DUNE: Uniform Navigational Environment
2019.02.1
|
This class is a communication manager for telemetry.
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) |
|
inline |
Constructor.
References Transports::Radio::MSG_TRANSMIT, and Transports::Radio::XxMesg::state.
|
inline |
References Transports::Radio::XxMesg::acknowledge, Transports::Radio::XxMesg::code, Transports::Radio::CODE_AK, Transports::Radio::CODE_IMC, Transports::Radio::CODE_REPORT, Transports::Radio::IDLE, Transports::Radio::MSG_AK, Transports::Radio::MSG_PROCESSED, recvImcMessage(), reportDecode(), sendAKtoRXMsg(), Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::sync, and Transports::Radio::XxMesg::telemetry_imc_status.
Referenced by Transports::Radio::Task::onMain().
|
inline |
References Transports::Radio::XxMesg::acknowledge, Transports::Radio::BUZY, buzyStateMachine(), Transports::Radio::XxMesg::code, Transports::Radio::XxMesg::des_id, Transports::Radio::XxMesg::error, Transports::Radio::XxMesg::error_msg, Transports::Radio::IDLE, imc_TelemetryMsg_tx(), Transports::Radio::XxMesg::msg, Transports::Radio::MSG_AK, Transports::Radio::XxMesg::msg_compl, Transports::Radio::MSG_ERROR, Transports::Radio::MSG_NAK, Transports::Radio::MSG_TRANSMIT, Transports::Radio::XxMesg::n_parts, Transports::Radio::XxMesg::npart, Transports::Radio::XxMesg::src_id, Transports::Radio::XxMesg::start_part, Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::str_header, and Transports::Radio::XxMesg::sync.
Referenced by Transports::Radio::Task::onMain().
|
inline |
References Transports::Radio::XxMesg::acknowledge, Transports::Radio::XxMesg::encodeHeader(), Transports::Radio::IDLE, Transports::Radio::XxMesg::msg, Transports::Radio::MSG_IN_PARTS, Transports::Radio::XxMesg::msg_multi_timer, Transports::Radio::MSG_NAK, Transports::Radio::XxMesg::msg_timer, Transports::Radio::MSG_TRANSMIT, Transports::Radio::XxMesg::n_parts, Transports::Radio::XxMesg::n_parts_status, Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::str_header, Transports::Radio::XxMesg::telemetry_imc_status, updateTxSync(), and Transports::Radio::WAITING_ACKN.
Referenced by anyDatatosend().
|
inline |
Consume Estimated State messages.
[in] | msg | EstimatedState message. |
References Transports::Radio::RepotImcData::estate.
Referenced by Transports::Radio::Task::consume().
|
inline |
Consume VehicleState messages.
[in] | msg | VehicleState message. |
References Transports::Radio::RepotImcData::vehicle_state.
|
inline |
Consume Plan Control State messages.
[in] | msg | PlanControlState message. |
References Transports::Radio::RepotImcData::plan_progress.
|
inline |
Consume Fuel Level messages.
[in] | msg | FuelLevel message. |
References Transports::Radio::RepotImcData::fuel_level.
|
inline |
References Transports::Radio::RepotImcData::batt_voltage.
|
inline |
Consume air Speed messages.
[in] | msg | IndicatedSpeed message. |
References Transports::Radio::RepotImcData::air_speed.
|
inline |
References Transports::Radio::RepotImcData::vtolstate.
|
inline |
Consume TelemetryMsg messages.
[in] | msg | TelemetryMsg message. |
|
inline |
References Transports::Radio::RepotImcData::air_speed, Transports::Radio::Report::air_speed, Transports::Radio::Report::alt, Transports::Radio::RepotImcData::batt_voltage, Transports::Radio::CODE_REPORT, Transports::Radio::Report::depth, Transports::Radio::XxMesg::encodeHeader(), Transports::Radio::RepotImcData::estate, Transports::Radio::Report::fuel_conf, Transports::Radio::RepotImcData::fuel_level, Transports::Radio::Report::fuel_level, Transports::Radio::Report::height, Transports::Radio::Report::lat, Transports::Radio::Report::lon, Transports::Radio::MSG_QUEUE, Transports::Radio::Report::pitch, Transports::Radio::RepotImcData::plan_progress, Transports::Radio::Report::progress, Transports::Radio::Report::roll, Transports::Radio::XxMesg::setMsgData(), Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::telemetry_imc_status, updateTxSync(), Transports::Radio::RepotImcData::vehicle_state, Transports::Radio::Report::vehicle_state, Transports::Radio::Report::vehicle_state_ent, Transports::Radio::Report::voltage, Transports::Radio::RepotImcData::vtolstate, Transports::Radio::Report::vtolstate, and Transports::Radio::Report::yaw.
Referenced by Transports::Radio::Task::highSpeedReport(), and Transports::Radio::Task::radioReport().
|
inline |
|
inline |
verifies if TX channel is busy
References Transports::Radio::IDLE.
Referenced by Transports::Radio::Task::highSpeedReport(), and Transports::Radio::Task::radioReport().
|
inline |
Referenced by imc_TelemetryMsg_tx().
|
inline |
Referenced by safeLookup().
|
inline |
|
inline |
References Transports::Radio::XxMesg::acknowledge, Transports::Radio::XxMesg::clear(), Transports::Radio::XxMesg::code, Transports::Radio::CODE_AK, Transports::Radio::XxMesg::decodeHeader(), Transports::Radio::XxMesg::des_id, Transports::Radio::XxMesg::error_msg, Transports::Radio::XxMesg::msg, Transports::Radio::MSG_IN_PARTS, Transports::Radio::MSG_IN_PARTS_ERR, Transports::Radio::XxMesg::n_parts, Transports::Radio::XxMesg::n_parts_end_sync, Transports::Radio::XxMesg::npart, Transports::Radio::XxMesg::src_id, Transports::Radio::XxMesg::start_part, Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::sync, Transports::Radio::XxMesg::testDecodeHeader(), and updateRxSync().
Referenced by Transports::Radio::Task::onMain().
|
inline |
References Transports::Radio::XxMesg::des_id, Transports::Radio::XxMesg::msg, Transports::Radio::MSG_ERROR, Transports::Radio::MSG_PROCESSED, safeLookup(), Transports::Radio::XxMesg::src_id, Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::telemetry_imc_status, and Transports::Radio::XxMesg::timestamp.
Referenced by anyDataToProcess().
|
inline |
References Transports::Radio::RepotImcData::air_speed, Transports::Radio::Report::air_speed, Transports::Radio::Report::alt, Transports::Radio::RepotImcData::batt_voltage, Transports::Radio::Report::depth, Transports::Radio::RepotImcData::estate, Transports::Radio::Report::fuel_conf, Transports::Radio::RepotImcData::fuel_level, Transports::Radio::Report::fuel_level, Transports::Radio::Report::height, Transports::Radio::Report::lat, Transports::Radio::Report::lon, Transports::Radio::XxMesg::msg, Transports::Radio::MSG_ERROR, Transports::Radio::MSG_PROCESSED, Transports::Radio::Report::pitch, Transports::Radio::RepotImcData::plan_progress, Transports::Radio::Report::progress, Transports::Radio::Report::roll, safeLookup(), Transports::Radio::XxMesg::src_id, Transports::Radio::XxMesg::state, Transports::Radio::RepotImcData::vehicle_state, Transports::Radio::Report::vehicle_state, Transports::Radio::Report::vehicle_state_ent, Transports::Radio::Report::voltage, Transports::Radio::RepotImcData::vtolstate, Transports::Radio::Report::vtolstate, and Transports::Radio::Report::yaw.
Referenced by anyDataToProcess().
|
inline |
References lookupSystemName().
Referenced by recvImcMessage(), and reportDecode().
|
inline |
References Transports::Radio::CODE_AK, Transports::Radio::XxMesg::encodeHeader(), Transports::Radio::MSG_QUEUE, Transports::Radio::XxMesg::src_id, Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::str_header, Transports::Radio::XxMesg::sync, and updateTxSync().
Referenced by anyDataToProcess().
|
inline |
update the local Rx synchronization number to detect data loss
Referenced by recivedDataToDecode().
|
inline |
References Transports::Radio::XxMesg::acknowledge, Transports::Radio::MSG_IN_PARTS, Transports::Radio::MSG_QUEUE, Transports::Radio::MSG_TRANSMIT, Transports::Radio::XxMesg::npart, Transports::Radio::XxMesg::state, Transports::Radio::XxMesg::telemetry_imc_status, and Transports::Radio::WAITING_ACKN.
Referenced by Transports::Radio::Task::onMain().
|
inline |
update the Tx synchronization number
Referenced by buzyStateMachine(), createReport(), imc_TelemetryMsg_tx(), and sendAKtoRXMsg().