aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-config-generator/src/openxc/command.hpp
blob: 2c052266ae7185ba436b61bd6c3e8fa9dd5d7649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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);
}