//-------------------------------------------------------------------------------------------------
// <copyright file="LWForwardTimeoutInternalCmd.h" company="LiquidRobotics">
//  Copyright (c) Liquid Robotics Corporation, confidential and proprietary.  All rights reserved. 
// </copyright>
//
// <summary>
//	Declarations for LWForwardTimeoutInternalCmd, a delegate class that carries
//	a timeout event is queued up on the lua instance specific thread.  When it runs,
//	it forwards the timeout to the script on the SMCReportTimeout method.
// </summary>
//
// <owner>Mike Cookson</owner>
//-------------------------------------------------------------------------------------------------

#ifndef __LWForwardTimeoutInternalCmd_h__
#define __LWForwardTimeoutInternalCmd_h__

#include "LWConcreteCmd.h"

namespace LiquidRobotics {

namespace SMACFramework {
	class ByteArray;
}

namespace LuaWrapper {

class SHARED_LIB_PUBLIC LWForwardTimeoutInternalCmd : public LWConcreteCmd
{
public:

	typedef LiquidRobotics::SMACFramework::ByteArray ByteArray;
	typedef LWConcreteCmd::CmdBasePtr CmdPtr;

	LWForwardTimeoutInternalCmd(TCon& _ctrl, const string& _cmd, const string& _instanceName, const string& _timerName);
	virtual ~LWForwardTimeoutInternalCmd();

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

	// get the output of the command
	virtual string GetResult();

private:

	LWControllerBase0& ctrl;
	const string cmd;
	const string instanceName;
	const string timerName;
};

}
}

#endif
