DUNE: Uniform Navigational Environment
2019.02.0
|
Task.
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
void | onResourceAcquisition (void) |
void | onResourceRelease (void) |
void | onResourceInitialization (void) |
void | onActivation (void) |
void | onDeactivation (void) |
void | consume (const IMC::UamTxStatus *msg) |
void | consume (const IMC::SoundSpeed *msg) |
void | consume (const IMC::VehicleMedium *msg) |
void | onMain (void) |
void | filterRange (DUNE::IMC::Distance &dist, DUNE::IMC::SonarData &profile) |
Public Attributes | |
SerialPort * | m_uart |
Trigger | m_trigger |
IMC::Distance | m_dist |
IMC::SonarData | m_profile |
Arguments | m_args |
Counter< double > | m_wdog |
double | m_sound_speed |
SwitchData | m_switch |
Parser | m_parser |
PatternFilter * | m_pfilt |
Monitors::MediumHandler | m_hand |
bool | m_uam_tx_ip |
|
inline |
Task constructor.
References Sensors::Imagenex852::Arguments::auto_activation, Sensors::Imagenex852::Arguments::data_points, Sensors::Imagenex852::Arguments::filter_enabled, Sensors::Imagenex852::Arguments::filter_median_size, Sensors::Imagenex852::Arguments::filter_threshold, m_args, m_dist, m_profile, Sensors::Imagenex852::Arguments::orientation, Sensors::Imagenex852::Arguments::pattern_diff, Sensors::Imagenex852::Arguments::pattern_filter, Sensors::Imagenex852::Arguments::position, Sensors::Imagenex852::Arguments::profile_range, Sensors::Imagenex852::Arguments::pulse_length, Sensors::Imagenex852::Arguments::range, Sensors::Imagenex852::Arguments::sample_frequency, Sensors::Imagenex852::Arguments::sspeed, Sensors::Imagenex852::Arguments::sspeed_dyn, Sensors::Imagenex852::Arguments::start_gain, Sensors::Imagenex852::Arguments::surface, and Sensors::Imagenex852::Arguments::uart_dev.
|
inline |
References m_uam_tx_ip.
|
inline |
References m_sound_speed.
|
inline |
|
inline |
Filter profile range using information in data points.
[in,out] | dist | Distance message. |
[in,out] | profile | SonarData message. |
References DUNE::IMC::SonarData::data, Sensors::Imagenex852::Arguments::data_points, Sensors::Imagenex852::Arguments::filter_median_size, Sensors::Imagenex852::Arguments::filter_threshold, Sensors::Imagenex852::SwitchData::getRange(), m_args, m_switch, DUNE::Math::median(), and DUNE::IMC::Distance::value.
Referenced by onMain().
|
inline |
|
inline |
References m_hand, m_trigger, and Sensors::Imagenex852::Trigger::setActive().
|
inline |
References Sensors::Imagenex852::Arguments::filter_enabled, Sensors::Imagenex852::PatternFilter::filterPattern(), filterRange(), Sensors::Imagenex852::Parser::getDataPointsCount(), Sensors::Imagenex852::SwitchData::getProfileMinRange(), Sensors::Imagenex852::Parser::getProfileRange(), Sensors::Imagenex852::Parser::getRange(), m_args, m_dist, m_hand, m_parser, m_pfilt, m_profile, m_sound_speed, m_switch, m_uam_tx_ip, m_uart, m_wdog, DUNE::Time::Counter< T >::overflow(), Sensors::Imagenex852::Parser::parse(), Sensors::Imagenex852::Arguments::pattern_filter, DUNE::Time::Counter< T >::reset(), and Sensors::Imagenex852::Arguments::sspeed_dyn.
|
inline |
Acquire resources.
References m_args, m_pfilt, m_uart, m_wdog, Sensors::Imagenex852::Arguments::pattern_diff, Sensors::Imagenex852::Arguments::pattern_filter, DUNE::Time::Counter< T >::setTop(), and Sensors::Imagenex852::Arguments::uart_dev.
|
inline |
|
inline |
|
inline |
Update parameters.
References Sensors::Imagenex852::Arguments::data_points, m_args, m_dist, m_profile, m_sound_speed, m_switch, m_trigger, m_uart, Sensors::Imagenex852::Arguments::orientation, Sensors::Imagenex852::Arguments::position, Sensors::Imagenex852::Arguments::profile_range, Sensors::Imagenex852::Arguments::pulse_length, Sensors::Imagenex852::Arguments::range, Sensors::Imagenex852::Arguments::sample_frequency, Sensors::Imagenex852::SwitchData::setDataPoints(), Sensors::Imagenex852::SwitchData::setProfileMinRange(), Sensors::Imagenex852::SwitchData::setPulseLength(), Sensors::Imagenex852::SwitchData::setRange(), Sensors::Imagenex852::Trigger::setSampleFrequency(), Sensors::Imagenex852::SwitchData::setStartGain(), Sensors::Imagenex852::Arguments::sspeed, Sensors::Imagenex852::Arguments::start_gain, and Sensors::Imagenex852::Arguments::uart_dev.
Arguments Sensors::Imagenex852::Task::m_args |
Task arguments.
Referenced by consume(), filterRange(), onMain(), onResourceAcquisition(), onUpdateParameters(), and Task().
IMC::Distance Sensors::Imagenex852::Task::m_dist |
Distance message.
Referenced by onMain(), onUpdateParameters(), and Task().
Monitors::MediumHandler Sensors::Imagenex852::Task::m_hand |
Medium handler.
Referenced by consume(), onDeactivation(), and onMain().
PatternFilter* Sensors::Imagenex852::Task::m_pfilt |
Pattern filter.
Referenced by onMain(), onResourceAcquisition(), and onResourceRelease().
IMC::SonarData Sensors::Imagenex852::Task::m_profile |
Profile message.
Referenced by onMain(), onUpdateParameters(), and Task().
double Sensors::Imagenex852::Task::m_sound_speed |
Last valid sound speed value.
Referenced by consume(), onMain(), and onUpdateParameters().
SwitchData Sensors::Imagenex852::Task::m_switch |
Switch data.
Referenced by filterRange(), onMain(), onResourceInitialization(), and onUpdateParameters().
Trigger Sensors::Imagenex852::Task::m_trigger |
Shot trigger.
Referenced by onActivation(), onDeactivation(), onResourceInitialization(), onResourceRelease(), and onUpdateParameters().
bool Sensors::Imagenex852::Task::m_uam_tx_ip |
SerialPort* Sensors::Imagenex852::Task::m_uart |
Serial port handle.
Referenced by onMain(), onResourceAcquisition(), onResourceInitialization(), onResourceRelease(), and onUpdateParameters().
Counter<double> Sensors::Imagenex852::Task::m_wdog |
Watchdog.
Referenced by onActivation(), onMain(), and onResourceAcquisition().