DUNE: Uniform Navigational Environment  2019.02.0
Transports::Radio::RadioDriver Class Referenceabstract

Public Member Functions

 RadioDriver (RadioConfParam args, Tasks::Task *taskp=NULL)
 
virtual ~RadioDriver (void)
 
virtual int configDevice (void)=0
 
virtual void process (const std::string msg)=0
 
bool processNewReport ()
 
bool newRxData (std::string &rx_data)
 
void clearNewRxData ()
 
virtual void sendString (std::string &data)=0
 
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)
 

Public Attributes

DeviceReports device_reports
 

Protected Attributes

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
 

Constructor & Destructor Documentation

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

Default destructor.

References m_handle.

Member Function Documentation

void Transports::Radio::RadioDriver::clearNewRxData ( )
inline
virtual int Transports::Radio::RadioDriver::configDevice ( void  )
pure virtual
int Transports::Radio::RadioDriver::maxDataPacket ( )
inline
bool Transports::Radio::RadioDriver::newRxData ( std::string &  rx_data)
inline

References driverRxRata.

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

bool Transports::Radio::RadioDriver::openSocket ( void  )
inline
virtual void Transports::Radio::RadioDriver::process ( const std::string  msg)
pure virtual
bool Transports::Radio::RadioDriver::processCrc ( void  )
inline
bool Transports::Radio::RadioDriver::processInput ( double  timeout = 0.05)
inline
void Transports::Radio::RadioDriver::processInputInit ( double  timeout = 0.05)
inline
bool Transports::Radio::RadioDriver::readSentence ( void  )
inline

Read sentence.

References m_handle, m_last_line, m_line, process(), and processNewReport().

Referenced by processInput(), and processInputInit().

bool Transports::Radio::RadioDriver::sendData ( std::string  txData)
inline

References sendString(), and task.

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

virtual void Transports::Radio::RadioDriver::sendString ( std::string &  data)
pure virtual

Member Data Documentation

std::queue<std::string> Transports::Radio::RadioDriver::driverRxRata
protected
std::string Transports::Radio::RadioDriver::m_last_line
protected
std::string Transports::Radio::RadioDriver::m_line
protected
Collaboration diagram for Transports::Radio::RadioDriver:
Collaboration graph