DUNE: Uniform Navigational Environment  2017.01.0
DUNE::Utils::Codecs::CodedReference Struct Reference

Detailed Description

This struct has methods to encode/decode several Reference IMC messages into single UamTxFrame/UamRxFrame IMC messages.

Static Public Member Functions

static void encodeById (const IMC::Reference *msg, IMC::UamTxFrame *frame, uint8_t id)
 
static IMC::MessagedecodeById (const IMC::UamRxFrame *frame, uint8_t id)
 
static size_t getPayloadSize (uint8_t num)
 

Static Public Attributes

static const uint8_t c_id
 

Member Function Documentation

static IMC::Message* DUNE::Utils::Codecs::CodedReference::decodeById ( const IMC::UamRxFrame frame,
uint8_t  id 
)
inlinestatic

Decode an UamRxFrame by System ID to retrieve a Reference message.

Parameters
[in]frameUamRxFrame pointer.
[in]idSystem ID.
Returns
IMC message.

References DUNE::IMC::UamRxFrame::data.

static void DUNE::Utils::Codecs::CodedReference::encodeById ( const IMC::Reference msg,
IMC::UamTxFrame frame,
uint8_t  id 
)
inlinestatic

Encode a Reference message to a UamTxFrame by System ID.

Parameters
[in]msgReference pointer.
[out]frameUamTxFrame pointer.
[in]idSystem ID.
Returns
true if message successfully decoded, false otherwise.

References DUNE::IMC::UamTxFrame::data.

static size_t DUNE::Utils::Codecs::CodedReference::getPayloadSize ( uint8_t  num)
inlinestatic

Get payload size by number of Reference messages.

Returns
size of payload.

Member Data Documentation

const uint8_t DUNE::Utils::Codecs::CodedReference::c_id
static

Code to identify Reference.

Collaboration diagram for DUNE::Utils::Codecs::CodedReference:
Collaboration graph