|
iCub-main
|
canbusanalogsensor : driver for CAN communication with IIT's analog sensor boards, including the MAIS and STRAIN boards.
More...
#include <CanBusAnalogSensor.h>
Inheritance diagram for CanBusAnalogSensor:Public Member Functions | |
| CanBusAnalogSensor (int period=20) | |
| ~CanBusAnalogSensor () | |
| virtual bool | open (yarp::os::Searchable &config) |
| virtual bool | close () |
| virtual int | read (yarp::sig::Vector &out) |
| virtual int | getState (int ch) |
| virtual int | getChannels () |
| int | calibrateSensor () |
| virtual int | calibrateChannel (int ch, double v) |
| virtual int | calibrateSensor (const yarp::sig::Vector &v) |
| virtual int | calibrateChannel (int ch) |
| virtual bool | threadInit () |
| virtual void | threadRelease () |
| virtual void | run () |
Protected Attributes | |
| PolyDriver | driver |
| ICanBus * | pCanBus |
| ICanBufferFactory * | pCanBufferFactory |
| CanBuffer | inBuffer |
| CanBuffer | outBuffer |
| int | canDeviceNum |
| std::mutex | mtx |
| unsigned int | channelsNum |
| unsigned short | boardId |
| short | status |
| double | timeStamp |
| AnalogDataFormat | dataFormat |
| yarp::sig::Vector | data |
| yarp::sig::Vector | scaleFactor |
| unsigned short | useCalibration |
| bool | diagnostic |
canbusanalogsensor : driver for CAN communication with IIT's analog sensor boards, including the MAIS and STRAIN boards.
| YARP device name |
|---|
canbusanalogsensor |
Parameters accepted in the config argument of the open method:
| Parameter name | Type | Units | Default Value | Required | Description | Notes |
|---|---|---|---|---|---|---|
| canbusDevice | string | - | - | Yes | Yarp device name of CAN Bus wrapper | - |
| physDevice | string | - | - | Yes | Yarp device name for the low level CAN device driver | - |
| canDeviceNum | int | - | - | Yes | ID of the CAN Bus line | - |
| canAddress | int | - | - | Yes | CAN Bus Address for the sensor board | - |
| format | int | bits | - | Yes | Format (i.e. number of bits) of analog data transmitted on the CAN bus (16 for STRAIN board, 8 for MAIS board) | - |
| period | int | ms | - | Yes | Publication period (in ms) of the sensor reading on the Can Bus | - |
| channels | int | - | - | Yes | Number of output channels of the sensor (6 for STRAIN board, 16 for MAIS board) | - |
| useCalibration | int | - | - | No | If useCalibration is present and set to 1 output the calibrated readings, otherwise output the raw values | - |
| diagnostic | int | - | - | No | If diagnostic is present and set to 1 properly return the state of the sensor, otherwise always return IAnalogSensor::AS_OK | - |
Definition at line 42 of file CanBusAnalogSensor.h.
|
inline |
Definition at line 81 of file CanBusAnalogSensor.h.
|
inline |
Definition at line 85 of file CanBusAnalogSensor.h.
|
virtual |
Definition at line 350 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 338 of file CanBusAnalogSensor.cpp.
| int CanBusAnalogSensor::calibrateSensor | ( | ) |
Definition at line 332 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 344 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 288 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 327 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 319 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 19 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 307 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 446 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 356 of file CanBusAnalogSensor.cpp.
|
virtual |
Definition at line 518 of file CanBusAnalogSensor.cpp.
|
protected |
Definition at line 71 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 66 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 70 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 75 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 74 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 78 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 61 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 64 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 68 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 65 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 63 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 62 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 76 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 72 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 73 of file CanBusAnalogSensor.h.
|
protected |
Definition at line 77 of file CanBusAnalogSensor.h.