X2 Standard
Version 1.28
Toggle main menu visibility
Loading...
Searching...
No Matches
licensedinterfaces
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
25
class
WeatherStationDataInterface
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
93
virtual
WeatherStationDataInterface::x2WindSpeedUnit
windSpeedUnit
()
94
{
95
return
WeatherStationDataInterface::x2WindSpeedUnit::windSpeedMps
;
96
}
97
124
virtual
int
weatherStationData
(
125
126
double
& dSkyTemp,
127
double
& dAmbTemp,
128
double
& dSenT,
129
double
& dWind,
130
131
int
& nPercentHumidity,
132
double
& dDewPointTemp,
133
int
& nRainHeaterPercentPower,
134
int
& nRainFlag,
135
int
& nWetFlag,
136
int
& nSecondsSinceGoodData,
137
double
& dVBNow,
138
double
& dBarometricPressure,
139
140
WeatherStationDataInterface::x2CloudCond
& cloudCondition,
141
WeatherStationDataInterface::x2WindCond
& windCondition,
142
WeatherStationDataInterface::x2RainCond
& rainCondition,
143
WeatherStationDataInterface::x2DayCond
& daylightCondition,
144
145
int
& nRoofCloseThisCycle
146
) = 0;
147
};
148
149
#endif
WeatherStationDataInterface
The WeatherStationDataInterface gives x2 authors a means to write a TheSky weather station driver.
Definition
weatherstationdatainterface.h:26
WeatherStationDataInterface::windSpeedUnit
virtual WeatherStationDataInterface::x2WindSpeedUnit windSpeedUnit()
Definition
weatherstationdatainterface.h:93
WeatherStationDataInterface::x2WindSpeedUnit
x2WindSpeedUnit
Windspeed units.
Definition
weatherstationdatainterface.h:70
WeatherStationDataInterface::x2WindSpeedUnit::windSpeedMps
@ windSpeedMps
Definition
weatherstationdatainterface.h:73
WeatherStationDataInterface::x2DayCond
x2DayCond
Daylight condition.
Definition
weatherstationdatainterface.h:60
WeatherStationDataInterface::temperatureIsInDegreesC
virtual bool temperatureIsInDegreesC()
Definition
weatherstationdatainterface.h:85
WeatherStationDataInterface::x2WindCond
x2WindCond
Wind condition.
Definition
weatherstationdatainterface.h:40
WeatherStationDataInterface::x2RainCond
x2RainCond
Rain condition.
Definition
weatherstationdatainterface.h:50
WeatherStationDataInterface::x2CloudCond
x2CloudCond
Cloud condition.
Definition
weatherstationdatainterface.h:30
WeatherStationDataInterface::weatherStationData
virtual int weatherStationData(double &dSkyTemp, double &dAmbTemp, double &dSenT, double &dWind, int &nPercentHumidity, 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
X2 Examples
(C) 2026 Software Bisque, Inc. All rights reserved.