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

Detailed Description

Servos simulator task

Public Member Functions

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

Public Attributes

IMC::ServoPosition m_positions [c_servo_count]
 
IMC::SetServoPosition m_commands [c_servo_count]
 
Random::Generatorm_prng
 
double m_last_time
 
double m_fault_timer
 
bool m_faulted
 
int m_servo_in_fault
 
Arguments m_args
 

Constructor & Destructor Documentation

Member Function Documentation

void Simulators::Servos::Task::consume ( const IMC::SimulatedState *  msg)
inline
void Simulators::Servos::Task::onMain ( void  )
inline
void Simulators::Servos::Task::onResourceAcquisition ( void  )
inline
void Simulators::Servos::Task::onResourceInitialization ( void  )
inline

Initialize resources.

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

Release resources.

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

Member Data Documentation

Arguments Simulators::Servos::Task::m_args

Task arguments.

IMC::SetServoPosition Simulators::Servos::Task::m_commands[c_servo_count]

Message for SetServoPosition.

double Simulators::Servos::Task::m_fault_timer

Fault timer counter.

bool Simulators::Servos::Task::m_faulted

Flag to signal a fault has already been generated.

double Simulators::Servos::Task::m_last_time

Last time a setservoposition message was received.

IMC::ServoPosition Simulators::Servos::Task::m_positions[c_servo_count]

Message for servo positions.

Random::Generator* Simulators::Servos::Task::m_prng

PRNG handle.

int Simulators::Servos::Task::m_servo_in_fault

Number of faulty servo.

Collaboration diagram for Simulators::Servos::Task:
Collaboration graph