• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
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 package android.car.diagnostic;
18 
19 import android.annotation.IntDef;
20 import android.annotation.SystemApi;
21 import java.lang.annotation.Retention;
22 import java.lang.annotation.RetentionPolicy;
23 
24 /**
25  * This class is a container for the indices of diagnostic sensors. The values are extracted by
26  * running packages/services/Car/tools/update-obd2-sensors.py against types.hal.
27  *
28  * DO NOT EDIT MANUALLY
29  *
30  * @hide
31  */
32 @SystemApi
33 public final class IntegerSensorIndex {
IntegerSensorIndex()34     private IntegerSensorIndex() {}
35 
36     public static final int FUEL_SYSTEM_STATUS = 0;
37     public static final int MALFUNCTION_INDICATOR_LIGHT_ON = 1;
38     public static final int IGNITION_MONITORS_SUPPORTED = 2;
39     public static final int IGNITION_SPECIFIC_MONITORS = 3;
40     public static final int INTAKE_AIR_TEMPERATURE = 4;
41     public static final int COMMANDED_SECONDARY_AIR_STATUS = 5;
42     public static final int NUM_OXYGEN_SENSORS_PRESENT = 6;
43     public static final int RUNTIME_SINCE_ENGINE_START = 7;
44     public static final int DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8;
45     public static final int WARMUPS_SINCE_CODES_CLEARED = 9;
46     public static final int DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10;
47     public static final int ABSOLUTE_BAROMETRIC_PRESSURE = 11;
48     public static final int CONTROL_MODULE_VOLTAGE = 12;
49     public static final int AMBIENT_AIR_TEMPERATURE = 13;
50     public static final int TIME_WITH_MALFUNCTION_LIGHT_ON = 14;
51     public static final int TIME_SINCE_TROUBLE_CODES_CLEARED = 15;
52     public static final int MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16;
53     public static final int MAX_OXYGEN_SENSOR_VOLTAGE = 17;
54     public static final int MAX_OXYGEN_SENSOR_CURRENT = 18;
55     public static final int MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19;
56     public static final int MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20;
57     public static final int FUEL_TYPE = 21;
58     public static final int FUEL_RAIL_ABSOLUTE_PRESSURE = 22;
59     public static final int ENGINE_OIL_TEMPERATURE = 23;
60     public static final int DRIVER_DEMAND_PERCENT_TORQUE = 24;
61     public static final int ENGINE_ACTUAL_PERCENT_TORQUE = 25;
62     public static final int ENGINE_REFERENCE_PERCENT_TORQUE = 26;
63     public static final int ENGINE_PERCENT_TORQUE_DATA_IDLE = 27;
64     public static final int ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28;
65     public static final int ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29;
66     public static final int ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30;
67     public static final int ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31;
68     public static final int LAST_SYSTEM = ENGINE_PERCENT_TORQUE_DATA_POINT4;
69     public static final int VENDOR_START = LAST_SYSTEM + 1;
70 
71 
72     /** @hide */
73     @Retention(RetentionPolicy.SOURCE)
74     @IntDef({
75         IntegerSensorIndex.FUEL_SYSTEM_STATUS,
76         IntegerSensorIndex.MALFUNCTION_INDICATOR_LIGHT_ON,
77         IntegerSensorIndex.IGNITION_MONITORS_SUPPORTED,
78         IntegerSensorIndex.IGNITION_SPECIFIC_MONITORS,
79         IntegerSensorIndex.INTAKE_AIR_TEMPERATURE,
80         IntegerSensorIndex.COMMANDED_SECONDARY_AIR_STATUS,
81         IntegerSensorIndex.NUM_OXYGEN_SENSORS_PRESENT,
82         IntegerSensorIndex.RUNTIME_SINCE_ENGINE_START,
83         IntegerSensorIndex.DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON,
84         IntegerSensorIndex.WARMUPS_SINCE_CODES_CLEARED,
85         IntegerSensorIndex.DISTANCE_TRAVELED_SINCE_CODES_CLEARED,
86         IntegerSensorIndex.ABSOLUTE_BAROMETRIC_PRESSURE,
87         IntegerSensorIndex.CONTROL_MODULE_VOLTAGE,
88         IntegerSensorIndex.AMBIENT_AIR_TEMPERATURE,
89         IntegerSensorIndex.TIME_WITH_MALFUNCTION_LIGHT_ON,
90         IntegerSensorIndex.TIME_SINCE_TROUBLE_CODES_CLEARED,
91         IntegerSensorIndex.MAX_FUEL_AIR_EQUIVALENCE_RATIO,
92         IntegerSensorIndex.MAX_OXYGEN_SENSOR_VOLTAGE,
93         IntegerSensorIndex.MAX_OXYGEN_SENSOR_CURRENT,
94         IntegerSensorIndex.MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE,
95         IntegerSensorIndex.MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR,
96         IntegerSensorIndex.FUEL_TYPE,
97         IntegerSensorIndex.FUEL_RAIL_ABSOLUTE_PRESSURE,
98         IntegerSensorIndex.ENGINE_OIL_TEMPERATURE,
99         IntegerSensorIndex.DRIVER_DEMAND_PERCENT_TORQUE,
100         IntegerSensorIndex.ENGINE_ACTUAL_PERCENT_TORQUE,
101         IntegerSensorIndex.ENGINE_REFERENCE_PERCENT_TORQUE,
102         IntegerSensorIndex.ENGINE_PERCENT_TORQUE_DATA_IDLE,
103         IntegerSensorIndex.ENGINE_PERCENT_TORQUE_DATA_POINT1,
104         IntegerSensorIndex.ENGINE_PERCENT_TORQUE_DATA_POINT2,
105         IntegerSensorIndex.ENGINE_PERCENT_TORQUE_DATA_POINT3,
106         IntegerSensorIndex.ENGINE_PERCENT_TORQUE_DATA_POINT4,
107         IntegerSensorIndex.LAST_SYSTEM,
108         IntegerSensorIndex.VENDOR_START,
109     })
110     public @interface SensorIndex {}
111 
112 }
113