#include <MipCommand.h>
Public Types | |
enum | eStatus { sNone, sQueued, sNotSent, sSent, sAckReceived, sReceived, sErronous, sCancelled } |
Status flags. | |
Public Member Functions | |
MipCommand (int cmdid, MipTxMessage *txmsg) | |
Constructor. | |
~MipCommand () | |
Destructor. | |
int | GetID () const |
Returns the command ID. | |
MipRxMessage * | GetRxMessage () const |
Returns the message to send. | |
MipTxMessage * | GetTxMessage () const |
Returns the received message. | |
MipDevice * | GetMipDevice () const |
Returns the MipBus. | |
eStatus | GetStatus () const |
Returns the status of the command. | |
unsigned char | GetAck () const |
Returns the status of the command. | |
void | SetCommandID (int id) |
Sets the command ID. | |
void | SetRxMessage (MipRxMessage *msg) |
Sets the message to send. | |
void | SetTxMessage (MipTxMessage *msg) |
Sets the received message. | |
void | SetMipDevice (MipDevice *mipdevice) |
Sets the MipBus. | |
void | SetStatus (eStatus status) |
Sets the status of the command. | |
void | SetAck (unsigned char ack) |
Sets the ack of the command. |
The MipCommand class is the abstraction used when sending a command to a MIP device. It mainly consists of a MipTxMessage (the message transmitted to the MIP) and a MipRxMessage (the reply received from the MIP). Furthermore, it contains a comman ID which not transmitted to the MIP.
A MIP command may be in various states (eStatus). The most important states are: