#include <CommandMessage.h>
Public Member Functions | |
CommandMessage (const CommandId &cmdId) | |
CommandMessage (const uint16_t cmdId) | |
void | addParamInt8 (int8_t param) |
void | addParamUInt8 (uint8_t param) |
void | addParamInt16 (int16_t param) |
void | addParamUInt16 (uint16_t param) |
void | addParamInt32 (int32_t param) |
void | addParamUInt32 (uint32_t param) |
void | addParamInt64 (int64_t param) |
void | addParamUInt64 (uint64_t param) |
uint16_t | getId () const |
int | getLength () const |
uint8_t * | getBytes () const |
Static Public Attributes | |
static const int | HEADER_LEN |
static const int | FOOTER_LEN |
static const int | MSG_LEN_IDX |
static const int | CHECKSUM_RIDX |
Definition at line 29 of file CommandMessage.h.
AnnotatorComm::CommandMessage::CommandMessage | ( | const CommandId & | cmdId | ) |
AnnotatorComm::CommandMessage::CommandMessage | ( | const uint16_t | cmdId | ) |
void AnnotatorComm::CommandMessage::addParamInt16 | ( | int16_t | param | ) |
Append a parameter as a signed 16-bit integer.
param | parameter |
void AnnotatorComm::CommandMessage::addParamInt32 | ( | int32_t | param | ) |
Append a parameter as a signed 32-bit integer.
param | parameter |
void AnnotatorComm::CommandMessage::addParamInt64 | ( | int64_t | param | ) |
Append a parameter as a signed 64-bit integer.
param | parameter |
void AnnotatorComm::CommandMessage::addParamInt8 | ( | int8_t | param | ) |
Append a parameter as a signed 8-bit integer.
param | parameter |
void AnnotatorComm::CommandMessage::addParamUInt16 | ( | uint16_t | param | ) |
Append a parameter as an unsigned 16-bit integer.
param | parameter |
void AnnotatorComm::CommandMessage::addParamUInt32 | ( | uint32_t | param | ) |
Append a parameter as an unsigned 32-bit integer.
param | parameter |
void AnnotatorComm::CommandMessage::addParamUInt64 | ( | uint64_t | param | ) |
Append a parameter as an unsigned 64-bit integer.
param | parameter |
void AnnotatorComm::CommandMessage::addParamUInt8 | ( | uint8_t | param | ) |
Append a parameter as an unsigned 8-bit integer.
param | parameter |
uint8_t* AnnotatorComm::CommandMessage::getBytes | ( | ) | const |
Get the byte string version of the command. Allocate and convert the command message to a series of bytes.
uint16_t AnnotatorComm::CommandMessage::getId | ( | ) | const |
Get the Command ID.
int AnnotatorComm::CommandMessage::getLength | ( | ) | const |
Get the command length.
const int AnnotatorComm::CommandMessage::CHECKSUM_RIDX [static] |
Checksum reverse index
Definition at line 50 of file CommandMessage.h.
const int AnnotatorComm::CommandMessage::FOOTER_LEN [static] |
Length of the footer in bytes
Definition at line 40 of file CommandMessage.h.
const int AnnotatorComm::CommandMessage::HEADER_LEN [static] |
Length of the header in bytes
Definition at line 35 of file CommandMessage.h.
const int AnnotatorComm::CommandMessage::MSG_LEN_IDX [static] |
Message length index
Definition at line 45 of file CommandMessage.h.