DUNE: Uniform Navigational Environment  2019.02.1
Transports::Radio::RadioRFDXXXxPtP Class Reference

Detailed Description

Author
João Teixeira.

Classes

struct  DeviceParam
 

Public Types

Public Member Functions

 RadioRFDXXXxPtP (RadioConfParam args, Tasks::Task *taskp=NULL)
 
 ~RadioRFDXXXxPtP (void)
 
int configDevice (void)
 
int DeviceVerifyConf ()
 
std::string commandCreate (At_cmd cmd_type, std::string &data)
 
void sendCommandAndWait (const std::string &cmd, double delay_aft)
 
void sendCommand (const std::string &cmd)
 
void sendString (std::string &msg)
 
bool saveIfExpectedCmdIs (const std::string &msg, std::string &expectedCmd, std::string &output)
 
void process (const std::string msg)
 
- Public Member Functions inherited from Transports::Radio::RadioDriver
 RadioDriver (RadioConfParam args, Tasks::Task *taskp=NULL)
 
virtual ~RadioDriver (void)
 
bool processNewReport ()
 
bool newRxData (std::string &rx_data)
 
void clearNewRxData ()
 
bool processCrc (void)
 
bool sendData (std::string txData)
 
int maxDataPacket ()
 
bool readSentence (void)
 
bool openSocket (void)
 
int connectToDevice ()
 
void processInputInit (double timeout=0.05)
 
bool processInput (double timeout=0.05)
 

Protected Attributes

DeviceParam device_param
 
bool cmd_mode
 
std::string last_command
 
- Protected Attributes inherited from Transports::Radio::RadioDriver
Tasks::Task * task
 
IMC::DevDataText m_dev_data
 
IO::Handle * m_handle
 
std::string m_line
 
std::string m_last_line
 
RadioConfParam radioParams
 
std::queue< std::string > driverRxRata
 

Additional Inherited Members

- Public Attributes inherited from Transports::Radio::RadioDriver
DeviceReports device_reports
 

Member Enumeration Documentation

Entity states.

Enumerator
ENABLE_CMD 
AT 
RADIO_VERSION 
BOARD_TYPE 
BOARD_FREQUENCY 
BOARD_VERSION 
SETTABLE_EEPROM_PARAMETERS 
TDM_TIMING 
RSSI 
EXIT_AT_COMMAND_MODE 
DISPLAY_OR_SET_PARAMETER_N 
REBOOT 
WRITE_PARAMETERS_EEPROM 
ENABLE_RSSI_REPORTING 
ENABLE_TDM_REPORTING 
DISABLE_DEBUG_REPORTING 
NO_CMD 
Enumerator
NO_MAVLINK_FRAMING 
FRAME_MAVLINK 
LOW_LATENCY_MAVLINK 

Constructor & Destructor Documentation

Transports::Radio::RadioRFDXXXxPtP::RadioRFDXXXxPtP ( RadioConfParam  args,
Tasks::Task *  taskp = NULL 
)
inline
Transports::Radio::RadioRFDXXXxPtP::~RadioRFDXXXxPtP ( void  )
inline

Default destructor.

References Transports::Radio::RadioDriver::m_handle.

Member Function Documentation

std::string Transports::Radio::RadioRFDXXXxPtP::commandCreate ( At_cmd  cmd_type,
std::string &  data 
)
inline

References ENABLE_CMD, and last_command.

Referenced by DeviceVerifyConf(), and sendString().

int Transports::Radio::RadioRFDXXXxPtP::configDevice ( void  )
inlinevirtual
int Transports::Radio::RadioRFDXXXxPtP::DeviceVerifyConf ( )
inline

References Transports::Radio::RadioConfParam::air_speed, AT, BOARD_FREQUENCY, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::board_frequency, BOARD_TYPE, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::board_type, BOARD_VERSION, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::board_version, cmd_mode, commandCreate(), device_param, Transports::Radio::RadioDriver::device_reports, DISPLAY_OR_SET_PARAMETER_N, Transports::Radio::RadioConfParam::duty_cycle, ENABLE_CMD, ENABLE_RSSI_REPORTING, ENABLE_TDM_REPORTING, Transports::Radio::RadioConfParam::error_correction, EXIT_AT_COMMAND_MODE, Transports::Radio::RadioDriver::m_last_line, Transports::Radio::RadioDriver::m_line, Transports::Radio::RadioConfParam::max_frequency, Transports::Radio::RadioConfParam::min_frequency, Transports::Radio::RadioConfParam::mum_channels, Transports::Radio::RadioConfParam::net_id, Transports::Radio::RadioConfParam::power_level, RADIO_VERSION, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::radio_version, Transports::Radio::RadioDriver::radioParams, REBOOT, RSSI, Transports::Radio::DeviceReports::rssi, Transports::Radio::RadioConfParam::rssi_report, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s10_mum_channels, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s11_duty_cycle, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s2_air_speed, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s3_net_id, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s4_power_level, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s5_error_correction, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s8_min_frequency, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s9_max_frequency, sendCommandAndWait(), SETTABLE_EEPROM_PARAMETERS, Transports::Radio::RadioDriver::task, Transports::Radio::RadioConfParam::tdm_report, TDM_TIMING, Transports::Radio::DeviceReports::tdm_timing_max_data_packet, and WRITE_PARAMETERS_EEPROM.

Referenced by configDevice().

void Transports::Radio::RadioRFDXXXxPtP::process ( const std::string  msg)
inlinevirtual

Process sentence.

Parameters
[in]msgsentence.

Implements Transports::Radio::RadioDriver.

References BOARD_FREQUENCY, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::board_frequency, BOARD_TYPE, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::board_type, BOARD_VERSION, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::board_version, cmd_mode, Transports::Radio::DATA_REPORT, Transports::Radio::DeviceReports::data_report, device_param, Transports::Radio::RadioDriver::device_reports, last_command, Transports::Radio::RadioDriver::m_dev_data, RADIO_VERSION, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::radio_version, Transports::Radio::DeviceReports::report_status, Transports::Radio::DeviceReports::rssi, Transports::Radio::RSSI_REPORT, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s0_format, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s10_mum_channels, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s11_duty_cycle, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s12_lbt_rssi, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s13_manchester, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s14_rtscts, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s1_serial_speed, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s2_air_speed, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s3_net_id, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s4_power_level, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s5_error_correction, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s6_mavlink, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s7_oppresend, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s8_min_frequency, Transports::Radio::RadioRFDXXXxPtP::DeviceParam::s9_max_frequency, saveIfExpectedCmdIs(), SETTABLE_EEPROM_PARAMETERS, Transports::Radio::RadioDriver::task, Transports::Radio::TDM_REPORT, Transports::Radio::DeviceReports::tdm_report, TDM_TIMING, Transports::Radio::DeviceReports::tdm_timing_max_data_packet, Transports::Radio::DeviceReports::tdm_timing_silence_period, and Transports::Radio::DeviceReports::tdm_timing_tx_window.

bool Transports::Radio::RadioRFDXXXxPtP::saveIfExpectedCmdIs ( const std::string &  msg,
std::string &  expectedCmd,
std::string &  output 
)
inline

References Transports::Radio::RadioDriver::task.

Referenced by process().

void Transports::Radio::RadioRFDXXXxPtP::sendCommand ( const std::string &  cmd)
inline
void Transports::Radio::RadioRFDXXXxPtP::sendCommandAndWait ( const std::string &  cmd,
double  delay_aft 
)
inline
void Transports::Radio::RadioRFDXXXxPtP::sendString ( std::string &  msg)
inlinevirtual

Member Data Documentation

bool Transports::Radio::RadioRFDXXXxPtP::cmd_mode
protected

Referenced by DeviceVerifyConf(), and process().

DeviceParam Transports::Radio::RadioRFDXXXxPtP::device_param
protected

Referenced by DeviceVerifyConf(), and process().

std::string Transports::Radio::RadioRFDXXXxPtP::last_command
protected

Referenced by commandCreate(), and process().

Collaboration diagram for Transports::Radio::RadioRFDXXXxPtP:
Collaboration graph