Implementation of a Phidgets device.
#include <PhidgetSpatial.hpp>
|
static int | AttachHandler (CPhidgetHandle ENC, void *userptr) |
|
static int | DetachHandler (CPhidgetHandle ENC, void *userptr) |
|
static int | ErrorHandler (CPhidgetHandle ENC, void *userptr, int ErrorCode, const char *Description) |
|
static int | SpatialDataHandler (CPhidgetSpatialHandle spatial, void *userptr, CPhidgetSpatial_SpatialEventDataHandle *data, int count) |
|
|
CPhidgetSpatialHandle | hSpatial0 |
|
yarp::os::Semaphore | hSemaphore |
|
double | acceleration [3] |
|
double | angularRate [3] |
|
double | magneticField [3] |
|
◆ ~PhidgetSpatial()
roboticslab::PhidgetSpatial::~PhidgetSpatial |
( |
| ) |
|
|
overridedefault |
◆ calibrateChannel() [1/2]
int PhidgetSpatial::calibrateChannel |
( |
int |
ch | ) |
|
|
override |
Calibrates one single channel.
- Parameters
-
- Returns
- status.
◆ calibrateChannel() [2/2]
int PhidgetSpatial::calibrateChannel |
( |
int |
ch, |
|
|
double |
value |
|
) |
| |
|
override |
Calibrates one single channel, using a calibration value.
- Parameters
-
ch | channel number. |
value | calibration value. |
- Returns
- status.
◆ calibrateSensor() [1/2]
int PhidgetSpatial::calibrateSensor |
( |
| ) |
|
|
override |
Calibrates the whole sensor.
- Returns
- status.
◆ calibrateSensor() [2/2]
int PhidgetSpatial::calibrateSensor |
( |
const yarp::sig::Vector & |
value | ) |
|
|
override |
Calibrates the whole sensor, using an vector of calibration values.
- Parameters
-
value | a vector of calibration values. |
- Returns
- status.
◆ getChannels()
int PhidgetSpatial::getChannels |
( |
| ) |
|
|
override |
Get the number of channels of the sensor.
- Returns
- number of channels (0 in case of errors).
◆ getState()
int PhidgetSpatial::getState |
( |
int |
ch | ) |
|
|
override |
Check the state value of a given channel.
- Parameters
-
- Returns
- status.
◆ open()
bool PhidgetSpatial::open |
( |
yarp::os::Searchable & |
config | ) |
|
|
override |
Open the DeviceDriver.
- Returns
- true/false upon success/failure
◆ read()
int PhidgetSpatial::read |
( |
yarp::sig::Vector & |
out | ) |
|
|
override |
Read a vector from the sensor.
- Parameters
-
out | a vector containing the sensor's last readings. |
- Returns
- AS_OK or return code. AS_TIMEOUT if the sensor timed-out.
◆ SpatialDataHandler()
int PhidgetSpatial::SpatialDataHandler |
( |
CPhidgetSpatialHandle |
spatial, |
|
|
void * |
userptr, |
|
|
CPhidgetSpatial_SpatialEventDataHandle * |
data, |
|
|
int |
count |
|
) |
| |
|
static |
printf("Number of Data Packets in this event: %d\n", count);
printf("---------------------------------------------\n");
The documentation for this class was generated from the following files:
- libraries/YarpPlugins/PhidgetSpatial/PhidgetSpatial.hpp
- libraries/YarpPlugins/PhidgetSpatial/DeviceDriverImpl.cpp
- libraries/YarpPlugins/PhidgetSpatial/IAnalogSensorImpl.cpp
- libraries/YarpPlugins/PhidgetSpatial/PhidgetSpatial.cpp