#pragma once

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

namespace inertia
{

struct INERTIA_API SingleAxisConfig
	: AxisConfig
	, SamplerConfig
{
	bool adoptOffset;
	bool adoptScale;
	bool wakeupFromLowPower;
	int32_t offset1;
	float scale1;
	uint16_t sensitivity;
	SpecificSensorSettingsPtr specificSettings;

	SingleAxisConfig(uint8_t sensorID, uint8_t const headerRevision = 1, uint8_t const sensorRevision = 0);
	SingleAxisConfig(uint8_t const* in, const unsigned _length);
	SingleAxisConfig(std::wstring const& argString);

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

	void GetBytes(std::vector<uint8_t>& out) 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 override;
	double GetRangeFactor() const override;
	unsigned GetResolution() const override;
	unsigned GetMaxRate() const override;
	unsigned GetInstanceMask() const override;
};

}
