client: Support HVAC, Battery, Time, Knob & Media Volume
[profile/ivi/automotive-message-broker.git] / lib / client / libamb-objects.h
1 /*
2  * Automotive Message Broker Client Library
3  *
4  * Copyright (C) 2016 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License)
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #ifndef __LIBSAMSUNG_CAN_H__
20 #define __LIBSAMSUNG_CAN_H__
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 #include "libamb-util.h"
27
28 enum GearboxPositionDisplay {
29         PARKING = (1<<3) | (1<<1), // 10, 0x0A
30         DRIVE,                     // 11, 0x0B
31         NEUTRAL,
32         REVERSE,
33 };
34
35 enum DriveMode {
36         NORMAL = (1<<3) | (1<<1),       // 10, 0x0A
37         ECO = (1<<3) | (1<<2),          // 12, 0x0C
38         SPORT,                          // 13, 0x0D
39 };
40
41 /**
42  * Gear Information
43  * CANID: 257 (0x101)
44  */
45 CAN_OBJECT(GearboxPositionDisplay, guchar, NULL);
46 CAN_OBJECT(GearboxPosition, guchar, NULL);
47 CAN_OBJECT(DriveMode, guchar, NULL);
48 CAN_OBJECT(AliveCounter, guchar, NULL);
49
50 /**
51  * Vehicle Speed & Odometer
52  * CANID: 258 (0x102)
53  */
54 CAN_OBJECT(VehicleSpeed,        guint16, Speed);
55 CAN_OBJECT(VehicleOdometer,     guint32, NULL);
56
57 /**
58  * Engine Information
59  * CANID: 259 (0x103)
60  */
61 CAN_OBJECT(EngineRPM,           guint16, NULL);
62 CAN_OBJECT(WarterTemperature,   guint16, NULL);
63 CAN_OBJECT(FuelGage,            guchar,  NULL);
64
65 /**
66  * TPMS Tire Air pressure
67  * CANID: 260 (0x104)
68  */
69 CAN_OBJECT(TPMS_FL, guchar, NULL);
70 CAN_OBJECT(TPMS_FR, guchar, NULL);
71 CAN_OBJECT(TPMS_RL, guchar, NULL);
72 CAN_OBJECT(TPMS_RR, guchar, NULL);
73
74 /**
75  * Battery Status
76  * CANID: 261 (0x105)
77  */
78 CAN_OBJECT(LampAutomaticHold,   guchar, NULL);
79 CAN_OBJECT(BatteryVoltage,      gdouble, NULL);
80 CAN_OBJECT(BatteryCurrent,      guchar, NULL);
81 CAN_OBJECT(BatteryChargeLevel,   guchar, NULL);
82
83 /**
84  * Warning Message & Status
85  * CANID: 518 (0x206)
86  */
87 CAN_OBJECT(WarningSafetybelts,  gboolean, NULL);
88 CAN_OBJECT(WarningAirbag,       gboolean, NULL);
89 CAN_OBJECT(CheckCharging,       gboolean, NULL);
90 CAN_OBJECT(WarningLowOilLevel,  gboolean, NULL);
91 CAN_OBJECT(CheckPowerSteering,  gboolean, NULL);
92 CAN_OBJECT(WarningBrake,        gboolean, NULL);
93 CAN_OBJECT(WarningEBD,          gboolean, NULL);
94
95 CAN_OBJECT(LeftTurnSignal,  gboolean, NULL);
96 CAN_OBJECT(RightTurnSignal,  gboolean, NULL);
97
98 CAN_OBJECT(EmergencyFlasher,    gboolean, NULL);
99 CAN_OBJECT(FuelLeveltooLow,     gboolean, NULL);
100 CAN_OBJECT(WarningTPM,          gboolean, NULL);
101 CAN_OBJECT(LowWasher,           gboolean, NULL);
102 CAN_OBJECT(SystemESC,           gboolean, NULL);
103 CAN_OBJECT(SystemESCOff,        gboolean, NULL);
104
105 CAN_OBJECT(WarningABS,          gboolean, NULL);
106 CAN_OBJECT(StsDoorOpen,         gboolean, NULL);
107 CAN_OBJECT(StsTrunkOpen,        gboolean, NULL);
108 CAN_OBJECT(WarningImmobilizer,  gboolean, NULL);
109 CAN_OBJECT(LampRearFogLights,   gboolean, NULL);
110
111 CAN_OBJECT(LampHazardLight,     gboolean, NULL);
112 CAN_OBJECT(LampFrontFog,        gboolean, NULL);
113 CAN_OBJECT(LampTailLight,       gboolean, NULL);
114 CAN_OBJECT(LampHighBeamAuto,    gboolean, NULL);
115 CAN_OBJECT(LampHighBeam,        gboolean, NULL);
116 CAN_OBJECT(LampCruiseCnt,       gboolean, NULL);
117 CAN_OBJECT(LampCruiseCntSet,    gboolean, NULL);
118
119 CAN_OBJECT(LampDoorOpenF_L,     gboolean, NULL);
120 CAN_OBJECT(LampDoorOpenF_R,     gboolean, NULL);
121 CAN_OBJECT(LampDoorOpenR_L,     gboolean, NULL);
122 CAN_OBJECT(LampDoorOpenR_R,     gboolean, NULL);
123 CAN_OBJECT(LampDoorOpenBonnet,  gboolean, NULL);
124 CAN_OBJECT(LampDoorOpenTrunk,   gboolean, NULL);
125 CAN_OBJECT(WarningParkingBreak, gboolean, NULL);
126 CAN_OBJECT(CheckInRear,         gboolean, NULL);
127
128 CAN_OBJECT(CheckSeatHeaterL,    guchar, NULL);
129 CAN_OBJECT(CheckSeatHeaterR,    guchar, NULL);
130 CAN_OBJECT(CheckSeatCoolerL,    guchar, NULL);
131 CAN_OBJECT(CheckSeatCoolerR,    guchar, NULL);
132
133 /**
134  * Wheel Remote Controller Key Event
135  * CANID: 519 (0x207)
136  */
137 CAN_OBJECT(FR_KeyEvent01,       gboolean, NULL);
138 CAN_OBJECT(FR_KeyEvent02,       gboolean, NULL);
139 CAN_OBJECT(FR_KeyEvent03,       gboolean, NULL);
140 CAN_OBJECT(FR_KeyEvent04,       gboolean, NULL);
141 CAN_OBJECT(FR_KeyEvent05,       gboolean, NULL);
142 CAN_OBJECT(FR_KeyEvent06,       gboolean, NULL);
143 CAN_OBJECT(FR_KeyEvent07,       gboolean, NULL);
144 CAN_OBJECT(FR_KeyEvent08,       gboolean, NULL);
145
146 CAN_OBJECT(FR_KeyEvent09,       gboolean, NULL);
147 CAN_OBJECT(FR_KeyEvent10,       gboolean, NULL);
148 CAN_OBJECT(FR_KeyEvent11,       gboolean, NULL);
149 CAN_OBJECT(FR_KeyEvent12,       gboolean, NULL);
150 CAN_OBJECT(FR_KeyEvent13,       gboolean, NULL);
151 CAN_OBJECT(FR_KeyEvent14,       gboolean, NULL);
152 CAN_OBJECT(FR_KeyEvent15,       gboolean, NULL);
153 CAN_OBJECT(FR_KeyEvent16,       gboolean, NULL);
154
155 CAN_OBJECT(FR_KeyEvent17,       gboolean, NULL);
156 CAN_OBJECT(FR_KeyEvent18,       gboolean, NULL);
157 CAN_OBJECT(FR_KeyEvent19,       gboolean, NULL);
158 CAN_OBJECT(FR_KeyEvent20,       gboolean, NULL);
159 CAN_OBJECT(FR_KeyEvent21,       gboolean, NULL);
160 CAN_OBJECT(FR_KeyEvent22,       gboolean, NULL);
161 CAN_OBJECT(FR_KeyEvent23,       gboolean, NULL);
162 CAN_OBJECT(FR_KeyEvent24,       gboolean, NULL);
163
164 /**
165  * CID Time Information
166  * CANID: 1025 (0x401)
167  */
168 CAN_OBJECT(CidWatchHour,        guchar, NULL);
169 CAN_OBJECT(CidWatchMin,         guchar, NULL);
170 CAN_OBJECT(CidWatchSec,         guchar, NULL);
171 CAN_OBJECT(CidWatchYY,      guint16, NULL);
172 CAN_OBJECT(CidWatchMM,      guchar, NULL);
173 CAN_OBJECT(CidWatchDD,      guchar, NULL);
174
175 /**
176  * CID Climate & Media Volumn Information
177  * CANID: 1026 (0x402)
178  */
179 CAN_OBJECT(AirDistributionCID,  guchar, NULL);
180 CAN_OBJECT(LeftTemperatureCID,  gdouble, NULL);
181 CAN_OBJECT(LeftAirflowCID,      guchar, NULL);
182 CAN_OBJECT(RightTemperatureCID, gdouble, NULL);
183 CAN_OBJECT(RightAirflowCID,     guchar, NULL);
184 CAN_OBJECT(MediaVolumeCID,      guchar, NULL);
185
186 /**
187  * Cluster Trip Information A
188  * CANID: 769 (0x301)
189  */
190 CAN_OBJECT(TRIP_A_Range,        guint32, NULL);
191 CAN_OBJECT(TRIP_A_Fuel_Used,    guchar, NULL);
192 CAN_OBJECT(TRIP_A_Avg_Speed,    guint16, NULL);
193 CAN_OBJECT(TRIP_A_EllapsedTime, guint16, NULL);
194
195 /**
196  * Cluster Trip Information B
197  * CANID: 770 (0x302)
198  */
199 CAN_OBJECT(TRIP_B_Range,        guint32, NULL);
200 CAN_OBJECT(TRIP_B_Fuel_Used,    guchar, NULL);
201 CAN_OBJECT(TRIP_B_Avg_Speed,    guint16, NULL);
202 CAN_OBJECT(TRIP_B_EllapsedTime, guint16, NULL);
203
204 /**
205  * Left Knob Control
206  * CANID: 1793 (0x701)
207  */
208 CAN_OBJECT(AirDistributionLeftKnob,     guchar, NULL);
209 CAN_OBJECT(LeftTemperatureLeftKnob,     gdouble, NULL);
210 CAN_OBJECT(LeftAirflowLeftKnob,         guchar, NULL);
211 CAN_OBJECT(MediaVolumeLeftKnob,         guchar, NULL);
212
213 /**
214  * Right Knob Control
215  * CANID: 1794 (0x702)
216  */
217 CAN_OBJECT(AirDistributionRightKnob,    guchar, NULL);
218 CAN_OBJECT(RightTemperatureRightKnob,   gdouble, NULL);
219 CAN_OBJECT(RightAirflowLeftKnob,        guchar, NULL);
220 CAN_OBJECT(MediaVolumeRightKnob,        guchar, NULL);
221
222 /**
223  * Writable AMB Object
224  * Climate
225  */
226 CAN_OBJECT_WRITABLE(CheckSeatHeaterL,       guchar, NULL);
227 CAN_OBJECT_WRITABLE(CheckSeatHeaterR,       guchar, NULL);
228 CAN_OBJECT_WRITABLE(CheckSeatCoolerL,       guchar, NULL);
229 CAN_OBJECT_WRITABLE(CheckSeatCoolerR,       guchar, NULL);
230 CAN_OBJECT_WRITABLE(AirDistributionCID,     guchar, NULL);
231 CAN_OBJECT_WRITABLE(LeftTemperatureCID,     gdouble, NULL);
232 CAN_OBJECT_WRITABLE(LeftAirflowCID,             guchar, NULL);
233 CAN_OBJECT_WRITABLE(RightTemperatureCID,    gdouble, NULL);
234 CAN_OBJECT_WRITABLE(RightAirflowCID,        guchar, NULL);
235
236 /**
237  * Writable AMB Object
238  * Media Volumn
239  */
240 CAN_OBJECT_WRITABLE(MediaVolumeCID,     guchar, NULL);
241
242 /**
243  * Writable AMB Object
244  * Left Knob Control
245  */
246 CAN_OBJECT_WRITABLE(AirDistributionLeftKnob,    guchar, NULL);
247 CAN_OBJECT_WRITABLE(LeftTemperatureLeftKnob,    gdouble, NULL);
248 CAN_OBJECT_WRITABLE(LeftAirflowLeftKnob,        guchar, NULL);
249 CAN_OBJECT_WRITABLE(MediaVolumeLeftKnob,        guchar, NULL);
250
251 /**
252  * Writable AMB Object
253  * Right Knob Control
254  */
255 CAN_OBJECT_WRITABLE(AirDistributionRightKnob,   guchar, NULL);
256 CAN_OBJECT_WRITABLE(RightTemperatureRightKnob,  gdouble, NULL);
257 CAN_OBJECT_WRITABLE(RightAirflowLeftKnob,       guchar, NULL);
258 CAN_OBJECT_WRITABLE(MediaVolumeRightKnob,       guchar, NULL);
259
260 #ifdef __cplusplus
261 }
262 #endif
263
264 #endif /* __LIBSAMSUNG_CAN_H__ */