41 #ifndef YOCTO_WEIGHSCALE_H 42 #define YOCTO_WEIGHSCALE_H 57 #ifndef _Y_EXCITATION_ENUM 58 #define _Y_EXCITATION_ENUM 66 #define Y_COMPTEMPADAPTRATIO_INVALID (YAPI_INVALID_DOUBLE) 67 #define Y_COMPTEMPAVG_INVALID (YAPI_INVALID_DOUBLE) 68 #define Y_COMPTEMPCHG_INVALID (YAPI_INVALID_DOUBLE) 69 #define Y_COMPENSATION_INVALID (YAPI_INVALID_DOUBLE) 70 #define Y_ZEROTRACKING_INVALID (YAPI_INVALID_DOUBLE) 71 #define Y_COMMAND_INVALID (YAPI_INVALID_STRING) 86 #pragma option push -w-8022 138 int set_unit(
const string& newval);
140 {
return this->set_unit(newval); }
153 {
return this->get_excitation(); }
167 {
return this->set_excitation(newval); }
181 int set_compTempAdaptRatio(
double newval);
183 {
return this->set_compTempAdaptRatio(newval); }
195 double get_compTempAdaptRatio(
void);
198 {
return this->get_compTempAdaptRatio(); }
207 double get_compTempAvg(
void);
210 {
return this->get_compTempAvg(); }
220 double get_compTempChg(
void);
223 {
return this->get_compTempChg(); }
232 double get_compensation(
void);
235 {
return this->get_compensation(); }
246 int set_zeroTracking(
double newval);
248 {
return this->set_zeroTracking(newval); }
259 double get_zeroTracking(
void);
262 {
return this->get_zeroTracking(); }
264 string get_command(
void);
267 {
return this->get_command(); }
269 int set_command(
const string& newval);
271 {
return this->set_command(newval); }
342 virtual int tare(
void);
355 virtual int setupSpan(
double currWeight,
double maxWeight);
357 virtual int setCompensationTable(
int tableIndex,vector<double> tempValues,vector<double> compValues);
359 virtual int loadCompensationTable(
int tableIndex,vector<double>& tempValues,vector<double>& compValues);
376 virtual int set_offsetAvgCompensationTable(vector<double> tempValues,vector<double> compValues);
393 virtual int loadOffsetAvgCompensationTable(vector<double>& tempValues,vector<double>& compValues);
410 virtual int set_offsetChgCompensationTable(vector<double> tempValues,vector<double> compValues);
427 virtual int loadOffsetChgCompensationTable(vector<double>& tempValues,vector<double>& compValues);
444 virtual int set_spanAvgCompensationTable(vector<double> tempValues,vector<double> compValues);
461 virtual int loadSpanAvgCompensationTable(vector<double>& tempValues,vector<double>& compValues);
478 virtual int set_spanChgCompensationTable(vector<double> tempValues,vector<double> compValues);
495 virtual int loadSpanChgCompensationTable(vector<double>& tempValues,vector<double>& compValues);
510 {
return this->nextWeighScale();}
YWeighScaleValueCallback _valueCallbackWeighScale
void(* YWeighScaleTimedReportCallback)(YWeighScale *func, YMeasure measure)
double compensation(void)
static const double COMPTEMPADAPTRATIO_INVALID
YWeighScaleTimedReportCallback _timedReportCallbackWeighScale
static const string COMMAND_INVALID
Y_EXCITATION_enum excitation(void)
static YWeighScale * First(void)
static const double ZEROTRACKING_INVALID
static const double COMPTEMPCHG_INVALID
int setUnit(const string &newval)
static YWeighScale * FindWeighScale(string func)
static YWeighScale * Find(string func)
static YWeighScale * FirstWeighScale(void)
virtual int registerTimedReportCallback(YSensorTimedReportCallback callback)
virtual int _invokeTimedReportCallback(YMeasure value)
YWeighScale * yFirstWeighScale(void)
virtual int _invokeValueCallback(string value)
static const double COMPENSATION_INVALID
double _compTempAdaptRatio
double compTempAdaptRatio(void)
virtual int _parseAttr(YJSONObject *json_val)
void(* YWeighScaleValueCallback)(YWeighScale *func, const string &functionValue)
virtual int registerValueCallback(YSensorValueCallback callback)
#define YOCTO_CLASS_EXPORT
YWeighScale * yFindWeighScale(const string &func)
static const double COMPTEMPAVG_INVALID
Y_EXCITATION_enum _excitation
int setCommand(const string &newval)
int setCompTempAdaptRatio(double newval)
int setZeroTracking(double newval)
int setExcitation(Y_EXCITATION_enum newval)
double zeroTracking(void)