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

Detailed Description

Motor simulator task

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
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
Simulators::Motor::Task::~Task ( void  )
inline

References onResourceRelease().

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, m_args, m_avg_motor, m_rpm, and m_rpm_new.

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

Release resources.

References m_avg_motor.

Referenced by ~Task().

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

Member Data Documentation

Arguments Simulators::Motor::Task::m_args

Task arguments.

Referenced by consume(), onResourceInitialization(), and Task().

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

Moving average filter for frequency of rotation.

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

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

Filtered motor frequency of rotation (RPM).

Referenced by onResourceInitialization(), and task().

int16_t Simulators::Motor::Task::m_rpm_new

New frequency of rotation value.

Referenced by consume(), onResourceInitialization(), and task().

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