From 35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 14 Feb 2014 15:51:02 +0100 Subject: correct RC mistakes --- src/MuxElements.h | 4 ++-- src/ParserConfigfile.cpp | 2 ++ src/RemoteControl.cpp | 15 ++++++++++++--- src/dabInputZmq.h | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/MuxElements.h b/src/MuxElements.h index 41037b5..711f3cf 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -168,7 +168,7 @@ class DabComponent : public RemoteControllable { public: DabComponent(std::string uid) : - RemoteControllable("Component " + uid) + RemoteControllable(uid) { RC_ADD_PARAMETER(label, "Label and shortlabel [label,short]"); } @@ -205,7 +205,7 @@ class DabService : public RemoteControllable { public: DabService(std::string uid) : - RemoteControllable("Service " + uid) + RemoteControllable(uid) { RC_ADD_PARAMETER(label, "Label and shortlabel [label,short]"); } diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp index d5dba9e..9f62bdd 100644 --- a/src/ParserConfigfile.cpp +++ b/src/ParserConfigfile.cpp @@ -380,6 +380,8 @@ void parse_configfile(string configuration_file, DabComponent* component = new DabComponent(componentuid); + component->enrol_at(*rc); + component->serviceId = service->id; component->subchId = subchannel->id; component->SCIdS = SCIdS_per_service[service]++; diff --git a/src/RemoteControl.cpp b/src/RemoteControl.cpp index 3c1c24a..a075497 100644 --- a/src/RemoteControl.cpp +++ b/src/RemoteControl.cpp @@ -179,9 +179,18 @@ RemoteControllerTelnet::dispatch_command(tcp::socket& socket, string command) } } else if (cmd[0] == "set") { - if (cmd.size() == 4) { + if (cmd.size() >= 4) { try { - set_param_(cmd[1], cmd[2], cmd[3]); + stringstream new_param_value; + for (int i = 3; i < cmd.size(); i++) { + new_param_value << cmd[i]; + + if (i+1 < cmd.size()) { + new_param_value << " "; + } + } + + set_param_(cmd[1], cmd[2], new_param_value.str()); reply(socket, "ok"); } catch (ParameterError &e) { @@ -193,7 +202,7 @@ RemoteControllerTelnet::dispatch_command(tcp::socket& socket, string command) } else { - reply(socket, "Incorrect parameters for command 'get'"); + reply(socket, "Incorrect parameters for command 'set'"); } } else if (cmd[0] == "quit") { diff --git a/src/dabInputZmq.h b/src/dabInputZmq.h index e3d6153..cd8df6f 100644 --- a/src/dabInputZmq.h +++ b/src/dabInputZmq.h @@ -98,7 +98,7 @@ class DabInputZmqBase : public DabInputBase, public RemoteControllable { class DabInputZmqMPEG : public DabInputZmqBase { public: DabInputZmqMPEG(const std::string name) - : DabInputZmqBase("MPEG " + name) { + : DabInputZmqBase(name) { RC_ADD_PARAMETER(buffer, "Size of the input buffer [mpeg frames]"); } @@ -110,7 +110,7 @@ class DabInputZmqMPEG : public DabInputZmqBase { class DabInputZmqAAC : public DabInputZmqBase { public: DabInputZmqAAC(const std::string name) - : DabInputZmqBase("AAC+ " + name) { + : DabInputZmqBase(name) { RC_ADD_PARAMETER(buffer, "Size of the input buffer [aac superframes]"); } -- cgit v1.2.3