summaryrefslogtreecommitdiffstats
path: root/src/dabInputZmq.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-21 22:02:21 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-21 22:02:21 +0100
commitb20b932571daff5621f12f760234e998d6e79fab (patch)
tree1ca7c1b70b091a77034f4aeec962ca8ac7ce4bcf /src/dabInputZmq.cpp
parent337eec371c8c86f35813d804f61176a7606bae20 (diff)
downloaddabmux-b20b932571daff5621f12f760234e998d6e79fab.tar.gz
dabmux-b20b932571daff5621f12f760234e998d6e79fab.tar.bz2
dabmux-b20b932571daff5621f12f760234e998d6e79fab.zip
add RemoteControl, make the ZMQ input inherit from it
Diffstat (limited to 'src/dabInputZmq.cpp')
-rw-r--r--src/dabInputZmq.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp
index 9b61033..4a2114a 100644
--- a/src/dabInputZmq.cpp
+++ b/src/dabInputZmq.cpp
@@ -235,5 +235,38 @@ int DabInputZmq::setBitrate(int bitrate)
return bitrate; // TODO do a nice check here
}
+/********* REMOTE CONTROL ***********/
+
+void DabInputZmq::set_parameter(string parameter, string value)
+{
+ stringstream ss(value);
+ ss.exceptions ( stringstream::failbit | stringstream::badbit );
+
+ if (parameter == "buffer") {
+ throw ParameterError("Parameter 'ntaps' is read-only");
+ }
+ else {
+ stringstream ss;
+ ss << "Parameter '" << parameter <<
+ "' is not exported by controllable " << get_rc_name();
+ throw ParameterError(ss.str());
+ }
+}
+
+string DabInputZmq::get_parameter(string parameter)
+{
+ stringstream ss;
+ if (parameter == "buffer") {
+ ss << INPUT_ZMQ_MAX_BUFFER_SIZE;
+ }
+ else {
+ ss << "Parameter '" << parameter <<
+ "' is not exported by controllable " << get_rc_name();
+ throw ParameterError(ss.str());
+ }
+ return ss.str();
+
+}
+
#endif