2 * Automotive Message Broker Client Library
4 * Copyright (C) 2016 Samsung Electronics Co., Ltd.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef __LIBSAMSUNG_CAN_H__
20 #define __LIBSAMSUNG_CAN_H__
26 #include "libamb-util.h"
28 enum GearboxPositionDisplay {
29 PARKING = (1<<3) | (1<<1), // 10, 0x0A
36 NORMAL = (1<<3) | (1<<1), // 10, 0x0A
37 ECO = (1<<3) | (1<<2), // 12, 0x0C
45 CAN_OBJECT(GearboxPositionDisplay, guchar, NULL);
46 CAN_OBJECT(GearboxPosition, guchar, NULL);
47 CAN_OBJECT(DriveMode, guchar, NULL);
48 CAN_OBJECT(AliveCounter, guchar, NULL);
51 * Vehicle Speed & Odometer
54 CAN_OBJECT(VehicleSpeed, guint16, Speed);
55 CAN_OBJECT(VehicleOdometer, guint32, NULL);
61 CAN_OBJECT(EngineRPM, guint16, NULL);
62 CAN_OBJECT(WarterTemperature, guint16, NULL);
63 CAN_OBJECT(OutsideTemperature, gdouble, NULL);
64 CAN_OBJECT(FuelGage, guchar, NULL);
67 * TPMS Tire Air pressure
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);
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(Wiper_Lo, gboolean, NULL);
84 CAN_OBJECT(Wiper_Speed, guchar, NULL);
85 CAN_OBJECT(Wiper_Hi, gboolean, NULL);
86 CAN_OBJECT(Wiper_Mist, gboolean, NULL);
87 CAN_OBJECT(Wiper_Auto, gboolean, NULL);
90 * Warning Message & Status
93 CAN_OBJECT(WarningSafetybelts, gboolean, NULL);
94 CAN_OBJECT(WarningAirbag, gboolean, NULL);
95 CAN_OBJECT(CheckCharging, gboolean, NULL);
96 CAN_OBJECT(WarningLowOilLevel, gboolean, NULL);
97 CAN_OBJECT(CheckPowerSteering, gboolean, NULL);
98 CAN_OBJECT(WarningBrake, gboolean, NULL);
99 CAN_OBJECT(WarningEBD, gboolean, NULL);
101 CAN_OBJECT(LeftTurnSignal, gboolean, NULL);
102 CAN_OBJECT(RightTurnSignal, gboolean, NULL);
104 CAN_OBJECT(CheckEnging, gboolean, NULL);
105 CAN_OBJECT(EmergencyFlasher, gboolean, NULL);
106 CAN_OBJECT(FuelLeveltooLow, gboolean, NULL);
107 CAN_OBJECT(WarningTPM, gboolean, NULL);
108 CAN_OBJECT(LowWasher, gboolean, NULL);
109 CAN_OBJECT(SystemESC, gboolean, NULL);
110 CAN_OBJECT(SystemESCOff, gboolean, NULL);
112 CAN_OBJECT(WarningABS, gboolean, NULL);
113 CAN_OBJECT(StsDoorOpen, gboolean, NULL);
114 CAN_OBJECT(StsTrunkOpen, gboolean, NULL);
115 CAN_OBJECT(WarningImmobilizer, gboolean, NULL);
116 CAN_OBJECT(LampRearFogLights, gboolean, NULL);
117 CAN_OBJECT(LampHeadBeam, gboolean, NULL);
119 CAN_OBJECT(LampHazardLight, gboolean, NULL);
120 CAN_OBJECT(LampFrontFog, gboolean, NULL);
121 CAN_OBJECT(LampTailLight, gboolean, NULL);
122 CAN_OBJECT(LampHighBeamAuto, gboolean, NULL);
123 CAN_OBJECT(LampHighBeam, gboolean, NULL);
124 CAN_OBJECT(LampCruiseCnt, gboolean, NULL);
125 CAN_OBJECT(LampCruiseCntSet, gboolean, NULL);
127 CAN_OBJECT(LampDoorOpenF_L, gboolean, NULL);
128 CAN_OBJECT(LampDoorOpenF_R, gboolean, NULL);
129 CAN_OBJECT(LampDoorOpenR_L, gboolean, NULL);
130 CAN_OBJECT(LampDoorOpenR_R, gboolean, NULL);
131 CAN_OBJECT(LampDoorOpenBonnet, gboolean, NULL);
132 CAN_OBJECT(LampDoorOpenTrunk, gboolean, NULL);
133 CAN_OBJECT(WarningParkingBreak, gboolean, NULL);
134 CAN_OBJECT(CheckInRear, gboolean, NULL);
136 CAN_OBJECT(CheckSeatHeaterL, guchar, NULL);
137 CAN_OBJECT(CheckSeatHeaterR, guchar, NULL);
138 CAN_OBJECT(CheckSeatCoolerL, guchar, NULL);
139 CAN_OBJECT(CheckSeatCoolerR, guchar, NULL);
141 CAN_OBJECT(InsideRecirculatedAirMode, gboolean, NULL);
142 CAN_OBJECT(FrontDefrostion, gboolean, NULL);
143 CAN_OBJECT(RearDefrostion, gboolean, NULL);
146 * Wheel Remote Controller Key Event
149 CAN_OBJECT(FR_KeyEvent01, gboolean, NULL);
150 CAN_OBJECT(FR_KeyEvent02, gboolean, NULL);
151 CAN_OBJECT(FR_KeyEvent03, gboolean, NULL);
152 CAN_OBJECT(FR_KeyEvent04, gboolean, NULL);
153 CAN_OBJECT(FR_KeyEvent05, gboolean, NULL);
154 CAN_OBJECT(FR_KeyEvent06, gboolean, NULL);
155 CAN_OBJECT(FR_KeyEvent07, gboolean, NULL);
156 CAN_OBJECT(FR_KeyEvent08, gboolean, NULL);
158 CAN_OBJECT(FR_KeyEvent09, gboolean, NULL);
159 CAN_OBJECT(FR_KeyEvent10, gboolean, NULL);
160 CAN_OBJECT(FR_KeyEvent11, gboolean, NULL);
161 CAN_OBJECT(FR_KeyEvent12, gboolean, NULL);
162 CAN_OBJECT(FR_KeyEvent13, gboolean, NULL);
163 CAN_OBJECT(FR_KeyEvent14, gboolean, NULL);
164 CAN_OBJECT(FR_KeyEvent15, gboolean, NULL);
165 CAN_OBJECT(FR_KeyEvent16, gboolean, NULL);
167 CAN_OBJECT(FR_KeyEvent17, gboolean, NULL);
168 CAN_OBJECT(FR_KeyEvent18, gboolean, NULL);
169 CAN_OBJECT(FR_KeyEvent19, gboolean, NULL);
170 CAN_OBJECT(FR_KeyEvent20, gboolean, NULL);
171 CAN_OBJECT(FR_KeyEvent21, gboolean, NULL);
172 CAN_OBJECT(FR_KeyEvent22, gboolean, NULL);
173 CAN_OBJECT(FR_KeyEvent23, gboolean, NULL);
174 CAN_OBJECT(FR_KeyEvent24, gboolean, NULL);
177 * CID Time Information
178 * CANID: 1025 (0x401)
180 CAN_OBJECT(CidWatchHour, guchar, NULL);
181 CAN_OBJECT(CidWatchMin, guchar, NULL);
182 CAN_OBJECT(CidWatchSec, guchar, NULL);
183 CAN_OBJECT(CidWatchYY, guint16, NULL);
184 CAN_OBJECT(CidWatchMM, guchar, NULL);
185 CAN_OBJECT(CidWatchDD, guchar, NULL);
188 * CID Climate & Media Volumn Information
189 * CANID: 1026 (0x402)
191 CAN_OBJECT(CidACOnOff, gboolean, NULL);
192 CAN_OBJECT(AirDistributionCID, guchar, NULL);
193 CAN_OBJECT(LeftTemperatureCID, gdouble, NULL);
194 CAN_OBJECT(LeftAirflowCID, guchar, NULL);
195 CAN_OBJECT(RightTemperatureCID, gdouble, NULL);
196 CAN_OBJECT(RightAirflowCID, guchar, NULL);
197 CAN_OBJECT(MediaVolumeCID, guchar, NULL);
200 * CID Climate & Defrosion Information
201 * CANID: 1027 (0x403)
203 CAN_OBJECT(CidCheckSeatHeaterL, guchar, NULL);
204 CAN_OBJECT(CidCheckSeatHeaterR, guchar, NULL);
205 CAN_OBJECT(CidCheckSeatCoolerL, guchar, NULL);
206 CAN_OBJECT(CidCheckSeatCoolerR, guchar, NULL);
207 CAN_OBJECT(CidInsideRecirculatedAirMode, gboolean, NULL);
208 CAN_OBJECT(CidFrontDefrostion, gboolean, NULL);
209 CAN_OBJECT(CidRearDefrostion, gboolean, NULL);
210 CAN_OBJECT(CidBtnAutoMode, gboolean, NULL);
213 * Cluster Trip Information A
216 CAN_OBJECT(TRIP_A_Range, guint32, NULL);
217 CAN_OBJECT(TRIP_A_Fuel_Used, guchar, NULL);
218 CAN_OBJECT(TRIP_A_Avg_Speed, guint16, NULL);
219 CAN_OBJECT(TRIP_A_EllapsedTime, guint16, NULL);
222 * Cluster Trip Information B
225 CAN_OBJECT(TRIP_B_Range, guint32, NULL);
226 CAN_OBJECT(TRIP_B_Fuel_Used, guchar, NULL);
227 CAN_OBJECT(TRIP_B_Avg_Speed, guint16, NULL);
228 CAN_OBJECT(TRIP_B_EllapsedTime, guint16, NULL);
232 * CANID: 1793 (0x701)
234 CAN_OBJECT(AirDistributionLeftKnob, guchar, NULL);
235 CAN_OBJECT(LeftTemperatureLeftKnob, gdouble, NULL);
236 CAN_OBJECT(LeftAirflowLeftKnob, guchar, NULL);
237 CAN_OBJECT(MediaVolumeLeftKnob, guchar, NULL);
241 * CANID: 1794 (0x702)
243 CAN_OBJECT(AirDistributionRightKnob, guchar, NULL);
244 CAN_OBJECT(RightTemperatureRightKnob, gdouble, NULL);
245 CAN_OBJECT(RightAirflowLeftKnob, guchar, NULL);
246 CAN_OBJECT(MediaVolumeRightKnob, guchar, NULL);
249 * Writable AMB Object
252 CAN_OBJECT_WRITABLE(CidCheckSeatHeaterL, guchar, NULL);
253 CAN_OBJECT_WRITABLE(CidCheckSeatHeaterR, guchar, NULL);
254 CAN_OBJECT_WRITABLE(CidCheckSeatCoolerL, guchar, NULL);
255 CAN_OBJECT_WRITABLE(CidCheckSeatCoolerR, guchar, NULL);
256 CAN_OBJECT_WRITABLE(AirDistributionCID, guchar, NULL);
257 CAN_OBJECT_WRITABLE(LeftTemperatureCID, gdouble, NULL);
258 CAN_OBJECT_WRITABLE(LeftAirflowCID, guchar, NULL);
259 CAN_OBJECT_WRITABLE(RightTemperatureCID, gdouble, NULL);
260 CAN_OBJECT_WRITABLE(RightAirflowCID, guchar, NULL);
261 CAN_OBJECT_WRITABLE(CidInsideRecirculatedAirMode, gboolean, NULL);
262 CAN_OBJECT_WRITABLE(CidFrontDefrostion, gboolean, NULL);
263 CAN_OBJECT_WRITABLE(CidRearDefrostion, gboolean, NULL);
264 CAN_OBJECT_WRITABLE(CidBtnAutoMode, gboolean, NULL);
265 CAN_OBJECT_WRITABLE(CidACOnOff, gboolean, NULL);
267 CAN_OBJECT_WRITABLE(CheckSeatHeaterL, guchar, NULL); /* defrecated */
268 CAN_OBJECT_WRITABLE(CheckSeatHeaterR, guchar, NULL); /* defrecated */
269 CAN_OBJECT_WRITABLE(CheckSeatCoolerL, guchar, NULL); /* defrecated */
270 CAN_OBJECT_WRITABLE(CheckSeatCoolerR, guchar, NULL); /* defrecated */
273 * Writable AMB Object
276 CAN_OBJECT_WRITABLE(MediaVolumeCID, guchar, NULL);
279 * Writable AMB Object
282 CAN_OBJECT_WRITABLE(AirDistributionLeftKnob, guchar, NULL);
283 CAN_OBJECT_WRITABLE(LeftTemperatureLeftKnob, gdouble, NULL);
284 CAN_OBJECT_WRITABLE(LeftAirflowLeftKnob, guchar, NULL);
285 CAN_OBJECT_WRITABLE(MediaVolumeLeftKnob, guchar, NULL);
288 * Writable AMB Object
291 CAN_OBJECT_WRITABLE(AirDistributionRightKnob, guchar, NULL);
292 CAN_OBJECT_WRITABLE(RightTemperatureRightKnob, gdouble, NULL);
293 CAN_OBJECT_WRITABLE(RightAirflowLeftKnob, guchar, NULL);
294 CAN_OBJECT_WRITABLE(MediaVolumeRightKnob, guchar, NULL);
300 #endif /* __LIBSAMSUNG_CAN_H__ */