X2 Standard  Version 1.24
weatherstationdatainterface.h
1 #ifndef _WeatherStationDataInterface_H
2 #define _WeatherStationDataInterface_H
3 
4 #ifndef INT_MIN
5 #define INT_MIN ((int) 0x8000/0x80000000)
6 #endif
7 
8 #define WeatherStationDataInterface_Name "com.bisque.TheSkyX.WeatherStationDataInterface/1.0"
9 
26 {
27 public:
28 
30  enum class x2CloudCond {
31  cloudUnknown = 0,
32  cloudClear = 1,
33  cloudCloudy = 2,
34  cloudVeryCloudy = 3,
35  cloudDisabled = 4,
36  cloudNoSensor = INT_MIN
37  };
38 
40  enum class x2WindCond {
41  windUnknown = 0,
42  windCalm = 1,
43  windWindy = 2,
44  windVeryWindy = 3,
45  windDisabled = 4,
46  windNoSensor = INT_MIN
47  };
48 
50  enum class x2RainCond {
51  rainUnknown = 0,
52  rainDry = 1,
53  rainWet = 2,
54  rainRain = 3,
55  rainDisabled = 4,
56  rainNoSensor = INT_MIN
57  };
58 
60  enum class x2DayCond {
61  dayUnknown = 0,
62  dayDark = 1,
63  dayLight = 2,
64  dayVeryLight = 3,
65  dayDisabled = 4,
66  dayNoSensor = INT_MIN
67  };
68 
70  enum class x2WindSpeedUnit {
71  windSpeedKph= 0,
72  windSpeedMph= 1,
73  windSpeedMps= 2,
74  };
75 
76  virtual ~WeatherStationDataInterface() {}
77 
78 public:
79 
85  virtual bool temperatureIsInDegreesC()
86  {
87  return true;
88  }
89 
94  {
96  }
97 
124  virtual int weatherStationData(
125 
126  double& dSkyTemp,
127  double& dAmbTemp,
128  double& dSenT,
129  double& dWind,
130 
131  int& nPercentHumdity,
132  double& dDewPointTemp,
133  int& nRainHeaterPercentPower,
134  int& nRainFlag,
135  int& nWetFlag,
136  int& nSecondsSinceGoodData,
137  double& dVBNow,
138  double& dBarometricPressure,
139 
143  WeatherStationDataInterface::x2DayCond& daylightCondition,
144 
145  int& nRoofCloseThisCycle
146  ) = 0;
147 };
148 
149 #endif
WeatherStationDataInterface::x2CloudCond::cloudNoSensor
@ cloudNoSensor
WeatherStationDataInterface::x2DayCond::dayDisabled
@ dayDisabled
WeatherStationDataInterface::x2RainCond::rainDry
@ rainDry
WeatherStationDataInterface::x2DayCond::dayDark
@ dayDark
WeatherStationDataInterface::x2CloudCond::cloudClear
@ cloudClear
WeatherStationDataInterface::x2RainCond::rainWet
@ rainWet
WeatherStationDataInterface::x2CloudCond::cloudDisabled
@ cloudDisabled
WeatherStationDataInterface::x2RainCond::rainNoSensor
@ rainNoSensor
WeatherStationDataInterface::x2WindCond::windNoSensor
@ windNoSensor
WeatherStationDataInterface::x2DayCond::dayVeryLight
@ dayVeryLight
WeatherStationDataInterface::x2WindSpeedUnit::windSpeedMph
@ windSpeedMph
WeatherStationDataInterface::windSpeedUnit
virtual WeatherStationDataInterface::x2WindSpeedUnit windSpeedUnit()
Definition: weatherstationdatainterface.h:93
WeatherStationDataInterface::temperatureIsInDegreesC
virtual bool temperatureIsInDegreesC()
Definition: weatherstationdatainterface.h:85
WeatherStationDataInterface::x2RainCond::rainRain
@ rainRain
WeatherStationDataInterface::x2DayCond::dayUnknown
@ dayUnknown
WeatherStationDataInterface::x2DayCond::dayLight
@ dayLight
WeatherStationDataInterface::x2WindCond
x2WindCond
Wind condition.
Definition: weatherstationdatainterface.h:40
WeatherStationDataInterface::x2RainCond::rainDisabled
@ rainDisabled
WeatherStationDataInterface::x2WindCond::windVeryWindy
@ windVeryWindy
WeatherStationDataInterface::x2WindCond::windUnknown
@ windUnknown
WeatherStationDataInterface
The WeatherStationDataInterface gives x2 authors a means to write a TheSky weather station driver.
Definition: weatherstationdatainterface.h:26
WeatherStationDataInterface::x2WindSpeedUnit::windSpeedMps
@ windSpeedMps
WeatherStationDataInterface::x2WindCond::windCalm
@ windCalm
WeatherStationDataInterface::x2CloudCond
x2CloudCond
Cloud condition.
Definition: weatherstationdatainterface.h:30
WeatherStationDataInterface::x2RainCond::rainUnknown
@ rainUnknown
WeatherStationDataInterface::x2DayCond
x2DayCond
Daylight condition.
Definition: weatherstationdatainterface.h:60
WeatherStationDataInterface::weatherStationData
virtual int weatherStationData(double &dSkyTemp, double &dAmbTemp, double &dSenT, double &dWind, int &nPercentHumdity, double &dDewPointTemp, int &nRainHeaterPercentPower, int &nRainFlag, int &nWetFlag, int &nSecondsSinceGoodData, double &dVBNow, double &dBarometricPressure, WeatherStationDataInterface::x2CloudCond &cloudCondition, WeatherStationDataInterface::x2WindCond &windCondition, WeatherStationDataInterface::x2RainCond &rainCondition, WeatherStationDataInterface::x2DayCond &daylightCondition, int &nRoofCloseThisCycle)=0
WeatherStationDataInterface::x2RainCond
x2RainCond
Rain condition.
Definition: weatherstationdatainterface.h:50
WeatherStationDataInterface::x2CloudCond::cloudCloudy
@ cloudCloudy
WeatherStationDataInterface::x2WindCond::windDisabled
@ windDisabled
WeatherStationDataInterface::x2DayCond::dayNoSensor
@ dayNoSensor
WeatherStationDataInterface::x2WindSpeedUnit::windSpeedKph
@ windSpeedKph
WeatherStationDataInterface::x2WindSpeedUnit
x2WindSpeedUnit
Windspeed units.
Definition: weatherstationdatainterface.h:70
WeatherStationDataInterface::x2CloudCond::cloudUnknown
@ cloudUnknown
WeatherStationDataInterface::x2WindCond::windWindy
@ windWindy
WeatherStationDataInterface::x2CloudCond::cloudVeryCloudy
@ cloudVeryCloudy
X2 Examples
(C) Software Bisque, Inc. All rights reserved.