summaryrefslogtreecommitdiff
path: root/plugins/dbus/environmentproperties.h
blob: 3815152d889ebf89c7126d673cd706c9622c303f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
#ifndef ENVIRONMENTPROPERTIES_H_
#define ENVIRONMENTPROPERTIES_H_

#include "dbusplugin.h"
#include "abstractdbusinterface.h"
#include "abstractroutingengine.h"

/** @interface ExteriorBrightness : VehiclePropertyType **/
class ExteriorBrightnessProperty: public DBusSink
{
public:
	ExteriorBrightnessProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("ExteriorBrightness", re, connection, map<string, string>())
	{
		/**
		 * @attributeName ExteriorBrightness
		 * @type unsigned long
		 * @access readonly
		 * @attributeComment \brief Must return the brightness outside the vehicle in lux.
		 */
		wantPropertyVariant(VehicleProperty::ExteriorBrightness,"ExteriorBrightness", "q", AbstractProperty::Read);

	}
};

/** @interface Temperature : VehiclePropertyType **/
class Temperature: public DBusSink
{
public:
	Temperature(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("Temperature", re, connection, map<string, string>())
	{
		/**
		 * @attributeName Interior
		 * @type signed long
		 * @access readonly
		 * @attributeComment \brief Must return the temperature of the interior of the vehicle in celcius.
		 */
		wantPropertyVariant(VehicleProperty::InteriorTemperature, "Interior", AbstractProperty::Read);

		wantPropertyVariant(VehicleProperty::InteriorTemperature, "InteriorTemperature", AbstractProperty::Read);

		/**
		 * @attributeName Exterior
		 * @type signed long
		 * @access readonly
		 * @attributeComment \brief Must return the temperature of the exterior of the vehicle in celcius.
		 */
		wantPropertyVariant(VehicleProperty::ExteriorTemperature, "Exterior", AbstractProperty::Read);

		wantPropertyVariant(VehicleProperty::ExteriorTemperature, "ExteriorTemperature", AbstractProperty::Read);


	}
};

/** @interface RainSensor : VehiclePropertyType **/
class RainSensor: public DBusSink
{
public:
	RainSensor(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("RainSensor", re, connection, map<string, string>())
	{
		/**
		 * @attributeName RainSensor
		 * @type unsigned short
		 * @access readonly
		 * @attributeComment \brief Must return level of rain intensity 0: No Rain - 10: Heaviest Rain.
		 */
		wantPropertyVariant(VehicleProperty::RainSensor, "RainSensor", "q", AbstractProperty::Read);

	}
};

/** @interface WindshieldWiper : VehiclePropertyType **/
class WindshieldWiper: public DBusSink
{
public:
	WindshieldWiper(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("WindshieldWiper", re, connection, map<string, string>())
	{
		/**
		 * @enum const unsigned short WIPERSPEED_OFF = 0;
		 * @enum const unsigned short WIPERSPEED_SLOWEST= 1;
		 * @enum const unsigned short WIPERSPEED_FASTEST = 5;
		 * @enum const unsigned short WIPERSPEED_AUTO = 10;
		 **/

		/**
		 * @attributeName WindshieldWiper
		 * @type unsigned short
		 * @access readonly
		 * @attributeComment \brief Must return Level of windshield whiper speed (see WIPERSPEED_)
		 */
		wantPropertyVariant(VehicleProperty::RainSensor, "WindshieldWiper", "y", AbstractProperty::ReadWrite);

	}
};

/** @interface HVAC : VehiclePropertyType **/
class HVACProperty: public DBusSink
{
public:
	HVACProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("HVAC", re, connection, map<string, string>())
	{
		/**
		 * @enum const unsigned short AIRFLOWDIRECTION_FRONTPANEL = 0;
		 * @enum const unsigned short AIRFLOWDIRECTION_FLOORDUCT= 1;
		 * @enum const unsigned short AIRFLOWDIRECTION_FRONT = 0x02;
		 * @enum const unsigned short AIRFLOWDIRECTION_DEFROSTER = 0x04;
		 **/

		/**
		 * @attributeName AirflowDirection
		 * @type unsigned short
		 * @access readwrite
		 * @attributeComment \brief Must return airflow direction.  See AIRFLOWDIRECTION_*.
		 */
		/// TODO: Deprecated.  Remove in 0.13
		wantPropertyVariant(VehicleProperty::AirflowDirection, "AirflowDirection", "y", AbstractProperty::ReadWrite);

		/**
		 * @attributeName FanSpeed
		 * @type unsigned short
		 * @access readwrite
		 * @attributeComment \brief Must return speed of the fan (0-7)
		 */
		wantPropertyVariant(VehicleProperty::FanSpeed, "FanSpeed", "y", AbstractProperty::ReadWrite);

		/**
		 * @attributeName TargetTemperature
		 * @type unsigned short
		 * @access readwrite
		 * @attributeComment \brief Must return target desired temperature in celcius.
		 */
		wantPropertyVariant(VehicleProperty::TargetTemperature, "TargetTemperature", "y", AbstractProperty::ReadWrite);

		/**
		 * @attributeName AirConditioning
		 * @type boolean
		 * @access readwrite
		 * @attributeComment \brief Must return air conditioning on (true) / off (false).
		 */
		wantPropertyVariant(VehicleProperty::AirConditioning, "AirConditioning", "b", AbstractProperty::ReadWrite);

		/**
		 * @attributeName AirRecirculation
		 * @type boolean
		 * @access readwrite
		 * @attributeComment \brief Must return air recirculation on (true) / off (false).
		 */
		wantPropertyVariant(VehicleProperty::AirRecirculation, "AirRecirculation", "b", AbstractProperty::ReadWrite);

		/**
		 * @attributeName Heater
		 * @type boolean
		 * @access readwrite
		 * @attributeComment \brief Must return heater on (true) / off (false).
		 */
		wantPropertyVariant(VehicleProperty::Heater, "Heater", "b", AbstractProperty::ReadWrite);

		/**
		 * @attributeName SteeringWheelHeater
		 * @type boolean
		 * @access readwrite
		 * @attributeComment \brief Must return air recirculation on (true) / off (false).
		 */
		wantPropertyVariant(VehicleProperty::SteeringWheelHeater, "SteeringWheelHeater", "b", AbstractProperty::ReadWrite);

		/**
		 * @attributeName SeatHeater
		 * @type boolean
		 * @access readwrite
		 * @attributeComment \brief Must return seat heater status: on (true) / off (false).
		 */
		wantPropertyVariant(VehicleProperty::SeatHeater, "SeatHeater", "b", AbstractProperty::ReadWrite);

		/**
		 * @attributeName SeatCooler
		 * @type boolean
		 * @access readwrite
		 * @attributeComment \brief Must return seat heater status: on (true) / off (false).
		 */
		wantPropertyVariant(VehicleProperty::SeatCooler, "SeatCooler", "b", AbstractProperty::ReadWrite);


	}
};

class ClimateControlProperty: public DBusSink
{
public:
	ClimateControlProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("ClimateControl", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::AirflowDirectionW3C, "AirflowDirection", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::FanSpeed, "FanSpeedLevel", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::TargetTemperature, "TargetTemperature", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::AirConditioning, "AirConditioning", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::AirRecirculation, "AirRecirculation", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::Heater, "Heater", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::SteeringWheelHeater, "SteeringWheelHeater", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::SeatHeater, "SeatHeater", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::SeatCooler, "SeatCooler", AbstractProperty::ReadWrite);
	}
};

/** @interface WindowStatus : VehiclePropertyType **/
class WindowStatusProperty: public DBusSink
{
public:
	WindowStatusProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("WindowStatus", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::WindowStatus,"Openness", AbstractProperty::ReadWrite);
		wantPropertyVariant(VehicleProperty::Defrost, "Defrost", AbstractProperty::ReadWrite);
	}
};

class DefrostProperty: public DBusSink
{
public:
	DefrostProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("Defrost", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::DefrostWindow,"DefrostWindow", AbstractProperty::ReadWrite);
		wantPropertyVariant(VehicleProperty::DefrostMirror, "DefrostMirror", AbstractProperty::ReadWrite);
	}
};

/** @interface Sunroof : VehiclePropertyType **/
class Sunroof: public DBusSink
{
public:
	Sunroof(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("Sunroof", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::Sunroof, "Openness", "y", AbstractProperty::ReadWrite);

		wantPropertyVariant(VehicleProperty::SunroofTilt, "Tilt", "y", AbstractProperty::ReadWrite);

	}
};

/** @interface ConvertibleRoof : VehiclePropertyType **/
class ConvertibleRoof: public DBusSink
{
public:
	ConvertibleRoof(AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("ConvertibleRoof", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::ConvertibleRoof, "Openness", "y", AbstractProperty::ReadWrite);
	}
};
#endif