//-------------------------------------------------------------------------------------------------
// <copyright file="OneTimeCommandSettings.h" company="LiquidRobotics">
//  Copyright (c) Liquid Robotics Corporation, confidential and proprietary.  All rights reserved. 
// </copyright>
//
// <summary>
// </summary>
//
// <owner></owner>
//-------------------------------------------------------------------------------------------------

#ifndef __ONETIMECOMMANDSETTINGS_H__
#define __ONETIMECOMMANDSETTINGS_H__

#include "LqrSMACByteArray.h"
#include "LqrSMACSerialPortSettings.h"
#include "PayloadMessage.h"
#include <stdint.h>

namespace LiquidRobotics {
namespace OneTimeCommand {

class OneTimeCommandSettings
{
public:

	typedef LiquidRobotics::SMACFramework::ByteArray ByteArray;
	typedef LiquidRobotics::PayloadInterface::PayloadMessage PayloadMessage;
	typedef LiquidRobotics::SMACFramework::SerialPortSettings SerialPortSettings;
	typedef std::string string;

	OneTimeCommandSettings(PayloadMessage::BoardAddress _address, const ByteArray& _message, PayloadMessage::BoardAddress _destination, const string& _portName);
	virtual ~OneTimeCommandSettings();

	PayloadMessage::BoardID GetBoardID() const;
	PayloadMessage::BoardAddress GetBoardAddress() const;
	const string& GetDateVerb() const;
	string GetDateVerbGMT(int year, int month, int day, int hour, int minute, int second) const;
	const string& GetDescription() const;
	PayloadMessage::BoardAddress GetDestination() const;
	uint16_t GetDeviceType() const;
	bool GetEchoedAcksRequested() const;
	bool GetEventsRequested() const;
	uint8_t GetFirmwareMajor() const;
	uint8_t GetFirmwareMinor() const;
	uint16_t GetFirmwareRev() const;
	const ByteArray& GetMessage() const;
	uint32_t GetPollingRate() const;
	const SerialPortSettings& GetPortSettings() const;
	bool GetPowerNotificationRequested() const;
	const uint8_t GetPowerOffDelay() const;
	const uint8_t GetPowerOnDelay() const;
	const string& GetSerialNum() const;
	const string& GetServerName() const;
	const string& GetShutdownVerb() const;
	PayloadMessage::BoardID GetTaskID() const;
	bool GetTelemetryRequested() const;

private:

	static string GetSetting(const string& settingName);
	PayloadMessage::BoardAddress boardAddress;
	string dateVerb;
	string description;
	uint16_t deviceType;
	bool echoedAcksRequested;
	bool eventsRequested;
	uint8_t firmwareMajor;
	uint8_t firmwareMinor;
	uint16_t firmwareRev;
	uint32_t pollingRate;
	bool powerNotificationRequested;
	uint8_t powerOffDelay;
	uint8_t powerOnDelay;
	string serialNum;
	string serverName;
	string shutdownVerb;
	SerialPortSettings portSettings;
	bool telemetryRequested;
	PayloadMessage::BoardAddress destination;
	ByteArray message;
};

}
}

#endif
