DUNE: Uniform Navigational Environment  2016.05.0
Transports::Evologics::Driver Class Reference

Public Member Functions

 Driver (Tasks::Task *task, IO::Handle *handle)
 
 ~Driver (void)
 
void sendReset (void)
 
void setAddress (unsigned addr)
 
void setSourceLevel (unsigned value)
 
void setLowGain (bool low_gain)
 
void setIdleTimeout (unsigned value)
 
void setRetryCount (unsigned value)
 
void setRetryCountIM (unsigned value)
 
void setRetryTimeout (unsigned value)
 
std::string getFirmwareVersion (void)
 
void setExtendedNotifications (bool enable)
 
void setPromiscuous (bool enable)
 
void setHighestAddress (unsigned value)
 
void sendIM (const uint8_t *data, size_t data_size, unsigned dst, bool ack)
 
void sendBurst (const uint8_t *data, size_t data_size, unsigned dst)
 
void sendPBM (const uint8_t *data, size_t data_size, unsigned dst)
 
unsigned getPropagationTime (void)
 
unsigned getSoundSpeed (void)
 
void setSoundSpeed (unsigned value)
 
void setCarrierWaveformID (unsigned value)
 
void setPositionDataOutput (bool enable)
 
uint32_t getClock (void)
 
std::vector< unsigned > getMultipathStructure (void)
 
void switchToNoiseState (void)
 
void switchToListenState (void)
 
void getRSSI (void)
 
void parseReceivedBurst (const std::string &str, RecvIM &msg)
 
void parse (const std::string &str, RecvIM &msg, bool piggyback)
 

Constructor & Destructor Documentation

Transports::Evologics::Driver::Driver ( Tasks::Task *  task,
IO::Handle *  handle 
)
inline

Constructor.

Parameters
[in]taskparent task.
[in]handleI/O handle.
Transports::Evologics::Driver::~Driver ( void  )
inline

Destructor.

Member Function Documentation

uint32_t Transports::Evologics::Driver::getClock ( void  )
inline

Retrieve value of system clock.

Returns
sound speed (in m/s).

Referenced by Transports::Evologics::Task::keepAlive().

std::string Transports::Evologics::Driver::getFirmwareVersion ( void  )
inline

Retrieve the firmware version string.

Returns
firmware version.

Referenced by parse().

std::vector<unsigned> Transports::Evologics::Driver::getMultipathStructure ( void  )
inline

Retrieve a table illustrating the structure of the last received acoustic signal’s multipath propagation from its source to the local device.

Returns
multipath structure.

Referenced by Transports::Evologics::Task::handleBurstMessage(), Transports::Evologics::Task::handleInstantMessage(), and Transports::Evologics::Task::handleMessageDelivered().

unsigned Transports::Evologics::Driver::getPropagationTime ( void  )
inline

Retrieve the last computed acoustic signal propagation time between communicating devices.

Returns
propagation time (microsecond).

Referenced by Transports::Evologics::Task::handleMessageDelivered().

void Transports::Evologics::Driver::getRSSI ( void  )
inline
unsigned Transports::Evologics::Driver::getSoundSpeed ( void  )
inline

Retrieve the configured sound speed.

Returns
sound speed (in m/s).
void Transports::Evologics::Driver::sendBurst ( const uint8_t *  data,
size_t  data_size,
unsigned  dst 
)
inline

Send burst data.

Parameters
[in]datadata to send.
[in]data_sizenumber of bytes to send.
[in]dstdestination address.

Referenced by Transports::Evologics::Task::consume().

void Transports::Evologics::Driver::sendIM ( const uint8_t *  data,
size_t  data_size,
unsigned  dst,
bool  ack 
)
inline

Send instant message.

Parameters
[in]datadata to send.
[in]data_sizenumber of bytes to send.
[in]dstdestination address.
[in]acktrue to wait for acknowledgment, false otherwise.

Referenced by Transports::Evologics::Task::consume().

void Transports::Evologics::Driver::sendPBM ( const uint8_t *  data,
size_t  data_size,
unsigned  dst 
)
inline

Send piggyback instant message.

Parameters
[in]datadata to send.
[in]data_sizenumber of bytes to send.
[in]dstdestination address.

Referenced by Transports::Evologics::Task::consume().

void Transports::Evologics::Driver::sendReset ( void  )
inline

Reset device.

void Transports::Evologics::Driver::setAddress ( unsigned  addr)
inline

Set modem address.

Parameters
[in]addraddress.

Referenced by Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::setCarrierWaveformID ( unsigned  value)
inline
void Transports::Evologics::Driver::setExtendedNotifications ( bool  enable)
inline
void Transports::Evologics::Driver::setHighestAddress ( unsigned  value)
inline

Set highest address.

Parameters
[in]valuehighest address.

Referenced by Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::setIdleTimeout ( unsigned  value)
inline

Set the timeout before closing an idle acoustic connection.

Parameters
[in]valuetimeout (s).

Referenced by Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::setLowGain ( bool  low_gain)
inline

Set low gain mode.

Recommended for short distances or testing purposes.

Parameters
[in]low_gaintrue to enable low gain, false otherwise.

Referenced by Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::setPositionDataOutput ( bool  enable)
inline
void Transports::Evologics::Driver::setPromiscuous ( bool  enable)
inline
void Transports::Evologics::Driver::setRetryCount ( unsigned  value)
inline

Set how many times will the device retry to establish an acoustic connection.

Parameters
[in]valuenumber of retries.

Referenced by Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::setRetryCountIM ( unsigned  value)
inline

Set the number of instant message delivery retries.

Parameters
[in]valuenumber of delivery retries.

Referenced by Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::setRetryTimeout ( unsigned  value)
inline

Set the time interval that the device waits for a response to its acoustic connection establishment request.

Parameters
[in]valueinterval (millisecond).

Referenced by Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::setSoundSpeed ( unsigned  value)
inline

Set sound speed.

Parameters
[in]valuesound speed (m/s).
void Transports::Evologics::Driver::setSourceLevel ( unsigned  value)
inline

Set the sound pressure level (SPL) in transmission mode.

Parameters
[in]valuefrom 3 to 0.

Referenced by Transports::Evologics::Task::consume(), and Transports::Evologics::Task::onResourceInitialization().

void Transports::Evologics::Driver::switchToListenState ( void  )
inline
void Transports::Evologics::Driver::switchToNoiseState ( void  )
inline
Collaboration diagram for Transports::Evologics::Driver:
Collaboration graph