summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-07 18:31:14 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-07 18:31:14 +0200
commitbbafa23de92eb542f4c8266d484aed9faf88d360 (patch)
tree75edfa08d5f8ac4d0e620422df1d87e631f77a33 /src
parente6f8d2c621727a7ee7dbafa6f9f06f6905e6cdb7 (diff)
parent39d6a781bbd9073aba30db15f57d8ce3c3e3ab92 (diff)
downloaddabmux-bbafa23de92eb542f4c8266d484aed9faf88d360.tar.gz
dabmux-bbafa23de92eb542f4c8266d484aed9faf88d360.tar.bz2
dabmux-bbafa23de92eb542f4c8266d484aed9faf88d360.zip
Merge next into servicelinking
Diffstat (limited to 'src')
-rw-r--r--src/RemoteControl.cpp15
-rw-r--r--src/RemoteControl.h8
2 files changed, 18 insertions, 5 deletions
diff --git a/src/RemoteControl.cpp b/src/RemoteControl.cpp
index ac9f087..31e63f2 100644
--- a/src/RemoteControl.cpp
+++ b/src/RemoteControl.cpp
@@ -57,7 +57,9 @@ std::list<std::string> RemoteControllable::get_supported_parameters() const {
return parameterlist;
}
-RemoteControllable* RemoteControllers::get_controllable_(const std::string& name) {
+RemoteControllable* RemoteControllers::get_controllable_(
+ const std::string& name)
+{
auto rc = std::find_if(controllables.begin(), controllables.end(),
[&](RemoteControllable* r) { return r->get_rc_name() == name; });
@@ -69,6 +71,17 @@ RemoteControllable* RemoteControllers::get_controllable_(const std::string& name
}
}
+void RemoteControllers::set_param(
+ const std::string& name,
+ const std::string& param,
+ const std::string& value)
+{
+ etiLog.level(info) << "RC: Setting " << name << " " << param
+ << " to " << value;
+ RemoteControllable* controllable = get_controllable_(name);
+ return controllable->set_parameter(param, value);
+}
+
// This runs in a separate thread, because
// it would take too long to be done in the main loop
// thread.
diff --git a/src/RemoteControl.h b/src/RemoteControl.h
index 5b735a8..fe8ac42 100644
--- a/src/RemoteControl.h
+++ b/src/RemoteControl.h
@@ -177,10 +177,10 @@ class RemoteControllers {
return controllable->get_parameter(param);
}
- void set_param(const std::string& name, const std::string& param, const std::string& value) {
- RemoteControllable* controllable = get_controllable_(name);
- return controllable->set_parameter(param, value);
- }
+ void set_param(
+ const std::string& name,
+ const std::string& param,
+ const std::string& value);
std::list<RemoteControllable*> controllables;