DUNE: Uniform Navigational Environment  2.5.1
Sensors::Edgetech2205::Packet Class Reference

Public Types

enum  HeaderIndices {
  HDR_IDX_MARKER, HDR_IDX_VERSION, HDR_IDX_SESSION, HDR_IDX_MSG_TYPE,
  HDR_IDX_CMD_TYPE, HDR_IDX_SUBSYS, HDR_IDX_CHANNEL, HDR_IDX_SEQUENCE,
  HDR_IDX_MSG_SIZE
}
 

Public Member Functions

 Packet (void)
 
void setMessageType (uint16_t type)
 
uint16_t getMessageType (void) const
 
void setMessageSize (uint32_t size)
 
uint32_t getMessageSize (void) const
 
uint8_t * getMessageData (void)
 
const uint8_t * getMessageData (void) const
 
void setCommandType (uint8_t type)
 
uint8_t getCommandType (void) const
 
void setChannel (uint8_t channel)
 
uint8_t getChannel (void) const
 
void setSubsystemNumber (uint8_t subsys)
 
uint8_t getSubsystemNumber (void) const
 
void setValue (uint32_t value)
 
uint32_t getValue (void) const
 
void setDataByte (unsigned index, uint8_t byte)
 
void setHeaderByte (unsigned index, uint8_t byte)
 
unsigned getSize (void) const
 
uint8_t * getData (void)
 
const uint8_t * getData (void) const
 
template<typename T >
void set (const T &value, unsigned index)
 
template<typename T >
void get (T &value, unsigned index)
 
unsigned getMaximumMessageSize (void) const
 
void dump (void) const
 

Member Enumeration Documentation

Enumerator
HDR_IDX_MARKER 
HDR_IDX_VERSION 
HDR_IDX_SESSION 
HDR_IDX_MSG_TYPE 
HDR_IDX_CMD_TYPE 
HDR_IDX_SUBSYS 
HDR_IDX_CHANNEL 
HDR_IDX_SEQUENCE 
HDR_IDX_MSG_SIZE 

Constructor & Destructor Documentation

Sensors::Edgetech2205::Packet::Packet ( void  )
inline

References HDR_IDX_MARKER, and HDR_IDX_VERSION.

Member Function Documentation

void Sensors::Edgetech2205::Packet::dump ( void  ) const
inline

References getSize().

template<typename T >
void Sensors::Edgetech2205::Packet::get ( T &  value,
unsigned  index 
)
inline
uint8_t Sensors::Edgetech2205::Packet::getChannel ( void  ) const
inline

Retrieve channel.

Returns
channel.

References HDR_IDX_CHANNEL.

uint8_t Sensors::Edgetech2205::Packet::getCommandType ( void  ) const
inline

Retrieve command type.

Returns
command type.

References HDR_IDX_CMD_TYPE.

uint8_t* Sensors::Edgetech2205::Packet::getData ( void  )
inline
const uint8_t* Sensors::Edgetech2205::Packet::getData ( void  ) const
inline
unsigned Sensors::Edgetech2205::Packet::getMaximumMessageSize ( void  ) const
inline
uint8_t* Sensors::Edgetech2205::Packet::getMessageData ( void  )
inline

Retrieve message data.

Returns
message data.

References getData().

Referenced by get(), Sensors::Edgetech2205::CommandLink::getTimeDifference(), and set().

const uint8_t* Sensors::Edgetech2205::Packet::getMessageData ( void  ) const
inline

Retrieve message data.

Returns
message data.

References getData().

uint32_t Sensors::Edgetech2205::Packet::getMessageSize ( void  ) const
inline

Retrieve message size.

Returns
message size.

References getData(), and HDR_IDX_MSG_SIZE.

Referenced by getSize(), and Sensors::Edgetech2205::Parser::parse().

uint16_t Sensors::Edgetech2205::Packet::getMessageType ( void  ) const
inline

Retrieve message type.

Returns
message type.

References getData(), and HDR_IDX_MSG_TYPE.

Referenced by Sensors::Edgetech2205::Task::handle().

unsigned Sensors::Edgetech2205::Packet::getSize ( void  ) const
inline

Retrieve the size of the packet.

Returns
packet size.

References getMessageSize().

Referenced by dump(), and Sensors::Edgetech2205::Task::writeToLog().

uint8_t Sensors::Edgetech2205::Packet::getSubsystemNumber ( void  ) const
inline

Retrieve subsystem number.

Returns
subsystem number.

References HDR_IDX_SUBSYS.

uint32_t Sensors::Edgetech2205::Packet::getValue ( void  ) const
inline
template<typename T >
void Sensors::Edgetech2205::Packet::set ( const T &  value,
unsigned  index 
)
inline
void Sensors::Edgetech2205::Packet::setDataByte ( unsigned  index,
uint8_t  byte 
)
inline
void Sensors::Edgetech2205::Packet::setHeaderByte ( unsigned  index,
uint8_t  byte 
)
inline
void Sensors::Edgetech2205::Packet::setMessageSize ( uint32_t  size)
inline
Collaboration diagram for Sensors::Edgetech2205::Packet:
Collaboration graph