yocto_pressure.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * $Id: yocto_pressure.h 28748 2017-10-03 08:23:39Z seb $
4  *
5  * Declares yFindPressure(), the high-level API for Pressure 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_PRESSURE_H
42 #define YOCTO_PRESSURE_H
43 
44 #include "yocto_api.h"
45 #include <cfloat>
46 #include <cmath>
47 #include <map>
48 
49 //--- (YPressure return codes)
50 //--- (end of YPressure return codes)
51 //--- (YPressure definitions)
52 class YPressure; // forward declaration
53 
54 typedef void (*YPressureValueCallback)(YPressure *func, const string& functionValue);
55 class YMeasure; // forward declaration
56 typedef void (*YPressureTimedReportCallback)(YPressure *func, YMeasure measure);
57 //--- (end of YPressure definitions)
58 
59 //--- (YPressure declaration)
68 #ifdef __BORLANDC__
69 #pragma option push -w-8022
70 #endif
71 //--- (end of YPressure declaration)
72 protected:
73  //--- (YPressure attributes)
74  // Attributes (function value cache)
77 
78  friend YPressure *yFindPressure(const string& func);
79  friend YPressure *yFirstPressure(void);
80 
81  // Constructor is protected, use yFindPressure factory function to instantiate
82  YPressure(const string& func);
83  //--- (end of YPressure attributes)
84 
85 public:
86  ~YPressure();
87  //--- (YPressure accessors declaration)
88 
89 
117  static YPressure* FindPressure(string func);
118 
130  virtual int registerValueCallback(YPressureValueCallback callback);
132 
133  virtual int _invokeValueCallback(string value);
134 
148 
149  virtual int _invokeTimedReportCallback(YMeasure value);
150 
151 
152  inline static YPressure* Find(string func)
153  { return YPressure::FindPressure(func); }
154 
162  YPressure *nextPressure(void);
163  inline YPressure *next(void)
164  { return this->nextPressure();}
165 
175  static YPressure* FirstPressure(void);
176  inline static YPressure* First(void)
177  { return YPressure::FirstPressure();}
178 #ifdef __BORLANDC__
179 #pragma option pop
180 #endif
181  //--- (end of YPressure accessors declaration)
182 };
183 
184 //--- (YPressure functions declaration)
185 
213 inline YPressure* yFindPressure(const string& func)
214 { return YPressure::FindPressure(func);}
225 { return YPressure::FirstPressure();}
226 
227 //--- (end of YPressure functions declaration)
228 
229 #endif
YPressureTimedReportCallback _timedReportCallbackPressure
YPressure * yFirstPressure(void)
YPressure * yFindPressure(const string &func)
virtual int registerTimedReportCallback(YSensorTimedReportCallback callback)
Definition: yocto_api.cpp:7923
static YPressure * First(void)
virtual int _invokeTimedReportCallback(YMeasure value)
Definition: yocto_api.cpp:7936
virtual int _invokeValueCallback(string value)
Definition: yocto_api.cpp:7645
void(* YPressureTimedReportCallback)(YPressure *func, YMeasure measure)
virtual int registerValueCallback(YSensorValueCallback callback)
Definition: yocto_api.cpp:7626
#define YOCTO_CLASS_EXPORT
Definition: yocto_api.h:61
static YPressure * FirstPressure(void)
YPressure * next(void)
void(* YPressureValueCallback)(YPressure *func, const string &functionValue)
static YPressure * FindPressure(string func)
YPressureValueCallback _valueCallbackPressure
static YPressure * Find(string func)


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