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/mapping.hpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 src/openxc/mapping.hpp (limited to 'src/openxc/mapping.hpp') diff --git a/src/openxc/mapping.hpp b/src/openxc/mapping.hpp new file mode 100755 index 0000000..30895cb --- /dev/null +++ b/src/openxc/mapping.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include +#include + +namespace openxc +{ + class mapping + { + private: + std::string mapping_name_; + std::string bus_; + std::string database_; + bool bit_numbering_inverted_; + bool enabled_; + public: + std::string mapping_name() const; + std::string bus() const; + std::string database() const; + bool bit_numbering_inverted() const; + bool enabled() const; + + void from_json(const nlohmann::json& j); + nlohmann::json to_json() const; + }; + + void to_json(nlohmann::json& j, const mapping& p); + void from_json(const nlohmann::json& j, mapping& p); +} -- cgit 1.2.3-korg