yocto_carbondioxide.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * $Id: yocto_carbondioxide.h 28748 2017-10-03 08:23:39Z seb $
4  *
5  * Declares yFindCarbonDioxide(), the high-level API for CarbonDioxide functions
6  *
7  * - - - - - - - - - License information: - - - - - - - - -
8  *
9  * Copyright (C) 2011 and beyond by Yoctopuce Sarl, Switzerland.
10  *
11  * Yoctopuce Sarl (hereafter Licensor) grants to you a perpetual
12  * non-exclusive license to use, modify, copy and integrate this
13  * file into your software for the sole purpose of interfacing
14  * with Yoctopuce products.
15  *
16  * You may reproduce and distribute copies of this file in
17  * source or object form, as long as the sole purpose of this
18  * code is to interface with Yoctopuce products. You must retain
19  * this notice in the distributed source file.
20  *
21  * You should refer to Yoctopuce General Terms and Conditions
22  * for additional information regarding your rights and
23  * obligations.
24  *
25  * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED 'AS IS' WITHOUT
26  * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
27  * WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS
28  * FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO
29  * EVENT SHALL LICENSOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL,
30  * INDIRECT OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA,
31  * COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR
32  * SERVICES, ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT
33  * LIMITED TO ANY DEFENSE THEREOF), ANY CLAIMS FOR INDEMNITY OR
34  * CONTRIBUTION, OR OTHER SIMILAR COSTS, WHETHER ASSERTED ON THE
35  * BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE), BREACH OF
36  * WARRANTY, OR OTHERWISE.
37  *
38  *********************************************************************/
39 
40 
41 #ifndef YOCTO_CARBONDIOXIDE_H
42 #define YOCTO_CARBONDIOXIDE_H
43 
44 #include "yocto_api.h"
45 #include <cfloat>
46 #include <cmath>
47 #include <map>
48 
49 //--- (YCarbonDioxide return codes)
50 //--- (end of YCarbonDioxide return codes)
51 //--- (YCarbonDioxide definitions)
52 class YCarbonDioxide; // forward declaration
53 
54 typedef void (*YCarbonDioxideValueCallback)(YCarbonDioxide *func, const string& functionValue);
55 class YMeasure; // forward declaration
57 #define Y_ABCPERIOD_INVALID (YAPI_INVALID_INT)
58 #define Y_COMMAND_INVALID (YAPI_INVALID_STRING)
59 //--- (end of YCarbonDioxide definitions)
60 
61 //--- (YCarbonDioxide declaration)
71 #ifdef __BORLANDC__
72 #pragma option push -w-8022
73 #endif
74 //--- (end of YCarbonDioxide declaration)
75 protected:
76  //--- (YCarbonDioxide attributes)
77  // Attributes (function value cache)
79  string _command;
82 
83  friend YCarbonDioxide *yFindCarbonDioxide(const string& func);
84  friend YCarbonDioxide *yFirstCarbonDioxide(void);
85 
86  // Function-specific method for parsing of JSON output and caching result
87  virtual int _parseAttr(YJSONObject* json_val);
88 
89  // Constructor is protected, use yFindCarbonDioxide factory function to instantiate
90  YCarbonDioxide(const string& func);
91  //--- (end of YCarbonDioxide attributes)
92 
93 public:
94  ~YCarbonDioxide();
95  //--- (YCarbonDioxide accessors declaration)
96 
97  static const int ABCPERIOD_INVALID = YAPI_INVALID_INT;
98  static const string COMMAND_INVALID;
99 
108  int get_abcPeriod(void);
109 
110  inline int abcPeriod(void)
111  { return this->get_abcPeriod(); }
112 
126  int set_abcPeriod(int newval);
127  inline int setAbcPeriod(int newval)
128  { return this->set_abcPeriod(newval); }
129 
130  string get_command(void);
131 
132  inline string command(void)
133  { return this->get_command(); }
134 
135  int set_command(const string& newval);
136  inline int setCommand(const string& newval)
137  { return this->set_command(newval); }
138 
166  static YCarbonDioxide* FindCarbonDioxide(string func);
167 
181 
182  virtual int _invokeValueCallback(string value);
183 
197 
198  virtual int _invokeTimedReportCallback(YMeasure value);
199 
214  virtual int triggerBaselineCalibration(void);
215 
216  virtual int triggetBaselineCalibration(void);
217 
234  virtual int triggerZeroCalibration(void);
235 
236  virtual int triggetZeroCalibration(void);
237 
238 
239  inline static YCarbonDioxide* Find(string func)
240  { return YCarbonDioxide::FindCarbonDioxide(func); }
241 
249  YCarbonDioxide *nextCarbonDioxide(void);
250  inline YCarbonDioxide *next(void)
251  { return this->nextCarbonDioxide();}
252 
262  static YCarbonDioxide* FirstCarbonDioxide(void);
263  inline static YCarbonDioxide* First(void)
265 #ifdef __BORLANDC__
266 #pragma option pop
267 #endif
268  //--- (end of YCarbonDioxide accessors declaration)
269 };
270 
271 //--- (YCarbonDioxide functions declaration)
272 
300 inline YCarbonDioxide* yFindCarbonDioxide(const string& func)
301 { return YCarbonDioxide::FindCarbonDioxide(func);}
313 
314 //--- (end of YCarbonDioxide functions declaration)
315 
316 #endif
string command(void)
int setCommand(const string &newval)
static YCarbonDioxide * FindCarbonDioxide(string func)
virtual int registerTimedReportCallback(YSensorTimedReportCallback callback)
Definition: yocto_api.cpp:7923
virtual int _invokeTimedReportCallback(YMeasure value)
Definition: yocto_api.cpp:7936
virtual int _invokeValueCallback(string value)
Definition: yocto_api.cpp:7645
static YCarbonDioxide * First(void)
virtual int _parseAttr(YJSONObject *json_val)
Definition: yocto_api.cpp:7015
static const string COMMAND_INVALID
virtual int registerValueCallback(YSensorValueCallback callback)
Definition: yocto_api.cpp:7626
static YCarbonDioxide * FirstCarbonDioxide(void)
#define YOCTO_CLASS_EXPORT
Definition: yocto_api.h:61
YCarbonDioxide * next(void)
void(* YCarbonDioxideValueCallback)(YCarbonDioxide *func, const string &functionValue)
YCarbonDioxide * yFindCarbonDioxide(const string &func)
#define YAPI_INVALID_INT
Definition: yocto_api.h:70
YCarbonDioxideValueCallback _valueCallbackCarbonDioxide
YCarbonDioxide * yFirstCarbonDioxide(void)
YCarbonDioxideTimedReportCallback _timedReportCallbackCarbonDioxide
int setAbcPeriod(int newval)
void(* YCarbonDioxideTimedReportCallback)(YCarbonDioxide *func, YMeasure measure)
static YCarbonDioxide * Find(string func)


yoctopuce_altimeter
Author(s): Anja Sheppard
autogenerated on Mon Jun 10 2019 15:49:11