diff options
Diffstat (limited to 'CAN-config-generator/src/openxc/command.hpp')
-rwxr-xr-x | CAN-config-generator/src/openxc/command.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/CAN-config-generator/src/openxc/command.hpp b/CAN-config-generator/src/openxc/command.hpp new file mode 100755 index 0000000..2c05226 --- /dev/null +++ b/CAN-config-generator/src/openxc/command.hpp @@ -0,0 +1,25 @@ +#pragma once
+
+#include <string>
+#include <json.hpp>
+
+namespace openxc
+{
+ class command
+ {
+ private:
+ std::string name_;
+ bool enabled_;
+ std::string handler_;
+ public:
+ std::string name() const;
+ bool enabled() const;
+ std::string handler() const;
+
+ void from_json(const nlohmann::json& j);
+ nlohmann::json to_json() const;
+ };
+
+ void to_json(nlohmann::json& j, const command& p);
+ void from_json(const nlohmann::json& j, command& p);
+}
|