diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2017-03-15 02:36:22 +0100 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2017-03-15 02:36:22 +0100 |
commit | f2487f0b481fae4aa1561e82e8e4aa5b8d0654a0 (patch) | |
tree | 7bfc1b140af1e922fc14ba3a02c042b69f24c128 /src/openxc/mapping.hpp | |
parent | 00655ea12cc870b84291e462ff791461cc500d68 (diff) |
initial commit.
Change-Id: I5e639061c99b7cc6da3da06ccf19bde683a69e9f
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'src/openxc/mapping.hpp')
-rwxr-xr-x | src/openxc/mapping.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/openxc/mapping.hpp b/src/openxc/mapping.hpp new file mode 100755 index 00000000..30895cba --- /dev/null +++ b/src/openxc/mapping.hpp @@ -0,0 +1,29 @@ +#pragma once
+
+#include <string>
+#include <json.hpp>
+
+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);
+}
|