summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-02-14 15:51:02 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-02-14 16:11:43 +0100
commit35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2 (patch)
treebd6f93056b4d28f14b0413fb3b94362e12f322c5 /src
parentd6923be4bd2e198b4cba161e8040072128bd392c (diff)
downloaddabmux-35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2.tar.gz
dabmux-35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2.tar.bz2
dabmux-35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2.zip
correct RC mistakes
Diffstat (limited to 'src')
-rw-r--r--src/MuxElements.h4
-rw-r--r--src/ParserConfigfile.cpp2
-rw-r--r--src/RemoteControl.cpp15
-rw-r--r--src/dabInputZmq.h4
4 files changed, 18 insertions, 7 deletions
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]");
}