#include <MipRxMessage.h>
Inheritance diagram for MipRxMessage:
Public Member Functions | |
MipRxMessage () | |
Constructor. | |
int | GetLength () const |
Returns the length. | |
bool | IsErronous () const |
Returns whether the packet is erronous or not. (Erronous means that either the length checksum or the packet checksum are wrong.) An erronous packet is always marked as complete. | |
bool | IsComplete () const |
Returns whether the packet is complete or not. (Not complete means that not all of it has been received yet.). | |
void | AddReceivedData (unsigned char *data, int len) |
Adds received data. | |
unsigned char | ReadCommand () |
Reads a command (byte) from the data. | |
unsigned char | ReadByte () |
Reads a byte from the data. | |
unsigned short int | ReadUnsignedInteger16 () |
Reads an unsigned 16bit integer from the data. | |
short int | ReadSignedInteger16 () |
Reads a signed 16bit integer from the data. | |
unsigned int | ReadUnsignedInteger32 () |
Reads an unsigned 32bit integer from the data. | |
int | ReadSignedInteger32 () |
Reads a signed 32bit integer from the data. | |
float | ReadFloat () |
Reads a float from the data. | |
bool | ReadBool () |
Reads a bool from the data. | |
bool | ReadHeader () |
Reads the header and checks the header checksum in the length field. Returns true if the checksum is correct. | |
bool | ReadLength () |
Reads the length and checks the header checksum in the length field. Returns true if the checksum is correct. | |
bool | CheckCRC () |
Checks the packet checksum. |
This class handles a received message. It contains methods to check the CRC and the header checksum, as well as methods to read the information of the message, i.e. methods that transform the received bits into integers, floats and other data types.