libvisiontransfer  10.6.0
Classes | Public Member Functions | List of all members
visiontransfer::DataChannelService Class Reference

Detailed Description

This is the DataChannelServer public API, backwards compatible with C++-98

The DataChannelService encapsulates miscellaneous device services, which are not implemented on all Nerian devices. Availability can be queried; access to unavailable elements will normally return default values or silently execute nothing.

The imuGet...() and envGet...() functions access an inertial measurement unit with attached environmental sensor, realized with the Hillcrest BNO080 and Bosch BME280, respectively, on supported devices.

Definition at line 40 of file datachannelservice.h.

#include <visiontransfer/datachannelservice.h>

Classes

class  Pimpl
 

Public Member Functions

 DataChannelService (DeviceInfo deviceInfo, unsigned long pollDelayUSec=1000)
 
 DataChannelService (const char *ipAddr, unsigned long pollDelayUSec=1000)
 
bool imuAvailable ()
 Return whether the device will provide data from an Inertial Measurement Unit. More...
 
TimestampedQuaternion imuGetRotationQuaternion ()
 Return the most recent rotation quaternion, relative to gravity and magnetic north. More...
 
std::vector< TimestampedQuaternionimuGetRotationQuaternionSeries (int fromSec=0, int fromUSec=0, int untilSec=0x7FFFffffl, int untilUSec=0x7FFFffffl)
 Return the current contents of the rotation quaternion data buffer, optionally between specified timestamps. More...
 
TimestampedVector imuGetAcceleration ()
 Return the most recent calibrated accelerometer reading. More...
 
std::vector< TimestampedVectorimuGetAccelerationSeries (int fromSec=0, int fromUSec=0, int untilSec=0x7FFFffffl, int untilUSec=0x7FFFffffl)
 Return the current contents of the calibrated accelerometer data buffer, optionally between specified timestamps. More...
 
TimestampedVector imuGetGyroscope ()
 Return the most recent calibrated angular accelerations from the gyroscope. More...
 
std::vector< TimestampedVectorimuGetGyroscopeSeries (int fromSec=0, int fromUSec=0, int untilSec=0x7FFFffffl, int untilUSec=0x7FFFffffl)
 Return the current contents of the gyroscope data buffer, optionally between specified timestamps. More...
 
TimestampedVector imuGetMagnetometer ()
 Return the most recent magnetometer readings. More...
 
std::vector< TimestampedVectorimuGetMagnetometerSeries (int fromSec=0, int fromUSec=0, int untilSec=0x7FFFffffl, int untilUSec=0x7FFFffffl)
 Return the current contents of the magnetometer data buffer, optionally between specified timestamps. More...
 
TimestampedVector imuGetLinearAcceleration ()
 Return the most recent linear acceleration, i.e. with gravity factored out. More...
 
std::vector< TimestampedVectorimuGetLinearAccelerationSeries (int fromSec=0, int fromUSec=0, int untilSec=0x7FFFffffl, int untilUSec=0x7FFFffffl)
 Return the current contents of the linear acceleration (without gravity) data buffer, optionally between specified timestamps. More...
 
TimestampedVector imuGetGravity ()
 Return the most recent gravity measurement. More...
 
std::vector< TimestampedVectorimuGetGravitySeries (int fromSec=0, int fromUSec=0, int untilSec=0x7FFFffffl, int untilUSec=0x7FFFffffl)
 Return the current contents of the gravity data buffer, optionally between specified timestamps. More...
 

Constructor & Destructor Documentation

◆ DataChannelService() [1/2]

visiontransfer::DataChannelService::DataChannelService ( DeviceInfo  deviceInfo,
unsigned long  pollDelayUSec = 1000 
)

Initialize a new background data channel service, connecting to the specified device. The optional argument pollDelayUSec is used in the background receive/update loop, the default of 1000us can be overridden for the sake of efficiency or if minimum latency requirements differ.

Definition at line 175 of file datachannelservice.cpp.

◆ DataChannelService() [2/2]

visiontransfer::DataChannelService::DataChannelService ( const char *  ipAddr,
unsigned long  pollDelayUSec = 1000 
)

Initialize a new background data channel service, connecting to the specified IP address. The optional argument pollDelayUSec is used in the background receive/update loop, the default of 1000us can be overridden for the sake of efficiency or if minimum latency requirements differ.

Definition at line 180 of file datachannelservice.cpp.

Member Function Documentation

◆ imuAvailable()

bool visiontransfer::DataChannelService::imuAvailable ( )

Return whether the device will provide data from an Inertial Measurement Unit.

Definition at line 191 of file datachannelservice.cpp.

◆ imuGetAcceleration()

TimestampedVector visiontransfer::DataChannelService::imuGetAcceleration ( )

Return the most recent calibrated accelerometer reading.

Definition at line 206 of file datachannelservice.cpp.

◆ imuGetAccelerationSeries()

std::vector< TimestampedVector > visiontransfer::DataChannelService::imuGetAccelerationSeries ( int  fromSec = 0,
int  fromUSec = 0,
int  untilSec = 0x7FFFffffl,
int  untilUSec = 0x7FFFffffl 
)

Return the current contents of the calibrated accelerometer data buffer, optionally between specified timestamps.

This operation consumes an internal ring buffer up to the desired end stamp, data older than the desired window is silently discarded.

Definition at line 209 of file datachannelservice.cpp.

◆ imuGetGravity()

TimestampedVector visiontransfer::DataChannelService::imuGetGravity ( )

Return the most recent gravity measurement.

Definition at line 234 of file datachannelservice.cpp.

◆ imuGetGravitySeries()

std::vector< TimestampedVector > visiontransfer::DataChannelService::imuGetGravitySeries ( int  fromSec = 0,
int  fromUSec = 0,
int  untilSec = 0x7FFFffffl,
int  untilUSec = 0x7FFFffffl 
)

Return the current contents of the gravity data buffer, optionally between specified timestamps.

This operation consumes an internal ring buffer up to the desired end stamp, data older than the desired window is silently discarded.

Definition at line 237 of file datachannelservice.cpp.

◆ imuGetGyroscope()

TimestampedVector visiontransfer::DataChannelService::imuGetGyroscope ( )

Return the most recent calibrated angular accelerations from the gyroscope.

Definition at line 213 of file datachannelservice.cpp.

◆ imuGetGyroscopeSeries()

std::vector< TimestampedVector > visiontransfer::DataChannelService::imuGetGyroscopeSeries ( int  fromSec = 0,
int  fromUSec = 0,
int  untilSec = 0x7FFFffffl,
int  untilUSec = 0x7FFFffffl 
)

Return the current contents of the gyroscope data buffer, optionally between specified timestamps.

This operation consumes an internal ring buffer up to the desired end stamp, data older than the desired window is silently discarded.

Definition at line 216 of file datachannelservice.cpp.

◆ imuGetLinearAcceleration()

TimestampedVector visiontransfer::DataChannelService::imuGetLinearAcceleration ( )

Return the most recent linear acceleration, i.e. with gravity factored out.

Definition at line 227 of file datachannelservice.cpp.

◆ imuGetLinearAccelerationSeries()

std::vector< TimestampedVector > visiontransfer::DataChannelService::imuGetLinearAccelerationSeries ( int  fromSec = 0,
int  fromUSec = 0,
int  untilSec = 0x7FFFffffl,
int  untilUSec = 0x7FFFffffl 
)

Return the current contents of the linear acceleration (without gravity) data buffer, optionally between specified timestamps.

This operation consumes an internal ring buffer up to the desired end stamp, data older than the desired window is silently discarded.

Definition at line 230 of file datachannelservice.cpp.

◆ imuGetMagnetometer()

TimestampedVector visiontransfer::DataChannelService::imuGetMagnetometer ( )

Return the most recent magnetometer readings.

Definition at line 220 of file datachannelservice.cpp.

◆ imuGetMagnetometerSeries()

std::vector< TimestampedVector > visiontransfer::DataChannelService::imuGetMagnetometerSeries ( int  fromSec = 0,
int  fromUSec = 0,
int  untilSec = 0x7FFFffffl,
int  untilUSec = 0x7FFFffffl 
)

Return the current contents of the magnetometer data buffer, optionally between specified timestamps.

This operation consumes an internal ring buffer up to the desired end stamp, data older than the desired window is silently discarded.

Definition at line 223 of file datachannelservice.cpp.

◆ imuGetRotationQuaternion()

TimestampedQuaternion visiontransfer::DataChannelService::imuGetRotationQuaternion ( )

Return the most recent rotation quaternion, relative to gravity and magnetic north.

Definition at line 199 of file datachannelservice.cpp.

◆ imuGetRotationQuaternionSeries()

std::vector< TimestampedQuaternion > visiontransfer::DataChannelService::imuGetRotationQuaternionSeries ( int  fromSec = 0,
int  fromUSec = 0,
int  untilSec = 0x7FFFffffl,
int  untilUSec = 0x7FFFffffl 
)

Return the current contents of the rotation quaternion data buffer, optionally between specified timestamps.

This operation consumes an internal ring buffer up to the desired end stamp, data older than the desired window is silently discarded.

Definition at line 202 of file datachannelservice.cpp.


The documentation for this class was generated from the following files:
Allied Vision