#pragma once

#include "data/config/SensorSpecificSettings.h"
#include "data/config/SamplerConfig.h"

namespace inertia
{

enum TOFConfigVersion : uint8_t
{
	TOF_V0 = 0,
	TOF_V1,
	TOF_V2,
	TOF_V3
};

enum TOFZones : uint8_t
{
	TOF_ZONE_4x4 = 0,
	TOF_ZONE_8x8 = 1
};


struct INERTIA_API TOFConfiguration
	: SpecificSensorSettings
	, SamplerConfig
{
	TOFConfigVersion tofVersion;
	uint8_t sensorCount;
	uint8_t interlacingFactor;
	TOFZones zones;

	TOFConfiguration();
	TOFConfiguration(uint8_t const* in, const unsigned offset, const unsigned _length);
	TOFConfiguration(std::wstring const& argString);

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

	void GetBytes(std::vector<uint8_t>& out, const size_t bitfieldOffset) const override;
	const std::pair<unsigned, Channel> GetChannel() const override;
	const std::wstring ToString() const override;
	const std::wstring ToSimpleString(uint16_t const globalRate) const;
	double GetRangeFactor() const override;
	unsigned GetResolution() const override;
	unsigned GetMaxRate() const override;
};

}
