aboutsummaryrefslogtreecommitdiffstats
path: root/lib/RemoteControl.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-07-19 20:26:36 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2023-07-19 20:26:36 +0200
commitd521d4f0c5ad3b663a322453c5798626081cb1f3 (patch)
tree1741d2a9d1ba69a351d034cc81815a73181a462a /lib/RemoteControl.h
parent8a547d0c0a84ea5a3464c7bc82a45f78aaae81c0 (diff)
downloaddabmod-d521d4f0c5ad3b663a322453c5798626081cb1f3.tar.gz
dabmod-d521d4f0c5ad3b663a322453c5798626081cb1f3.tar.bz2
dabmod-d521d4f0c5ad3b663a322453c5798626081cb1f3.zip
Change RC showjson command
Diffstat (limited to 'lib/RemoteControl.h')
-rw-r--r--lib/RemoteControl.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/RemoteControl.h b/lib/RemoteControl.h
index 4bc3b68..26f30d9 100644
--- a/lib/RemoteControl.h
+++ b/lib/RemoteControl.h
@@ -48,6 +48,7 @@
#include "Log.h"
#include "Socket.h"
+#include "Json.h"
#define RC_ADD_PARAMETER(p, desc) { \
std::vector<std::string> p; \
@@ -120,10 +121,7 @@ class RemoteControllable {
/* Getting a parameter always returns a string. */
virtual const std::string get_parameter(const std::string& parameter) const = 0;
- using value_t = std::variant<std::string, double, size_t, ssize_t, bool, std::nullopt_t>;
- using map_t = std::unordered_map<std::string, value_t>;
-
- virtual const map_t get_all_values() const = 0;
+ virtual const json::map_t get_all_values() const = 0;
protected:
std::string m_rc_name;
@@ -140,7 +138,7 @@ class RemoteControllers {
void check_faults();
std::list< std::vector<std::string> > get_param_list_values(const std::string& name);
std::string get_param(const std::string& name, const std::string& param);
- std::string get_params_json(const std::string& name);
+ std::string get_showjson();
void set_param(
const std::string& name,