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

Detailed Description

This struct has methods to encode an EstimatedState IMC message into an UamTxFrame and to decode an EstimatedState from an UamRxFrame.

Static Public Member Functions

static void encode (const IMC::EstimatedState *msg, IMC::UamTxFrame *frame)
 
static IMC::Messagedecode (const IMC::UamRxFrame *frame)
 
static size_t getSize (void)
 

Static Public Attributes

static const uint8_t c_id
 

Member Function Documentation

static IMC::Message* DUNE::Utils::Codecs::CodedEstimatedState::decode ( const IMC::UamRxFrame frame)
inlinestatic

Decode an UamRxFrame to retrieve an EstimatedState message.

Parameters
[in]frameUamRxFrame pointer.
Returns
IMC message.

References DUNE::IMC::EstimatedState::alt, DUNE::IMC::UamRxFrame::data, DUNE::IMC::EstimatedState::depth, DUNE::IMC::deserialize(), getSize(), DUNE::IMC::EstimatedState::lat, DUNE::IMC::EstimatedState::lon, and DUNE::IMC::EstimatedState::psi.

static void DUNE::Utils::Codecs::CodedEstimatedState::encode ( const IMC::EstimatedState msg,
IMC::UamTxFrame frame 
)
inlinestatic

Encode an EstimatedState message to a UamTxFrame message pointer.

Parameters
[in]msgEstimatedState pointer.
[out]frameUamTxFrame pointer.

References DUNE::IMC::EstimatedState::alt, c_id, DUNE::IMC::UamTxFrame::data, DUNE::IMC::EstimatedState::depth, getSize(), DUNE::IMC::EstimatedState::psi, DUNE::IMC::serialize(), and DUNE::Coordinates::toWGS84().

static size_t DUNE::Utils::Codecs::CodedEstimatedState::getSize ( void  )
inlinestatic

Get payload size.

Returns
size of payload.

References c_id.

Referenced by decode(), and encode().

Member Data Documentation

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

Code to identify EstimatedState.

Referenced by encode(), and getSize().

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