libvisiontransfer
10.8.0
|
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< TimestampedQuaternion > | 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. More... | |
TimestampedVector | imuGetAcceleration () |
Return the most recent calibrated accelerometer reading. More... | |
std::vector< TimestampedVector > | 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. More... | |
TimestampedVector | imuGetGyroscope () |
Return the most recent calibrated angular accelerations from the gyroscope. More... | |
std::vector< TimestampedVector > | 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. More... | |
TimestampedVector | imuGetMagnetometer () |
Return the most recent magnetometer readings. More... | |
std::vector< TimestampedVector > | 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. More... | |
TimestampedVector | imuGetLinearAcceleration () |
Return the most recent linear acceleration, i.e. with gravity factored out. More... | |
std::vector< TimestampedVector > | 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. More... | |
TimestampedVector | imuGetGravity () |
Return the most recent gravity measurement. More... | |
std::vector< TimestampedVector > | 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. More... | |
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 189 of file datachannelservice.cpp.
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 194 of file datachannelservice.cpp.
bool visiontransfer::DataChannelService::imuAvailable | ( | ) |
Return whether the device will provide data from an Inertial Measurement Unit.
Definition at line 205 of file datachannelservice.cpp.
TimestampedVector visiontransfer::DataChannelService::imuGetAcceleration | ( | ) |
Return the most recent calibrated accelerometer reading.
Definition at line 220 of file datachannelservice.cpp.
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 223 of file datachannelservice.cpp.
TimestampedVector visiontransfer::DataChannelService::imuGetGravity | ( | ) |
Return the most recent gravity measurement.
Definition at line 248 of file datachannelservice.cpp.
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 251 of file datachannelservice.cpp.
TimestampedVector visiontransfer::DataChannelService::imuGetGyroscope | ( | ) |
Return the most recent calibrated angular accelerations from the gyroscope.
Definition at line 227 of file datachannelservice.cpp.
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 230 of file datachannelservice.cpp.
TimestampedVector visiontransfer::DataChannelService::imuGetLinearAcceleration | ( | ) |
Return the most recent linear acceleration, i.e. with gravity factored out.
Definition at line 241 of file datachannelservice.cpp.
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 244 of file datachannelservice.cpp.
TimestampedVector visiontransfer::DataChannelService::imuGetMagnetometer | ( | ) |
Return the most recent magnetometer readings.
Definition at line 234 of file datachannelservice.cpp.
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 237 of file datachannelservice.cpp.
TimestampedQuaternion visiontransfer::DataChannelService::imuGetRotationQuaternion | ( | ) |
Return the most recent rotation quaternion, relative to gravity and magnetic north.
Definition at line 213 of file datachannelservice.cpp.
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 216 of file datachannelservice.cpp.