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 class VehicleSpeedProperty: public DBusSink
29 VehicleSpeedProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
30 :DBusSink("org.automotive.vehicleSpeed","/org/automotive/runningstatus/vehicleSpeed", re, connection, map<string, string>())
32 wantProperty<uint16_t>(VehicleProperty::VehicleSpeed,"VehicleSpeed", "i", AbstractProperty::Read);
33 supportedChanged(re->supported());
39 class TirePressureProperty: public DBusSink
42 TirePressureProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
43 :DBusSink("org.automotive.tirePressure","/org/automotive/maintainance/tirePressure", re, connection, map<string, string>())
45 wantProperty<uint16_t>(VehicleProperty::TirePressureLeftFront,"LeftFront", "q", AbstractProperty::Read);
46 wantProperty<uint16_t>(VehicleProperty::TirePressureRightFront,"RightFront", "q", AbstractProperty::Read);
47 wantProperty<uint16_t>(VehicleProperty::TirePressureLeftRear,"LeftRear", "q", AbstractProperty::Read);
48 wantProperty<uint16_t>(VehicleProperty::TirePressureRightRear,"RightRear", "q", AbstractProperty::Read);
49 supportedChanged(re->supported());
53 class VehiclePowerModeProperty: public DBusSink
56 VehiclePowerModeProperty(AbstractRoutingEngine* re, GDBusConnection* connection)
57 :DBusSink("org.automotive.vehiclePowerMode","/org/automotive/runningstatus/vehiclePowerMode", re, connection, map<string, string>())
59 wantProperty<uint16_t>(VehicleProperty::VehiclePowerMode, "VehiclePowerMode","b",AbstractProperty::Read);
60 supportedChanged(re->supported());
64 class TripMeterProperty: public DBusSink
67 TripMeterProperty(AbstractRoutingEngine *re, GDBusConnection *connection)
68 :DBusSink("org.automotive.tripMeter","/org/automotive/runningstatus/tripMeter", re, connection, map<string, string>())
70 wantProperty<uint16_t>(VehicleProperty::TripMeterA, "A", "q", AbstractProperty::ReadWrite);
71 wantProperty<uint16_t>(VehicleProperty::TripMeterB, "B", "q", AbstractProperty::ReadWrite);
72 wantProperty<uint16_t>(VehicleProperty::TripMeterC, "C", "q", AbstractProperty::ReadWrite);
73 supportedChanged(re->supported());
77 class AccelerationProperty: public DBusSink
80 AccelerationProperty(AbstractRoutingEngine *re, GDBusConnection *connection)
81 :DBusSink("org.automotive.acceleration","/org/automotive/runningstatus/acceleration", re, connection, map<string, string>())
83 wantProperty<uint16_t>(VehicleProperty::AccelerationX, "X", "q", AbstractProperty::Read);
84 wantProperty<uint16_t>(VehicleProperty::AccelerationY, "Y", "q", AbstractProperty::Read);
85 wantProperty<uint16_t>(VehicleProperty::AccelerationZ, "Z", "q", AbstractProperty::Read);
86 supportedChanged(re->supported());
90 class TransmissionProperty: public DBusSink
93 TransmissionProperty(AbstractRoutingEngine *re, GDBusConnection *connection)
94 :DBusSink("org.automotive.transmission","/org/automotive/runningstatus/transmission", re, connection, map<string, string>())
96 wantProperty<Transmission::TransmissionPositions>(VehicleProperty::TransmissionShiftPosition,
97 "ShiftPosition", "y", AbstractProperty::Read);
98 wantProperty<Transmission::TransmissionPositions>(VehicleProperty::TransmissionGearPosition,
99 "GearPosition", "y", AbstractProperty::Read);
100 wantProperty<Transmission::TransmissionPositions>(VehicleProperty::TransmissionMode,
101 "Mode", "y", AbstractProperty::Read);
103 supportedChanged(re->supported());