4 #ifndef __embObjStrain_h__
5 #define __embObjStrain_h__
7 #include <yarp/dev/DeviceDriver.h>
8 #include <yarp/dev/IAnalogSensor.h>
9 #include <yarp/os/PeriodicThread.h>
22 #include <yarp/os/LogStream.h>
34 #define EMBOBJSTRAIN_USESERVICEPARSER
53 public yarp::dev::DeviceDriver,
67 bool open(yarp::os::Searchable &config);
71 virtual int read(yarp::sig::Vector &
out);
82 virtual bool update(eOprotID32_t id32,
double timestamp,
void* rxdata);
88 eOipv4addr_t ipv4addr;
97 unsigned int counterSat;
98 unsigned int counterError;
99 unsigned int counterTimeout;
108 vector<double> analogdata;
109 vector<double> offset;
110 vector<double> scaleFactor;
112 bool scaleFactorIsFilled;
120 bool fromConfig(yarp::os::Searchable &config);
123 void printServiceConfig(
void);
126 bool fillScaleFactor();
127 bool sendConfig2Strain(
void);
130 void resetCounters();
131 void getCounters(
unsigned int &saturations,
unsigned int &errors,
unsigned int &timeouts);
Interface for a factory device; a device that can create objects.
embObjStrain : driver for communication with IIT's STRAIN board over EMS boards.
virtual int read(yarp::sig::Vector &out)
Read a vector from the sensor.
virtual eth::iethresType_t type()
virtual bool update(eOprotID32_t id32, double timestamp, void *rxdata)
virtual int calibrateChannel(int ch, double v)
virtual int getState(int ch)
virtual bool initialised()
virtual int getChannels()
virtual int calibrateSensor()
bool open(yarp::os::Searchable &config)
Copyright (C) 2008 RobotCub Consortium.