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

#ifndef __SETestCommand_H__
#define __SETestCommand_H__

#include "LqrSMACSemaphore.h"
#include "SEClassConfig.h"
#include "boost/shared_ptr.hpp"

namespace LiquidRobotics {

namespace SMACFramework {
	class CmdLineParser;
	class Logger;
}

namespace SensorExample {

class SHARED_LIB_PUBLIC SETestCommand : public SEConcreteCmd
{
public:

	typedef SEConcreteCmd Base;
	typedef SEControllerBase0 TCon;
	typedef SEControllerCommandPtr CmdPtr;
	typedef LiquidRobotics::SMACFramework::CmdLineParser CmdLineParser;
	typedef LiquidRobotics::SMACFramework::Logger Logger;
	typedef TCon::ParsingContext ParsingContext;
	typedef std::vector<string> StringArray;

	SETestCommand(TCon& ctrl, const StringArray& _args, Logger& _logger);
	virtual ~SETestCommand();

	// this method is called by the background thread to execute the command
	virtual void Execute();

	// parse the command
	static CmdPtr Parse(const string& arg1, const string& arg2, TCon& ctrl, const CmdLineParser& parser, ParsingContext& context, Logger& logger);

private:

	typedef LiquidRobotics::SMACFramework::Semaphore Semaphore;

	TCon& ctrl;
	Logger& logger;
	Semaphore sem;
	StringArray args;
};

}
}

#endif
