DUNE: Uniform Navigational Environment  2.3.2
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 hasLBLConfig (void) const
 
bool hasOrigin (void) const
 
bool isInitialized (void) const
 
void updateBeacons (void)
 
void addBeacon (unsigned id, const IMC::LblBeacon *msg)
 
void consume (const IMC::GpsFix *msg)
 
void consume (const IMC::LblConfig *msg)
 
void consume (const IMC::SimulatedState *msg)
 
void onActivation (void)
 
void onDeactivation (void)
 
void onMain (void)
 

Public Attributes

IMC::SimulatedState m_sstate
 
IMC::GpsFix * m_origin
 
IMC::LblConfig * m_lbl_cfg
 
Counter< double > m_ping_time
 
Random::Generatorm_prng
 
std::vector< BeaconSetupm_beacons
 
std::vector< BeaconSetup >
::const_iterator 
m_beacon
 
Arguments m_args
 

Constructor & Destructor Documentation

Member Function Documentation

void Simulators::LBL::Task::addBeacon ( unsigned  id,
const IMC::LblBeacon *  msg 
)
inline
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

References isInitialized(), and m_sstate.

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

References m_lbl_cfg.

Referenced by consume(), and isInitialized().

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

References m_origin.

Referenced by consume(), and isInitialized().

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

References hasLBLConfig(), hasOrigin(), and m_beacons.

Referenced by consume(), and onMain().

void Simulators::LBL::Task::onActivation ( void  )
inline
void Simulators::LBL::Task::onDeactivation ( void  )
inline
void Simulators::LBL::Task::onResourceAcquisition ( void  )
inline
void Simulators::LBL::Task::onResourceRelease ( void  )
inline

Release resources.

References m_lbl_cfg, m_origin, and m_prng.

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

Member Data Documentation

Arguments Simulators::LBL::Task::m_args
std::vector<BeaconSetup>::const_iterator Simulators::LBL::Task::m_beacon

Current active beacon.

Referenced by onMain(), and updateBeacons().

std::vector<BeaconSetup> Simulators::LBL::Task::m_beacons

Configuration/position of LBL beacons.

Referenced by addBeacon(), isInitialized(), onMain(), and updateBeacons().

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

LblConfig buffer.

Referenced by consume(), hasLBLConfig(), onResourceRelease(), and updateBeacons().

IMC::GpsFix* Simulators::LBL::Task::m_origin

WGS84 origin.

Referenced by addBeacon(), consume(), hasOrigin(), and onResourceRelease().

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

Next ping time.

Referenced by onActivation(), onMain(), onUpdateParameters(), and updateBeacons().

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

PRNG handle.

Referenced by onMain(), onResourceAcquisition(), and onResourceRelease().

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

Simulated state.

Referenced by consume(), and onMain().

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