#pragma once

#include "data/config/SamplingConfig.h"

namespace inertia
{

/** IMAConfigVersion */
enum IMAConfigVersion {
	IMA_V0 = 0,
	IMA_V1,
	IMA_V2,
	IMA_V3
};

struct INERTIA_API IMAConfig
	: SamplingConfig
{
	bool adoptInterval;
	bool adoptValuesPerMessage;
	IMAConfigVersion imaVersion;
	uint16_t interval;
	uint8_t valuesPerMessage;
	uint8_t samplingChannel;
	uint8_t subscribedChannel;

	IMAConfig();
	IMAConfig(uint8_t const* in);
	IMAConfig(std::wstring const& argString);

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

	ConfigType GetConfigType() const override;
	static unsigned GetLength();
	void GetBytes(std::vector<uint8_t>& out) const override;
	const std::wstring ToString() const override;
	const std::wstring ToSimpleString(uint16_t const globalRate) const;
	const std::pair<unsigned, Channel> GetChannel() const;
};

}
