DUNE: Uniform Navigational Environment  2016.05.0
Power::PSIMAR::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
bool setPower (bool on)
 
void consume (const IMC::PowerChannelControl *msg)
 
bool dispatchState (void)
 
void consume (const IMC::QueryPowerChannelState *msg)
 
void onMain (void)
 

Public Attributes

Hardware::ESCC * m_psu_escc
 
UCTK::Interface * m_psu_ctl
 
IMC::PowerChannelState m_power_state
 
bool m_get_state
 
Arguments m_args
 

Constructor & Destructor Documentation

Power::PSIMAR::Task::Task ( const std::string &  name,
Tasks::Context &  ctx 
)
inline

Member Function Documentation

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

References m_power_state.

bool Power::PSIMAR::Task::dispatchState ( void  )
inline

Dispatch raw board state.

Returns
true if successfully dispatched state

References m_psu_ctl.

Referenced by onMain().

void Power::PSIMAR::Task::onMain ( void  )
inline

References dispatchState(), and m_get_state.

void Power::PSIMAR::Task::onResourceAcquisition ( void  )
inline
void Power::PSIMAR::Task::onResourceRelease ( void  )
inline

References m_psu_ctl, m_psu_escc, and setPower().

void Power::PSIMAR::Task::onUpdateParameters ( void  )
inline
bool Power::PSIMAR::Task::setPower ( bool  on)
inline

References m_power_state, and m_psu_ctl.

Referenced by consume(), and onResourceRelease().

Member Data Documentation

Arguments Power::PSIMAR::Task::m_args
bool Power::PSIMAR::Task::m_get_state

Get state.

Referenced by onMain(), onResourceAcquisition(), and Task().

IMC::PowerChannelState Power::PSIMAR::Task::m_power_state

Current power channel state.

Referenced by consume(), onUpdateParameters(), and setPower().

UCTK::Interface* Power::PSIMAR::Task::m_psu_ctl
Hardware::ESCC* Power::PSIMAR::Task::m_psu_escc

PSU UART.

Referenced by onResourceAcquisition(), and onResourceRelease().

Collaboration diagram for Power::PSIMAR::Task:
Collaboration graph