summaryrefslogtreecommitdiffstats
path: root/src/dabInputZmq.cpp
diff options
context:
space:
mode:
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