DUNE: Uniform Navigational Environment  2020.01.0
Sensors::Edgetech2205::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
void onResourceRelease (void)
 
void onResourceInitialization (void)
 
void queueState (StateMachineStates state)
 
bool hasQueuedStates (void) const
 
StateMachineStates getCurrentState (void) const
 
StateMachineStates dequeueState (void)
 
void onRequestActivation (void)
 
bool connect (void)
 
void failActivation (const std::string &message)
 
void onRequestDeactivation (void)
 
void disconnect (void)
 
void onDeactivation (void)
 
void onActivation (void)
 
void requestLogName (void)
 
void consume (const IMC::PowerChannelState *msg)
 
void consume (const IMC::EstimatedState *msg)
 
void consume (const IMC::LoggingControl *msg)
 
void setPingAutoSelectMode (void)
 
void setTriggerCoupling (void)
 
void initConfig (void)
 
void setDataActive (SubsystemId subsys, const std::string &channels)
 
void setPing (SubsystemId subsys, const std::string &channels)
 
int getSubsysIndex (int subsys)
 
void dispatchDebugData (const std::string &text)
 
void handleSonarData (void)
 
void writeSubsystemData (SubsystemData *data)
 
void updateSubsystemData (SubsystemData *data)
 
void handlePacket (void)
 
bool readData (void)
 
void estimateTimeDelta (Counter< double > &reference_timer)
 
void openLog (const Path &path)
 
void logPacket (void)
 
void closeLog (void)
 
void controlPower (IMC::PowerChannelControl::OperationEnum op)
 
void turnPowerOn (void)
 
void turnPowerOff (void)
 
bool isPowered (void)
 
void updateStateMachine (void)
 
void onMain (void)
 

Public Attributes

TCPSocket * m_sock_dat
 
std::vector< uint8_t > m_bfr
 
Parser m_parser
 
CommandLinkm_cmd
 
Logm_log
 
Counter< double > m_wdog
 
Counter< double > m_time_delta_timer
 
SubsystemData m_subsys_data [c_subsys_count]
 
StateMachineStates m_sm_state
 
std::queue< StateMachineStatesm_sm_state_queue
 
bool m_powered
 
Packetm_packet
 
Arguments m_args
 

Static Public Attributes

static const unsigned c_buffer_size
 

Constructor & Destructor Documentation

Member Function Documentation

void Sensors::Edgetech2205::Task::closeLog ( void  )
inline
bool Sensors::Edgetech2205::Task::connect ( void  )
inline
void Sensors::Edgetech2205::Task::consume ( const IMC::PowerChannelState *  msg)
inline
void Sensors::Edgetech2205::Task::consume ( const IMC::EstimatedState *  msg)
inline
void Sensors::Edgetech2205::Task::consume ( const IMC::LoggingControl *  msg)
inline
void Sensors::Edgetech2205::Task::controlPower ( IMC::PowerChannelControl::OperationEnum  op)
inline
StateMachineStates Sensors::Edgetech2205::Task::dequeueState ( void  )
inline
void Sensors::Edgetech2205::Task::disconnect ( void  )
inline
void Sensors::Edgetech2205::Task::dispatchDebugData ( const std::string &  text)
inline
void Sensors::Edgetech2205::Task::failActivation ( const std::string &  message)
inline
StateMachineStates Sensors::Edgetech2205::Task::getCurrentState ( void  ) const
inline
int Sensors::Edgetech2205::Task::getSubsysIndex ( int  subsys)
inline
void Sensors::Edgetech2205::Task::handlePacket ( void  )
inline
bool Sensors::Edgetech2205::Task::hasQueuedStates ( void  ) const
inline

Test if state queue has pending state transitions.

Returns
true if state queue has pending states, false otherwise.
bool Sensors::Edgetech2205::Task::isPowered ( void  )
inline

Test if power channel is on.

Returns
true if power channel is on, false otherwise.
void Sensors::Edgetech2205::Task::logPacket ( void  )
inline
void Sensors::Edgetech2205::Task::onDeactivation ( void  )
inline
void Sensors::Edgetech2205::Task::onMain ( void  )
inline
void Sensors::Edgetech2205::Task::onRequestActivation ( void  )
inline
void Sensors::Edgetech2205::Task::onRequestDeactivation ( void  )
inline
void Sensors::Edgetech2205::Task::onResourceInitialization ( void  )
inline
void Sensors::Edgetech2205::Task::onResourceRelease ( void  )
inline
void Sensors::Edgetech2205::Task::openLog ( const Path &  path)
inline
void Sensors::Edgetech2205::Task::queueState ( StateMachineStates  state)
inline

Push a new state to the state queue.

Parameters
[in]statestate machine state.
bool Sensors::Edgetech2205::Task::readData ( void  )
inline
void Sensors::Edgetech2205::Task::requestLogName ( void  )
inline
void Sensors::Edgetech2205::Task::setDataActive ( SubsystemId  subsys,
const std::string &  channels 
)
inline
void Sensors::Edgetech2205::Task::setPing ( SubsystemId  subsys,
const std::string &  channels 
)
inline
void Sensors::Edgetech2205::Task::turnPowerOff ( void  )
inline
void Sensors::Edgetech2205::Task::turnPowerOn ( void  )
inline
void Sensors::Edgetech2205::Task::writeSubsystemData ( SubsystemData data)
inline

References Sensors::Edgetech2205::SubsystemData::altitude, Sensors::Edgetech2205::SubsystemData::course, Sensors::Edgetech2205::SubsystemData::depth, Sensors::Edgetech2205::Packet::getMessageData(), Sensors::Edgetech2205::SubsystemData::heading, Sensors::Edgetech2205::SubsystemData::latitude, Sensors::Edgetech2205::SubsystemData::latitude_rad, Sensors::Edgetech2205::SubsystemData::longitude, Sensors::Edgetech2205::SubsystemData::longitude_rad, Sensors::Edgetech2205::SubsystemData::pitch, Sensors::Edgetech2205::SubsystemData::roll, Sensors::Edgetech2205::SDATA_IDX_ALTITUDE, Sensors::Edgetech2205::SDATA_IDX_ANNOTATION_STRING, Sensors::Edgetech2205::SDATA_IDX_COORDINATE_UNITS, Sensors::Edgetech2205::SDATA_IDX_COURSE, Sensors::Edgetech2205::SDATA_IDX_CPU_DAY, Sensors::Edgetech2205::SDATA_IDX_CPU_HOUR, Sensors::Edgetech2205::SDATA_IDX_CPU_MINUTES, Sensors::Edgetech2205::SDATA_IDX_CPU_SECONDS, Sensors::Edgetech2205::SDATA_IDX_CPU_TIME_BASIS, Sensors::Edgetech2205::SDATA_IDX_CPU_YEAR, Sensors::Edgetech2205::SDATA_IDX_DEPTH, Sensors::Edgetech2205::SDATA_IDX_HEADING, Sensors::Edgetech2205::SDATA_IDX_LATITUDE, Sensors::Edgetech2205::SDATA_IDX_LONGITUDE, Sensors::Edgetech2205::SDATA_IDX_MILLISECOND_TODAY, Sensors::Edgetech2205::SDATA_IDX_NMEA_HOUR, Sensors::Edgetech2205::SDATA_IDX_NMEA_MINUTES, Sensors::Edgetech2205::SDATA_IDX_NMEA_SECONDS, Sensors::Edgetech2205::SDATA_IDX_PITCH, Sensors::Edgetech2205::SDATA_IDX_ROLL, Sensors::Edgetech2205::SDATA_IDX_SPEED, Sensors::Edgetech2205::SDATA_IDX_TIME, Sensors::Edgetech2205::SDATA_IDX_VALIDITY, Sensors::Edgetech2205::Packet::set(), Sensors::Edgetech2205::SubsystemData::speed, Sensors::Edgetech2205::SubsystemData::time_bdt, Sensors::Edgetech2205::SubsystemData::time_epoch, Sensors::Edgetech2205::SubsystemData::time_msec_today, and Sensors::Edgetech2205::SubsystemData::validity.

Member Data Documentation

const unsigned Sensors::Edgetech2205::Task::c_buffer_size
static

Buffer size.

Arguments Sensors::Edgetech2205::Task::m_args

Configuration parameters.

std::vector<uint8_t> Sensors::Edgetech2205::Task::m_bfr

Read buffer.

CommandLink* Sensors::Edgetech2205::Task::m_cmd

Command link.

Log* Sensors::Edgetech2205::Task::m_log

Log file.

Packet* Sensors::Edgetech2205::Task::m_packet

Current packet being parsed.

Parser Sensors::Edgetech2205::Task::m_parser
bool Sensors::Edgetech2205::Task::m_powered

True if device is powered on.

StateMachineStates Sensors::Edgetech2205::Task::m_sm_state

Current state machine state.

std::queue<StateMachineStates> Sensors::Edgetech2205::Task::m_sm_state_queue

State machine state queue.

TCPSocket* Sensors::Edgetech2205::Task::m_sock_dat

Data socket.

SubsystemData Sensors::Edgetech2205::Task::m_subsys_data[c_subsys_count]

Subsystem specific data.

Counter<double> Sensors::Edgetech2205::Task::m_time_delta_timer

Timer for time delta estimation.

Counter<double> Sensors::Edgetech2205::Task::m_wdog

Watchdog timer.

Collaboration diagram for Sensors::Edgetech2205::Task:
Collaboration graph