DUNE: Uniform Navigational Environment
2016.05.0
|
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 |
CommandLink * | m_cmd |
Log * | m_log |
Counter< double > | m_wdog |
Counter< double > | m_time_delta_timer |
SubsystemData | m_subsys_data [c_subsys_count] |
StateMachineStates | m_sm_state |
std::queue< StateMachineStates > | m_sm_state_queue |
bool | m_powered |
Packet * | m_packet |
Arguments | m_args |
Static Public Attributes | |
static const unsigned | c_buffer_size |
|
inline |
References Sensors::Edgetech2205::Arguments::addr, Sensors::Edgetech2205::Arguments::autosel_mode, c_buffer_size, Sensors::Edgetech2205::Arguments::channels_hf, Sensors::Edgetech2205::Arguments::channels_lf, Sensors::Edgetech2205::Arguments::ignored_sample_count, m_args, m_bfr, Sensors::Edgetech2205::Arguments::port_cmd, Sensors::Edgetech2205::Arguments::port_dat, Sensors::Edgetech2205::Arguments::power_channel, Sensors::Edgetech2205::Arguments::range_hf, Sensors::Edgetech2205::Arguments::range_lf, Sensors::Edgetech2205::Arguments::time_delta_init_samples, Sensors::Edgetech2205::Arguments::time_delta_init_tout, Sensors::Edgetech2205::Arguments::time_delta_max_latency, Sensors::Edgetech2205::Arguments::time_delta_periodicity, and Sensors::Edgetech2205::Arguments::trg_div.
|
inline |
References Sensors::Edgetech2205::Log::getPath(), m_log, and m_packet.
Referenced by consume(), onResourceRelease(), openLog(), and updateStateMachine().
|
inline |
References Sensors::Edgetech2205::Arguments::addr, m_args, m_cmd, and Sensors::Edgetech2205::Arguments::port_cmd.
Referenced by updateStateMachine().
|
inline |
References m_args, m_powered, and Sensors::Edgetech2205::Arguments::power_channel.
|
inline |
|
inline |
|
inline |
References m_args, and Sensors::Edgetech2205::Arguments::power_channel.
Referenced by failActivation(), turnPowerOff(), and turnPowerOn().
|
inline |
References hasQueuedStates(), m_sm_state, and m_sm_state_queue.
Referenced by updateStateMachine().
|
inline |
References m_cmd, m_sock_dat, setDataActive(), setPing(), Sensors::Edgetech2205::CommandLink::shutdown(), Sensors::Edgetech2205::SUBSYS_SSH, and Sensors::Edgetech2205::SUBSYS_SSL.
Referenced by updateStateMachine().
|
inline |
Referenced by handleSonarData(), and updateSubsystemData().
|
inline |
|
inline |
References controlPower().
Referenced by updateStateMachine().
|
inline |
References m_sm_state.
Referenced by consume().
|
inline |
References Sensors::Edgetech2205::SUBSYS_SSH, and Sensors::Edgetech2205::SUBSYS_SSL.
Referenced by handleSonarData(), and setPing().
|
inline |
References Sensors::Edgetech2205::Packet::getMessageType(), handleSonarData(), m_packet, and Sensors::Edgetech2205::MSG_ID_SONAR_DATA.
Referenced by readData().
|
inline |
References dispatchDebugData(), Sensors::Edgetech2205::Packet::get(), getSubsysIndex(), Sensors::Edgetech2205::Packet::getSubsystemNumber(), Sensors::Edgetech2205::Arguments::ignored_sample_count, logPacket(), m_args, m_log, m_packet, m_subsys_data, Sensors::Edgetech2205::SubsystemData::ping_count, Sensors::Edgetech2205::SubsystemData::ping_number, Sensors::Edgetech2205::SDATA_IDX_PING_NUMBER, updateSubsystemData(), and writeSubsystemData().
Referenced by handlePacket().
|
inline |
Test if state queue has pending state transitions.
References m_sm_state_queue.
Referenced by dequeueState(), and onMain().
|
inline |
Initialize sidescan configuration.
References Sensors::Edgetech2205::Arguments::channels_hf, Sensors::Edgetech2205::Arguments::channels_lf, m_args, m_cmd, Sensors::Edgetech2205::Arguments::range_hf, Sensors::Edgetech2205::Arguments::range_lf, setDataActive(), setPing(), setPingAutoSelectMode(), Sensors::Edgetech2205::CommandLink::setPingRange(), setTriggerCoupling(), Sensors::Edgetech2205::SUBSYS_SSH, and Sensors::Edgetech2205::SUBSYS_SSL.
Referenced by onActivation().
|
inline |
Test if power channel is on.
References m_powered.
Referenced by updateStateMachine().
|
inline |
References Sensors::Edgetech2205::Log::get(), m_log, m_packet, and Sensors::Edgetech2205::Log::put().
Referenced by handleSonarData().
|
inline |
References Sensors::Edgetech2205::Arguments::addr, DUNE::Time::Counter< T >::getElapsed(), initConfig(), m_args, m_cmd, m_sock_dat, m_subsys_data, m_wdog, Sensors::Edgetech2205::Arguments::port_dat, Sensors::Edgetech2205::CommandLink::setPingTrigger(), Sensors::Edgetech2205::SUBSYS_SSH, Sensors::Edgetech2205::SUBSYS_SSL, and Sensors::Edgetech2205::TRIG_MODE_INTERNAL.
|
inline |
|
inline |
References hasQueuedStates(), and updateStateMachine().
|
inline |
References queueState(), and Sensors::Edgetech2205::SM_ACT_BEGIN.
|
inline |
References queueState(), and Sensors::Edgetech2205::SM_DEACT_BEGIN.
|
inline |
|
inline |
References closeLog().
|
inline |
References Sensors::Edgetech2205::Arguments::addr, Sensors::Edgetech2205::Arguments::autosel_mode, Sensors::Edgetech2205::Arguments::channels_hf, Sensors::Edgetech2205::Arguments::channels_lf, m_args, m_cmd, m_powered, Sensors::Edgetech2205::Arguments::port_cmd, Sensors::Edgetech2205::Arguments::port_dat, Sensors::Edgetech2205::Arguments::power_channel, Sensors::Edgetech2205::Arguments::range_hf, Sensors::Edgetech2205::Arguments::range_lf, setDataActive(), setPing(), setPingAutoSelectMode(), Sensors::Edgetech2205::CommandLink::setPingRange(), setTriggerCoupling(), Sensors::Edgetech2205::SUBSYS_SSH, and Sensors::Edgetech2205::SUBSYS_SSL.
|
inline |
References closeLog(), Sensors::Edgetech2205::Log::get(), Sensors::Edgetech2205::Log::getPath(), m_log, and m_packet.
Referenced by consume().
|
inline |
Push a new state to the state queue.
[in] | state | state machine state. |
References m_sm_state_queue.
Referenced by onRequestActivation(), onRequestDeactivation(), and updateStateMachine().
|
inline |
References handlePacket(), m_bfr, m_packet, m_parser, m_sock_dat, and Sensors::Edgetech2205::Parser::parse().
Referenced by updateStateMachine().
|
inline |
Referenced by updateStateMachine().
|
inline |
References Sensors::Edgetech2205::CHAN_PORT, Sensors::Edgetech2205::CHAN_STARBOARD, m_cmd, and Sensors::Edgetech2205::CommandLink::setDataActive().
Referenced by disconnect(), initConfig(), and onUpdateParameters().
|
inline |
References Sensors::Edgetech2205::SubsystemData::active, getSubsysIndex(), m_cmd, m_subsys_data, and Sensors::Edgetech2205::CommandLink::setPing().
Referenced by disconnect(), initConfig(), and onUpdateParameters().
|
inline |
|
inline |
References Sensors::Edgetech2205::Arguments::channels_hf, Sensors::Edgetech2205::Arguments::channels_lf, m_args, m_cmd, Sensors::Edgetech2205::CommandLink::setPingCoupling(), Sensors::Edgetech2205::CommandLink::setPingTrigger(), Sensors::Edgetech2205::SUBSYS_SSH, Sensors::Edgetech2205::SUBSYS_SSL, Sensors::Edgetech2205::Arguments::trg_div, Sensors::Edgetech2205::TRIG_MODE_COUPLED, and Sensors::Edgetech2205::TRIG_MODE_INTERNAL.
Referenced by initConfig(), and onUpdateParameters().
|
inline |
References controlPower().
Referenced by updateStateMachine().
|
inline |
References controlPower().
Referenced by updateStateMachine().
|
inline |
References closeLog(), connect(), dequeueState(), disconnect(), Sensors::Edgetech2205::CommandLink::estimateTimeDelta(), estimateTimeDelta(), failActivation(), isPowered(), m_args, m_cmd, m_log, m_time_delta_timer, m_wdog, DUNE::Time::Counter< T >::overflow(), queueState(), readData(), requestLogName(), DUNE::Time::Counter< T >::reset(), DUNE::Time::Counter< T >::setTop(), Sensors::Edgetech2205::SM_ACT_BEGIN, Sensors::Edgetech2205::SM_ACT_DONE, Sensors::Edgetech2205::SM_ACT_LOG_REQUEST, Sensors::Edgetech2205::SM_ACT_LOG_WAIT, Sensors::Edgetech2205::SM_ACT_POWER_ON, Sensors::Edgetech2205::SM_ACT_POWER_WAIT, Sensors::Edgetech2205::SM_ACT_SAMPLE, Sensors::Edgetech2205::SM_ACT_SS_SYNC, Sensors::Edgetech2205::SM_ACT_SS_WAIT, Sensors::Edgetech2205::SM_DEACT_BEGIN, Sensors::Edgetech2205::SM_DEACT_DISCONNECT, Sensors::Edgetech2205::SM_DEACT_DONE, Sensors::Edgetech2205::SM_DEACT_POWER_OFF, Sensors::Edgetech2205::SM_DEACT_POWER_WAIT, Sensors::Edgetech2205::SM_IDLE, Sensors::Edgetech2205::Arguments::time_delta_max_latency, turnPowerOff(), and turnPowerOn().
Referenced by onMain().
|
inline |
References Sensors::Edgetech2205::SubsystemData::altitude, Sensors::Edgetech2205::SubsystemData::course, Sensors::Edgetech2205::SubsystemData::depth, dispatchDebugData(), Sensors::Edgetech2205::SubsystemData::estates, Sensors::Edgetech2205::EstimatedStateList::find(), Sensors::Edgetech2205::Packet::get(), Sensors::Edgetech2205::CommandLink::getEstimatedTimeDelta(), Sensors::Edgetech2205::Packet::getSubsystemNumber(), Sensors::Edgetech2205::Packet::getTimeStamp(), Sensors::Edgetech2205::SubsystemData::heading, Sensors::Edgetech2205::SubsystemData::latitude, Sensors::Edgetech2205::SubsystemData::latitude_rad, Sensors::Edgetech2205::SubsystemData::longitude, Sensors::Edgetech2205::SubsystemData::longitude_rad, m_cmd, m_packet, Sensors::Edgetech2205::SubsystemData::msec_cpu, Sensors::Edgetech2205::SubsystemData::ping_count, Sensors::Edgetech2205::SubsystemData::ping_number, Sensors::Edgetech2205::SubsystemData::pitch, Sensors::Edgetech2205::SubsystemData::roll, Sensors::Edgetech2205::SDATA_IDX_MILLISECOND_TODAY, Sensors::Edgetech2205::SDATA_IDX_TIME, 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.
Referenced by handleSonarData().
|
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, m_packet, 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.
Referenced by handleSonarData().
|
static |
Buffer size.
Referenced by Task().
Arguments Sensors::Edgetech2205::Task::m_args |
Configuration parameters.
Referenced by connect(), consume(), controlPower(), estimateTimeDelta(), handleSonarData(), initConfig(), onActivation(), onUpdateParameters(), setPingAutoSelectMode(), setTriggerCoupling(), Task(), and updateStateMachine().
std::vector<uint8_t> Sensors::Edgetech2205::Task::m_bfr |
Read buffer.
Referenced by readData(), and Task().
CommandLink* Sensors::Edgetech2205::Task::m_cmd |
Command link.
Referenced by connect(), disconnect(), estimateTimeDelta(), initConfig(), onActivation(), onUpdateParameters(), setDataActive(), setPing(), setPingAutoSelectMode(), setTriggerCoupling(), updateStateMachine(), and updateSubsystemData().
Log* Sensors::Edgetech2205::Task::m_log |
Log file.
Referenced by closeLog(), handleSonarData(), logPacket(), openLog(), and updateStateMachine().
Packet* Sensors::Edgetech2205::Task::m_packet |
Current packet being parsed.
Referenced by closeLog(), handlePacket(), handleSonarData(), logPacket(), openLog(), readData(), updateSubsystemData(), and writeSubsystemData().
Parser Sensors::Edgetech2205::Task::m_parser |
Referenced by readData().
bool Sensors::Edgetech2205::Task::m_powered |
True if device is powered on.
Referenced by consume(), isPowered(), and onUpdateParameters().
StateMachineStates Sensors::Edgetech2205::Task::m_sm_state |
Current state machine state.
Referenced by dequeueState(), and getCurrentState().
std::queue<StateMachineStates> Sensors::Edgetech2205::Task::m_sm_state_queue |
State machine state queue.
Referenced by dequeueState(), hasQueuedStates(), and queueState().
TCPSocket* Sensors::Edgetech2205::Task::m_sock_dat |
Data socket.
Referenced by disconnect(), onActivation(), and readData().
SubsystemData Sensors::Edgetech2205::Task::m_subsys_data[c_subsys_count] |
Subsystem specific data.
Referenced by consume(), handleSonarData(), onActivation(), and setPing().
Counter<double> Sensors::Edgetech2205::Task::m_time_delta_timer |
Timer for time delta estimation.
Referenced by updateStateMachine().
Counter<double> Sensors::Edgetech2205::Task::m_wdog |
Watchdog timer.
Referenced by onActivation(), and updateStateMachine().