2 * Copyright (C) 2017 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.1 (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.1
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 package android.hardware.automotive.vehicle@2.1;
19 import android.hardware.automotive.vehicle@2.0;
22 * Extension of VehicleProperty enum declared in Vehicle HAL 2.0
24 enum VehicleProperty: @2.0::VehicleProperty {
26 * Reports wheel rotational distance in meters since last wheel tick
29 * The value is a vector each element represents distance for individual
30 * wheel in the following order: left front, right front, left rear,
31 * right rear. VehiclePropValue.timestamp must be correctly filled in.
33 * Vendors must specify wheels that support this sensor in
34 * VehiclePropConfig.configFlags. The format of this field is a bitset of
35 * values from Wheel enum.
37 * @change_mode VehiclePropertyChangeMode:ON_CHANGE |VehiclePropertyChangeMode:CONTINUOUS
38 * @access VehiclePropertyAccess:READ
39 * @unit VehicleUnit:METER
43 | VehiclePropertyGroup:SYSTEM
44 | VehiclePropertyType:FLOAT_VEC
45 | VehicleArea:GLOBAL),
48 * OBD2 Live Sensor Data
50 * This property uses COMPLEX data to send a snapshot of the current (live)
51 * values of the OBD2 sensors provided by the vehicle.
54 * configArray[0] : number of vendor-specific integer-valued sensors
55 * that can be returned in a frame.
56 * configArray[1] : number of vendor-specific float-valued sensors
57 * that can be returned in a frame.
59 * The values are to be interpreted as follows:
60 * the indices defined in Obd2IntegerSensorIndex are to be used to
61 * read from int32Values;
62 * the indices defined in Obd2FloatSensorIndex are to be used to
63 * read from floatValues.
64 * the elements of bytes are to be interpreted as a bitmask, such that
65 * the bits 0 thru the integer value of
66 * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
67 * are 1 if the corresponding index is a valid sensor index whose value can
68 * be read in the returned int32Values vector, 0 otherwise.
69 * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
70 * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
71 * are 1 if the corresponding index is a valid sensor index whose value
72 * can be read in the returned floatValues vector, 0 otherwise.
74 * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
75 * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
76 * is only valid if the corresponding bits in the bytes vector are set to 1.
78 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
79 * @access VehiclePropertyAccess:READ
83 | VehiclePropertyGroup:SYSTEM
84 | VehiclePropertyType:COMPLEX
85 | VehicleArea:GLOBAL),
88 * OBD2 Freeze Frame Sensor Data
90 * This property uses COMPLEX data to send a snapshot of the values of the
91 * OBD2 sensors provided by the vehicle at the time that a diagnostic
92 * troubleshooting code (DTC) was recorded by the vehicle.
95 * configArray[0] : number of vendor-specific integer-valued sensors
96 * that can be returned in a frame.
97 * configArray[1] : number of vendor-specific float-valued sensors
98 * that can be returned in a frame.
100 * A get of this property must take the following form:
101 * int64Values[0]: timestamp of the freeze frame to retrieve.
102 * Valid timestamps are given by OBD2_DTC_INFO.
104 * The values are to be interpreted as follows:
105 * the indices defined in Obd2IntegerSensorIndex are to be used to
106 * read from int32Values;
107 * the indices defined in Obd2FloatSensorIndex are to be used to
108 * read from floatValues;
109 * the elements of bytes are to be interpreted as a bitmask, such that
110 * the bits 0 thru the integer value of
111 * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
112 * are 1 if the corresponding index is a valid sensor index whose value can
113 * be read in the returned int32Values vector, 0 otherwise.
114 * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
115 * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
116 * are 1 if the corresponding index is a valid sensor index whose value
117 * can be read in the returned floatValues vector, 0 otherwise.
118 * stringValue is the DTC that caused this freeze frame to be recorded.
120 * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
121 * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
122 * is only valid if the corresponding bits in the bytes vector are set to 1,
123 * and a possible valid stringValue is "P0176" to indicate a malfunction
124 * of the fuel composition sensor circuit.
126 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
127 * @access VehiclePropertyAccess:READ
129 OBD2_FREEZE_FRAME = (
131 | VehiclePropertyGroup:SYSTEM
132 | VehiclePropertyType:COMPLEX
133 | VehicleArea:GLOBAL),
136 * OBD2 Freeze Frame Information
138 * This property describes the current freeze frames stored in vehicle
139 * memory and available for retrieval via OBD2_FREEZE_FRAME.
141 * The values are to be interpreted as follows:
142 * each element of int64Values is the timestamp at which a a fault code
143 * has been detected and the corresponding freeze frame stored, and each
144 * such element can be used as the key to OBD2_FREEZE_FRAME to retrieve
145 * the corresponding freeze frame.
147 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
148 * @access VehiclePropertyAccess:READ
150 OBD2_FREEZE_FRAME_INFO = (
152 | VehiclePropertyGroup:SYSTEM
153 | VehiclePropertyType:COMPLEX
154 | VehicleArea:GLOBAL),
157 * OBD2 Freeze Frame Clear
159 * This property allows deletion of any of the freeze frames stored in
160 * vehicle memory, as described by OBD2_DTC_INFO.
162 * A set of this property is to be interpreted as follows:
163 * if int64Values contains no elements, then all DTCs stored will be cleared;
164 * if int64Values contains one or more elements, then DTCs at the timestamps
165 * stored in int64Values will be cleared, and the others not cleared, except
166 * the memory will be compacted so that all remaining DTCs are stored
169 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
170 * @access VehiclePropertyAccess:WRITE
172 OBD2_FREEZE_FRAME_CLEAR = (
174 | VehiclePropertyGroup:SYSTEM
175 | VehiclePropertyType:COMPLEX
176 | VehicleArea:GLOBAL),
179 * Vehicle Maps Service (VMS) message
181 * This property uses COMPLEX data to communicate vms messages.
183 * Its contents are to be interpreted as follows:
184 * the indices defined in VmsMessageIntegerValuesIndex are to be used to
185 * read from int32Values;
186 * bytes is a serialized VMS message as defined in the vms protocol
187 * which is opaque to the framework;
189 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
190 * @access VehiclePropertyAccess:READ_WRITE
192 VEHICLE_MAP_SERVICE = (
194 | VehiclePropertyGroup:SYSTEM
195 | VehiclePropertyType:COMPLEX
196 | VehicleArea:GLOBAL),
199 /** The status of a fuel system as described by the OBD2 specification. */
200 enum FuelSystemStatus : int32_t {
201 OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
205 OPEN_ENGINE_LOAD_OR_DECELERATION = 4,
207 OPEN_SYSTEM_FAILURE = 8,
209 CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
212 /** Defines which ignition monitors are available to be read. */
213 enum IgnitionMonitorKind : int32_t {
219 /** These ignition monitors are common to both SPARK and COMPRESSION. */
220 enum CommonIgnitionMonitors : int32_t {
221 COMPONENTS_AVAILABLE = 0x1 << 0,
222 COMPONENTS_INCOMPLETE = 0x1 << 1,
224 FUEL_SYSTEM_AVAILABLE = 0x1 << 2,
225 FUEL_SYSTEM_INCOMPLETE = 0x1 << 3,
227 MISFIRE_AVAILABLE = 0x1 << 4,
228 MISFIRE_INCOMPLETE = 0x1 << 5,
231 /** Ignition monitors available for SPARK vehicles. */
232 enum SparkIgnitionMonitors : CommonIgnitionMonitors {
233 EGR_AVAILABLE = 0x1 << 6,
234 EGR_INCOMPLETE = 0x1 << 7,
236 OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8,
237 OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9,
239 OXYGEN_SENSOR_AVAILABLE = 0x1 << 10,
240 OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11,
242 AC_REFRIGERANT_AVAILABLE = 0x1 << 12,
243 AC_REFRIGERANT_INCOMPLETE = 0x1 << 13,
245 SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14,
246 SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15,
248 EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16,
249 EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17,
251 HEATED_CATALYST_AVAILABLE = 0x1 << 18,
252 HEATED_CATALYST_INCOMPLETE = 0x1 << 19,
254 CATALYST_AVAILABLE = 0x1 << 20,
255 CATALYST_INCOMPLETE = 0x1 << 21,
258 /** Ignition monitors only available for COMPRESSION vehicles. */
259 enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
260 EGR_OR_VVT_AVAILABLE = 0x1 << 6,
261 EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
263 PM_FILTER_AVAILABLE = 0x1 << 8,
264 PM_FILTER_INCOMPLETE = 0x1 << 9,
266 EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10,
267 EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11,
269 BOOST_PRESSURE_AVAILABLE = 0x1 << 12,
270 BOOST_PRESSURE_INCOMPLETE = 0x1 << 13,
272 NOx_SCR__AVAILABLE = 0x1 << 14,
273 NOx_SCR_INCOMPLETE = 0x1 << 15,
275 NMHC_CATALYST_AVAILABLE = 0x1 << 16,
276 NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
279 enum SecondaryAirStatus : int32_t {
282 DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
284 FROM_OUTSIDE_OR_OFF = 4,
286 PUMP_ON_FOR_DIAGNOSTICS = 8,
289 enum FuelType : int32_t {
308 BIFUEL_RUNNING_GASOLINE = 9,
310 BIFUEL_RUNNING_METHANOL = 10,
312 BIFUEL_RUNNING_ETHANOL = 11,
314 BIFUEL_RUNNING_LPG = 12,
316 BIFUEL_RUNNING_CNG = 13,
318 BIFUEL_RUNNING_PROPANE = 14,
320 BIFUEL_RUNNING_ELECTRIC = 15,
322 BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 16,
324 HYBRID_GASOLINE = 17,
330 HYBRID_ELECTRIC = 20,
332 HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 21,
334 HYBRID_REGENERATIVE = 22,
336 BIFUEL_RUNNING_DIESEL = 23,
340 * This enum provides the canonical mapping for sensor properties that have an integer value.
341 * The ordering of the values is taken from the OBD2 specification.
342 * Some of the properties are represented as an integer mapping to another enum. In those cases
343 * expect a comment by the property definition describing the enum to look at for the mapping.
344 * Any value greater than the last reserved index is available to vendors to map their extensions.
346 enum Obd2IntegerSensorIndex : int32_t {
347 /** refer to FuelSystemStatus for a description of this value. */
348 FUEL_SYSTEM_STATUS = 0,
350 MALFUNCTION_INDICATOR_LIGHT_ON = 1,
352 /** refer to IgnitionMonitorKind for a description of this value. */
353 IGNITION_MONITORS_SUPPORTED = 2,
356 * The value of this sensor is a bitmask that specifies whether ignition-specific
357 * tests are available and whether they are complete. The semantics of the individual
358 * bits in this value are given by, respectively, SparkIgnitionMonitors and
359 * CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
361 IGNITION_SPECIFIC_MONITORS = 3,
363 INTAKE_AIR_TEMPERATURE = 4,
365 /** refer to SecondaryAirStatus for a description of this value. */
366 COMMANDED_SECONDARY_AIR_STATUS = 5,
368 NUM_OXYGEN_SENSORS_PRESENT = 6,
370 RUNTIME_SINCE_ENGINE_START = 7,
372 DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8,
374 WARMUPS_SINCE_CODES_CLEARED = 9,
376 DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10,
378 ABSOLUTE_BAROMETRIC_PRESSURE = 11,
380 CONTROL_MODULE_VOLTAGE = 12,
382 AMBIENT_AIR_TEMPERATURE = 13,
384 TIME_WITH_MALFUNCTION_LIGHT_ON = 14,
386 TIME_SINCE_TROUBLE_CODES_CLEARED = 15,
388 MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16,
390 MAX_OXYGEN_SENSOR_VOLTAGE = 17,
392 MAX_OXYGEN_SENSOR_CURRENT = 18,
394 MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19,
396 MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
398 /** refer to FuelType for a description of this value. */
401 FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
403 ENGINE_OIL_TEMPERATURE = 23,
405 DRIVER_DEMAND_PERCENT_TORQUE = 24,
407 ENGINE_ACTUAL_PERCENT_TORQUE = 25,
409 ENGINE_REFERENCE_PERCENT_TORQUE = 26,
411 ENGINE_PERCENT_TORQUE_DATA_IDLE = 27,
413 ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28,
415 ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29,
417 ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30,
419 ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31,
421 LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
425 * This enum provides the canonical mapping for sensor properties that have a floating-point value.
426 * The ordering of the values is taken from the OBD2 specification.
427 * Any value greater than the last reserved index is available to vendors to map their extensions.
429 enum Obd2FloatSensorIndex : int32_t {
430 CALCULATED_ENGINE_LOAD = 0,
432 ENGINE_COOLANT_TEMPERATURE = 1,
434 SHORT_TERM_FUEL_TRIM_BANK1 = 2,
436 LONG_TERM_FUEL_TRIM_BANK1 = 3,
438 SHORT_TERM_FUEL_TRIM_BANK2 = 4,
440 LONG_TERM_FUEL_TRIM_BANK2 = 5,
444 INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7,
452 MAF_AIR_FLOW_RATE = 11,
454 THROTTLE_POSITION = 12,
456 OXYGEN_SENSOR1_VOLTAGE = 13,
458 OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14,
460 OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15,
462 OXYGEN_SENSOR2_VOLTAGE = 16,
464 OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17,
466 OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18,
468 OXYGEN_SENSOR3_VOLTAGE = 19,
470 OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20,
472 OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21,
474 OXYGEN_SENSOR4_VOLTAGE = 22,
476 OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23,
478 OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24,
480 OXYGEN_SENSOR5_VOLTAGE = 25,
482 OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26,
484 OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27,
486 OXYGEN_SENSOR6_VOLTAGE = 28,
488 OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29,
490 OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30,
492 OXYGEN_SENSOR7_VOLTAGE = 31,
494 OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32,
496 OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33,
498 OXYGEN_SENSOR8_VOLTAGE = 34,
500 OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35,
502 OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36,
504 FUEL_RAIL_PRESSURE = 37,
506 FUEL_RAIL_GAUGE_PRESSURE = 38,
508 COMMANDED_EXHAUST_GAS_RECIRCULATION = 39,
510 EXHAUST_GAS_RECIRCULATION_ERROR = 40,
512 COMMANDED_EVAPORATIVE_PURGE = 41,
514 FUEL_TANK_LEVEL_INPUT = 42,
516 EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43,
518 CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44,
520 CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45,
522 CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46,
524 CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47,
526 ABSOLUTE_LOAD_VALUE = 48,
528 FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49,
530 RELATIVE_THROTTLE_POSITION = 50,
532 ABSOLUTE_THROTTLE_POSITION_B = 51,
534 ABSOLUTE_THROTTLE_POSITION_C = 52,
536 ACCELERATOR_PEDAL_POSITION_D = 53,
538 ACCELERATOR_PEDAL_POSITION_E = 54,
540 ACCELERATOR_PEDAL_POSITION_F = 55,
542 COMMANDED_THROTTLE_ACTUATOR = 56,
544 ETHANOL_FUEL_PERCENTAGE = 57,
546 ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58,
548 SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59,
550 SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60,
552 SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,
554 SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62,
556 LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63,
558 LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64,
560 LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65,
562 LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66,
564 RELATIVE_ACCELERATOR_PEDAL_POSITION = 67,
566 HYBRID_BATTERY_PACK_REMAINING_LIFE = 68,
568 FUEL_INJECTION_TIMING = 69,
570 ENGINE_FUEL_RATE = 70,
572 LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
576 * This enum lists the types of supported VMS messages.
578 enum VmsMessageType : int32_t {
579 /** A client subscribes to a layer. */
582 /** A client unsubscribes from a layer. */
585 /** A client publishes a data packet. */
588 /* A client declaring layers offering. */
591 /* Requesting the list of available layers. */
592 AVAILABILITY_REQUEST = 5,
594 /* Returning the list of available layers. */
595 AVAILABILITY_RESPONSE = 6,
597 /** Requesting layers that have subscribers. */
598 SUBSCRIPTION_REQUEST = 7,
600 /** Returning layers that have subscribers. */
601 SUBSCRIPTION_RESPONSE = 8,
605 * This enum provides the canonical mapping for VMS properties that have an
608 enum VmsBaseMessageIntegerValuesIndex : int32_t {
609 /* The message type as enumerated by VmsMessageType enum. */
610 VMS_MESSAGE_TYPE = 0,
614 * This enum provides the canonical mapping for VMS SUBMIT, UNSUBMIT and DATA
615 * messages integer value properties.
617 enum VmsSimpleMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
618 /* The layer ID as defined in the vms protocol. */
621 /* The version of the VMS layer. */
622 VMS_LAYER_VERSION = 2,
626 * This enum provides the canonical mapping for VMS offering messages integer
629 enum VmsOfferingMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
630 /* The number of VMS layer dependencies. */
631 VMS_NUMBER_OF_LAYERS_DEPENDENCIES = 1,
633 /* The first index that contain dependencies */
634 FIRST_DEPENDENCIES_INDEX = 2,
638 * A VMS subscription request only contains its message type. The format of a VMS subscription
639 * response is described below.
641 enum VmsSubscriptionResponseFormat : VmsBaseMessageIntegerValuesIndex {
643 * Recipients should ignore any packet with a sequence number that is less than the highest
644 * sequence number they have seen thus far.
648 /** The number of VMS layers. Each layer has two integers: type and version. */
649 NUMBER_OF_LAYERS = 2,
651 /** The first index that contains a layer. */