From 014ba2dd29eaadb4d61948ca417c25112f76ee0e Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 13 Jun 2017 17:20:05 +0200 Subject: Import CAN generator from low-level-can-service Also use the app-templates CMake helpers. Change-Id: I034e5efa9baa0f686a081f60df5c3588e4b3bd51 Signed-off-by: Romain Forlot --- src/openxc/command.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 src/openxc/command.hpp (limited to 'src/openxc/command.hpp') diff --git a/src/openxc/command.hpp b/src/openxc/command.hpp new file mode 100755 index 0000000..2c05226 --- /dev/null +++ b/src/openxc/command.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include +#include + +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); +} -- cgit 1.2.3-korg