DUNE: Uniform Navigational Environment  2.6.0-rc1
Sensors::Imagenex837B::Task Struct Reference

Detailed Description

Task.

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
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 setFrequency (void)
 
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)
 
void ping (unsigned data_point)
 
void handleSonarData (void)
 
void updateState (void)
 
void checkAltitude (void)
 
void task (void)
 

Public Attributes

TCPSocket * m_sock
 
Frame m_frame
 
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::SonarData m_ping
 
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
 
Arguments m_args
 

Constructor & Destructor Documentation

Member Function Documentation

void Sensors::Imagenex837B::Task::checkActivationProgress ( void  )
inline
void Sensors::Imagenex837B::Task::checkAltitude ( void  )
inline
void Sensors::Imagenex837B::Task::closeLog ( void  )
inline
void Sensors::Imagenex837B::Task::consume ( const IMC::EstimatedState *  msg)
inline

References m_estate.

void Sensors::Imagenex837B::Task::consume ( const IMC::LoggingControl *  msg)
inline
void Sensors::Imagenex837B::Task::consume ( const IMC::SoundSpeed *  msg)
inline
unsigned Sensors::Imagenex837B::Task::getIndex ( unsigned  value,
const unsigned *  table,
unsigned  table_size 
)
inline

Get index from table according with given value.

Parameters
[in]valuevalue to be checked in the table.
[in]tablevector with parameters.
[in]table_sizesize of the vector.
Returns
index of the vector.

Referenced by setRange().

void Sensors::Imagenex837B::Task::onActivation ( void  )
inline
void Sensors::Imagenex837B::Task::onDeactivation ( void  )
inline
void Sensors::Imagenex837B::Task::onRequestActivation ( void  )
inline
void Sensors::Imagenex837B::Task::onResourceInitialization ( void  )
inline

References closeLog().

void Sensors::Imagenex837B::Task::onResourceRelease ( void  )
inline
void Sensors::Imagenex837B::Task::openLog ( const Path &  path)
inline

References closeLog(), m_log_file, and m_log_path.

Referenced by consume().

void Sensors::Imagenex837B::Task::ping ( unsigned  data_point)
inline
void Sensors::Imagenex837B::Task::setAbsorption ( unsigned  value)
inline

Define switch command data absorption value.

Parameters
[in]valueabsorption value.

References m_sdata, and Sensors::Imagenex837B::SD_ABSORPTION.

Referenced by onUpdateParameters().

void Sensors::Imagenex837B::Task::setAutoGainValue ( unsigned  value)
inline

Define switch command data auto gain threshold.

Parameters
[in]valueauto gain threshold.

References m_sdata, and Sensors::Imagenex837B::SD_AGC_THRESHOLD.

Referenced by onUpdateParameters().

void Sensors::Imagenex837B::Task::setAutoMode ( bool  auto_mode)
inline

Define switch command data auto mode.

References m_sdata, and Sensors::Imagenex837B::SD_RUN_MODE.

Referenced by onUpdateParameters().

void Sensors::Imagenex837B::Task::setDataPoints ( unsigned  value)
inline

Define switch command data number of data points.

Parameters
[in]valuenumber of data points.

References m_frame, m_sdata, Sensors::Imagenex837B::SD_DATA_POINTS, and Sensors::Imagenex837B::Frame::setExtendedDataPoints().

Referenced by onUpdateParameters().

void Sensors::Imagenex837B::Task::setFrequency ( void  )
inline

Define switch command data frequency value.

References m_ping, m_sdata, and Sensors::Imagenex837B::SD_FREQUENCY.

Referenced by Task().

void Sensors::Imagenex837B::Task::setNadirAngle ( float  angle)
inline
void Sensors::Imagenex837B::Task::setRange ( unsigned  value)
inline
void Sensors::Imagenex837B::Task::setStartGain ( unsigned  value)
inline

Define switch command data start gain.

Parameters
[in]valuestart gain.

References m_frame, m_sdata, Sensors::Imagenex837B::SD_START_GAIN, and Sensors::Imagenex837B::Frame::setStartGain().

Referenced by onUpdateParameters().

void Sensors::Imagenex837B::Task::setSwitchDelay ( unsigned  value)
inline

Define switch command data switch delay.

Parameters
[in]valueswitch delay.

References m_sdata, and Sensors::Imagenex837B::SD_SWITCH_DELAY.

Referenced by onUpdateParameters().

Member Data Documentation

Arguments Sensors::Imagenex837B::Task::m_args
Counter<double> Sensors::Imagenex837B::Task::m_countdown

Activation/deactivation timer.

Referenced by checkActivationProgress(), onRequestActivation(), and onUpdateParameters().

IMC::EstimatedState Sensors::Imagenex837B::Task::m_estate

Estimated state.

Referenced by checkAltitude(), consume(), and updateState().

std::ofstream Sensors::Imagenex837B::Task::m_log_file

Log file.

Referenced by closeLog(), handleSonarData(), and openLog().

Path Sensors::Imagenex837B::Task::m_log_path

Log filename.

Referenced by closeLog(), and openLog().

IMC::SonarData Sensors::Imagenex837B::Task::m_ping

Single sidescan ping.

Referenced by onUpdateParameters(), ping(), setFrequency(), setRange(), Task(), and task().

IMC::PowerChannelControl Sensors::Imagenex837B::Task::m_power_channel_control

Power channel control.

Referenced by onDeactivation(), onRequestActivation(), and onUpdateParameters().

Counter<double> Sensors::Imagenex837B::Task::m_range_counter

Range adaptive modifier counter.

Referenced by onUpdateParameters(), and task().

uint8_t Sensors::Imagenex837B::Task::m_rdata_ftr[c_rdata_ftr_size]

Footer Return data.

Referenced by ping().

uint8_t Sensors::Imagenex837B::Task::m_rdata_hdr[c_rdata_hdr_size]

Header Return data.

Referenced by handleSonarData(), and ping().

uint8_t Sensors::Imagenex837B::Task::m_sdata[c_sdata_size]
TCPSocket* Sensors::Imagenex837B::Task::m_sock

TCP socket.

Referenced by checkActivationProgress(), onDeactivation(), ping(), and task().

Collaboration diagram for Sensors::Imagenex837B::Task:
Collaboration graph