* This class is inherited from the IRA::CSocket class. It takes charge of the management of the socket used to command the SRT ACU via the remote interface.
* if the remote side disconnects or a problem affects the comunication line, this class try to reconnect to the ACU until the communication is up again..
*/
classCCommandSocket:publicIRA::CSocket
{
public:
/**
* Constructor.
*/
CCommandSocket();
/**
* Destructor
*/
virtual~CCommandSocket();
/**
* This member function is used to enstablish and configure the communication channel to the ACU.
* This must be the first call before using any other function of this class.
* @param config pointer to the component configuration data structure
* Force the socket to connect to the ACU. If the operation fails an exception is thrown, if the operation could not succesfully complete immediately
* the command line state is set to <i>ACU::ACU_CNTDING</i>. It must be called by an external watchdog in order to keep the connection enstablished.
* This is not synchronized because this method acts on the socket only by accessing the mutex for the <i>CCommonData</i> class as the background thread of this socket @sa <i>onconnect()</i>
* This mutex is used to sync external calls to the public methods of the class. The requirements is that just one call at the time must be served if the methos requires to
* send a message to the ACU. the reason for that is that we need to wait to known the result of the previous command to the ACU that comes form the status socket.
*/
ACE_Recursive_Thread_Mutexm_syncMutex;
/**
* This member function is called to send a buffer to the ACU.
* @param Msg pointer to the byte buffer that contains the message for the ACU
* @param Len length of the buffer
* @param error It will contain the error description in case the operation fails.
* @return SUCCESS if the buffer was sent correctly, WOULDBLOCK if the send would block, FAIL in case of error, the parameter error is set accordingly.