DUNE: Uniform Navigational Environment  2019.02.1
Simulators::LBL::Task Struct Reference

Detailed Description

LBL simulator task.

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
bool checkLbl (void) const
 
bool checkGps (void) const
 
bool ready (void) const
 
void reset (void)
 
void consume (const IMC::GpsFix *msg)
 
void consume (const IMC::LblConfig *msg)
 
void consume (const IMC::SimulatedState *msg)
 
void consume (const IMC::UamTxFrame *msg)
 
void onActivation (void)
 
void onDeactivation (void)
 
void range (const std::string &sys_name)
 
void onMain (void)
 

Public Attributes

IMC::SimulatedState m_sstate
 
IMC::GpsFix * m_gps
 
IMC::LblConfig * m_lbl_cfg
 
MessageList< IMC::LblBeacon >::const_iterator m_cursor
 
Counter< double > m_pinger
 
Random::Generatorm_prng
 
Arguments m_args
 

Constructor & Destructor Documentation

Member Function Documentation

bool Simulators::LBL::Task::checkGps ( void  ) const
inline

Check GPS is defined.

Returns
true if GPS is defined, false otherwise.
bool Simulators::LBL::Task::checkLbl ( void  ) const
inline

Check LBL is defined.

Returns
true if LBL is defined, false otherwise.
void Simulators::LBL::Task::consume ( const IMC::GpsFix *  msg)
inline
void Simulators::LBL::Task::consume ( const IMC::LblConfig *  msg)
inline
void Simulators::LBL::Task::consume ( const IMC::SimulatedState *  msg)
inline
void Simulators::LBL::Task::consume ( const IMC::UamTxFrame *  msg)
inline
void Simulators::LBL::Task::onActivation ( void  )
inline
void Simulators::LBL::Task::onDeactivation ( void  )
inline
void Simulators::LBL::Task::onMain ( void  )
inline
void Simulators::LBL::Task::onResourceAcquisition ( void  )
inline
void Simulators::LBL::Task::onResourceRelease ( void  )
inline

Release resources.

void Simulators::LBL::Task::onUpdateParameters ( void  )
inline

Update parameters.

References Simulators::LBL::Arguments::ping_delay.

void Simulators::LBL::Task::range ( const std::string &  sys_name)
inline
bool Simulators::LBL::Task::ready ( void  ) const
inline

Check if we are ready to simulate LBL.

Returns
true if we are ready to simulate, false otherwise.
void Simulators::LBL::Task::reset ( void  )
inline

Reset ranger.

Member Data Documentation

Arguments Simulators::LBL::Task::m_args

Task arguments.

MessageList<IMC::LblBeacon>::const_iterator Simulators::LBL::Task::m_cursor

Cursor.

IMC::GpsFix* Simulators::LBL::Task::m_gps

WGS84 origin.

IMC::LblConfig* Simulators::LBL::Task::m_lbl_cfg

LblConfig buffer.

Counter<double> Simulators::LBL::Task::m_pinger

Next ping time.

Random::Generator* Simulators::LBL::Task::m_prng

PRNG handle.

IMC::SimulatedState Simulators::LBL::Task::m_sstate

Simulated state.

Collaboration diagram for Simulators::LBL::Task:
Collaboration graph