DUNE: Uniform Navigational Environment  2016.05.0
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

References m_adcs.

Member Function Documentation

void Power::DOAMv1::Task::checkActivation ( void  )
inline
void Power::DOAMv1::Task::consume ( const IMC::Heartbeat *  msg)
inline

References m_slave_alive, and m_slave_id.

void Power::DOAMv1::Task::consume ( const IMC::QueryPowerChannelState *  msg)
inline

References m_power_state.

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

Referenced by waitForCommand().

void Power::DOAMv1::Task::sendMessages ( const uint16_t *  unpack)
inline
bool Power::DOAMv1::Task::setPowerChannelState ( uint8_t  value)
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.

Referenced by checkActivation(), and onRequestActivation().

Message* Power::DOAMv1::Task::m_adcs[c_adcs_max]
IMC::PowerChannelState Power::DOAMv1::Task::m_power_state

Power channel state.

Referenced by consume(), onUpdateParameters(), setPowerChannelState(), and Task().

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

True if slave CPU is alive.

Referenced by checkActivation(), consume(), and onRequestActivation().

unsigned Power::DOAMv1::Task::m_slave_id

System id of the slave DUNE instance.

Referenced by consume(), and onUpdateParameters().

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

Temperature.

Referenced by onCommand().

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

Watchdog.

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

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