client: Add AMB objects for Vehicle Status
[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
49 /**
50  * Vehicle Speed & Odometer
51  * CANID: 258 (0x102)
52  */
53 CAN_OBJECT(VehicleOdometer,     guint32, NULL);
54 CAN_OBJECT(VehicleSpeed,        guint16, Speed);
55
56 /**
57  * Engine Information
58  * CANID: 259 (0x103)
59  */
60 CAN_OBJECT(EngineRPM,           guint16, NULL);
61 CAN_OBJECT(WarterTemperature,   guint16, NULL);
62 CAN_OBJECT(FuelGage,            guchar,  NULL);
63
64 /**
65  * TPMS Tire Air pressure
66  * CANID: 260 (0x104)
67  */
68 CAN_OBJECT(TPMS_FL, guchar, NULL);
69 CAN_OBJECT(TPMS_FR, guchar, NULL);
70 CAN_OBJECT(TPMS_RL, guchar, NULL);
71 CAN_OBJECT(TPMS_RR, guchar, NULL);
72
73 /**
74  * Warning Message & Status
75  * CANID: 518 (0x206)
76  */
77 CAN_OBJECT(WarningSafetybelts,  gboolean, NULL);
78 CAN_OBJECT(WarningAirbag,       gboolean, NULL);
79 CAN_OBJECT(CheckCharging,       gboolean, NULL);
80 CAN_OBJECT(WarningLowOilLevel,  gboolean, NULL);
81 CAN_OBJECT(CheckPowerSteering,  gboolean, NULL);
82 CAN_OBJECT(WarningBrake,        gboolean, NULL);
83 CAN_OBJECT(WarningEBD,          gboolean, NULL);
84 CAN_OBJECT(CheckEnging,         gboolean, NULL);
85 CAN_OBJECT(EmergencyFlasher,    gboolean, NULL);
86 CAN_OBJECT(FuelLeveltooLow,     gboolean, NULL);
87 CAN_OBJECT(WarningTPM,          gboolean, NULL);
88 CAN_OBJECT(LowWasher,           gboolean, NULL);
89 CAN_OBJECT(SystemESC,           gboolean, NULL);
90 CAN_OBJECT(SystemESCOff,        gboolean, NULL);
91 CAN_OBJECT(WarningABS,          gboolean, NULL);
92 CAN_OBJECT(StsDoorOpen,         gboolean, NULL);
93 CAN_OBJECT(StsTrunkOpen,        gboolean, NULL);
94 CAN_OBJECT(WarningImmobilizer,  gboolean, NULL);
95 CAN_OBJECT(LampRearFogLights,   gboolean, NULL);
96 CAN_OBJECT(LampHazardLight,     gboolean, NULL);
97 CAN_OBJECT(LampFrontFog,        gboolean, NULL);
98 CAN_OBJECT(LampTailLight,       gboolean, NULL);
99 CAN_OBJECT(LampHighBeamAuto,    gboolean, NULL);
100 CAN_OBJECT(LampHighBeam,        gboolean, NULL);
101 CAN_OBJECT(LampCruiseCnt,       gboolean, NULL);
102 CAN_OBJECT(LampCruiseCntSet,    gboolean, NULL);
103 CAN_OBJECT(LampDoorOpenF_L,     gboolean, NULL);
104 CAN_OBJECT(LampDoorOpenF_R,     gboolean, NULL);
105 CAN_OBJECT(LampDoorOpenR_R,     gboolean, NULL);
106 CAN_OBJECT(LampDoorOpenR_L,     gboolean, NULL);
107 CAN_OBJECT(LampDoorOpenBonnet,  gboolean, NULL);
108 CAN_OBJECT(LampDoorOpenTrunk,   gboolean, NULL);
109 CAN_OBJECT(WarningParkingBreak, gboolean, NULL);
110
111 #ifdef __cplusplus
112 }
113 #endif
114
115 #endif /* __LIBSAMSUNG_CAN_H__ */