DUNE: Uniform Navigational Environment  2.3.2
Actuators::SCRT::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
void onUpdateParameters (void)
 
void onEntityReservation (void)
 
void onEntityResolution (void)
 
void onResourceRelease (void)
 
void onResourceAcquisition (void)
 
void onResourceInitialization (void)
 
void onReportEntityState (void)
 
void consume (const IMC::SetServoPosition *msg)
 
void consume (const IMC::Voltage *msg)
 
void actuateServo (unsigned nr, double value)
 
void setLeakStatus (int idx, bool leak)
 
void enableServo (unsigned i)
 
void disableServo (unsigned i)
 
void onCommand (uint8_t cmd, const uint8_t *data, int data_size)
 
void onVersion (unsigned major, unsigned minor, unsigned patch)
 
bool waitForCommand (uint8_t code)
 
void task (void)
 

Public Attributes

IMC::Voltage m_volt
 
IMC::Current m_ampg [4]
 
IMC::Temperature m_temp
 
IMC::EntityState m_leaks [2]
 
uint16_t m_servo_ref [c_servo_count]
 
LUCL::Protocol m_proto
 
int m_hw_major
 
Counter< double > m_last_adc
 
Arguments m_args
 
float m_last_ref [c_servo_count]
 
float m_last_timestamp [c_servo_count]
 
unsigned m_pos_id [c_servo_count]
 
float m_set_position [c_servo_count]
 

Constructor & Destructor Documentation

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

References onResourceRelease().

Member Function Documentation

void Actuators::SCRT::Task::actuateServo ( unsigned  nr,
double  value 
)
inline

References m_set_position.

Referenced by consume(), and onResourceInitialization().

void Actuators::SCRT::Task::consume ( const IMC::SetServoPosition *  msg)
inline

References actuateServo().

void Actuators::SCRT::Task::consume ( const IMC::Voltage *  msg)
inline

References m_pos_id.

void Actuators::SCRT::Task::disableServo ( unsigned  i)
inline
void Actuators::SCRT::Task::enableServo ( unsigned  i)
inline
void Actuators::SCRT::Task::onCommand ( uint8_t  cmd,
const uint8_t *  data,
int  data_size 
)
inline
void Actuators::SCRT::Task::onEntityResolution ( void  )
inline
void Actuators::SCRT::Task::onReportEntityState ( void  )
inline
void Actuators::SCRT::Task::onResourceAcquisition ( void  )
inline
void Actuators::SCRT::Task::onResourceInitialization ( void  )
inline

References actuateServo(), and enableServo().

void Actuators::SCRT::Task::onResourceRelease ( void  )
inline

Referenced by ~Task().

void Actuators::SCRT::Task::onVersion ( unsigned  major,
unsigned  minor,
unsigned  patch 
)
inline

References m_hw_major.

Referenced by waitForCommand().

void Actuators::SCRT::Task::setLeakStatus ( int  idx,
bool  leak 
)
inline

References m_leaks.

Referenced by onCommand().

bool Actuators::SCRT::Task::waitForCommand ( uint8_t  code)
inline

References m_proto, onCommand(), and onVersion().

Referenced by task().

Member Data Documentation

IMC::Current Actuators::SCRT::Task::m_ampg[4]

Current sensor messages.

Referenced by onCommand(), and onEntityReservation().

int Actuators::SCRT::Task::m_hw_major

Hardware major.

Referenced by onCommand(), and onVersion().

Counter<double> Actuators::SCRT::Task::m_last_adc

Last ADC sampling.

Referenced by onUpdateParameters(), and task().

float Actuators::SCRT::Task::m_last_ref[c_servo_count]

Servo's previous set reference (needed for angular rate limitation)

Referenced by onUpdateParameters(), and task().

float Actuators::SCRT::Task::m_last_timestamp[c_servo_count]

Servo's previous set reference's time (needed for angular rate limitation)

Referenced by onUpdateParameters(), and task().

IMC::EntityState Actuators::SCRT::Task::m_leaks[2]

Leak detection.

Referenced by onEntityReservation(), onReportEntityState(), and setLeakStatus().

unsigned Actuators::SCRT::Task::m_pos_id[c_servo_count]

Servo's position voltage signal.

Referenced by consume(), and onEntityResolution().

LUCL::Protocol Actuators::SCRT::Task::m_proto

Device protocol handler.

Referenced by onResourceAcquisition(), task(), and waitForCommand().

uint16_t Actuators::SCRT::Task::m_servo_ref[c_servo_count]

Servo references.

Referenced by onUpdateParameters(), and task().

float Actuators::SCRT::Task::m_set_position[c_servo_count]

Servo's set position received in the IMC messages.

Referenced by actuateServo(), and task().

IMC::Temperature Actuators::SCRT::Task::m_temp

Temperature sensor message.

Referenced by onCommand(), and onEntityReservation().

IMC::Voltage Actuators::SCRT::Task::m_volt

Voltage sensor message.

Referenced by onCommand(), and onEntityReservation().

Collaboration diagram for Actuators::SCRT::Task:
Collaboration graph