DUNE: Uniform Navigational Environment
2019.02.1
|
Task.
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
void | initializeSonarData (unsigned data_size) |
void | onResourceInitialization (void) |
void | onResourceRelease (void) |
void | onRequestActivation (void) |
void | onActivation (void) |
void | onDeactivation (void) |
void | checkActivationProgress (void) |
void | openLog (const Path &path) |
void | closeLog (void) |
void | consume (const IMC::EstimatedState *msg) |
void | consume (const IMC::LoggingControl *msg) |
void | consume (const IMC::SoundSpeed *msg) |
unsigned | getIndex (unsigned value, const unsigned *table, unsigned table_size) |
void | setRange (unsigned value) |
void | setStartGain (unsigned value) |
void | setSwitchDelay (unsigned value) |
void | setAbsorption (unsigned value) |
void | setDataPoints (unsigned value) |
void | setAutoMode (bool auto_mode) |
void | setNadirAngle (float angle) |
void | setAutoGainValue (unsigned value) |
bool | ping (unsigned data_point) |
void | sendExternalControl (Address addr, unsigned port) |
bool | getEcho (void) |
void | writeToFile (void) |
void | update (void) |
void | checkAltitude (void) |
bool | request (void) |
void | process (void) |
void | checkRange (void) |
void | onMain (void) |
Public Attributes | |
TCPSocket * | m_tcp |
UDPSocket * | m_udp |
Frame837 * | m_frame837 |
Frame83P * | m_frame83P |
IMC::SonarData * | m_data |
ExternalControl * | m_ec |
uint8_t | m_sdata [c_sdata_size] |
uint8_t | m_rdata_hdr [c_rdata_hdr_size] |
uint8_t | m_rdata_ftr [c_rdata_ftr_size] |
IMC::EstimatedState | m_estate |
std::ofstream | m_log_file |
Path | m_log_path |
IMC::PowerChannelControl | m_power_channel_control |
Counter< double > | m_countdown |
Counter< double > | m_range_counter |
Time::Counter< float > | m_wdog |
Arguments | m_args |
|
inline |
Constructor.
References Sensors::Imagenex837B::Arguments::absorption, Sensors::Imagenex837B::Arguments::addr, Sensors::Imagenex837B::Arguments::auto_gain, Sensors::Imagenex837B::Arguments::auto_gain_value, Sensors::Imagenex837B::Arguments::data_points, Sensors::Imagenex837B::Arguments::def_range, Sensors::Imagenex837B::Arguments::file_name, Sensors::Imagenex837B::Arguments::mod, Sensors::Imagenex837B::Arguments::mod_add, Sensors::Imagenex837B::Arguments::mod_mul, Sensors::Imagenex837B::Arguments::mod_timer, Sensors::Imagenex837B::Arguments::nadir, Sensors::Imagenex837B::Arguments::offset, Sensors::Imagenex837B::Arguments::output_format, Sensors::Imagenex837B::Arguments::port, Sensors::Imagenex837B::Arguments::power_channel, Sensors::Imagenex837B::SD_FREQUENCY, Sensors::Imagenex837B::Arguments::start_gain, Sensors::Imagenex837B::Arguments::switch_delay, Sensors::Imagenex837B::Arguments::tilt_angle, Sensors::Imagenex837B::Arguments::timeout_error, and Sensors::Imagenex837B::Arguments::xdcr.
|
inline |
|
inline |
Check current water column.
References Sensors::Imagenex837B::Arguments::mod_add, and Sensors::Imagenex837B::Arguments::mod_mul.
|
inline |
Check sonar range.
References Sensors::Imagenex837B::Arguments::mod.
|
inline |
Close current log file.
|
inline |
|
inline |
References Sensors::Imagenex837B::Arguments::file_name.
|
inline |
|
inline |
Request get echo using External Control frame.
References Sensors::Imagenex837B::Arguments::addr, Sensors::Imagenex837B::Frame::getData(), Sensors::Imagenex837B::Frame83P::getMaxSize(), Sensors::Imagenex837B::Frame83P::getMessageData(), Sensors::Imagenex837B::Frame83P::getMessageSize(), Sensors::Imagenex837B::Frame83P::getRange(), Sensors::Imagenex837B::Arguments::port, and Sensors::Imagenex837B::Frame83P::verifyReturn().
|
inline |
Get index from table according with given value.
[in] | value | value to be checked in the table. |
[in] | table | vector with parameters. |
[in] | table_size | size of the vector. |
|
inline |
Initialize IMC sonar data holder.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Update task parameters.
References Sensors::Imagenex837B::Arguments::absorption, Sensors::Imagenex837B::Arguments::addr, Sensors::Imagenex837B::Arguments::auto_gain, Sensors::Imagenex837B::Arguments::auto_gain_value, Sensors::Imagenex837B::Arguments::data_points, Sensors::Imagenex837B::Arguments::def_range, Sensors::Imagenex837B::Frame83P::getMessageSize(), Sensors::Imagenex837B::Arguments::mod_timer, Sensors::Imagenex837B::Arguments::nadir, Sensors::Imagenex837B::Arguments::output_format, Sensors::Imagenex837B::Arguments::port, Sensors::Imagenex837B::Arguments::power_channel, Sensors::Imagenex837B::Frame::setProfileTiltAngle(), Sensors::Imagenex837B::ExternalControl::setProfileTiltAngle(), Sensors::Imagenex837B::Arguments::start_gain, Sensors::Imagenex837B::Arguments::switch_delay, Sensors::Imagenex837B::Arguments::tilt_angle, and Sensors::Imagenex837B::Arguments::timeout_error.
|
inline |
Open a log file to hold 837 or 83P files.
[in] | path | desired log path. |
|
inline |
Request device to ping.
[in] | data_point | data index. |
References Sensors::Imagenex837B::Frame837::getMessageData(), and Sensors::Imagenex837B::SD_PACKET_NUM.
|
inline |
Process return data.
|
inline |
Request sonar data.
References Sensors::Imagenex837B::Arguments::data_points.
|
inline |
|
inline |
Define switch command data absorption value.
[in] | value | absorption value. |
References Sensors::Imagenex837B::SD_ABSORPTION.
|
inline |
Define switch command data auto gain threshold.
[in] | value | auto gain threshold. |
References Sensors::Imagenex837B::SD_AGC_THRESHOLD.
|
inline |
Define switch command data auto mode.
References Sensors::Imagenex837B::SD_RUN_MODE.
|
inline |
Define switch command data number of data points.
[in] | value | number of data points. |
References Sensors::Imagenex837B::SD_DATA_POINTS, and Sensors::Imagenex837B::Frame837::setExtendedDataPoints().
|
inline |
Define switch command data number nadir angle.
[in] | angle | nadir angle. |
References Sensors::Imagenex837B::SD_NADIR_HI, Sensors::Imagenex837B::SD_NADIR_LO, Sensors::Imagenex837B::ExternalControl::setDisplayMode(), Sensors::Imagenex837B::Frame837::setDisplayMode(), and Sensors::Imagenex837B::Arguments::xdcr.
|
inline |
Define switch command data range.
[in] | value | range. |
References Sensors::Imagenex837B::SD_PULSE_LEN, Sensors::Imagenex837B::SD_RANGE, Sensors::Imagenex837B::Frame837::setPulseLength(), Sensors::Imagenex837B::ExternalControl::setRange(), and Sensors::Imagenex837B::Frame::setRange().
|
inline |
Define switch command data start gain.
[in] | value | start gain. |
References Sensors::Imagenex837B::SD_START_GAIN, Sensors::Imagenex837B::ExternalControl::setGain(), and Sensors::Imagenex837B::Frame837::setStartGain().
|
inline |
Define switch command data switch delay.
[in] | value | switch delay. |
References Sensors::Imagenex837B::SD_SWITCH_DELAY.
|
inline |
Update state (to be logged in 837/83P file formats).
References Sensors::Imagenex837B::Arguments::nadir, Sensors::Imagenex837B::Arguments::offset, Sensors::Imagenex837B::Frame::setCourse(), Sensors::Imagenex837B::Frame::setGpsData(), Sensors::Imagenex837B::Frame::setHeading(), Sensors::Imagenex837B::Frame::setPitch(), Sensors::Imagenex837B::Frame::setRoll(), and Sensors::Imagenex837B::Frame::setSpeed().
|
inline |
Handle sonar data to 837/83P file formats.
References Sensors::Imagenex837B::Frame::getData(), Sensors::Imagenex837B::Frame83P::getSize(), Sensors::Imagenex837B::Frame837::getSize(), Sensors::Imagenex837B::Frame::setDateTime(), Sensors::Imagenex837B::Frame837::setFirmwareVersion(), Sensors::Imagenex837B::Frame837::setRepRate(), and Sensors::Imagenex837B::Frame837::setSerialStatus().
Arguments Sensors::Imagenex837B::Task::m_args |
Configuration parameters.
Counter<double> Sensors::Imagenex837B::Task::m_countdown |
Activation/deactivation timer.
IMC::SonarData* Sensors::Imagenex837B::Task::m_data |
Sonar Return Data.
ExternalControl* Sensors::Imagenex837B::Task::m_ec |
External Control frame.
IMC::EstimatedState Sensors::Imagenex837B::Task::m_estate |
Estimated state.
std::ofstream Sensors::Imagenex837B::Task::m_log_file |
Log file.
Path Sensors::Imagenex837B::Task::m_log_path |
Log filename.
IMC::PowerChannelControl Sensors::Imagenex837B::Task::m_power_channel_control |
Power channel control.
Counter<double> Sensors::Imagenex837B::Task::m_range_counter |
Range adaptive modifier counter.
uint8_t Sensors::Imagenex837B::Task::m_rdata_ftr[c_rdata_ftr_size] |
Footer Return data.
uint8_t Sensors::Imagenex837B::Task::m_rdata_hdr[c_rdata_hdr_size] |
Header Return data.
uint8_t Sensors::Imagenex837B::Task::m_sdata[c_sdata_size] |
Output switch data.
TCPSocket* Sensors::Imagenex837B::Task::m_tcp |
TCP socket.
UDPSocket* Sensors::Imagenex837B::Task::m_udp |
UDP socket.
Time::Counter<float> Sensors::Imagenex837B::Task::m_wdog |
Watchdog.