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

Classes

struct  Channel
 

Public Member Functions

 Driver (Tasks::Task *task, const std::string &uart_dev, unsigned uart_baud)
 
 ~Driver (void)
 
bool samplingStart (double timeout)
 
bool samplingStop (double timeout)
 
bool setSamplingRate (double value, double timeout)
 
bool detectionStart (double timeout)
 
bool detectionRead (double timeout)
 
bool setCalculatedChannels (double timeout)
 
bool readSample (double timeout=1.0)
 
std::vector< Channel >
::const_iterator 
beginChannels (void) const
 
std::vector< Channel >
::const_iterator 
endChannels (void) const
 

Constructor & Destructor Documentation

Sensors::SmartX::Driver::Driver ( Tasks::Task *  task,
const std::string &  uart_dev,
unsigned  uart_baud 
)
inline

Constructor.

Parameters
[in]taskparent task.
[in]uart_devserial port device.
[in]uart_baudserial port baud rate.
Sensors::SmartX::Driver::~Driver ( void  )
inline

Destructor.

Member Function Documentation

std::vector<Channel>::const_iterator Sensors::SmartX::Driver::beginChannels ( void  ) const
inline
bool Sensors::SmartX::Driver::detectionRead ( double  timeout)
inline

Read detection results.

Returns
true if detection procedure is complete, false otherwise.

Referenced by Sensors::SmartX::Task::updateStateMachine().

bool Sensors::SmartX::Driver::detectionStart ( double  timeout)
inline

Start detection procedure.

Returns
true if detection procedure was started, false otherwise.

Referenced by Sensors::SmartX::Task::updateStateMachine().

std::vector<Channel>::const_iterator Sensors::SmartX::Driver::endChannels ( void  ) const
inline
bool Sensors::SmartX::Driver::readSample ( double  timeout = 1.0)
inline
bool Sensors::SmartX::Driver::samplingStart ( double  timeout)
inline

Start sampling.

Returns
true if command was accepted, false otherwise.

Referenced by Sensors::SmartX::Task::updateStateMachine().

bool Sensors::SmartX::Driver::samplingStop ( double  timeout)
inline

Stop sampling.

Returns
true if command was accepted, false otherwise.

Referenced by Sensors::SmartX::Task::updateStateMachine().

bool Sensors::SmartX::Driver::setCalculatedChannels ( double  timeout)
inline
bool Sensors::SmartX::Driver::setSamplingRate ( double  value,
double  timeout 
)
inline

Set sampling rate.

Parameters
[in]valuesampling frequency in Hz.
Returns
true if command was accepted, false otherwise.

Referenced by Sensors::SmartX::Task::updateStateMachine().

Collaboration diagram for Sensors::SmartX::Driver:
Collaboration graph