VectorNav .NET Library
Public Member Functions | Static Public Member Functions | Properties | List of all members
VectorNav.Sensor.EzAsyncData Class Reference

Allows easy and reliable access to asynchronous data from a VectorNav sensor at the cost of a slight performance hit. More...

Public Member Functions

 EzAsyncData (VnSensor sensor)
 
void Disconnect ()
 Disconnects from the VectorNav sensor. More...
 
CompositeData GetNextData ()
 This method will get the next data packet available and block until a data packet is received if there is currently not data available. More...
 
CompositeData GetNextData (int timeoutMs)
 This method will get the next data packet available and block until a data packet is received if there is currently not data available. More...
 

Static Public Member Functions

static EzAsyncData Connect (string portName, UInt32 baudrate)
 Connects to a sensor with the specified connection parameters. More...
 

Properties

CompositeData CurrentData [get]
 Returns the latest collection of current data received from asychronous messages from the sensor. More...
 
VnSensor Sensor [get]
 Returns the wrapped VnSensor. More...
 

Detailed Description

Allows easy and reliable access to asynchronous data from a VectorNav sensor at the cost of a slight performance hit.

Member Function Documentation

static EzAsyncData VectorNav.Sensor.EzAsyncData.Connect ( string  portName,
UInt32  baudrate 
)
static

Connects to a sensor with the specified connection parameters.

Parameters
portNameThe COM port name.
baudrateBaudrate to connect to the sensor at.
Returns
EzAsyncData object wrapping the connected sensor and providing easy access to asynchronous data.
void VectorNav.Sensor.EzAsyncData.Disconnect ( )

Disconnects from the VectorNav sensor.

CompositeData VectorNav.Sensor.EzAsyncData.GetNextData ( )

This method will get the next data packet available and block until a data packet is received if there is currently not data available.

Returns
The received data packet.
CompositeData VectorNav.Sensor.EzAsyncData.GetNextData ( int  timeoutMs)

This method will get the next data packet available and block until a data packet is received if there is currently not data available.

Parameters
timeoutMsThe number of milliseconds to wait for the next available data.
Returns
If data is received within the specified timeout, then data will be returned. If data is not received by then, null will be returned.

Property Documentation

CompositeData VectorNav.Sensor.EzAsyncData.CurrentData
get

Returns the latest collection of current data received from asychronous messages from the sensor.

VnSensor VectorNav.Sensor.EzAsyncData.Sensor
get

Returns the wrapped VnSensor.


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