VectorNav C++ Library
Static Public Member Functions | List of all members
vn::sensors::Searcher Class Reference

Helpful class for finding VectorNav sensors. More...

#include <searcher.h>

Static Public Member Functions

static void findPorts (std::vector< std::string > &portlist)
 Searches the serial port at all valid baudrates for a VectorNav sensor. More...
 
static bool search (const std::string &portName, int32_t *foundBaudrate)
 Searches the serial port at all valid baudrates for a VectorNav sensor. More...
 
static std::vector< std::pair< std::string, uint32_t > > search (void)
 Checks all available serial ports on the system for any VectorNav sensors. More...
 
static std::vector< std::pair< std::string, uint32_t > > search (std::vector< std::string > &portsToCheck)
 Checks the provided list of serial ports for any connected VectorNav sensors. More...
 
static bool test (std::string portName, uint32_t baudrate)
 Tests if a sensor is connected to the serial port at the specified baudrate. More...
 

Detailed Description

Helpful class for finding VectorNav sensors.

Member Function Documentation

static void vn::sensors::Searcher::findPorts ( std::vector< std::string > &  portlist)
static

Searches the serial port at all valid baudrates for a VectorNav sensor.

Parameters
[in]portNameThe serial port to search.
[out]foundBuadrateIf a sensor is found, this will be set to the baudrate the sensor is communicating at.
Returns
true if a sensor if found; otherwise false.
static bool vn::sensors::Searcher::search ( const std::string &  portName,
int32_t *  foundBaudrate 
)
static

Searches the serial port at all valid baudrates for a VectorNav sensor.

Parameters
[in]portNameThe serial port to search.
[out]foundBuadrateIf a sensor is found, this will be set to the baudrate the sensor is communicating at.
Returns
true if a sensor if found; otherwise false.
static std::vector<std::pair<std::string, uint32_t> > vn::sensors::Searcher::search ( void  )
static

Checks all available serial ports on the system for any VectorNav sensors.

Returns
Collection of serial ports and baudrates for all found sensors.
static std::vector<std::pair<std::string, uint32_t> > vn::sensors::Searcher::search ( std::vector< std::string > &  portsToCheck)
static

Checks the provided list of serial ports for any connected VectorNav sensors.

Parameters
[in]portsToCheckList of serial ports to check for sensors.
Returns
Collection of serial ports and baudrates for all found sensors.
static bool vn::sensors::Searcher::test ( std::string  portName,
uint32_t  baudrate 
)
static

Tests if a sensor is connected to the serial port at the specified baudrate.

Parameters
[in]portNameThe serial port to test.
[in]baudrateThe baudrate to test at.
Returns
true if a sensor if found; otherwise false.

The documentation for this class was generated from the following file: