3 #ifndef __analogSensorEth_h__
4 #define __analogSensorEth_h__
6 #include <yarp/dev/DeviceDriver.h>
7 #include <yarp/dev/IAnalogSensor.h>
8 #include <yarp/os/PeriodicThread.h>
21 #include <yarp/os/LogStream.h>
26 class embObjAnalogSensor;
38 AnalogData(
int ch,
int buffsize): _data(0), _size(ch), _bufferSize(buffsize)
40 _data=
new double[_bufferSize];
41 for(
int k=0;k<_bufferSize;k++)
66 public yarp::dev::DeviceDriver,
89 bool open(yarp::os::Searchable &config);
93 virtual int read(yarp::sig::Vector &
out);
104 virtual bool update(eOprotID32_t id32,
double timestamp,
void* rxdata);
108 string boardIPstring;
110 eOipv4addr_t ipv4addr;
119 unsigned int counterSat;
120 unsigned int counterError;
121 unsigned int counterTimeout;
128 short _useCalibration;
144 bool extractGroup(Bottle &input, Bottle &
out,
const std::string &key1,
const std::string &txt,
int size);
145 bool fromConfig(yarp::os::Searchable &config);
151 bool fillDatOfStrain(
void *as_array_raw);
152 bool sendConfig2Strain(
void);
153 bool getFullscaleValues();
157 bool fillDatOfMais(
void *as_array_raw);
158 bool sendConfig2Mais(
void);
162 bool fillDatOfInertial(
void *inertialdata);
163 bool configServiceInertials(Searchable& globalConfig);
164 bool sendConfig2SkinInertial(yarp::os::Searchable &config);
169 void resetCounters();
170 void getCounters(
unsigned int &saturations,
unsigned int &errors,
unsigned int &timeouts);
Interface for a factory device; a device that can create objects.
double & operator[](int i)
AnalogData(int ch, int buffsize)
class yarp::dev::embObjAnalogSensor
virtual int getChannels()
virtual bool update(eOprotID32_t id32, double timestamp, void *rxdata)
virtual int calibrateSensor()
virtual bool initialised()
bool open(yarp::os::Searchable &config)
virtual int getState(int ch)
virtual int calibrateChannel(int ch, double v)
virtual eth::iethresType_t type()
virtual int read(yarp::sig::Vector &out)
Read a vector from the sensor.
Copyright (C) 2008 RobotCub Consortium.