DUNE: Uniform Navigational Environment  2016.05.0
Sensors::ExplorerDVL::Driver Class Reference

Public Types

enum  InputTriggerBehaviour {
  ITB_OFF, ITB_RISING_EDGE, ITB_FALLING_EDGE, ITB_BOTH_EDGES,
  ITB_LOW_LEVEL, ITB_HIGH_LEVEL
}
 

Public Member Functions

 Driver (Tasks::Task *task, const std::string &uart, unsigned baud)
 
 ~Driver (void)
 
bool restartPinging (void)
 
bool startPinging (void)
 
bool stopPinging (void)
 
bool setDataFormat (unsigned value)
 
bool setDepthCells (uint8_t number)
 
bool setHeadingAlignment (double angle)
 
bool setTurnKey (bool value)
 
bool setMaximumTrackingDepth (unsigned value)
 
bool setBottomTrackPingsPerEnsemble (unsigned value)
 
bool setSoundSpeed (unsigned value)
 
bool setEarthCoordinates (void)
 
bool setManualSensorSource (void)
 
bool setInputTriggerEnable (InputTriggerBehaviour behaviour, uint16_t delay, uint16_t timeout=65535)
 
void setTimeout (double timeout)
 
size_t getTimeoutCount (void) const
 
size_t readData (uint8_t *bfr, size_t bfr_size)
 

Member Enumeration Documentation

Enumerator
ITB_OFF 
ITB_RISING_EDGE 
ITB_FALLING_EDGE 
ITB_BOTH_EDGES 
ITB_LOW_LEVEL 
ITB_HIGH_LEVEL 

Constructor & Destructor Documentation

Sensors::ExplorerDVL::Driver::Driver ( Tasks::Task *  task,
const std::string &  uart,
unsigned  baud 
)
inline

Constructor.

Parameters
[in]taskparent task.
[in]uartserial port device.
[in]baudserial port baud rate.
Sensors::ExplorerDVL::Driver::~Driver ( void  )
inline

Destructor.

Member Function Documentation

size_t Sensors::ExplorerDVL::Driver::getTimeoutCount ( void  ) const
inline

Get the number of timeouts that ocurred thus far.

Returns
number of timeouts.

Referenced by Sensors::ExplorerDVL::Task::dispatchStats().

size_t Sensors::ExplorerDVL::Driver::readData ( uint8_t *  bfr,
size_t  bfr_size 
)
inline

Read data.

Parameters
[in]bfrbuffer to hold data.
[in]bfr_sizesize of data buffer.
Returns
number of bytes read.

Referenced by Sensors::ExplorerDVL::Task::readSample().

bool Sensors::ExplorerDVL::Driver::restartPinging ( void  )
inline
bool Sensors::ExplorerDVL::Driver::setBottomTrackPingsPerEnsemble ( unsigned  value)
inline

Set the number of bottom-track pings to average together in each data ensemble.

Parameters
[in]numberof pings.
Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::setDataFormat ( unsigned  value)
inline

Set data format number.

Parameters
[in]valuedata format number.
Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::setDepthCells ( uint8_t  number)
inline

Set number of depth cells.

Parameters
[in]numbernumber of depth cells.
Returns
true if command succeeded, false otherwise.
bool Sensors::ExplorerDVL::Driver::setEarthCoordinates ( void  )
inline
bool Sensors::ExplorerDVL::Driver::setHeadingAlignment ( double  angle)
inline

Set heading alignment.

Parameters
[in]anglealignment angle in degree.
Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::setInputTriggerEnable ( InputTriggerBehaviour  behaviour,
uint16_t  delay,
uint16_t  timeout = 65535 
)
inline
bool Sensors::ExplorerDVL::Driver::setManualSensorSource ( void  )
inline

Set the source of environmental sensor data to manual.

This is useful when the DVL doesn't have any installed optional sensors.

Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::setMaximumTrackingDepth ( unsigned  value)
inline

Set maximum tracking depth.

Parameters
[in]valuemaximum tracking depth in meter.
Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::setSoundSpeed ( unsigned  value)
inline

Set speed of sound.

Parameters
[in]valuespeed of sound in m/s.
Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::setup().

void Sensors::ExplorerDVL::Driver::setTimeout ( double  timeout)
inline

Set the number of seconds to wait for a reply.

Parameters
[in]timeoutnumber of seconds to wait for a reply.

Referenced by Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::setTurnKey ( bool  value)
inline

Enable/disable automatic pinging.

Parameters
[in]valuetrue to enable, false to disable automatic pinging.
Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::startPinging ( void  )
inline

Start pinging and collecting data.

Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::configureInputTrigger(), restartPinging(), and Sensors::ExplorerDVL::Task::setup().

bool Sensors::ExplorerDVL::Driver::stopPinging ( void  )
inline

Stop pinging and enter command mode.

Returns
true if command succeeded, false otherwise.

Referenced by Sensors::ExplorerDVL::Task::configureInputTrigger(), restartPinging(), and Sensors::ExplorerDVL::Task::setup().

Collaboration diagram for Sensors::ExplorerDVL::Driver:
Collaboration graph