• 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 FloatSensorIndex {
FloatSensorIndex()34     private FloatSensorIndex() {}
35 
36     public static final int CALCULATED_ENGINE_LOAD = 0;
37     public static final int ENGINE_COOLANT_TEMPERATURE = 1;
38     public static final int SHORT_TERM_FUEL_TRIM_BANK1 = 2;
39     public static final int LONG_TERM_FUEL_TRIM_BANK1 = 3;
40     public static final int SHORT_TERM_FUEL_TRIM_BANK2 = 4;
41     public static final int LONG_TERM_FUEL_TRIM_BANK2 = 5;
42     public static final int FUEL_PRESSURE = 6;
43     public static final int INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7;
44     public static final int ENGINE_RPM = 8;
45     public static final int VEHICLE_SPEED = 9;
46     public static final int TIMING_ADVANCE = 10;
47     public static final int MAF_AIR_FLOW_RATE = 11;
48     public static final int THROTTLE_POSITION = 12;
49     public static final int OXYGEN_SENSOR1_VOLTAGE = 13;
50     public static final int OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14;
51     public static final int OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15;
52     public static final int OXYGEN_SENSOR2_VOLTAGE = 16;
53     public static final int OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17;
54     public static final int OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18;
55     public static final int OXYGEN_SENSOR3_VOLTAGE = 19;
56     public static final int OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20;
57     public static final int OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21;
58     public static final int OXYGEN_SENSOR4_VOLTAGE = 22;
59     public static final int OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23;
60     public static final int OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24;
61     public static final int OXYGEN_SENSOR5_VOLTAGE = 25;
62     public static final int OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26;
63     public static final int OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27;
64     public static final int OXYGEN_SENSOR6_VOLTAGE = 28;
65     public static final int OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29;
66     public static final int OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30;
67     public static final int OXYGEN_SENSOR7_VOLTAGE = 31;
68     public static final int OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32;
69     public static final int OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33;
70     public static final int OXYGEN_SENSOR8_VOLTAGE = 34;
71     public static final int OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35;
72     public static final int OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36;
73     public static final int FUEL_RAIL_PRESSURE = 37;
74     public static final int FUEL_RAIL_GAUGE_PRESSURE = 38;
75     public static final int COMMANDED_EXHAUST_GAS_RECIRCULATION = 39;
76     public static final int EXHAUST_GAS_RECIRCULATION_ERROR = 40;
77     public static final int COMMANDED_EVAPORATIVE_PURGE = 41;
78     public static final int FUEL_TANK_LEVEL_INPUT = 42;
79     public static final int EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43;
80     public static final int CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44;
81     public static final int CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45;
82     public static final int CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46;
83     public static final int CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47;
84     public static final int ABSOLUTE_LOAD_VALUE = 48;
85     public static final int FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49;
86     public static final int RELATIVE_THROTTLE_POSITION = 50;
87     public static final int ABSOLUTE_THROTTLE_POSITION_B = 51;
88     public static final int ABSOLUTE_THROTTLE_POSITION_C = 52;
89     public static final int ACCELERATOR_PEDAL_POSITION_D = 53;
90     public static final int ACCELERATOR_PEDAL_POSITION_E = 54;
91     public static final int ACCELERATOR_PEDAL_POSITION_F = 55;
92     public static final int COMMANDED_THROTTLE_ACTUATOR = 56;
93     public static final int ETHANOL_FUEL_PERCENTAGE = 57;
94     public static final int ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58;
95     public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59;
96     public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60;
97     public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61;
98     public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62;
99     public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63;
100     public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64;
101     public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65;
102     public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66;
103     public static final int RELATIVE_ACCELERATOR_PEDAL_POSITION = 67;
104     public static final int HYBRID_BATTERY_PACK_REMAINING_LIFE = 68;
105     public static final int FUEL_INJECTION_TIMING = 69;
106     public static final int ENGINE_FUEL_RATE = 70;
107     public static final int LAST_SYSTEM = ENGINE_FUEL_RATE;
108     public static final int VENDOR_START = LAST_SYSTEM + 1;
109 
110 
111     /** @hide */
112     @Retention(RetentionPolicy.SOURCE)
113     @IntDef({
114         FloatSensorIndex.CALCULATED_ENGINE_LOAD,
115         FloatSensorIndex.ENGINE_COOLANT_TEMPERATURE,
116         FloatSensorIndex.SHORT_TERM_FUEL_TRIM_BANK1,
117         FloatSensorIndex.LONG_TERM_FUEL_TRIM_BANK1,
118         FloatSensorIndex.SHORT_TERM_FUEL_TRIM_BANK2,
119         FloatSensorIndex.LONG_TERM_FUEL_TRIM_BANK2,
120         FloatSensorIndex.FUEL_PRESSURE,
121         FloatSensorIndex.INTAKE_MANIFOLD_ABSOLUTE_PRESSURE,
122         FloatSensorIndex.ENGINE_RPM,
123         FloatSensorIndex.VEHICLE_SPEED,
124         FloatSensorIndex.TIMING_ADVANCE,
125         FloatSensorIndex.MAF_AIR_FLOW_RATE,
126         FloatSensorIndex.THROTTLE_POSITION,
127         FloatSensorIndex.OXYGEN_SENSOR1_VOLTAGE,
128         FloatSensorIndex.OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM,
129         FloatSensorIndex.OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO,
130         FloatSensorIndex.OXYGEN_SENSOR2_VOLTAGE,
131         FloatSensorIndex.OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM,
132         FloatSensorIndex.OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO,
133         FloatSensorIndex.OXYGEN_SENSOR3_VOLTAGE,
134         FloatSensorIndex.OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM,
135         FloatSensorIndex.OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO,
136         FloatSensorIndex.OXYGEN_SENSOR4_VOLTAGE,
137         FloatSensorIndex.OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM,
138         FloatSensorIndex.OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO,
139         FloatSensorIndex.OXYGEN_SENSOR5_VOLTAGE,
140         FloatSensorIndex.OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM,
141         FloatSensorIndex.OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO,
142         FloatSensorIndex.OXYGEN_SENSOR6_VOLTAGE,
143         FloatSensorIndex.OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM,
144         FloatSensorIndex.OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO,
145         FloatSensorIndex.OXYGEN_SENSOR7_VOLTAGE,
146         FloatSensorIndex.OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM,
147         FloatSensorIndex.OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO,
148         FloatSensorIndex.OXYGEN_SENSOR8_VOLTAGE,
149         FloatSensorIndex.OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM,
150         FloatSensorIndex.OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO,
151         FloatSensorIndex.FUEL_RAIL_PRESSURE,
152         FloatSensorIndex.FUEL_RAIL_GAUGE_PRESSURE,
153         FloatSensorIndex.COMMANDED_EXHAUST_GAS_RECIRCULATION,
154         FloatSensorIndex.EXHAUST_GAS_RECIRCULATION_ERROR,
155         FloatSensorIndex.COMMANDED_EVAPORATIVE_PURGE,
156         FloatSensorIndex.FUEL_TANK_LEVEL_INPUT,
157         FloatSensorIndex.EVAPORATION_SYSTEM_VAPOR_PRESSURE,
158         FloatSensorIndex.CATALYST_TEMPERATURE_BANK1_SENSOR1,
159         FloatSensorIndex.CATALYST_TEMPERATURE_BANK2_SENSOR1,
160         FloatSensorIndex.CATALYST_TEMPERATURE_BANK1_SENSOR2,
161         FloatSensorIndex.CATALYST_TEMPERATURE_BANK2_SENSOR2,
162         FloatSensorIndex.ABSOLUTE_LOAD_VALUE,
163         FloatSensorIndex.FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO,
164         FloatSensorIndex.RELATIVE_THROTTLE_POSITION,
165         FloatSensorIndex.ABSOLUTE_THROTTLE_POSITION_B,
166         FloatSensorIndex.ABSOLUTE_THROTTLE_POSITION_C,
167         FloatSensorIndex.ACCELERATOR_PEDAL_POSITION_D,
168         FloatSensorIndex.ACCELERATOR_PEDAL_POSITION_E,
169         FloatSensorIndex.ACCELERATOR_PEDAL_POSITION_F,
170         FloatSensorIndex.COMMANDED_THROTTLE_ACTUATOR,
171         FloatSensorIndex.ETHANOL_FUEL_PERCENTAGE,
172         FloatSensorIndex.ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE,
173         FloatSensorIndex.SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1,
174         FloatSensorIndex.SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2,
175         FloatSensorIndex.SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3,
176         FloatSensorIndex.SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4,
177         FloatSensorIndex.LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1,
178         FloatSensorIndex.LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2,
179         FloatSensorIndex.LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3,
180         FloatSensorIndex.LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4,
181         FloatSensorIndex.RELATIVE_ACCELERATOR_PEDAL_POSITION,
182         FloatSensorIndex.HYBRID_BATTERY_PACK_REMAINING_LIFE,
183         FloatSensorIndex.FUEL_INJECTION_TIMING,
184         FloatSensorIndex.ENGINE_FUEL_RATE,
185         FloatSensorIndex.LAST_SYSTEM,
186         FloatSensorIndex.VENDOR_START,
187     })
188     public @interface SensorIndex {}
189 
190 }
191