DUNE: Uniform Navigational Environment  2019.02.0
Transports::Radio::Telemetry Class Reference

Detailed Description

This class is a communication manager for telemetry.

Author
João Teixeira

Public Member Functions

 Telemetry (Tasks::Task *task, uint8_t system, MapName radio_names, MapAddr radio_addrs, int max_packet_size)
 
void consume (const IMC::EstimatedState *msg)
 
void consume (const IMC::VehicleState *msg)
 
void consume (const IMC::PlanControlState *msg)
 
void consume (const IMC::FuelLevel *msg)
 
void consume (const IMC::Voltage *msg)
 
void consume (const IMC::IndicatedSpeed *msg)
 
void consume (const IMC::VtolState *msg)
 
void consume (const IMC::TelemetryMsg *msg)
 
bool imc_TelemetryMsg_tx ()
 
void updateTxSync (void)
 
void updateRxSync (int value=-1)
 
bool isIdle (void)
 
void createReport (void)
 
bool reportDecode (XxMesg &rxmsg)
 
void recivedDataTimeOut ()
 
void recivedDataToDecode (std::string &rxData)
 
bool anyDataToProcess (void)
 
bool buzyStateMachine (std::string &txData)
 
void sendAKtoRXMsg (void)
 
int anyDatatosend (std::string &txData)
 
void updateTxState ()
 
void recvImcMessage (XxMesg &rxmsg)
 
unsigned lookupSystemAddress (const std::string &name, unsigned &adrr)
 
std::string lookupSystemName (unsigned addr)
 
std::string safeLookup (unsigned addr)
 

Constructor & Destructor Documentation

Transports::Radio::Telemetry::Telemetry ( Tasks::Task *  task,
uint8_t  system,
MapName  radio_names,
MapAddr  radio_addrs,
int  max_packet_size 
)
inline

Member Function Documentation

void Transports::Radio::Telemetry::consume ( const IMC::EstimatedState *  msg)
inline

Consume Estimated State messages.

Parameters
[in]msgEstimatedState message.

References Transports::Radio::RepotImcData::estate.

Referenced by Transports::Radio::Task::consume().

void Transports::Radio::Telemetry::consume ( const IMC::VehicleState *  msg)
inline

Consume VehicleState messages.

Parameters
[in]msgVehicleState message.

References Transports::Radio::RepotImcData::vehicle_state.

void Transports::Radio::Telemetry::consume ( const IMC::PlanControlState *  msg)
inline

Consume Plan Control State messages.

Parameters
[in]msgPlanControlState message.

References Transports::Radio::RepotImcData::plan_progress.

void Transports::Radio::Telemetry::consume ( const IMC::FuelLevel *  msg)
inline

Consume Fuel Level messages.

Parameters
[in]msgFuelLevel message.

References Transports::Radio::RepotImcData::fuel_level.

void Transports::Radio::Telemetry::consume ( const IMC::Voltage *  msg)
inline
void Transports::Radio::Telemetry::consume ( const IMC::IndicatedSpeed *  msg)
inline

Consume air Speed messages.

Parameters
[in]msgIndicatedSpeed message.

References Transports::Radio::RepotImcData::air_speed.

void Transports::Radio::Telemetry::consume ( const IMC::VtolState *  msg)
inline
void Transports::Radio::Telemetry::consume ( const IMC::TelemetryMsg *  msg)
inline

Consume TelemetryMsg messages.

Parameters
[in]msgTelemetryMsg message.
bool Transports::Radio::Telemetry::isIdle ( void  )
inline
unsigned Transports::Radio::Telemetry::lookupSystemAddress ( const std::string &  name,
unsigned &  adrr 
)
inline

Referenced by imc_TelemetryMsg_tx().

std::string Transports::Radio::Telemetry::lookupSystemName ( unsigned  addr)
inline

Referenced by safeLookup().

std::string Transports::Radio::Telemetry::safeLookup ( unsigned  addr)
inline

References lookupSystemName().

Referenced by recvImcMessage(), and reportDecode().

void Transports::Radio::Telemetry::updateRxSync ( int  value = -1)
inline

update the local Rx synchronization number to detect data loss

Referenced by recivedDataToDecode().

void Transports::Radio::Telemetry::updateTxSync ( void  )
inline

update the Tx synchronization number

Referenced by buzyStateMachine(), createReport(), imc_TelemetryMsg_tx(), and sendAKtoRXMsg().

Collaboration diagram for Transports::Radio::Telemetry:
Collaboration graph