annotatorcomm::CommandMessage Class Reference

#include <CommandMessage.h>

List of all members.

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


Detailed Description

CommandMessage encapsulates the bytes of a command message and provides helpful methods for manipulating them.

Definition at line 29 of file CommandMessage.h.


Constructor & Destructor Documentation

annotatorcomm::CommandMessage::CommandMessage ( const CommandId cmdId  ) 

Construct a CommandMessage.

Parameters:
cmdId Command ID

annotatorcomm::CommandMessage::CommandMessage ( const uint16_t  cmdId  ) 

Construct a CommandMessage.

Parameters:
cmdId Command ID


Member Function Documentation

void annotatorcomm::CommandMessage::addParamInt16 ( int16_t  param  ) 

Append a parameter as a signed 16-bit integer.

Parameters:
param parameter

void annotatorcomm::CommandMessage::addParamInt32 ( int32_t  param  ) 

Append a parameter as a signed 32-bit integer.

Parameters:
param parameter

void annotatorcomm::CommandMessage::addParamInt64 ( int64_t  param  ) 

Append a parameter as a signed 64-bit integer.

Parameters:
param parameter

void annotatorcomm::CommandMessage::addParamInt8 ( int8_t  param  ) 

Append a parameter as a signed 8-bit integer.

Parameters:
param parameter

void annotatorcomm::CommandMessage::addParamUInt16 ( uint16_t  param  ) 

Append a parameter as an unsigned 16-bit integer.

Parameters:
param parameter

void annotatorcomm::CommandMessage::addParamUInt32 ( uint32_t  param  ) 

Append a parameter as an unsigned 32-bit integer.

Parameters:
param parameter

void annotatorcomm::CommandMessage::addParamUInt64 ( uint64_t  param  ) 

Append a parameter as an unsigned 64-bit integer.

Parameters:
param parameter

void annotatorcomm::CommandMessage::addParamUInt8 ( uint8_t  param  ) 

Append a parameter as an unsigned 8-bit integer.

Parameters:
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.

Returns:
allocated command byte string

uint16_t annotatorcomm::CommandMessage::getId (  )  const

Get the Command ID.

Returns:
Command ID

int annotatorcomm::CommandMessage::getLength (  )  const

Get the command length.

Returns:
command length


Member Data Documentation

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.


The documentation for this class was generated from the following file:
Generated on Tue Aug 1 11:14:11 2006 for libAnnotatorComm by  doxygen 1.4.7