#pragma once

namespace inertia
{

/** InertiaCommandGroups */
enum InertiaCommandGroups : unsigned {
	CommandService = 1,
	CommandFlash = 2,
	CommandLogging = 3,
	CommandRemoteIO = 4,
	CommandIOConfig = 5,
	CommandScheduler = 6,
	CommandGCC = 7,
	CommandUnknown = 0xff
};


struct INERTIA_API InertiaCommand
{
protected:
	InertiaCommand();
	InertiaCommand(const uint8_t* packet, const unsigned max_size);
	InertiaCommand(std::wstring const& argString);
	virtual ~InertiaCommand();
	InertiaCommand(InertiaCommand const&) = default;
	InertiaCommand& operator = (InertiaCommand const&) = default;

public:
	virtual InertiaCommandGroups GetGroup() const = 0;
	virtual uint8_t GetType() const = 0;
	virtual bool IsResponse() const = 0;

	virtual void GetBytes(std::vector<uint8_t>& out) const = 0;
	virtual const std::wstring ToString() const = 0;
};


struct INERTIA_API BoolValue
{
protected:
	BoolValue(const uint8_t* packet, const unsigned max_size);
	BoolValue(std::wstring const& argString);

	void GetBytes(std::vector<uint8_t>& out) const;
	const std::wstring ToString() const;

#ifdef WITH_BOOST_PROGRAM_OPTIONS
	static const po::options_description GetOptionDescription();
#endif

public:
	bool result;
};

}
