diff options
-rw-r--r-- | src/RemoteControl.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/RemoteControl.cpp b/src/RemoteControl.cpp index 72fbb54..3940ecd 100644 --- a/src/RemoteControl.cpp +++ b/src/RemoteControl.cpp @@ -451,7 +451,23 @@ void RemoteControllerZmq::process() size_t cohort_size = rcs.controllables.size(); for (auto &controllable : rcs.controllables) { std::stringstream ss; - ss << controllable->get_rc_name(); + ss << "{ \"name\": \"" << controllable->get_rc_name() << "\"," << + " \"params\": { "; + + list< vector<string> > params = controllable->get_parameter_descriptions(); + size_t i = 0; + for (auto ¶m : params) { + if (i > 0) { + ss << ", "; + } + + ss << "\"" << param[0] << "\": " << + "\"" << param[1] << "\""; + + i++; + } + + ss << " } }"; std::string msg_s = ss.str(); |