DUNE: Uniform Navigational Environment  2019.02.0
Simulators::CTD::Task Struct Reference

Detailed Description

SVS simulator task.

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onResourceInitialization (void)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
void consume (const IMC::SimulatedState *msg)
 
void task (void)
 

Public Attributes

IMC::Temperature m_temp
 
IMC::SoundSpeed m_sspeed
 
IMC::Conductivity m_cond
 
IMC::Salinity m_salinity
 
IMC::Depth m_depth
 
IMC::Pressure m_pressure
 
IMC::SimulatedState m_sstate
 
Random::Generatorm_prng
 
Arguments m_args
 

Constructor & Destructor Documentation

Member Function Documentation

void Simulators::CTD::Task::consume ( const IMC::SimulatedState *  msg)
inline

Requests activation of the task (if not active already) and stores received state in m_sstate.

References m_sstate.

void Simulators::CTD::Task::onResourceAcquisition ( void  )
inline

Acquire resources. Initializes the random number generator.

References m_args, m_prng, Simulators::CTD::Arguments::prng_seed, and Simulators::CTD::Arguments::prng_type.

void Simulators::CTD::Task::onResourceInitialization ( void  )
inline

Initialize resources.

It requests deactivation so that this task is not active by default and will be activated only when DUNE::IMC::SimulatedState messages are received.

void Simulators::CTD::Task::onResourceRelease ( void  )
inline

Release resources.

References m_prng.

Member Data Documentation

Arguments Simulators::CTD::Task::m_args

Task arguments.

Referenced by onResourceAcquisition(), Task(), and task().

IMC::Conductivity Simulators::CTD::Task::m_cond

Current conductivity.

Referenced by task().

IMC::Depth Simulators::CTD::Task::m_depth

Referenced by task().

IMC::Pressure Simulators::CTD::Task::m_pressure

Referenced by task().

Random::Generator* Simulators::CTD::Task::m_prng

PRNG handle.

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

IMC::Salinity Simulators::CTD::Task::m_salinity

Current salinity.

Referenced by task().

IMC::SoundSpeed Simulators::CTD::Task::m_sspeed

Current sound speed.

Referenced by task().

IMC::SimulatedState Simulators::CTD::Task::m_sstate

Last received simulated state.

Referenced by consume(), and task().

IMC::Temperature Simulators::CTD::Task::m_temp

Temperature.

Referenced by task().

Collaboration diagram for Simulators::CTD::Task:
Collaboration graph