diff options
Diffstat (limited to 'src/MuxElements.cpp')
-rw-r--r-- | src/MuxElements.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp index 773ec17..656e294 100644 --- a/src/MuxElements.cpp +++ b/src/MuxElements.cpp @@ -662,4 +662,41 @@ unsigned short DabSubchannel::getSizeDWord(void) const return (bitrate * 3) >> 3; } +LinkageSet::LinkageSet(string name, uint16_t lsn, bool hard, bool international) : + RemoteControllable(name), + lsn(lsn), + active(false), + hard(hard), + 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 >> 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 << active; + } + else { + ss << "Parameter '" << parameter << + "' is not exported by controllable " << get_rc_name(); + throw ParameterError(ss.str()); + } + return ss.str(); +} |