aboutsummaryrefslogtreecommitdiffstats
path: root/src/MuxElements.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-28 20:08:56 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-28 20:08:56 +0100
commit6800fb66282525542366bc58df3095b93e3bf8ca (patch)
treec6e7607b5090ceff1e69a1f0fff206b1a7a9c07b /src/MuxElements.cpp
parent96b4dc4efca1b164f79a7f7394449866f034ac31 (diff)
downloaddabmux-6800fb66282525542366bc58df3095b93e3bf8ca.tar.gz
dabmux-6800fb66282525542366bc58df3095b93e3bf8ca.tar.bz2
dabmux-6800fb66282525542366bc58df3095b93e3bf8ca.zip
Remove service linking active from RC
This can be added later if the need arises, and when proper testing validates the implementation.
Diffstat (limited to 'src/MuxElements.cpp')
-rw-r--r--src/MuxElements.cpp57
1 files changed, 13 insertions, 44 deletions
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp
index 7f92652..9dbe5fc 100644
--- a/src/MuxElements.cpp
+++ b/src/MuxElements.cpp
@@ -662,53 +662,22 @@ unsigned short DabSubchannel::getSizeDWord() const
return (bitrate * 3) >> 3;
}
-LinkageSet::LinkageSet(string name, uint16_t lsn, bool hard, bool international) :
- RemoteControllable(name)
+LinkageSet::LinkageSet(const std::string& name,
+ uint16_t lsn,
+ bool hard,
+ bool international) :
+ lsn(lsn),
+ active(true),
+ hard(hard),
+ international(international)
+{}
+
+
+LinkageSet LinkageSet::filter_type(const ServiceLinkType type)
{
- data.lsn = lsn;
- data.active = false;
- data.hard = hard;
- data.international = international;
- RC_ADD_PARAMETER(active, "Activate this linkage set [0 or 1]");
-}
-
-void LinkageSet::set_parameter(const string& parameter, const string& value)
-{
- if (parameter == "active") {
- stringstream ss;
- ss << value;
- ss >> data.active;
- }
- else {
- stringstream ss;
- ss << "Parameter '" << parameter <<
- "' is not exported by controllable " << get_rc_name();
- throw ParameterError(ss.str());
- }
-}
-
-const string LinkageSet::get_parameter(const string& parameter) const
-{
- stringstream ss;
- if (parameter == "active") {
- ss << data.active;
- }
- else {
- ss << "Parameter '" << parameter <<
- "' is not exported by controllable " << get_rc_name();
- throw ParameterError(ss.str());
- }
- return ss.str();
-}
-
-LinkageSetData LinkageSetData::filter_type(ServiceLinkType type)
-{
- LinkageSetData lsd;
+ LinkageSet lsd(m_name, lsn, hard, international);
- lsd.lsn = lsn;
lsd.active = active;
- lsd.hard = hard;
- lsd.international = international;
lsd.keyservice = keyservice;
for (const auto& link : id_list) {