common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / stub / vehicle / client / include / stub / Vehicle_Sensor_Common_API.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef VEHICLE_CLIENT_INCLUDE_VEHICLE_SERVICE_VEHICLE_SENSOR_COMMON_API_H_
18 #define VEHICLE_CLIENT_INCLUDE_VEHICLE_SERVICE_VEHICLE_SENSOR_COMMON_API_H_
19
20 /**
21  * @file Vehicle_Sensor_Common_API.h
22  * @brief vehicle common id defined header file
23  */
24
25 /** @addtogroup BaseSystem
26  *  @{
27  */
28 /** @addtogroup vehicle_service
29  *  @ingroup BaseSystem
30  *  @{
31  */
32 /** @addtogroup vehicle
33  *  @ingroup vehicle_service
34  *  @{
35  */
36
37 /******************************************************************************
38  * File name    :Vehicle_Sensor_Common_API.h
39  * System name    :_CWORD107_
40  * Subsystem name  :Vehicle I/F library, Sensor I/F library
41  ******************************************************************************/
42
43 /************************************************************************
44  *      Macro definition                          *
45  ************************************************************************/
46
47 #if 1                    // Ignore -> MISRA-C++ Rules 16-1-2, 16-2-2
48 /* #GPF_60_023 For testing */
49 #ifndef CONFIG_EXTTERM_INPUT_DAB2BIT    // Ignore -> MISRA-C++ Rules 16-1-2, 16-2-2
50 /**
51  * \~english  DAB data 2 bits macro
52  */
53 #define CONFIG_EXTTERM_INPUT_DAB2BIT 1    // Ignore -> MISRA-C++ Rules 16-2-2
54 #endif
55 #ifndef CONFIG_EXTTERM_INPUT_GPS2BIT    // Ignore -> MISRA-C++ Rules 16-1-2, 16-2-2
56 /**
57  * \~english  GPS data 2 bits macro
58  */
59 #define CONFIG_EXTTERM_INPUT_GPS2BIT 1    // Ignore -> MISRA-C++ Rules 16-2-2
60 #endif
61 #ifndef CONFIG_EXTTERM_INPUT_IMAGETERMINAL  // Ignore -> MISRA-C++ Rules 16-1-2, 16-2-2
62 /**
63  * \~english  Image terminal macro
64  */
65 #define CONFIG_EXTTERM_INPUT_IMAGETERMINAL  1  // Ignore -> MISRA-C++ Rules 16-2-2
66 #endif
67 #endif
68 /* The above definition is a remnant of the external terminal processing part inside *
69  * the sennsor that was enabled or disabled, and is not originally required at all.  *
70  * Enable all sensor internal processing and then delete.  */
71
72 /*----------------------------------------------------------------------*
73  *  Data ID corresponding to vehicle sensor information                 *
74  *----------------------------------------------------------------------*/
75 /*
76  *  Note.
77  *  This feature needs to be defined by the vendor.
78  */
79
80 /**
81  * \~english  Destination information
82  */
83 #define  VEHICLE_DID_DESTINATION      (0x00000001UL)  // Ignore -> MISRA-C++ Rule 16-2-2
84
85 /**
86  * \~english  Hybrid electric vehicle information
87  */
88 #define  VEHICLE_DID_HV          (0x00000002UL)  // Ignore -> MISRA-C++ Rule 16-2-2
89
90 /**
91  * \~english  Steering wheel information
92  */
93 #define  VEHICLE_DID_STEERING_WHEEL    (0x00000003UL)  // Ignore -> MISRA-C++ Rule 16-2-2
94
95 /**
96  * \~english  Voltage
97  */
98 #define  VEHICLE_DID_VB          (0x00000004UL)  // Ignore -> MISRA-C++ Rule 16-2-2
99
100 /**
101  * \~english  IG information
102  */
103 #define  VEHICLE_DID_IG          (0x00000005UL)  // Ignore -> MISRA-C++ Rule 16-2-2
104
105 /**
106  * \~english  Microphone information
107  */
108 #define  VEHICLE_DID_MIC          (0x00000006UL)  // Ignore -> MISRA-C++ Rule 16-2-2
109
110 /**
111  * \~english  Back door information
112  */
113 #define  VEHICLE_DID_BACKDOOR      (0x00000007UL)  // Ignore -> MISRA-C++ Rule 16-2-2
114
115 /**
116  * \~english  Parking brake information
117  */
118 #define  VEHICLE_DID_PKB          (0x00000008UL)  // Ignore -> MISRA-C++ Rule 16-2-2
119
120 /**
121  * \~english  ADIM information
122  */
123 #define  VEHICLE_DID_ADIM        (0x00000009UL)  // Ignore -> MISRA-C++ Rule 16-2-2
124
125 /**
126  * \~english  Illumination information
127  */
128 #define  VEHICLE_DID_ILL          (0x0000000AUL)  // Ignore -> MISRA-C++ Rule 16-2-2
129
130 /**
131  * \~english  RHEOSTAT information
132  */
133 #define  VEHICLE_DID_RHEOSTAT      (0x0000000BUL)  // Ignore -> MISRA-C++ Rule 16-2-2
134
135 /**
136  * \~english  System temperature information
137  */
138 #define  VEHICLE_DID_SYSTEMP        (0x0000000CUL)  // Ignore -> MISRA-C++ Rule 16-2-2
139
140 /**
141  * \~english  Reverse information
142  */
143 #define  VEHICLE_DID_REV          (0x00000017UL)  // Ignore -> MISRA-C++ Rule 16-2-2
144
145 /**
146  * \~english  Reverse information(line sensor)
147  */
148 #define  VEHICLE_DID_REV_LINE      (0x0000000EUL)  // Ignore -> MISRA-C++ Rule 16-2-2
149
150 /**
151  * \~english  Reverse CAN information
152  */
153 #define  VEHICLE_DID_REV_CAN        (0x0000000FUL)  // Ignore -> MISRA-C++ Rule 16-2-2
154 /**
155  * \~english  SPEED information
156  */
157 #define  VEHICLE_DID_SPEED        (0x00000010UL)  // Ignore -> MISRA-C++ Rule 16-2-2
158
159 /**
160  * \~english  SPEED PULSE information
161  */
162 #define  VEHICLE_DID_SPEED_PULSE        (0x00000011UL)  // Ignore -> MISRA-C++ Rule 16-2-2
163
164 /**
165  * \~english  VB information
166  */
167 #define  VEHICLE_DID_VBLOW        (0x00000012UL)  // Ignore -> MISRA-C++ Rule 16-2-2
168
169 /**
170  * \~english  Drive information(2WD/4WD)
171  */
172 #define  VEHICLE_DID_DVINF                (0x00000013UL)
173
174 /**
175  * \~english  Transmission information
176  */
177 #define  VEHICLE_DID_VARTRM1                (0x00000014UL)
178
179 /**
180  * \~english  Shift position signal(R, P, N, D)
181  */
182 #define  VEHICLE_DID_SHIFT                (0x00000015UL)
183
184 /**
185  * \~english  Direct line sensor(PKB)
186  */
187 #define  VEHICLE_DID_PKB_LINE              (0x00000016UL)
188
189 /**
190  * \~english  D seat door signal switch
191  */
192 #define VEHICLE_DID_DSEAT_DOOR              (0x0000000DUL)
193
194 /**
195  * \~english  P seat door signal switch
196  */
197 #define VEHICLE_DID_PSEAT_DOOR              (0x00000018UL)
198
199 /**
200  * \~english  RR seat door signal switch
201  */
202 #define VEHICLE_DID_RRSEAT_DOOR              (0x00000019UL)
203
204 /**
205  * \~english  RL seat door signal switch
206  */
207 #define VEHICLE_DID_RLSEAT_DOOR              (0x0000001AUL)
208
209 /**
210  * \~english  IGP information
211  */
212 #define VEHICLE_DID_IGP                      (0x0000001BUL)
213
214 /**
215  * \~english  HV information status
216  */
217 #define VEHICLE_DID_HV_STS              (0x0000001CUL)
218
219 /**
220  * \~english  Shift position signal(Unspecified)
221  */
222 #define VEHICLE_DID_SHIFT_U             (0x0000001DUL)
223
224 /**
225  * \~english USB power supply
226  */
227 #define VEHICLE_DID_USBPOWERSUPPLY      (0x800000A0UL)
228
229 /**
230  * \~english  Analog Microphone Connect information
231  */
232 #define  VEHICLE_DID_ANALOG_MIC        (0x800000B0UL)
233
234 /**
235  * \~english  MultiMic Connect information
236  */
237 #define  VEHICLE_DID_MULTI_MIC         (0x800000B1UL)
238
239 /*----------------------------------------------------------------------*
240  *  Vehicle sensor information data                        *
241  *----------------------------------------------------------------------*/
242 /**
243  * \~english  OFF
244  */
245 #define  VEHICLE_SNS_OFF          (0x00U)  // Ignore -> MISRA-C++ Rule 16-2-2
246
247 /**
248  * \~english  ON
249  */
250 #define  VEHICLE_SNS_ON          (0x01U)  // Ignore -> MISRA-C++ Rule 16-2-2
251
252 #define  VEHICLE_SNS_BLACKOUT    (0x02U)  // Disruptions
253 /**
254  * \~english  Undefined
255  */
256 #define  VEHICLE_SNS_UNDEF        (0x03U)  // Ignore -> MISRA-C++ Rule 16-2-2
257
258 /**
259  * \~english  Disconnection
260  */
261 #define  VEHICLE_SNS_UNCONNECTION    (0x00U)  // Ignore -> MISRA-C++ Rule 16-2-2
262
263 /**
264  * \~english  Connection
265  */
266 #define  VEHICLE_SNS_CONNECTION      (0x01U)  // Ignore -> MISRA-C++ Rule 16-2-2
267
268 /**
269  * \~english  Uncertainty
270  */
271 #define  VEHICLE_SNS_BW_UNCERTAINTY   (0x02U)
272
273 /**
274  * \~english  Unspecified
275  */
276 #define  VEHICLE_SNS_UNSPECIFIED      (0x03U)  // Ignore -> MISRA-C++ Rule 16-2-2
277 /* #GPF_60_023 ADD START */
278 #if (CONFIG_EXTTERM_INPUT_DAB2BIT | CONFIG_EXTTERM_INPUT_GPS2BIT)    // Ignore -> MISRA-C++ Rules 16-1-2, 16-2-2
279 /**
280  * \~english  Short
281  */
282 #define  VEHICLE_SNS_SHORT        (0x02U)  // Ignore -> MISRA-C++ Rule 16-2-2
283 #endif
284 /* #GPF_60_023 ADD END */
285
286 /**
287  * \~english  Hybrid electric vehicle
288  */
289 #define  VEHICLE_SNS_HV          (0x01U)  // Ignore -> MISRA-C++ Rule 16-2-2
290
291 /**
292  * \~english  Plug-in hybrid electric vehicle
293  */
294 #define  VEHICLE_SNS_PHV          (0x02U)  // Ignore -> MISRA-C++ Rule 16-2-2
295
296 /**
297  * \~english  Electric vehicle
298  */
299 #define  VEHICLE_SNS_EV           (0x03U)
300
301 /**
302  * \~english  Fuel Cell vehicle
303  */
304 #define  VEHICLE_SNS_FCV          (0x04U)
305
306 /**
307  * \~english  1 motor vehicle
308  */
309 #define  VEHICLE_SNS_1MOT         (0x05U)
310
311 /**
312  * \~english  Conventional(48V) vehicle
313  */
314 #define  VEHICLE_SNS_48V          (0x06U)
315
316 /**
317  *  \~english S&S vehicle
318  */
319 #define  VEHICLE_SNS_SANDS        (0x07U)
320
321 /**
322  * \~english  Conventional vehicle
323  */
324 #define  VEHICLE_SNS_NONHV        (0x00U)  // Ignore -> MISRA-C++ Rule 16-2-2
325
326 /**
327  * \~english  Two wheel drive
328  */
329 #define  VEHICLE_SNS_2WD          (0x00U)  // Ignore -> MISRA-C++ Rule 16-2-2
330
331 /**gb
332  * \~english  Four wheel drive
333  */
334 #define  VEHICLE_SNS_4WD          (0x01U)  // Ignore -> MISRA-C++ Rule 16-2-2
335
336 /**
337  * \~english  Left handle
338  */
339 #define  VEHICLE_SNS_LH          (0x01U)  // Ignore -> MISRA-C++ Rule 16-2-2
340
341 /**
342  * \~english  Right handle
343  */
344 #define  VEHICLE_SNS_RH          (0x02U)  // Ignore -> MISRA-C++ Rule 16-2-2
345
346 /**
347  * \~english  Close
348  */
349 #define  VEHICLE_SNS_CLOSE        (0x00U)  // Ignore -> MISRA-C++ Rule 16-2-2
350
351 /**
352  * \~english  Open
353  */
354 #define  VEHICLE_SNS_OPEN        (0x01U)  // Ignore -> MISRA-C++ Rule 16-2-2
355
356 /**
357  * \~english  Back door uncertainty
358  */
359 #define  VEHICLE_SNS_BD_UNCERTAINTY    (0x02U)  // Ignore -> MISRA-C++ Rule 16-2-2
360
361 /**
362  * \~english  ADIM uncertainty
363  */
364 #define  VEHICLE_SNS_ADIM_UNCERTAINTY  (0x00U)  // Ignore -> MISRA-C++ Rule 16-2-2
365
366 /**
367  * \~english  ADIM undefined
368  */
369 #define  VEHICLE_SNS_ADIM_UNDEF      (0x01U)  // Ignore -> MISRA-C++ Rule 16-2-2
370
371 /**
372  * \~english  ADIM off
373  */
374 #define  VEHICLE_SNS_ADIM_OFF      (0x02U)  // Ignore -> MISRA-C++ Rule 16-2-2
375
376 /**
377  * \~english  ADIM on
378  */
379 #define  VEHICLE_SNS_ADIM_ON        (0x03U)  // Ignore -> MISRA-C++ Rule 16-2-2
380
381 /**
382  * \~english  Drive information(2WD)
383  */
384 #define  VEHICLE_SNS_DVINF_2WD      (0x00U)
385
386 /**
387  * \~english  Drive information(4WD)
388  */
389 #define  VEHICLE_SNS_DVINF_4WD      (0x01U)
390
391 /**
392  * \~english  Drive information uncertainty
393  */
394 #define  VEHICLE_SNS_DVINF_UNCERTAINTY  (0x03U)
395
396 /**
397  * \~english  Transmission information(MT)
398  */
399 #define  VEHICLE_SNS_VARTRM1_MT      (0x00U)
400
401 /**
402  * \~english  Transmission information(AT)
403  */
404 #define  VEHICLE_SNS_VARTRM1_AT      (0x01U)
405
406 /**
407  * \~english  Transmission information(CVT)
408  */
409 #define  VEHICLE_SNS_VARTRM1_CVT      (0x02U)
410
411 /**
412  * \~english  Transmission information(MMT)
413  */
414 #define  VEHICLE_SNS_VARTRM1_MMT      (0x03U)
415
416 /**
417  * \~english  Transmission information(SMT)
418  */
419 #define  VEHICLE_SNS_VARTRM1_SMT      (0x04U)
420
421 /**
422  * \~english  Transmission information(HV_AT)
423  */
424 #define  VEHICLE_SNS_VARTRM1_HV_AT    (0x05U)
425
426 /**
427  * \~english  Transmission information uncertainty
428  */
429 #define  VEHICLE_SNS_VARTRM1_UNCERTAINTY  (0x0FU)
430
431 /**
432  * \~english  D seat door uncertainty
433  */
434 #define VEHICLE_SNS_DS_UNCERTAINTY    (0x02U)
435
436 /**
437  * \~english  P seat door uncertainty
438  */
439 #define VEHICLE_SNS_PS_UNCERTAINTY    (0x02U)
440
441 /**
442  * \~english  RR seat door uncertainty
443  */
444 #define VEHICLE_SNS_RRS_UNCERTAINTY    (0x02U)
445
446 /**
447  * \~english  RL seat door uncertainty
448  */
449 #define VEHICLE_SNS_RLS_UNCERTAINTY    (0x02U)
450
451 /**
452  * \~english  HV information not decision
453  */
454 #define  VEHICLE_SNS_HV_NOT_DECISION    (0x00U)
455
456 /**
457  * \~english  HV information decision
458  */
459 #define VEHICLE_SNS_HV_DECISION      (0x01U)
460
461 /**
462  * @enum VehicleSnsAnlogMicBit
463  * \~english  ANALOGMIC connect bit information
464  */
465 enum VehicleSnsAnlogMicBit {
466   VEHICLE_SNS_ANALOG_MIC1_BIT = 0x02,  //!< \~english ANALOGMIC1 connect
467   VEHICLE_SNS_ANALOG_MIC2_BIT = 0x04,  //!< \~english ANALOGMIC2 connect
468 };
469
470 /**
471  * @enum VehicleSnsMultiMicBit
472  * \~english  MULTI MIC connect bit information
473  */
474 enum VehicleSnsMultiMicBit {
475   VEHICLE_SNS_A2B_HUB_BIT = 0x01,           //!< \~english A2BHUB connect
476   VEHICLE_SNS_MULTI_MIC1_BIT = 0x02,        //!< \~english MULTIMIC1 connect
477   VEHICLE_SNS_MULTI_MIC2_BIT = 0x04,        //!< \~english MULTIMIC2 connect
478   VEHICLE_SNS_MULTI_MIC3_BIT = 0x08,        //!< \~english MULTIMIC3 connect
479   VEHICLE_SNS_MULTI_MIC4_BIT = 0x10,        //!< \~english MULTIMIC4 connect
480   VEHICLE_SNS_MULTI_MIC5_BIT = 0x20,        //!< \~english MULTIMIC5 connect
481   VEHICLE_SNS_MULTI_MIC6_BIT = 0x40,        //!< \~english MULTIMIC6 connect
482   VEHICLE_SNS_ANC_BIT = 0x80,               //!< \~english ANC connect
483 };
484
485 /*-------------------------------------------------------------------------------
486  * Time status return value
487  -------------------------------------------------------------------------------*/
488 /**
489  * \~english  Real time clock
490  */
491 #define  GPS_TIMESTS_RTC      (0x02U)  // Ignore -> MISRA-C++ Rule 16-2-2
492
493 /**
494  * \~english  Exception time
495  */
496 #define  GPS_TIMESTS_NG      (0x03U)  // Ignore -> MISRA-C++ Rule 16-2-2
497
498 /** @}*/  // end of vehicle
499 /** @}*/  // end of VehicleService
500 /** @}*/  // end of BaseSystem
501
502 #endif  // VEHICLE_CLIENT_INCLUDE_VEHICLE_SERVICE_VEHICLE_SENSOR_COMMON_API_H_