automotive-message-broker  0.14.803
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
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 
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 
54 CAN_OBJECT(VehicleSpeed, guint16, Speed);
55 CAN_OBJECT(VehicleOdometer, guint32, NULL);
56 
61 CAN_OBJECT(EngineRPM, guint16, NULL);
62 CAN_OBJECT(WarterTemperature, guint16, NULL);
63 CAN_OBJECT(OutsideTemperature, gdouble, NULL);
64 CAN_OBJECT(FuelGage, guchar, NULL);
65 
70 CAN_OBJECT(TPMS_FL, guchar, NULL);
71 CAN_OBJECT(TPMS_FR, guchar, NULL);
72 CAN_OBJECT(TPMS_RL, guchar, NULL);
73 CAN_OBJECT(TPMS_RR, guchar, NULL);
74 
79 CAN_OBJECT(LampAutomaticHold, guchar, NULL);
80 CAN_OBJECT(BatteryVoltage, gdouble, NULL);
81 CAN_OBJECT(BatteryCurrent, guchar, NULL);
82 CAN_OBJECT(BatteryChargeLevel, guchar, NULL);
83 CAN_OBJECT(Washer_Shot, gboolean, NULL);
84 CAN_OBJECT(Wiper_Lo, gboolean, NULL);
85 CAN_OBJECT(Wiper_Speed, guchar, NULL);
86 CAN_OBJECT(Wiper_Hi, gboolean, NULL);
87 CAN_OBJECT(Wiper_Mist, gboolean, NULL);
88 CAN_OBJECT(Wiper_Auto, gboolean, NULL);
89 
94 CAN_OBJECT(Object_Detect_Front_Left, guchar, NULL);
95 CAN_OBJECT(Object_Detect_Front_Right, guchar, NULL);
96 CAN_OBJECT(Object_Detect_Front, guchar, NULL);
97 CAN_OBJECT(Object_Detect_Rear, guchar, NULL);
98 CAN_OBJECT(Object_Detect_Rear_Left, guchar, NULL);
99 CAN_OBJECT(Object_Detect_Rear_Right, guchar, NULL);
100 CAN_OBJECT(Object_Detect, gboolean, NULL);
101 
106 CAN_OBJECT(WarningSafetybelts, gboolean, NULL);
107 CAN_OBJECT(WarningAirbag, gboolean, NULL);
108 CAN_OBJECT(CheckCharging, gboolean, NULL);
109 CAN_OBJECT(WarningLowOilLevel, gboolean, NULL);
110 CAN_OBJECT(CheckPowerSteering, gboolean, NULL);
111 CAN_OBJECT(WarningBrake, gboolean, NULL);
112 CAN_OBJECT(WarningEBD, gboolean, NULL);
113 
114 CAN_OBJECT(LeftTurnSignal, gboolean, NULL);
115 CAN_OBJECT(RightTurnSignal, gboolean, NULL);
116 
117 CAN_OBJECT(CheckEnging, gboolean, NULL);
118 CAN_OBJECT(EmergencyFlasher, gboolean, NULL);
119 CAN_OBJECT(FuelLeveltooLow, gboolean, NULL);
120 CAN_OBJECT(WarningTPM, gboolean, NULL);
121 CAN_OBJECT(LowWasher, gboolean, NULL);
122 CAN_OBJECT(SystemESC, gboolean, NULL);
123 CAN_OBJECT(SystemESCOff, gboolean, NULL);
124 
125 CAN_OBJECT(WarningABS, gboolean, NULL);
126 CAN_OBJECT(StsDoorOpen, gboolean, NULL);
127 CAN_OBJECT(StsTrunkOpen, gboolean, NULL);
128 CAN_OBJECT(WarningImmobilizer, gboolean, NULL);
129 CAN_OBJECT(LampRearFogLights, gboolean, NULL);
130 CAN_OBJECT(LampHeadBeam, gboolean, NULL);
131 
132 CAN_OBJECT(LampHazardLight, gboolean, NULL);
133 CAN_OBJECT(LampFrontFog, gboolean, NULL);
134 CAN_OBJECT(LampTailLight, gboolean, NULL);
135 CAN_OBJECT(LampHighBeamAuto, gboolean, NULL);
136 CAN_OBJECT(LampHighBeam, gboolean, NULL);
137 CAN_OBJECT(LampCruiseCnt, gboolean, NULL);
138 CAN_OBJECT(LampCruiseCntSet, gboolean, NULL);
139 
140 CAN_OBJECT(LampDoorOpenF_L, gboolean, NULL);
141 CAN_OBJECT(LampDoorOpenF_R, gboolean, NULL);
142 CAN_OBJECT(LampDoorOpenR_L, gboolean, NULL);
143 CAN_OBJECT(LampDoorOpenR_R, gboolean, NULL);
144 CAN_OBJECT(LampDoorOpenBonnet, gboolean, NULL);
145 CAN_OBJECT(LampDoorOpenTrunk, gboolean, NULL);
146 CAN_OBJECT(WarningParkingBreak, gboolean, NULL);
147 CAN_OBJECT(CheckInRear, gboolean, NULL);
148 
149 CAN_OBJECT(CheckSeatHeaterL, guchar, NULL);
150 CAN_OBJECT(CheckSeatHeaterR, guchar, NULL);
151 CAN_OBJECT(CheckSeatCoolerL, guchar, NULL);
152 CAN_OBJECT(CheckSeatCoolerR, guchar, NULL);
153 
154 CAN_OBJECT(InsideRecirculatedAirMode, gboolean, NULL);
155 CAN_OBJECT(FrontDefrostion, gboolean, NULL);
156 CAN_OBJECT(RearDefrostion, gboolean, NULL);
157 
162 CAN_OBJECT(FR_KeyEvent01, gboolean, NULL);
163 CAN_OBJECT(FR_KeyEvent02, gboolean, NULL);
164 CAN_OBJECT(FR_KeyEvent03, gboolean, NULL);
165 CAN_OBJECT(FR_KeyEvent04, gboolean, NULL);
166 CAN_OBJECT(FR_KeyEvent05, gboolean, NULL);
167 CAN_OBJECT(FR_KeyEvent06, gboolean, NULL);
168 CAN_OBJECT(FR_KeyEvent07, gboolean, NULL);
169 CAN_OBJECT(FR_KeyEvent08, gboolean, NULL);
170 
171 CAN_OBJECT(FR_KeyEvent09, gboolean, NULL);
172 CAN_OBJECT(FR_KeyEvent10, gboolean, NULL);
173 CAN_OBJECT(FR_KeyEvent11, gboolean, NULL);
174 CAN_OBJECT(FR_KeyEvent12, gboolean, NULL);
175 CAN_OBJECT(FR_KeyEvent13, gboolean, NULL);
176 CAN_OBJECT(FR_KeyEvent14, gboolean, NULL);
177 CAN_OBJECT(FR_KeyEvent15, gboolean, NULL);
178 CAN_OBJECT(FR_KeyEvent16, gboolean, NULL);
179 
180 CAN_OBJECT(FR_KeyEvent17, gboolean, NULL);
181 CAN_OBJECT(FR_KeyEvent18, gboolean, NULL);
182 CAN_OBJECT(FR_KeyEvent19, gboolean, NULL);
183 CAN_OBJECT(FR_KeyEvent20, gboolean, NULL);
184 CAN_OBJECT(FR_KeyEvent21, gboolean, NULL);
185 CAN_OBJECT(FR_KeyEvent22, gboolean, NULL);
186 CAN_OBJECT(FR_KeyEvent23, gboolean, NULL);
187 CAN_OBJECT(FR_KeyEvent24, gboolean, NULL);
188 
193 CAN_OBJECT(CidWatchHour, guchar, NULL);
194 CAN_OBJECT(CidWatchMin, guchar, NULL);
195 CAN_OBJECT(CidWatchSec, guchar, NULL);
196 CAN_OBJECT(CidWatchYY, guint16, NULL);
197 CAN_OBJECT(CidWatchMM, guchar, NULL);
198 CAN_OBJECT(CidWatchDD, guchar, NULL);
199 
204 CAN_OBJECT(CidACOnOff, gboolean, NULL);
205 CAN_OBJECT(AirDistributionCID, guchar, NULL);
206 CAN_OBJECT(LeftTemperatureCID, gdouble, NULL);
207 CAN_OBJECT(LeftAirflowCID, guchar, NULL);
208 CAN_OBJECT(RightTemperatureCID, gdouble, NULL);
209 CAN_OBJECT(RightAirflowCID, guchar, NULL);
210 CAN_OBJECT(MediaVolumeCID, guchar, NULL);
211 
216 CAN_OBJECT(CidCheckSeatHeaterL, guchar, NULL);
217 CAN_OBJECT(CidCheckSeatHeaterR, guchar, NULL);
218 CAN_OBJECT(CidCheckSeatCoolerL, guchar, NULL);
219 CAN_OBJECT(CidCheckSeatCoolerR, guchar, NULL);
220 CAN_OBJECT(CidInsideRecirculatedAirMode, gboolean, NULL);
221 CAN_OBJECT(CidFrontDefrostion, gboolean, NULL);
222 CAN_OBJECT(CidRearDefrostion, gboolean, NULL);
223 CAN_OBJECT(CidBtnAutoMode, gboolean, NULL);
224 
229 CAN_OBJECT(TRIP_A_Range, guint32, NULL);
230 CAN_OBJECT(TRIP_A_Fuel_Used, guchar, NULL);
231 CAN_OBJECT(TRIP_A_Avg_Speed, guint16, NULL);
232 CAN_OBJECT(TRIP_A_EllapsedTime, guint16, NULL);
233 
238 CAN_OBJECT(TRIP_B_Range, guint32, NULL);
239 CAN_OBJECT(TRIP_B_Fuel_Used, guchar, NULL);
240 CAN_OBJECT(TRIP_B_Avg_Speed, guint16, NULL);
241 CAN_OBJECT(TRIP_B_EllapsedTime, guint16, NULL);
242 
247 CAN_OBJECT(AirDistributionLeftKnob, guchar, NULL);
248 CAN_OBJECT(LeftTemperatureLeftKnob, gdouble, NULL);
249 CAN_OBJECT(LeftAirflowLeftKnob, guchar, NULL);
250 CAN_OBJECT(MediaVolumeLeftKnob, guchar, NULL);
251 
256 CAN_OBJECT(AirDistributionRightKnob, guchar, NULL);
257 CAN_OBJECT(RightTemperatureRightKnob, gdouble, NULL);
258 CAN_OBJECT(RightAirflowLeftKnob, guchar, NULL);
259 CAN_OBJECT(MediaVolumeRightKnob, guchar, NULL);
260 
265 CAN_OBJECT_WRITABLE(CidCheckSeatHeaterL, guchar, NULL);
266 CAN_OBJECT_WRITABLE(CidCheckSeatHeaterR, guchar, NULL);
267 CAN_OBJECT_WRITABLE(CidCheckSeatCoolerL, guchar, NULL);
268 CAN_OBJECT_WRITABLE(CidCheckSeatCoolerR, guchar, NULL);
269 CAN_OBJECT_WRITABLE(AirDistributionCID, guchar, NULL);
270 CAN_OBJECT_WRITABLE(LeftTemperatureCID, gdouble, NULL);
271 CAN_OBJECT_WRITABLE(LeftAirflowCID, guchar, NULL);
272 CAN_OBJECT_WRITABLE(RightTemperatureCID, gdouble, NULL);
273 CAN_OBJECT_WRITABLE(RightAirflowCID, guchar, NULL);
274 CAN_OBJECT_WRITABLE(CidInsideRecirculatedAirMode, gboolean, NULL);
275 CAN_OBJECT_WRITABLE(CidFrontDefrostion, gboolean, NULL);
276 CAN_OBJECT_WRITABLE(CidRearDefrostion, gboolean, NULL);
277 CAN_OBJECT_WRITABLE(CidBtnAutoMode, gboolean, NULL);
278 CAN_OBJECT_WRITABLE(CidACOnOff, gboolean, NULL);
279 
280 CAN_OBJECT_WRITABLE(CheckSeatHeaterL, guchar, NULL); /* defrecated */
281 CAN_OBJECT_WRITABLE(CheckSeatHeaterR, guchar, NULL); /* defrecated */
282 CAN_OBJECT_WRITABLE(CheckSeatCoolerL, guchar, NULL); /* defrecated */
283 CAN_OBJECT_WRITABLE(CheckSeatCoolerR, guchar, NULL); /* defrecated */
284 
289 CAN_OBJECT_WRITABLE(MediaVolumeCID, guchar, NULL);
290 
295 CAN_OBJECT_WRITABLE(AirDistributionLeftKnob, guchar, NULL);
296 CAN_OBJECT_WRITABLE(LeftTemperatureLeftKnob, gdouble, NULL);
297 CAN_OBJECT_WRITABLE(LeftAirflowLeftKnob, guchar, NULL);
298 CAN_OBJECT_WRITABLE(MediaVolumeLeftKnob, guchar, NULL);
299 
304 CAN_OBJECT_WRITABLE(AirDistributionRightKnob, guchar, NULL);
305 CAN_OBJECT_WRITABLE(RightTemperatureRightKnob, gdouble, NULL);
306 CAN_OBJECT_WRITABLE(RightAirflowLeftKnob, guchar, NULL);
307 CAN_OBJECT_WRITABLE(MediaVolumeRightKnob, guchar, NULL);
308 
309 #ifdef __cplusplus
310 }
311 #endif
312 
313 #endif /* __LIBSAMSUNG_CAN_H__ */