#pragma once

#include "data/config/SensorSpecificSettings.h"

namespace inertia
{

enum SchedulerWakeupRecurrence : uint8_t {
	SCHEDULER_INTERVAL_SECONDS = 0,
	SCHEDULER_INTERVAL_MINUTES,
	SCHEDULER_INTERVAL_HOURS,
	SCHEDULER_INTERVAL_DAYS
};

struct INERTIA_API SchedulerSettings
	: SpecificSensorSettings
{
	bool enableScheduler;
	SchedulerWakeupRecurrence wakeupIntervalRecurrence;
	uint8_t statusWakeupInterval;
	uint8_t statusWakeupDuration;
	uint8_t reserved;

	SchedulerSettings();
	SchedulerSettings(uint8_t const* in, const unsigned offset, const unsigned _length);
	SchedulerSettings(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::wstring ToString() const override;
	const std::wstring ToSimpleString() const;
};

}
