#include <MipTxMessage.h>
Inheritance diagram for MipTxMessage:
Public Member Functions | |
MipTxMessage (int src=0, int dest=0, eType type=sNone) | |
Constructor. | |
int | GetLength () const |
Returns the length. | |
unsigned char * | GetPacket () |
Returns the complete packet. | |
void | WriteCommand (unsigned char value) |
Writes a command (byte) to the data. | |
void | WriteByte (unsigned char value) |
Writes a byte to the data. | |
void | WriteUnsignedInteger16 (unsigned short int value) |
Writes an unsigned 16bit integer to the data. | |
void | WriteSignedInteger16 (short int value) |
Writes a signed 16bit integer to the data. | |
void | WriteUnsignedInteger32 (unsigned int value) |
Writes an unsigned 32bit integer to the data. | |
void | WriteSignedInteger32 (int value) |
Writes a signed 32bit integer to the data. | |
void | WriteFloat (float value) |
Writes a float to the data. | |
void | WriteBool (bool value) |
Writes a bool to the data. | |
void | WriteHeader () |
Writes the message header. | |
void | WriteLength () |
Writes the length (including the header checksum) to the message. | |
void | WriteCRC () |
Calculates the CRC and adds it to the message. |
This class prepares a message for transmission to a MIP. It writes the header with the correct length and header checksum and calculates the CRC of the message. Furthermore, it contains methods to pack the arguments (integers, floats, ...) into the message.