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