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/diagnostic_message.hpp | |
parent | 00655ea12cc870b84291e462ff791461cc500d68 (diff) |
initial commit.
Change-Id: I5e639061c99b7cc6da3da06ccf19bde683a69e9f
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'src/openxc/diagnostic_message.hpp')
-rwxr-xr-x | src/openxc/diagnostic_message.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/openxc/diagnostic_message.hpp b/src/openxc/diagnostic_message.hpp new file mode 100755 index 00000000..33b41e61 --- /dev/null +++ b/src/openxc/diagnostic_message.hpp @@ -0,0 +1,35 @@ +#pragma once
+
+#include <string>
+#include <json.hpp>
+
+namespace openxc
+{
+ class diagnostic_message
+ {
+ private:
+ std::string bus_;
+ std::uint32_t id_;
+ std::uint32_t mode_;
+ std::uint32_t frequency_;
+ std::uint32_t pid_;
+ std::string name_;
+ std::string decoder_;
+ std::string callback_;
+ public:
+ std::string bus() const;
+ std::uint32_t id() const;
+ std::uint32_t mode() const;
+ std::uint32_t frequency() const;
+ std::uint32_t pid() const;
+ std::string name() const;
+ std::string decoder() const;
+ std::string callback() const;
+
+ void from_json(const nlohmann::json& j);
+ nlohmann::json to_json() const;
+ };
+
+ void to_json(nlohmann::json& j, const diagnostic_message& p);
+ void from_json(const nlohmann::json& j, diagnostic_message& p);
+}
|