7#ifndef __CANBUSINERTIALMTB_H__
8#define __CANBUSINERTIALMTB_H__
11#include <yarp/os/PeriodicThread.h>
12#include <yarp/dev/IAnalogSensor.h>
13#include <yarp/dev/PolyDriver.h>
14#include <yarp/dev/CanBusInterface.h>
15#include <yarp/sig/Vector.h>
19using namespace yarp::os;
60class CanBusInertialMTB :
public PeriodicThread,
public yarp::dev::IAnalogSensor,
public DeviceDriver
66 bool validateConf(yarp::os::Searchable& config,
67 std::vector<int> & canAddresses);
69 void setPrivateBoardStatus(
int boardIndex,
short status);
70 void setPrivateBoardAccStatus(
int boardIndex,
short status);
71 void setPrivateBoardGyroStatus(
int boardIndex,
short status);
83 std::vector<MTBInertialBoardInfo>
boards;
107 virtual bool open(yarp::os::Searchable& config);
108 virtual bool close();
111 virtual int read(yarp::sig::Vector &
out);
canbusinertialmtb : driver for CAN communication with inertial sensors (accelerometers,...
std::vector< short > sharedStatus
virtual void threadRelease()
std::vector< short > privateStatus
ICanBufferFactory * pCanBufferFactory
short privateGlobalStatus
virtual int read(yarp::sig::Vector &out)
std::vector< MTBInertialBoardInfo > boards
virtual int getChannels()
yarp::sig::Vector privateData
virtual bool open(yarp::os::Searchable &config)
virtual int getState(int ch)
virtual int calibrateChannel(int ch, double v)
CanBusInertialMTB(int period=20)
virtual bool threadInit()
unsigned char enabledSensors
unsigned char sensorPeriod
unsigned int vectorOffset
offset of the board data in the output vector
unsigned int nrOfChannels
6 if extAccAndGyro, 3 if acc