#pragma once

#include "data/config/AbstractConfig.h"

namespace inertia
{

struct INERTIA_API SamplerConfig
{
public:
	uint8_t instanceMask;
	uint8_t samplingChannel;
	uint8_t wordSize;

	bool enableSampling;
	bool enableTransmit;
	bool enableLogging;
	bool adoptMod;
	uint32_t mod;

	virtual const std::pair<unsigned, Channel> GetChannel() const;

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

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

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

	virtual double GetRangeFactor() const = 0;
	virtual unsigned GetResolution() const = 0;
	virtual unsigned GetMaxRate() const = 0;
};

}
