DUNE: Uniform Navigational Environment  2.5.1
Actuators::SIMCT01::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
void onEntityReservation (void)
 
void onUpdateParameters (void)
 
void onResourceAcquisition (void)
 
void onResourceInitialization (void)
 
void onResourceRelease (void)
 
void setReplyTimeout (double timeout)
 
void consume (const IMC::SetThrusterActuation *msg)
 
void readString (char *bfr, unsigned bfr_size)
 
bool sendCommand (const char *cmd, char *reply, unsigned reply_size)
 
bool sendDemand (unsigned index, int8_t value)
 
bool resetMotor (unsigned index)
 
bool queryCurrent (unsigned index)
 
bool queryRPM (unsigned index)
 
void onMain (void)
 

Public Attributes

SerialPort * m_uart
 
std::vector< IMC::Current > m_amps
 
std::vector< IMC::Rpm > m_rpms
 
Counter< double > m_feedback_timer
 
std::vector< Counter< double > > m_wdogs
 
double m_reply_tout
 
Arguments m_args
 

Constructor & Destructor Documentation

Actuators::SIMCT01::Task::~Task ( void  )
inline

References onResourceRelease().

Member Function Documentation

void Actuators::SIMCT01::Task::consume ( const IMC::SetThrusterActuation *  msg)
inline
void Actuators::SIMCT01::Task::onEntityReservation ( void  )
inline
void Actuators::SIMCT01::Task::onResourceAcquisition ( void  )
inline
void Actuators::SIMCT01::Task::onResourceRelease ( void  )
inline

References m_uart.

Referenced by ~Task().

bool Actuators::SIMCT01::Task::queryCurrent ( unsigned  index)
inline
bool Actuators::SIMCT01::Task::queryRPM ( unsigned  index)
inline
void Actuators::SIMCT01::Task::readString ( char *  bfr,
unsigned  bfr_size 
)
inline

References m_uart.

Referenced by sendCommand().

bool Actuators::SIMCT01::Task::resetMotor ( unsigned  index)
inline
bool Actuators::SIMCT01::Task::sendCommand ( const char *  cmd,
char *  reply,
unsigned  reply_size 
)
inline
bool Actuators::SIMCT01::Task::sendDemand ( unsigned  index,
int8_t  value 
)
inline
void Actuators::SIMCT01::Task::setReplyTimeout ( double  timeout)
inline

References m_reply_tout.

Referenced by onResourceInitialization().

Member Data Documentation

std::vector<IMC::Current> Actuators::SIMCT01::Task::m_amps

Current messages.

Referenced by onEntityReservation(), onUpdateParameters(), and queryCurrent().

Counter<double> Actuators::SIMCT01::Task::m_feedback_timer

Feedback timer.

Referenced by onMain(), onResourceInitialization(), and onUpdateParameters().

double Actuators::SIMCT01::Task::m_reply_tout

Reply timeout.

Referenced by sendCommand(), and setReplyTimeout().

std::vector<IMC::Rpm> Actuators::SIMCT01::Task::m_rpms

RPM messages.

Referenced by onEntityReservation(), onUpdateParameters(), and queryRPM().

SerialPort* Actuators::SIMCT01::Task::m_uart
std::vector<Counter<double> > Actuators::SIMCT01::Task::m_wdogs
Collaboration diagram for Actuators::SIMCT01::Task:
Collaboration graph