DUNE: Uniform Navigational Environment  2019.02.1
Power::DOAMv1::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
void onUpdateParameters (void)
 
void onEntityReservation (void)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
void onResourceInitialization (void)
 
void setStrobeMode (StrobeMode mode)
 
void sendMessages (const uint16_t *unpack)
 
void onCommand (uint8_t cmd, const uint8_t *data, int data_size)
 
void onVersion (unsigned major, unsigned minor, unsigned patch)
 
void consume (const IMC::Heartbeat *msg)
 
void consume (const IMC::QueryPowerChannelState *msg)
 
void consume (const IMC::PowerChannelControl *msg)
 
void consume (const IMC::PowerOperation *msg)
 
void checkActivation (void)
 
void onRequestActivation (void)
 
void onRequestDeactivation (void)
 
void onActivation (void)
 
void onDeactivation (void)
 
bool setPowerChannelState (uint8_t value)
 
bool waitForCommand (uint8_t code, unsigned retries=10)
 
void onMain (void)
 

Public Attributes

Hardware::LUCL::Protocol m_proto
 
Message * m_adcs [c_adcs_max]
 
Time::Counter< double > m_wdog
 
IMC::Temperature m_temp
 
IMC::PowerChannelState m_power_state
 
Arguments m_args
 
Counter< double > m_act_timer
 
bool m_slave_alive
 
unsigned m_slave_id
 

Constructor & Destructor Documentation

Power::DOAMv1::Task::~Task ( void  )
inline

Member Function Documentation

void Power::DOAMv1::Task::checkActivation ( void  )
inline
void Power::DOAMv1::Task::consume ( const IMC::Heartbeat *  msg)
inline
void Power::DOAMv1::Task::consume ( const IMC::QueryPowerChannelState *  msg)
inline
void Power::DOAMv1::Task::consume ( const IMC::PowerChannelControl *  msg)
inline
void Power::DOAMv1::Task::consume ( const IMC::PowerOperation *  msg)
inline
void Power::DOAMv1::Task::onActivation ( void  )
inline
void Power::DOAMv1::Task::onCommand ( uint8_t  cmd,
const uint8_t *  data,
int  data_size 
)
inline
void Power::DOAMv1::Task::onDeactivation ( void  )
inline
void Power::DOAMv1::Task::onEntityReservation ( void  )
inline
void Power::DOAMv1::Task::onMain ( void  )
inline
void Power::DOAMv1::Task::onRequestActivation ( void  )
inline
void Power::DOAMv1::Task::onRequestDeactivation ( void  )
inline
void Power::DOAMv1::Task::onResourceAcquisition ( void  )
inline
void Power::DOAMv1::Task::onResourceInitialization ( void  )
inline
void Power::DOAMv1::Task::onResourceRelease ( void  )
inline
void Power::DOAMv1::Task::onVersion ( unsigned  major,
unsigned  minor,
unsigned  patch 
)
inline
void Power::DOAMv1::Task::sendMessages ( const uint16_t *  unpack)
inline
bool Power::DOAMv1::Task::setPowerChannelState ( uint8_t  value)
inline
void Power::DOAMv1::Task::setStrobeMode ( StrobeMode  mode)
inline
bool Power::DOAMv1::Task::waitForCommand ( uint8_t  code,
unsigned  retries = 10 
)
inline

Member Data Documentation

Counter<double> Power::DOAMv1::Task::m_act_timer

Activation timer.

Message* Power::DOAMv1::Task::m_adcs[c_adcs_max]

ADC Messages.

Arguments Power::DOAMv1::Task::m_args

Task arguments.

IMC::PowerChannelState Power::DOAMv1::Task::m_power_state

Power channel state.

Hardware::LUCL::Protocol Power::DOAMv1::Task::m_proto

Device protocol handler.

bool Power::DOAMv1::Task::m_slave_alive

True if slave CPU is alive.

unsigned Power::DOAMv1::Task::m_slave_id

System id of the slave DUNE instance.

IMC::Temperature Power::DOAMv1::Task::m_temp

Temperature.

Time::Counter<double> Power::DOAMv1::Task::m_wdog

Watchdog.

Collaboration diagram for Power::DOAMv1::Task:
Collaboration graph