41 #ifndef YOCTO_GENERICSENSOR_H 42 #define YOCTO_GENERICSENSOR_H 57 #ifndef _Y_SIGNALSAMPLING_ENUM 58 #define _Y_SIGNALSAMPLING_ENUM 67 #define Y_SIGNALVALUE_INVALID (YAPI_INVALID_DOUBLE) 68 #define Y_SIGNALUNIT_INVALID (YAPI_INVALID_STRING) 69 #define Y_SIGNALRANGE_INVALID (YAPI_INVALID_STRING) 70 #define Y_VALUERANGE_INVALID (YAPI_INVALID_STRING) 71 #define Y_SIGNALBIAS_INVALID (YAPI_INVALID_DOUBLE) 86 #pragma option push -w-8022 137 int set_unit(
const string& newval);
139 {
return this->set_unit(newval); }
149 double get_signalValue(
void);
152 {
return this->get_signalValue(); }
161 string get_signalUnit(
void);
164 {
return this->get_signalUnit(); }
173 string get_signalRange(
void);
176 {
return this->get_signalRange(); }
187 int set_signalRange(
const string& newval);
189 {
return this->set_signalRange(newval); }
198 string get_valueRange(
void);
201 {
return this->get_valueRange(); }
213 int set_valueRange(
const string& newval);
215 {
return this->set_valueRange(newval); }
228 int set_signalBias(
double newval);
230 {
return this->set_signalBias(newval); }
241 double get_signalBias(
void);
244 {
return this->get_signalBias(); }
263 {
return this->get_signalSampling(); }
283 {
return this->set_signalSampling(newval); }
354 virtual int zeroAdjust(
void);
369 {
return this->nextGenericSensor();}
void(* YGenericSensorValueCallback)(YGenericSensor *func, const string &functionValue)
static YGenericSensor * First(void)
void(* YGenericSensorTimedReportCallback)(YGenericSensor *func, YMeasure measure)
YGenericSensor * yFindGenericSensor(const string &func)
int setSignalSampling(Y_SIGNALSAMPLING_enum newval)
YGenericSensor * next(void)
int setSignalBias(double newval)
virtual int registerTimedReportCallback(YSensorTimedReportCallback callback)
static YGenericSensor * FirstGenericSensor(void)
virtual int _invokeTimedReportCallback(YMeasure value)
virtual int _invokeValueCallback(string value)
static const string SIGNALRANGE_INVALID
static const double SIGNALBIAS_INVALID
virtual int _parseAttr(YJSONObject *json_val)
virtual int registerValueCallback(YSensorValueCallback callback)
YGenericSensor * yFirstGenericSensor(void)
#define YOCTO_CLASS_EXPORT
Y_SIGNALSAMPLING_enum _signalSampling
int setSignalRange(const string &newval)
static const string VALUERANGE_INVALID
Y_SIGNALSAMPLING_enum signalSampling(void)
static YGenericSensor * FindGenericSensor(string func)
static const string SIGNALUNIT_INVALID
YGenericSensorTimedReportCallback _timedReportCallbackGenericSensor
static YGenericSensor * Find(string func)
int setValueRange(const string &newval)
static const double SIGNALVALUE_INVALID
YGenericSensorValueCallback _valueCallbackGenericSensor
int setUnit(const string &newval)