//-------------------------------------------------------------------------------------------------
// <copyright file="LogListenerProgramSettings.cpp" company="LiquidRobotics">
//  Copyright (c) Liquid Robotics Corporation, confidential and proprietary.  All rights reserved. 
// </copyright>
//
// <summary>
// 	Implementation of LogListenerProgramSettings class, a serializable entity that
//  holds the various settings for the LogListenerProgram class
// </summary>
//
// <owner>Arash Ushani</owner>
//-------------------------------------------------------------------------------------------------

#include "LogListenerProgramSettings.h"
#include "LqrSMACLoadSaveBoostXml.h"

using namespace std;
using namespace LiquidRobotics::EventLib;
using namespace LiquidRobotics::SMACFramework;

namespace LiquidRobotics {
namespace LogListener {

LogListenerProgramSettings::LogListenerProgramSettings()
//: controllerSettings
: serverName("LogListener")
, serverKind("")
, shutdownEvent("Shutdown", "EventBase", "LiquidR-SMC")
{
}

LogListenerProgramSettings::LogListenerProgramSettings(const LogListenerProgramSettings& rhs)
: serverName(rhs.serverName)
, serverKind(rhs.serverKind)
, shutdownEvent(rhs.shutdownEvent)
, eventTransceiverSettings(rhs.eventTransceiverSettings)
, payloadManagerClientSettings(rhs.payloadManagerClientSettings)
{
}

const string& LogListenerProgramSettings::GetServerName() const
{
	return serverName;
}

void LogListenerProgramSettings::SetServerName(const string& newValue)
{
	serverName = newValue;
}

const string& LogListenerProgramSettings::GetServerKind() const
{
	return serverKind;
}

void LogListenerProgramSettings::SetServerKind(const string& newValue)
{
	serverKind = newValue;
}


const LogListenerProgramSettings::StdOutLoggerSettings& LogListenerProgramSettings::GetLoggerSettings() const
{
	return loggerSettings;
}

void LogListenerProgramSettings::SetLoggerSettings(const StdOutLoggerSettings& newValue)
{
	loggerSettings = newValue;
}

/*

const FileSetSettings& LogListenerProgramSettings::GetFloatLogSettings() const
{
	return floatLogSettings;

}

void LogListenerProgramSettings::SetFloatLogSettings(const FileSetSettings& newValue)
{
	floatLogSettings = newValue;
}
*/


const LogListenerProgramSettings::EventSettings& LogListenerProgramSettings::GetShutdownEvent() const
{
	return shutdownEvent;
}

void LogListenerProgramSettings::SetShutdownEvent(const EventSettings& newValue)
{
	shutdownEvent = newValue;
}

const EventTransceiverSettings& LogListenerProgramSettings::GetEventTransceiverSettings() const
{
	return eventTransceiverSettings;
}

void LogListenerProgramSettings::SetEventTransceiverSettings(const EventTransceiverSettings& newValue)
{
	eventTransceiverSettings = newValue;
}

const PayloadManagerClientSettings& LogListenerProgramSettings::GetPayloadManagerClientSettings() const
{
	return payloadManagerClientSettings;
}

void LogListenerProgramSettings::SetPayloadManagerClientSettings(const PayloadManagerClientSettings& newValue)
{
	payloadManagerClientSettings = newValue;
}

void LogListenerProgramSettings::Load(const string& fileName)
{
	LoadBoostXml(fileName, *this);
}

void LogListenerProgramSettings::Save(const string& fileName) const
{
	SaveBoostXml(fileName, *this);
}

}
}
