DUNE: Uniform Navigational Environment  2019.02.1
DUNE::Navigation::UsblTools::Modem Class Reference

Detailed Description

USBL tools handler.

Public Member Functions

 Modem (void)
 
bool waitingForSystem (std::string name)
 
bool run (std::string &name, float time)
 
bool wantsFix (std::string name)
 
bool parse (const IMC::UamRxFrame *msg, std::vector< uint8_t > &data)
 
bool encode (const IMC::UsblFixExtended *msg, std::vector< uint8_t > &data)
 
bool encode (const IMC::UsblPositionExtended *msg, std::vector< uint8_t > &data)
 
bool encode (const IMC::UsblAnglesExtended *msg, std::vector< uint8_t > &data)
 

Constructor & Destructor Documentation

DUNE::Navigation::UsblTools::Modem::Modem ( void  )
inline

Constructor.

Member Function Documentation

bool DUNE::Navigation::UsblTools::Modem::encode ( const IMC::UsblFixExtended msg,
std::vector< uint8_t > &  data 
)
inline
bool DUNE::Navigation::UsblTools::Modem::parse ( const IMC::UamRxFrame msg,
std::vector< uint8_t > &  data 
)
inline

Parse incoming frame.

Parameters
[in]msgreceived acoustic frame.
[out]dataframe to be send.
Returns
true if there's data to be sent, false otherwise.

References DUNE::Navigation::UsblTools::c_mask_fix, DUNE::Navigation::UsblTools::CODE_REQ, DUNE::Navigation::UsblTools::CODE_RPL, DUNE::IMC::UamRxFrame::data, DUNE::Navigation::UsblTools::REQ_PERIOD, DUNE::Navigation::UsblTools::REQ_START, and DUNE::IMC::UamRxFrame::sys_src.

bool DUNE::Navigation::UsblTools::Modem::run ( std::string &  name,
float  time 
)
inline

Trigger through all targets.

Parameters
[out]nametarget's name to be tracked.
[in]timeto wait for target system's reply.
Returns
true, if we have a system to track now.
bool DUNE::Navigation::UsblTools::Modem::waitingForSystem ( std::string  name)
inline

This function verifies if we are waiting for the target's reply.

Parameters
[in]namename of the target.
Returns
true if we are waiting, false otherwise.
bool DUNE::Navigation::UsblTools::Modem::wantsFix ( std::string  name)
inline

Get if target's wants an absolute fix.

Returns
true if target wants an absolute fix, false if it wants a relative position.
Collaboration diagram for DUNE::Navigation::UsblTools::Modem:
Collaboration graph