#include <MessageHelper.h>
Public Member Functions | |
MessageHelper () | |
virtual | ~MessageHelper () |
void | SetBuffer (void *const buffer) |
void | AddVariable (const void *variable, const int size) |
void | AddData (const void *data, const int size) |
void | GetVariable (void *const variable, const int size) |
void | GetData (void *const data, const int size) |
int | GetSize (void) |
void | SetSize (const int size) |
void | AddInteger (const int value) |
void | AddFloat (const float value) |
int | GetInteger (void) |
float | GetFloat (void) |
Static Public Member Functions | |
static std::string | DumpAsHex (const void *data, const int size) |
|
The ctor performs some basic initialisation |
|
The dtor makes sure everything is tidy |
|
Adds a data block of a specified size to the message buffer without using any endian checking
|
|
Adds a float to the message buffer
|
|
Adds an integer to the message buffer
|
|
Adds a variable of a specified size to the message buffer while using an endian check to preserve the value between platforms with different endian formats
|
|
This produces a hex dump of any length of data |
|
Gets data of a specified size from the message buffer
|
|
Gets a float from the message buffer
|
|
Gets an integer from the message buffer
|
|
Returns the current size of the message in bytes
|
|
Gets a variable of a specified size from the message buffer
|
|
Sets the data buffer pointer to use while constructing or deconstructing this message. This also causes the length of the buffer to revert to zero.
|
|
Sets the current size of the message in bytes
|