Mark diagnostic values as either being numerically equivalent to OBD2 values, or providing the equivalent OBD2 value

Test: build
Bug: 64024685
Change-Id: I24ef13514a94e10c599605e6970a023168774049
This commit is contained in:
Enrico Granata 2017-08-03 16:52:32 -07:00
parent d182bb10e0
commit 7f7a54ee3b

View file

@ -255,7 +255,10 @@ enum VehicleProperty: @2.0::VehicleProperty {
| VehicleArea:GLOBAL),
};
/** The status of the vehicle's fuel system. */
/**
* The status of the vehicle's fuel system.
* These values come from the SAE J1979 standard.
*/
enum Obd2FuelSystemStatus : int32_t {
OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
CLOSED_LOOP = 2,
@ -270,7 +273,10 @@ enum Obd2IgnitionMonitorKind : int32_t {
COMPRESSION = 1,
};
/** These ignition monitors are common to both SPARK and COMPRESSION. */
/**
* Ignition monitors common to both SPARK and COMPRESSION.
* These values come from the SAE J1979 standard.
*/
enum Obd2CommonIgnitionMonitors : int32_t {
COMPONENTS_AVAILABLE = 0x1 << 0,
COMPONENTS_INCOMPLETE = 0x1 << 1,
@ -282,7 +288,10 @@ enum Obd2CommonIgnitionMonitors : int32_t {
MISFIRE_INCOMPLETE = 0x1 << 5,
};
/** Ignition monitors available for SPARK vehicles. */
/**
* Ignition monitors available for SPARK vehicles.
* These values come from the SAE J1979 standard.
*/
enum Obd2SparkIgnitionMonitors : Obd2CommonIgnitionMonitors {
EGR_AVAILABLE = 0x1 << 6,
EGR_INCOMPLETE = 0x1 << 7,
@ -309,7 +318,10 @@ enum Obd2SparkIgnitionMonitors : Obd2CommonIgnitionMonitors {
CATALYST_INCOMPLETE = 0x1 << 21,
};
/** Ignition monitors only available for COMPRESSION vehicles. */
/**
* Ignition monitors only available for COMPRESSION vehicles.
* These values come from the SAE J1979 standard.
*/
enum Obd2CompressionIgnitionMonitors : Obd2CommonIgnitionMonitors {
EGR_OR_VVT_AVAILABLE = 0x1 << 6,
EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
@ -330,7 +342,10 @@ enum Obd2CompressionIgnitionMonitors : Obd2CommonIgnitionMonitors {
NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
};
/** The status of the vehicle's secondary air system. */
/**
* The status of the vehicle's secondary air system.
* These values come from the SAE J1979 standard.
*/
enum Obd2SecondaryAirStatus : int32_t {
UPSTREAM = 1,
DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
@ -338,7 +353,10 @@ enum Obd2SecondaryAirStatus : int32_t {
PUMP_ON_FOR_DIAGNOSTICS = 8,
};
/** The fuel type(s) supported by a vehicle. */
/**
* The fuel type(s) supported by a vehicle.
* These values come from the SAE J1979 standard.
*/
enum Obd2FuelType : int32_t {
NOT_AVAILABLE = 0,
GASOLINE = 1,
@ -372,14 +390,16 @@ enum Obd2FuelType : int32_t {
* Some of the properties are represented as an integer mapping to another enum. In those cases
* expect a comment by the property definition describing the enum to look at for the mapping.
* Any value greater than the last reserved index is available to vendors to map their extensions.
* While these values do not directly map to SAE J1979 PIDs, an equivalence is listed next
* to each one to aid implementors.
*/
enum DiagnosticIntegerSensorIndex : int32_t {
/** refer to FuelSystemStatus for a description of this value. */
FUEL_SYSTEM_STATUS = 0,
MALFUNCTION_INDICATOR_LIGHT_ON = 1,
FUEL_SYSTEM_STATUS = 0, /* PID 0x03 */
MALFUNCTION_INDICATOR_LIGHT_ON = 1, /* PID 0x01 */
/** refer to IgnitionMonitorKind for a description of this value. */
IGNITION_MONITORS_SUPPORTED = 2,
IGNITION_MONITORS_SUPPORTED = 2, /* PID 0x01 */
/**
* The value of this sensor is a bitmask that specifies whether ignition-specific
@ -387,39 +407,39 @@ enum DiagnosticIntegerSensorIndex : int32_t {
* bits in this value are given by, respectively, SparkIgnitionMonitors and
* CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
*/
IGNITION_SPECIFIC_MONITORS = 3,
INTAKE_AIR_TEMPERATURE = 4,
IGNITION_SPECIFIC_MONITORS = 3, /* PID 0x01 */
INTAKE_AIR_TEMPERATURE = 4, /* PID 0x0F */
/** refer to SecondaryAirStatus for a description of this value. */
COMMANDED_SECONDARY_AIR_STATUS = 5,
NUM_OXYGEN_SENSORS_PRESENT = 6,
RUNTIME_SINCE_ENGINE_START = 7,
DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8,
WARMUPS_SINCE_CODES_CLEARED = 9,
DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10,
ABSOLUTE_BAROMETRIC_PRESSURE = 11,
CONTROL_MODULE_VOLTAGE = 12,
AMBIENT_AIR_TEMPERATURE = 13,
TIME_WITH_MALFUNCTION_LIGHT_ON = 14,
TIME_SINCE_TROUBLE_CODES_CLEARED = 15,
MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16,
MAX_OXYGEN_SENSOR_VOLTAGE = 17,
MAX_OXYGEN_SENSOR_CURRENT = 18,
MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19,
MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
COMMANDED_SECONDARY_AIR_STATUS = 5, /* PID 0x12 */
NUM_OXYGEN_SENSORS_PRESENT = 6, /* PID 0x13 */
RUNTIME_SINCE_ENGINE_START = 7, /* PID 0x1F */
DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8, /* PID 0x21 */
WARMUPS_SINCE_CODES_CLEARED = 9, /* PID 0x30 */
DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10, /* PID 0x31 */
ABSOLUTE_BAROMETRIC_PRESSURE = 11, /* PID 0x33 */
CONTROL_MODULE_VOLTAGE = 12, /* PID 0x42 */
AMBIENT_AIR_TEMPERATURE = 13, /* PID 0x46 */
TIME_WITH_MALFUNCTION_LIGHT_ON = 14, /* PID 0x4D */
TIME_SINCE_TROUBLE_CODES_CLEARED = 15, /* PID 0x4E */
MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16, /* PID 0x4F */
MAX_OXYGEN_SENSOR_VOLTAGE = 17, /* PID 0x4F */
MAX_OXYGEN_SENSOR_CURRENT = 18, /* PID 0x4F */
MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19, /* PID 0x4F */
MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20, /* PID 0x50 */
/** refer to FuelType for a description of this value. */
FUEL_TYPE = 21,
FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
ENGINE_OIL_TEMPERATURE = 23,
DRIVER_DEMAND_PERCENT_TORQUE = 24,
ENGINE_ACTUAL_PERCENT_TORQUE = 25,
ENGINE_REFERENCE_PERCENT_TORQUE = 26,
ENGINE_PERCENT_TORQUE_DATA_IDLE = 27,
ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28,
ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29,
ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30,
ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31,
FUEL_TYPE = 21, /* PID 0x51 */
FUEL_RAIL_ABSOLUTE_PRESSURE = 22, /* PID 0x59 */
ENGINE_OIL_TEMPERATURE = 23, /* PID 0x5C */
DRIVER_DEMAND_PERCENT_TORQUE = 24, /* PID 0x61 */
ENGINE_ACTUAL_PERCENT_TORQUE = 25, /* PID 0x62 */
ENGINE_REFERENCE_PERCENT_TORQUE = 26, /* PID 0x63 */
ENGINE_PERCENT_TORQUE_DATA_IDLE = 27, /* PID 0x64 */
ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28, /* PID 0x64 */
ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29, /* PID 0x64 */
ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30, /* PID 0x64 */
ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31, /* PID 0x64 */
LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
};
@ -427,79 +447,81 @@ enum DiagnosticIntegerSensorIndex : int32_t {
* This enum provides the canonical mapping for sensor properties that have a floating-point value.
* The ordering of the values is taken from the OBD2 specification.
* Any value greater than the last reserved index is available to vendors to map their extensions.
* While these values do not directly map to SAE J1979 PIDs, an equivalence is listed next
* to each one to aid implementors.
*/
enum DiagnosticFloatSensorIndex : int32_t {
CALCULATED_ENGINE_LOAD = 0,
ENGINE_COOLANT_TEMPERATURE = 1,
SHORT_TERM_FUEL_TRIM_BANK1 = 2,
LONG_TERM_FUEL_TRIM_BANK1 = 3,
SHORT_TERM_FUEL_TRIM_BANK2 = 4,
LONG_TERM_FUEL_TRIM_BANK2 = 5,
FUEL_PRESSURE = 6,
INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7,
ENGINE_RPM = 8,
VEHICLE_SPEED = 9,
TIMING_ADVANCE = 10,
MAF_AIR_FLOW_RATE = 11,
THROTTLE_POSITION = 12,
OXYGEN_SENSOR1_VOLTAGE = 13,
OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14,
OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15,
OXYGEN_SENSOR2_VOLTAGE = 16,
OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17,
OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18,
OXYGEN_SENSOR3_VOLTAGE = 19,
OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20,
OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21,
OXYGEN_SENSOR4_VOLTAGE = 22,
OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23,
OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24,
OXYGEN_SENSOR5_VOLTAGE = 25,
OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26,
OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27,
OXYGEN_SENSOR6_VOLTAGE = 28,
OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29,
OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30,
OXYGEN_SENSOR7_VOLTAGE = 31,
OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32,
OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33,
OXYGEN_SENSOR8_VOLTAGE = 34,
OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35,
OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36,
FUEL_RAIL_PRESSURE = 37,
FUEL_RAIL_GAUGE_PRESSURE = 38,
COMMANDED_EXHAUST_GAS_RECIRCULATION = 39,
EXHAUST_GAS_RECIRCULATION_ERROR = 40,
COMMANDED_EVAPORATIVE_PURGE = 41,
FUEL_TANK_LEVEL_INPUT = 42,
EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43,
CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44,
CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45,
CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46,
CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47,
ABSOLUTE_LOAD_VALUE = 48,
FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49,
RELATIVE_THROTTLE_POSITION = 50,
ABSOLUTE_THROTTLE_POSITION_B = 51,
ABSOLUTE_THROTTLE_POSITION_C = 52,
ACCELERATOR_PEDAL_POSITION_D = 53,
ACCELERATOR_PEDAL_POSITION_E = 54,
ACCELERATOR_PEDAL_POSITION_F = 55,
COMMANDED_THROTTLE_ACTUATOR = 56,
ETHANOL_FUEL_PERCENTAGE = 57,
ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58,
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59,
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60,
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62,
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63,
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64,
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65,
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66,
RELATIVE_ACCELERATOR_PEDAL_POSITION = 67,
HYBRID_BATTERY_PACK_REMAINING_LIFE = 68,
FUEL_INJECTION_TIMING = 69,
ENGINE_FUEL_RATE = 70,
CALCULATED_ENGINE_LOAD = 0, /* PID 0x04 */
ENGINE_COOLANT_TEMPERATURE = 1, /* PID 0x05 */
SHORT_TERM_FUEL_TRIM_BANK1 = 2, /* PID 0x06 */
LONG_TERM_FUEL_TRIM_BANK1 = 3, /* PID 0x07 */
SHORT_TERM_FUEL_TRIM_BANK2 = 4, /* PID 0x08 */
LONG_TERM_FUEL_TRIM_BANK2 = 5, /* PID 0x09 */
FUEL_PRESSURE = 6, /* PID 0x0A */
INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7, /* PID 0x0B */
ENGINE_RPM = 8, /* PID 0x0C */
VEHICLE_SPEED = 9, /* PID 0x0D */
TIMING_ADVANCE = 10, /* PID 0x0E */
MAF_AIR_FLOW_RATE = 11, /* PID 0x10 */
THROTTLE_POSITION = 12, /* PID 0x11 */
OXYGEN_SENSOR1_VOLTAGE = 13, /* PID 0x14 */
OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14, /* PID 0x14 */
OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15, /* PID 0x24 */
OXYGEN_SENSOR2_VOLTAGE = 16, /* PID 0x15 */
OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17, /* PID 0x15 */
OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18, /* PID 0x25 */
OXYGEN_SENSOR3_VOLTAGE = 19, /* PID 0x16 */
OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20, /* PID 0x16 */
OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21, /* PID 0x26 */
OXYGEN_SENSOR4_VOLTAGE = 22, /* PID 0x17 */
OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23, /* PID 0x17 */
OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24, /* PID 0x27 */
OXYGEN_SENSOR5_VOLTAGE = 25, /* PID 0x18 */
OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26, /* PID 0x18 */
OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27, /* PID 0x28 */
OXYGEN_SENSOR6_VOLTAGE = 28, /* PID 0x19 */
OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29, /* PID 0x19 */
OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30, /* PID 0x29 */
OXYGEN_SENSOR7_VOLTAGE = 31, /* PID 0x1A */
OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32, /* PID 0x1A */
OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33, /* PID 0x2A */
OXYGEN_SENSOR8_VOLTAGE = 34, /* PID 0x1B */
OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35, /* PID 0x1B */
OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36, /* PID 0x2B */
FUEL_RAIL_PRESSURE = 37, /* PID 0x22 */
FUEL_RAIL_GAUGE_PRESSURE = 38, /* PID 0x23 */
COMMANDED_EXHAUST_GAS_RECIRCULATION = 39, /* PID 0x2C */
EXHAUST_GAS_RECIRCULATION_ERROR = 40, /* PID 0x2D */
COMMANDED_EVAPORATIVE_PURGE = 41, /* PID 0x2E */
FUEL_TANK_LEVEL_INPUT = 42, /* PID 0x2F */
EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43, /* PID 0x32 */
CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44, /* PID 0x3C */
CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45, /* PID 0x3D */
CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46, /* PID 0x3E */
CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47, /* PID 0x3F */
ABSOLUTE_LOAD_VALUE = 48, /* PID 0x43 */
FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49, /* PID 0x44 */
RELATIVE_THROTTLE_POSITION = 50, /* PID 0x45 */
ABSOLUTE_THROTTLE_POSITION_B = 51, /* PID 0x47 */
ABSOLUTE_THROTTLE_POSITION_C = 52, /* PID 0x48 */
ACCELERATOR_PEDAL_POSITION_D = 53, /* PID 0x49 */
ACCELERATOR_PEDAL_POSITION_E = 54, /* PID 0x4A */
ACCELERATOR_PEDAL_POSITION_F = 55, /* PID 0x4B */
COMMANDED_THROTTLE_ACTUATOR = 56, /* PID 0x4C */
ETHANOL_FUEL_PERCENTAGE = 57,/* PID 0x52 */
ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58, /* PID 0x53 */
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59, /* PID 0x55 */
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60, /* PID 0x57 */
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,/* PID 0x55 */
SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62, /* PID 0x57 */
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63, /* PID 0x56 */
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64, /* PID 0x58 */
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65, /* PID 0x56 */
LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66, /* PID 0x58 */
RELATIVE_ACCELERATOR_PEDAL_POSITION = 67, /* PID 0x5A */
HYBRID_BATTERY_PACK_REMAINING_LIFE = 68, /* PID 0x5B */
FUEL_INJECTION_TIMING = 69, /* PID 0x5D */
ENGINE_FUEL_RATE = 70, /* PID 0x5E */
LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
};