DUNE: Uniform Navigational Environment
2019.02.0
|
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onEntityReservation (void) |
void | onResourceRelease (void) |
void | onResourceAcquisition (void) |
void | onResourceInitialization (void) |
void | consume (const IMC::SetServoPosition *msg) |
bool | readConstantParameters (void) |
bool | readEffectiveParameters (void) |
bool | startContinuous (void) |
bool | stopContinuous (void) |
LUCL::Command * | waitForReply (Commands command, double timeout) |
bool | waitForReplyAndDiscard (Commands command, double timeout) |
uint8_t | convertAngleToDemand (unsigned servo, double angle) |
void | setServoPosition (uint8_t servo, double position) |
void | handleState (LUCL::Command::CommandPayload &cmd) |
void | handleCommand (LUCL::Command *cmd) |
void | dispatchStats (void) |
void | clearStats (void) |
void | onMain (void) |
Public Attributes | |
Arguments | m_args |
IMC::ServoPosition | m_servo_pos [c_servo_count] |
IMC::Current | m_servo_amp [c_servo_count] |
SerialPort * | m_uart |
Listener * | m_listener |
double | m_exc_min [c_servo_count] |
double | m_exc_max [c_servo_count] |
uint8_t | m_demand_res |
unsigned | m_stat_invalid |
unsigned | m_stat_error |
unsigned | m_stat_timeout |
Counter< double > | m_wdog |
|
inline |
|
inline |
References dispatchStats(), m_stat_error, m_stat_invalid, and m_stat_timeout.
Referenced by onResourceInitialization().
|
inline |
References setServoPosition().
|
inline |
References m_args, m_demand_res, m_exc_max, m_exc_min, and Actuators::SCRTv4::Arguments::servo_dirs.
Referenced by setServoPosition().
|
inline |
References m_stat_error, m_stat_invalid, and m_stat_timeout.
Referenced by clearStats(), handleCommand(), and waitForReply().
|
inline |
References Actuators::SCRTv4::CMD_STATE, dispatchStats(), handleState(), m_stat_error, and m_stat_invalid.
Referenced by onMain().
|
inline |
References m_args, m_exc_min, m_servo_amp, m_servo_pos, m_wdog, DUNE::Time::Counter< T >::reset(), and Actuators::SCRTv4::Arguments::servo_dirs.
Referenced by handleCommand().
|
inline |
References m_servo_amp, and m_servo_pos.
|
inline |
|
inline |
References m_args, m_listener, m_uart, and Actuators::SCRTv4::Arguments::uart_dev.
|
inline |
|
inline |
References m_listener, and m_uart.
|
inline |
References Actuators::SCRTv4::CMD_PARAMS_CON, m_demand_res, m_uart, and waitForReply().
Referenced by onResourceInitialization().
|
inline |
References Actuators::SCRTv4::CMD_PARAMS_EFF, m_exc_max, m_exc_min, m_uart, setServoPosition(), and waitForReply().
Referenced by onResourceInitialization().
|
inline |
References Actuators::SCRTv4::CMD_SERVO_SET, convertAngleToDemand(), and m_uart.
Referenced by consume(), and readEffectiveParameters().
|
inline |
References Actuators::SCRTv4::CMD_STATE, Actuators::SCRTv4::CONT_OUT_RATE_10HZ, m_uart, and waitForReplyAndDiscard().
Referenced by onResourceInitialization().
|
inline |
References Actuators::SCRTv4::CMD_CHECK_FUSES, Actuators::SCRTv4::CMD_STATE, Actuators::SCRTv4::CONT_OUT_RATE_0HZ, m_uart, and waitForReplyAndDiscard().
Referenced by onResourceInitialization().
|
inline |
References dispatchStats(), m_listener, m_stat_timeout, Actuators::SCRTv4::Listener::pop(), and Actuators::SCRTv4::Listener::waitForCommand().
Referenced by readConstantParameters(), readEffectiveParameters(), and waitForReplyAndDiscard().
|
inline |
References waitForReply().
Referenced by startContinuous(), and stopContinuous().
Arguments Actuators::SCRTv4::Task::m_args |
Task arguments.
Referenced by convertAngleToDemand(), handleState(), onResourceAcquisition(), and Task().
uint8_t Actuators::SCRTv4::Task::m_demand_res |
Demand resolution.
Referenced by convertAngleToDemand(), and readConstantParameters().
double Actuators::SCRTv4::Task::m_exc_max[c_servo_count] |
Maximum excursion (º).
Referenced by convertAngleToDemand(), and readEffectiveParameters().
double Actuators::SCRTv4::Task::m_exc_min[c_servo_count] |
Minimum excursion (º).
Referenced by convertAngleToDemand(), handleState(), and readEffectiveParameters().
Listener* Actuators::SCRTv4::Task::m_listener |
Command listener.
Referenced by onMain(), onResourceAcquisition(), onResourceRelease(), and waitForReply().
IMC::Current Actuators::SCRTv4::Task::m_servo_amp[c_servo_count] |
Current messages.
Referenced by handleState(), and onEntityReservation().
IMC::ServoPosition Actuators::SCRTv4::Task::m_servo_pos[c_servo_count] |
Servo position messages.
Referenced by handleState(), and onEntityReservation().
unsigned Actuators::SCRTv4::Task::m_stat_error |
Count of communication errors.
Referenced by clearStats(), dispatchStats(), and handleCommand().
unsigned Actuators::SCRTv4::Task::m_stat_invalid |
Count of invalid checksums.
Referenced by clearStats(), dispatchStats(), and handleCommand().
unsigned Actuators::SCRTv4::Task::m_stat_timeout |
Count of command timeouts.
Referenced by clearStats(), dispatchStats(), and waitForReply().
SerialPort* Actuators::SCRTv4::Task::m_uart |
Serial port device.
Referenced by onResourceAcquisition(), onResourceRelease(), readConstantParameters(), readEffectiveParameters(), setServoPosition(), startContinuous(), and stopContinuous().
Counter<double> Actuators::SCRTv4::Task::m_wdog |
Watchdog.
Referenced by handleState(), onMain(), and onResourceInitialization().