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

Detailed Description

Motor simulator task

Public Member Functions

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

Public Attributes

MovingAverage< double > * m_avg_motor
 
IMC::Rpm m_rpm
 
int16_t m_rpm_new
 
Arguments m_args
 

Constructor & Destructor Documentation

Simulators::Motor::Task::Task ( const std::string &  name,
Tasks::Context &  ctx 
)
inline

Member Function Documentation

void Simulators::Motor::Task::consume ( const IMC::SetThrusterActuation *  msg)
inline
void Simulators::Motor::Task::onResourceInitialization ( void  )
inline

Initialize resources.

References Simulators::Motor::Arguments::avg_samples.

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

Release resources.

void Simulators::Motor::Task::task ( void  )
inline

Member Data Documentation

Arguments Simulators::Motor::Task::m_args

Task arguments.

MovingAverage<double>* Simulators::Motor::Task::m_avg_motor

Moving average filter for frequency of rotation.

IMC::Rpm Simulators::Motor::Task::m_rpm

Filtered motor frequency of rotation (RPM).

int16_t Simulators::Motor::Task::m_rpm_new

New frequency of rotation value.

Collaboration diagram for Simulators::Motor::Task:
Collaboration graph