DUNE: Uniform Navigational Environment  2016.09.0
Sensors::SonTekArgonaut::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
void onUpdateParameters (void)
 
void onEntityReservation (void)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
bool read (const char *str, double timeout=1.0)
 
bool sendCommand (const char *str, const char *reply, double timeout=2.0)
 
void onResourceInitialization (void)
 
void readSample (void)
 
void onMain (void)
 

Public Attributes

SerialPort * m_uart
 
Navigation::BeamFilter * m_filter
 
char m_buffer [512]
 
IMC::Temperature m_temp
 
IMC::GroundVelocity m_gvel
 
IMC::WaterVelocity m_wvel
 
IMC::Distance m_dist [c_beam_count+1]
 
Counter< double > m_wdog
 
Arguments m_args
 

Constructor & Destructor Documentation

Sensors::SonTekArgonaut::Task::~Task ( void  )
inline

References onResourceRelease().

Member Function Documentation

void Sensors::SonTekArgonaut::Task::onEntityReservation ( void  )
inline

References m_dist.

void Sensors::SonTekArgonaut::Task::onMain ( void  )
inline
void Sensors::SonTekArgonaut::Task::onResourceAcquisition ( void  )
inline
void Sensors::SonTekArgonaut::Task::onResourceInitialization ( void  )
inline

References m_uart, read(), and sendCommand().

void Sensors::SonTekArgonaut::Task::onResourceRelease ( void  )
inline

References m_filter, and m_uart.

Referenced by ~Task().

bool Sensors::SonTekArgonaut::Task::read ( const char *  str,
double  timeout = 1.0 
)
inline

References m_uart.

Referenced by onResourceInitialization(), and sendCommand().

void Sensors::SonTekArgonaut::Task::readSample ( void  )
inline
bool Sensors::SonTekArgonaut::Task::sendCommand ( const char *  str,
const char *  reply,
double  timeout = 2.0 
)
inline

References m_uart, and read().

Referenced by onResourceInitialization().

Member Data Documentation

Arguments Sensors::SonTekArgonaut::Task::m_args

Task arguments.

Referenced by onResourceAcquisition(), onUpdateParameters(), and Task().

char Sensors::SonTekArgonaut::Task::m_buffer[512]

Internal buffer.

Referenced by readSample().

IMC::Distance Sensors::SonTekArgonaut::Task::m_dist[c_beam_count+1]
Navigation::BeamFilter* Sensors::SonTekArgonaut::Task::m_filter

Beam Filter.

Referenced by onResourceAcquisition(), onResourceRelease(), and readSample().

IMC::GroundVelocity Sensors::SonTekArgonaut::Task::m_gvel

Ground velocity.

Referenced by readSample().

IMC::Temperature Sensors::SonTekArgonaut::Task::m_temp

Temperature.

Referenced by readSample().

SerialPort* Sensors::SonTekArgonaut::Task::m_uart
Counter<double> Sensors::SonTekArgonaut::Task::m_wdog

Input watchdog.

Referenced by onMain(), onUpdateParameters(), and readSample().

IMC::WaterVelocity Sensors::SonTekArgonaut::Task::m_wvel

Water velocity.

Referenced by readSample().

Collaboration diagram for Sensors::SonTekArgonaut::Task:
Collaboration graph