2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef VEHICLE_CLIENT_INCLUDE_VEHICLE_SERVICE_VEHICLE_SENSOR_COMMON_API_H_
18 #define VEHICLE_CLIENT_INCLUDE_VEHICLE_SERVICE_VEHICLE_SENSOR_COMMON_API_H_
21 * @file Vehicle_Sensor_Common_API.h
22 * @brief vehicle common id defined header file
25 /** @addtogroup BaseSystem
28 /** @addtogroup vehicle_service
32 /** @addtogroup vehicle
33 * @ingroup vehicle_service
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 ******************************************************************************/
43 /************************************************************************
45 ************************************************************************/
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
51 * \~english DAB data 2 bits macro
53 #define CONFIG_EXTTERM_INPUT_DAB2BIT 1 // Ignore -> MISRA-C++ Rules 16-2-2
55 #ifndef CONFIG_EXTTERM_INPUT_GPS2BIT // Ignore -> MISRA-C++ Rules 16-1-2, 16-2-2
57 * \~english GPS data 2 bits macro
59 #define CONFIG_EXTTERM_INPUT_GPS2BIT 1 // Ignore -> MISRA-C++ Rules 16-2-2
61 #ifndef CONFIG_EXTTERM_INPUT_IMAGETERMINAL // Ignore -> MISRA-C++ Rules 16-1-2, 16-2-2
63 * \~english Image terminal macro
65 #define CONFIG_EXTTERM_INPUT_IMAGETERMINAL 1 // Ignore -> MISRA-C++ Rules 16-2-2
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. */
72 /*----------------------------------------------------------------------*
73 * Data ID corresponding to vehicle sensor information *
74 *----------------------------------------------------------------------*/
77 * This feature needs to be defined by the vendor.
81 * \~english Destination information
83 #define VEHICLE_DID_DESTINATION (0x00000001UL) // Ignore -> MISRA-C++ Rule 16-2-2
86 * \~english Hybrid electric vehicle information
88 #define VEHICLE_DID_HV (0x00000002UL) // Ignore -> MISRA-C++ Rule 16-2-2
91 * \~english Steering wheel information
93 #define VEHICLE_DID_STEERING_WHEEL (0x00000003UL) // Ignore -> MISRA-C++ Rule 16-2-2
98 #define VEHICLE_DID_VB (0x00000004UL) // Ignore -> MISRA-C++ Rule 16-2-2
101 * \~english IG information
103 #define VEHICLE_DID_IG (0x00000005UL) // Ignore -> MISRA-C++ Rule 16-2-2
106 * \~english Microphone information
108 #define VEHICLE_DID_MIC (0x00000006UL) // Ignore -> MISRA-C++ Rule 16-2-2
111 * \~english Back door information
113 #define VEHICLE_DID_BACKDOOR (0x00000007UL) // Ignore -> MISRA-C++ Rule 16-2-2
116 * \~english Parking brake information
118 #define VEHICLE_DID_PKB (0x00000008UL) // Ignore -> MISRA-C++ Rule 16-2-2
121 * \~english ADIM information
123 #define VEHICLE_DID_ADIM (0x00000009UL) // Ignore -> MISRA-C++ Rule 16-2-2
126 * \~english Illumination information
128 #define VEHICLE_DID_ILL (0x0000000AUL) // Ignore -> MISRA-C++ Rule 16-2-2
131 * \~english RHEOSTAT information
133 #define VEHICLE_DID_RHEOSTAT (0x0000000BUL) // Ignore -> MISRA-C++ Rule 16-2-2
136 * \~english System temperature information
138 #define VEHICLE_DID_SYSTEMP (0x0000000CUL) // Ignore -> MISRA-C++ Rule 16-2-2
141 * \~english Reverse information
143 #define VEHICLE_DID_REV (0x00000017UL) // Ignore -> MISRA-C++ Rule 16-2-2
146 * \~english Reverse information(line sensor)
148 #define VEHICLE_DID_REV_LINE (0x0000000EUL) // Ignore -> MISRA-C++ Rule 16-2-2
151 * \~english Reverse CAN information
153 #define VEHICLE_DID_REV_CAN (0x0000000FUL) // Ignore -> MISRA-C++ Rule 16-2-2
155 * \~english SPEED information
157 #define VEHICLE_DID_SPEED (0x00000010UL) // Ignore -> MISRA-C++ Rule 16-2-2
160 * \~english SPEED PULSE information
162 #define VEHICLE_DID_SPEED_PULSE (0x00000011UL) // Ignore -> MISRA-C++ Rule 16-2-2
165 * \~english VB information
167 #define VEHICLE_DID_VBLOW (0x00000012UL) // Ignore -> MISRA-C++ Rule 16-2-2
170 * \~english Drive information(2WD/4WD)
172 #define VEHICLE_DID_DVINF (0x00000013UL)
175 * \~english Transmission information
177 #define VEHICLE_DID_VARTRM1 (0x00000014UL)
180 * \~english Shift position signal(R, P, N, D)
182 #define VEHICLE_DID_SHIFT (0x00000015UL)
185 * \~english Direct line sensor(PKB)
187 #define VEHICLE_DID_PKB_LINE (0x00000016UL)
190 * \~english D seat door signal switch
192 #define VEHICLE_DID_DSEAT_DOOR (0x0000000DUL)
195 * \~english P seat door signal switch
197 #define VEHICLE_DID_PSEAT_DOOR (0x00000018UL)
200 * \~english RR seat door signal switch
202 #define VEHICLE_DID_RRSEAT_DOOR (0x00000019UL)
205 * \~english RL seat door signal switch
207 #define VEHICLE_DID_RLSEAT_DOOR (0x0000001AUL)
210 * \~english IGP information
212 #define VEHICLE_DID_IGP (0x0000001BUL)
215 * \~english HV information status
217 #define VEHICLE_DID_HV_STS (0x0000001CUL)
220 * \~english Shift position signal(Unspecified)
222 #define VEHICLE_DID_SHIFT_U (0x0000001DUL)
225 * \~english USB power supply
227 #define VEHICLE_DID_USBPOWERSUPPLY (0x800000A0UL)
230 * \~english Analog Microphone Connect information
232 #define VEHICLE_DID_ANALOG_MIC (0x800000B0UL)
235 * \~english MultiMic Connect information
237 #define VEHICLE_DID_MULTI_MIC (0x800000B1UL)
239 /*----------------------------------------------------------------------*
240 * Vehicle sensor information data *
241 *----------------------------------------------------------------------*/
245 #define VEHICLE_SNS_OFF (0x00U) // Ignore -> MISRA-C++ Rule 16-2-2
250 #define VEHICLE_SNS_ON (0x01U) // Ignore -> MISRA-C++ Rule 16-2-2
252 #define VEHICLE_SNS_BLACKOUT (0x02U) // Disruptions
254 * \~english Undefined
256 #define VEHICLE_SNS_UNDEF (0x03U) // Ignore -> MISRA-C++ Rule 16-2-2
259 * \~english Disconnection
261 #define VEHICLE_SNS_UNCONNECTION (0x00U) // Ignore -> MISRA-C++ Rule 16-2-2
264 * \~english Connection
266 #define VEHICLE_SNS_CONNECTION (0x01U) // Ignore -> MISRA-C++ Rule 16-2-2
269 * \~english Uncertainty
271 #define VEHICLE_SNS_BW_UNCERTAINTY (0x02U)
274 * \~english Unspecified
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
282 #define VEHICLE_SNS_SHORT (0x02U) // Ignore -> MISRA-C++ Rule 16-2-2
284 /* #GPF_60_023 ADD END */
287 * \~english Hybrid electric vehicle
289 #define VEHICLE_SNS_HV (0x01U) // Ignore -> MISRA-C++ Rule 16-2-2
292 * \~english Plug-in hybrid electric vehicle
294 #define VEHICLE_SNS_PHV (0x02U) // Ignore -> MISRA-C++ Rule 16-2-2
297 * \~english Electric vehicle
299 #define VEHICLE_SNS_EV (0x03U)
302 * \~english Fuel Cell vehicle
304 #define VEHICLE_SNS_FCV (0x04U)
307 * \~english 1 motor vehicle
309 #define VEHICLE_SNS_1MOT (0x05U)
312 * \~english Conventional(48V) vehicle
314 #define VEHICLE_SNS_48V (0x06U)
317 * \~english S&S vehicle
319 #define VEHICLE_SNS_SANDS (0x07U)
322 * \~english Conventional vehicle
324 #define VEHICLE_SNS_NONHV (0x00U) // Ignore -> MISRA-C++ Rule 16-2-2
327 * \~english Two wheel drive
329 #define VEHICLE_SNS_2WD (0x00U) // Ignore -> MISRA-C++ Rule 16-2-2
332 * \~english Four wheel drive
334 #define VEHICLE_SNS_4WD (0x01U) // Ignore -> MISRA-C++ Rule 16-2-2
337 * \~english Left handle
339 #define VEHICLE_SNS_LH (0x01U) // Ignore -> MISRA-C++ Rule 16-2-2
342 * \~english Right handle
344 #define VEHICLE_SNS_RH (0x02U) // Ignore -> MISRA-C++ Rule 16-2-2
349 #define VEHICLE_SNS_CLOSE (0x00U) // Ignore -> MISRA-C++ Rule 16-2-2
354 #define VEHICLE_SNS_OPEN (0x01U) // Ignore -> MISRA-C++ Rule 16-2-2
357 * \~english Back door uncertainty
359 #define VEHICLE_SNS_BD_UNCERTAINTY (0x02U) // Ignore -> MISRA-C++ Rule 16-2-2
362 * \~english ADIM uncertainty
364 #define VEHICLE_SNS_ADIM_UNCERTAINTY (0x00U) // Ignore -> MISRA-C++ Rule 16-2-2
367 * \~english ADIM undefined
369 #define VEHICLE_SNS_ADIM_UNDEF (0x01U) // Ignore -> MISRA-C++ Rule 16-2-2
374 #define VEHICLE_SNS_ADIM_OFF (0x02U) // Ignore -> MISRA-C++ Rule 16-2-2
379 #define VEHICLE_SNS_ADIM_ON (0x03U) // Ignore -> MISRA-C++ Rule 16-2-2
382 * \~english Drive information(2WD)
384 #define VEHICLE_SNS_DVINF_2WD (0x00U)
387 * \~english Drive information(4WD)
389 #define VEHICLE_SNS_DVINF_4WD (0x01U)
392 * \~english Drive information uncertainty
394 #define VEHICLE_SNS_DVINF_UNCERTAINTY (0x03U)
397 * \~english Transmission information(MT)
399 #define VEHICLE_SNS_VARTRM1_MT (0x00U)
402 * \~english Transmission information(AT)
404 #define VEHICLE_SNS_VARTRM1_AT (0x01U)
407 * \~english Transmission information(CVT)
409 #define VEHICLE_SNS_VARTRM1_CVT (0x02U)
412 * \~english Transmission information(MMT)
414 #define VEHICLE_SNS_VARTRM1_MMT (0x03U)
417 * \~english Transmission information(SMT)
419 #define VEHICLE_SNS_VARTRM1_SMT (0x04U)
422 * \~english Transmission information(HV_AT)
424 #define VEHICLE_SNS_VARTRM1_HV_AT (0x05U)
427 * \~english Transmission information uncertainty
429 #define VEHICLE_SNS_VARTRM1_UNCERTAINTY (0x0FU)
432 * \~english D seat door uncertainty
434 #define VEHICLE_SNS_DS_UNCERTAINTY (0x02U)
437 * \~english P seat door uncertainty
439 #define VEHICLE_SNS_PS_UNCERTAINTY (0x02U)
442 * \~english RR seat door uncertainty
444 #define VEHICLE_SNS_RRS_UNCERTAINTY (0x02U)
447 * \~english RL seat door uncertainty
449 #define VEHICLE_SNS_RLS_UNCERTAINTY (0x02U)
452 * \~english HV information not decision
454 #define VEHICLE_SNS_HV_NOT_DECISION (0x00U)
457 * \~english HV information decision
459 #define VEHICLE_SNS_HV_DECISION (0x01U)
462 * @enum VehicleSnsAnlogMicBit
463 * \~english ANALOGMIC connect bit information
465 enum VehicleSnsAnlogMicBit {
466 VEHICLE_SNS_ANALOG_MIC1_BIT = 0x02, //!< \~english ANALOGMIC1 connect
467 VEHICLE_SNS_ANALOG_MIC2_BIT = 0x04, //!< \~english ANALOGMIC2 connect
471 * @enum VehicleSnsMultiMicBit
472 * \~english MULTI MIC connect bit information
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
485 /*-------------------------------------------------------------------------------
486 * Time status return value
487 -------------------------------------------------------------------------------*/
489 * \~english Real time clock
491 #define GPS_TIMESTS_RTC (0x02U) // Ignore -> MISRA-C++ Rule 16-2-2
494 * \~english Exception time
496 #define GPS_TIMESTS_NG (0x03U) // Ignore -> MISRA-C++ Rule 16-2-2
498 /** @}*/ // end of vehicle
499 /** @}*/ // end of VehicleService
500 /** @}*/ // end of BaseSystem
502 #endif // VEHICLE_CLIENT_INCLUDE_VEHICLE_SERVICE_VEHICLE_SENSOR_COMMON_API_H_