2 Copyright (C) 2012 Intel Corporation
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef _PROPERTIES_H_H_H_
20 #define _PROPERTIES_H_H_H_
22 #include "dbusplugin.h"
23 #include "abstractdbusinterface.h"
24 #include "abstractroutingengine.h"
26 /** @interface VehicleSpeed : VehiclePropertyType **/
27 class VehicleSpeedProperty: public DBusSink
30 VehicleSpeedProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
31 :DBusSink("VehicleSpeed", re, connection, map<string, string>())
33 wantPropertyVariant(VehicleProperty::VehicleSpeed, "Speed", AbstractProperty::Read);
37 /** @interface EngineSpeed : VehiclePropertyType **/
38 class EngineSpeedProperty: public DBusSink
41 EngineSpeedProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
42 :DBusSink("EngineSpeed", re, connection, map<string, string>())
44 wantPropertyVariant(VehicleProperty::EngineSpeed, "Speed", AbstractProperty::Read);
48 /** @interface VehiclePowerMode : VehiclePropertyType **/
49 class VehiclePowerModeProperty: public DBusSink
52 VehiclePowerModeProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
53 :DBusSink("VehiclePowerMode", re, connection, map<string, string>())
55 wantPropertyVariant(VehicleProperty::VehiclePowerMode, "VehiclePowerMode",AbstractProperty::Read);
59 /** @interface TripMeter : VehiclePropertyType **/
60 class TripMeterProperty: public DBusSink
63 TripMeterProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
64 :DBusSink("TripMeter", re, connection, map<string, string>())
66 wantPropertyVariant(VehicleProperty::TripMeters, "TripMeters", AbstractProperty::ReadWrite);
70 /** @interface Acceleration : VehiclePropertyType **/
71 class AccelerationProperty: public DBusSink
74 AccelerationProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
75 :DBusSink("Acceleration", re, connection, map<string, string>())
77 wantPropertyVariant(VehicleProperty::AccelerationX, "X", AbstractProperty::Read);
78 wantPropertyVariant(VehicleProperty::AccelerationY, "Y", AbstractProperty::Read);
79 wantPropertyVariant(VehicleProperty::AccelerationZ, "Z", AbstractProperty::Read);
83 /** @interface Transmission : VehiclePropertyType **/
84 class TransmissionProperty: public DBusSink
87 TransmissionProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
88 :DBusSink("Transmission", re, connection, map<string, string>())
90 wantPropertyVariant(VehicleProperty::TransmissionShiftPosition, "ShiftPosition", AbstractProperty::Read);
91 wantPropertyVariant(VehicleProperty::TransmissionGearPosition, "GearPosition", AbstractProperty::Read);
92 wantPropertyVariant(VehicleProperty::TransmissionGearPosition, "Gear", AbstractProperty::Read);
93 wantPropertyVariant(VehicleProperty::TransmissionModeW3C, "Mode", AbstractProperty::Read);
94 wantPropertyVariant(VehicleProperty::TransmissionGearType, "Type", AbstractProperty::Read);
98 /** @interface CruiseControlStatus : VehiclePropertyType **/
99 class CruiseControlProperty: public DBusSink
102 CruiseControlProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
103 :DBusSink("CruiseControlStatus", re, connection, map<string, string>())
105 wantPropertyVariant(VehicleProperty::CruiseControlSpeed, "Speed", AbstractProperty::Read);
106 wantPropertyVariant(VehicleProperty::CruiseControlActive, "Status", AbstractProperty::Read);
110 /** @interface WheelBrake : VehiclePropertyType **/
111 class BrakeOperation: public DBusSink
114 BrakeOperation(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
115 :DBusSink("BrakeOperation", re, connection, map<string, string>())
117 wantPropertyVariant(VehicleProperty::WheelBrake, "BrakePedalDepressed", AbstractProperty::Read);
121 /** @interface LightStatus : VehiclePropertyType **/
122 class LightStatusProperty: public DBusSink
125 LightStatusProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
126 :DBusSink("LightStatus", re, connection, map<string, string>())
128 wantPropertyVariant(VehicleProperty::LightHead, "Head", AbstractProperty::ReadWrite);
129 wantPropertyVariant(VehicleProperty::LightRightTurn, "RightTurn", AbstractProperty::ReadWrite);
130 wantPropertyVariant(VehicleProperty::LightLeftTurn, "LeftTurn", AbstractProperty::ReadWrite);
131 wantPropertyVariant(VehicleProperty::LightBrake, "Brake", AbstractProperty::ReadWrite);
132 wantPropertyVariant(VehicleProperty::LightFog, "Fog", AbstractProperty::ReadWrite);
133 wantPropertyVariant(VehicleProperty::LightHazard, "Hazard", AbstractProperty::ReadWrite);
134 wantPropertyVariant(VehicleProperty::LightParking, "Parking", AbstractProperty::ReadWrite);
135 wantPropertyVariant(VehicleProperty::LightHighBeam, "HighBeam", AbstractProperty::ReadWrite);
136 wantPropertyVariant(VehicleProperty::LightAutomatic, "AutomaticHeadlights", AbstractProperty::ReadWrite);
137 wantPropertyVariant(VehicleProperty::LightDynamicHighBeam, "DynamicHighBeam", AbstractProperty::ReadWrite);
141 class InteriorLightStatusProperty: public DBusSink
144 InteriorLightStatusProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
145 :DBusSink("InteriorLightStatus", re, connection, map<string, string>())
147 wantPropertyVariant(VehicleProperty::InteriorLightStatus, "Status", AbstractProperty::ReadWrite);
151 /** @interface Horn : VehiclePropertyType **/
152 class HornProperty: public DBusSink
155 HornProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
156 :DBusSink("Horn", re, connection, map<string, string>())
158 wantPropertyVariant(VehicleProperty::Horn, "Status", AbstractProperty::Read);
162 /** @interface Fuel : VehiclePropertyType **/
163 class FuelProperty: public DBusSink
166 FuelProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
167 :DBusSink("Fuel", re, connection, map<string, string>())
169 wantPropertyVariant(VehicleProperty::FuelLevel, "Level", AbstractProperty::Read);
170 wantPropertyVariant(VehicleProperty::FuelRange, "Range", AbstractProperty::Read);
171 wantPropertyVariant(VehicleProperty::FuelConsumption, "InstantConsumption", AbstractProperty::Read);
172 wantPropertyVariant(VehicleProperty::FuelEconomy, "InstantEconomy", AbstractProperty::Read);
173 wantPropertyVariant(VehicleProperty::FuelAverageEconomy, "AverageEconomy", AbstractProperty::ReadWrite);
174 wantPropertyVariant(VehicleProperty::FuelAverageConsumption, "AverageConsumption", AbstractProperty::ReadWrite);
175 wantPropertyVariant(VehicleProperty::FuelConsumptionSinceRestart, "FuelConsumedSinceRestart", AbstractProperty::ReadWrite);
176 wantPropertyVariant(VehicleProperty::FuelTimeSinceRestart, "TimeSinceRestart", AbstractProperty::ReadWrite);
180 /** @interface EngineOil : VehiclePropertyType **/
181 class EngineOilProperty: public DBusSink
184 EngineOilProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
185 :DBusSink("EngineOil", re, connection, map<string, string>())
187 wantPropertyVariant(VehicleProperty::EngineOilRemaining, "Level", AbstractProperty::Read);
188 wantPropertyVariant(VehicleProperty::EngineOilTemperature, "Temperature", AbstractProperty::Read);
189 wantPropertyVariant(VehicleProperty::EngineOilPressure, "Pressure", AbstractProperty::Read);
190 wantPropertyVariant(VehicleProperty::EngineOilChangeIndicator, "Change", AbstractProperty::Read);
191 wantPropertyVariant(VehicleProperty::EngineOilLifeRemaining, "LifeRemaining", AbstractProperty::Read);
195 /** @interface Location : VehiclePropertyType **/
196 class LocationProperty: public DBusSink
199 LocationProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
200 :DBusSink("Location", re, connection, map<string, string>())
202 wantPropertyVariant(VehicleProperty::Latitude, "Latitude", AbstractProperty::Read);
203 wantPropertyVariant(VehicleProperty::Longitude, "Longitude", AbstractProperty::Read);
204 wantPropertyVariant(VehicleProperty::Altitude, "Altitude", AbstractProperty::Read);
205 wantPropertyVariant(VehicleProperty::Direction, "Direction", AbstractProperty::Read);
210 class SteeringWheel: public DBusSink
213 SteeringWheel(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
214 :DBusSink("SteeringWheel", re, connection, map<string, string>())
216 wantPropertyVariant(VehicleProperty::SteeringWheelAngleW3C, "Angle", AbstractProperty::Read);
220 class ThrottlePosition: public DBusSink
223 ThrottlePosition(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
224 :DBusSink("ThrottlePosition", re, connection, map<string, string>())
226 wantPropertyVariant(VehicleProperty::ThrottlePosition, "Value", AbstractProperty::Read);
230 class NightMode: public DBusSink
233 NightMode(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
234 :DBusSink("NightMode", re, connection, map<string, string>())
236 wantPropertyVariant(VehicleProperty::NightMode, "NightMode", AbstractProperty::Read);
237 wantPropertyVariant(VehicleProperty::NightMode, "Mode", AbstractProperty::Read);
241 class DrivingMode: public DBusSink
244 DrivingMode(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
245 :DBusSink("DrivingMode", re, connection, map<string, string>())
247 wantPropertyVariant(VehicleProperty::DrivingMode, "DrivingMode", AbstractProperty::Read);
248 wantPropertyVariant(VehicleProperty::DrivingModeW3C, "Mode", AbstractProperty::Read);
252 class PowertrainTorque: public DBusSink
255 PowertrainTorque(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
256 :DBusSink("PowertrainTorque", re, connection, map<string, string>())
258 wantPropertyVariant(VehicleProperty::PowertrainTorque, "Value", AbstractProperty::Read);
262 class AcceleratorPedalPosition: public DBusSink
265 AcceleratorPedalPosition(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
266 :DBusSink("AcceleratorPedalPosition", re, connection, map<string, string>())
268 wantPropertyVariant(VehicleProperty::AcceleratorPedalPosition, "Value", AbstractProperty::Read);
272 class Chime: public DBusSink
275 Chime(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
276 :DBusSink("Chime", re, connection, map<string, string>())
278 wantPropertyVariant(VehicleProperty::Chime, "Status", AbstractProperty::Read);
282 class WheelTick: public DBusSink
285 WheelTick(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
286 :DBusSink("WheelTick", re, connection, map<string, string>())
288 wantPropertyVariant(VehicleProperty::WheelTick, "Value", AbstractProperty::Read);
292 class IgnitionTime: public DBusSink
295 IgnitionTime(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
296 :DBusSink("IgnitionTime", re, connection, map<string, string>())
298 wantPropertyVariant(VehicleProperty::IgnitionTimeOn, "IgnitionTimeOn", AbstractProperty::Read);
299 wantPropertyVariant(VehicleProperty::IgnitionTimeOff, "IgnitionTimeOff", AbstractProperty::Read);
303 class YawRate: public DBusSink
306 YawRate(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
307 :DBusSink("YawRate", re, connection, map<string, string>())
309 wantPropertyVariant(VehicleProperty::YawRate, "Value", AbstractProperty::Read);
313 class ButtonEvent: public DBusSink
316 ButtonEvent(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
317 :DBusSink("ButtonEvent", re, connection, map<string, string>())
319 wantPropertyVariant(VehicleProperty::YawRate, "Value", AbstractProperty::Read);