DUNE: Uniform Navigational Environment
2.3.2
|
Servos simulator task
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
~Task (void) | |
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::Generator * | m_prng |
double | m_last_time |
double | m_fault_timer |
bool | m_faulted |
int | m_servo_in_fault |
Arguments | m_args |
|
inline |
References Simulators::Servos::Arguments::fault_trigger, Simulators::Servos::Arguments::generate_faults, Simulators::Servos::Arguments::limit_rate, m_args, Simulators::Servos::Arguments::max_angle, Simulators::Servos::Arguments::max_rate, Simulators::Servos::Arguments::prng_seed, and Simulators::Servos::Arguments::prng_type.
|
inline |
References onResourceRelease().
|
inline |
References Simulators::Servos::Arguments::fault_trigger, Simulators::Servos::Arguments::generate_faults, Simulators::Servos::Arguments::limit_rate, m_args, m_commands, m_fault_timer, m_faulted, m_last_time, m_positions, m_prng, m_servo_in_fault, Simulators::Servos::Arguments::max_angle, DUNE::Math::trimValue(), and DUNE::Math::Random::Generator::uniform().
|
inline |
|
inline |
|
inline |
Acquire resources.
References m_args, m_prng, Simulators::Servos::Arguments::prng_seed, and Simulators::Servos::Arguments::prng_type.
|
inline |
Initialize resources.
References m_last_time, and m_positions.
|
inline |
|
inline |
Update parameters.
References m_args, Simulators::Servos::Arguments::max_angle, and Simulators::Servos::Arguments::max_rate.
Arguments Simulators::Servos::Task::m_args |
Task arguments.
Referenced by consume(), onResourceAcquisition(), onUpdateParameters(), and Task().
IMC::SetServoPosition Simulators::Servos::Task::m_commands[c_servo_count] |
Message for SetServoPosition.
Referenced by consume().
double Simulators::Servos::Task::m_fault_timer |
Fault timer counter.
Referenced by consume().
bool Simulators::Servos::Task::m_faulted |
Flag to signal a fault has already been generated.
Referenced by consume().
double Simulators::Servos::Task::m_last_time |
Last time a setservoposition message was received.
Referenced by consume(), and onResourceInitialization().
IMC::ServoPosition Simulators::Servos::Task::m_positions[c_servo_count] |
Message for servo positions.
Referenced by consume(), and onResourceInitialization().
Random::Generator* Simulators::Servos::Task::m_prng |
PRNG handle.
Referenced by consume(), onResourceAcquisition(), and onResourceRelease().
int Simulators::Servos::Task::m_servo_in_fault |
Number of faulty servo.
Referenced by consume().