diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-06 07:34:16 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-06 07:34:16 +0000 |
commit | 2f64ed86de472a8be59020c52c00f42173f80946 (patch) | |
tree | aca43e6cdd48fa385ff09823ff0a1c849421d828 | |
parent | 47e7e6b1533ad7b9ca0fa06dc489bc46f9e42cdd (diff) | |
parent | 138288a041ca28fdd421ae0aa5c46e663f616a24 (diff) | |
download | Car-2f64ed86de472a8be59020c52c00f42173f80946.tar.gz |
release-request-d642586e-3e25-49f4-8b4c-acad0e3f63d8-for-git_oc-mr1-release-4249777 snap-temp-L81500000089724408
Change-Id: Ib3bfff7fa8de8bd1b8215e048015cc4c0f844c9e
25 files changed, 970 insertions, 720 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk index 4bf7e9aeb0..d828faa03d 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -54,6 +54,9 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/androi $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android.car7_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android.car_intermediates/) +$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android.car_intermediates/src/android/car/hardware/ICarDiagnostic*.java) +$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android.car7_intermediates/src/android/car/hardware/ICarDiagnostic*.java) + # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt index fe2794b1bc..65a1ec126b 100644 --- a/car-lib/api/system-current.txt +++ b/car-lib/api/system-current.txt @@ -353,14 +353,14 @@ package android.car.content.pm { } -package android.car.hardware { +package android.car.diagnostic { public class CarDiagnosticEvent implements android.os.Parcelable { ctor public CarDiagnosticEvent(android.os.Parcel); method public int describeContents(); method public java.lang.Integer getFuelSystemStatus(); method public java.lang.Integer getFuelType(); - method public android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors getIgnitionMonitors(); + method public android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors getIgnitionMonitors(); method public java.lang.Integer getSecondaryAirStatus(); method public float getSystemFloatSensor(int, float); method public java.lang.Float getSystemFloatSensor(int); @@ -374,37 +374,37 @@ package android.car.hardware { method public boolean isLiveFrame(); method public void writeToJson(android.util.JsonWriter) throws java.io.IOException; method public void writeToParcel(android.os.Parcel, int); - field public static final android.os.Parcelable.Creator<android.car.hardware.CarDiagnosticEvent> CREATOR; + field public static final android.os.Parcelable.Creator<android.car.diagnostic.CarDiagnosticEvent> CREATOR; field public final java.lang.String dtc; field public final int frameType; field public final long timestamp; } public static class CarDiagnosticEvent.Builder { - method public android.car.hardware.CarDiagnosticEvent.Builder atTimestamp(long); - method public android.car.hardware.CarDiagnosticEvent build(); - method public static android.car.hardware.CarDiagnosticEvent.Builder newFreezeFrameBuilder(); - method public static android.car.hardware.CarDiagnosticEvent.Builder newLiveFrameBuilder(); - method public android.car.hardware.CarDiagnosticEvent.Builder withDtc(java.lang.String); - method public android.car.hardware.CarDiagnosticEvent.Builder withFloatValue(int, float); - method public android.car.hardware.CarDiagnosticEvent.Builder withIntValue(int, int); + method public android.car.diagnostic.CarDiagnosticEvent.Builder atTimestamp(long); + method public android.car.diagnostic.CarDiagnosticEvent build(); + method public static android.car.diagnostic.CarDiagnosticEvent.Builder newFreezeFrameBuilder(); + method public static android.car.diagnostic.CarDiagnosticEvent.Builder newLiveFrameBuilder(); + method public android.car.diagnostic.CarDiagnosticEvent.Builder withDtc(java.lang.String); + method public android.car.diagnostic.CarDiagnosticEvent.Builder withFloatValue(int, float); + method public android.car.diagnostic.CarDiagnosticEvent.Builder withIntValue(int, int); } public static class CarDiagnosticEvent.CommonIgnitionMonitors { - method public android.car.hardware.CarDiagnosticEvent.CompressionIgnitionMonitors asCompressionIgnitionMonitors(); - method public android.car.hardware.CarDiagnosticEvent.SparkIgnitionMonitors asSparkIgnitionMonitors(); - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor components; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor fuelSystem; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor misfire; + method public android.car.diagnostic.CarDiagnosticEvent.CompressionIgnitionMonitors asCompressionIgnitionMonitors(); + method public android.car.diagnostic.CarDiagnosticEvent.SparkIgnitionMonitors asSparkIgnitionMonitors(); + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor components; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor fuelSystem; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor misfire; } - public static final class CarDiagnosticEvent.CompressionIgnitionMonitors extends android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors { - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor EGROrVVT; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor NMHCCatalyst; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor NOxSCR; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor PMFilter; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor boostPressure; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor exhaustGasSensor; + public static final class CarDiagnosticEvent.CompressionIgnitionMonitors extends android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors { + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor EGROrVVT; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor NMHCCatalyst; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor NOxSCR; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor PMFilter; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor boostPressure; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor exhaustGasSensor; } public static final class CarDiagnosticEvent.FuelSystemStatus { @@ -463,29 +463,29 @@ package android.car.hardware { public static abstract class CarDiagnosticEvent.SecondaryAirStatus.Status implements java.lang.annotation.Annotation { } - public static final class CarDiagnosticEvent.SparkIgnitionMonitors extends android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors { - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor ACRefrigerant; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor EGR; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor catalyst; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor evaporativeSystem; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor heatedCatalyst; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor oxygenSensor; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor oxygenSensorHeater; - field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor secondaryAirSystem; + public static final class CarDiagnosticEvent.SparkIgnitionMonitors extends android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors { + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor ACRefrigerant; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor EGR; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor catalyst; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor evaporativeSystem; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor heatedCatalyst; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor oxygenSensor; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor oxygenSensorHeater; + field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor secondaryAirSystem; } public final class CarDiagnosticManager { method public boolean clearFreezeFrames(long...) throws android.car.CarNotConnectedException; - method public android.car.hardware.CarDiagnosticEvent getFreezeFrame(long) throws android.car.CarNotConnectedException; + method public android.car.diagnostic.CarDiagnosticEvent getFreezeFrame(long) throws android.car.CarNotConnectedException; method public long[] getFreezeFrameTimestamps() throws android.car.CarNotConnectedException; - method public android.car.hardware.CarDiagnosticEvent getLatestLiveFrame() throws android.car.CarNotConnectedException; + method public android.car.diagnostic.CarDiagnosticEvent getLatestLiveFrame() throws android.car.CarNotConnectedException; method public boolean isClearFreezeFramesSupported() throws android.car.CarNotConnectedException; method public boolean isFreezeFrameNotificationSupported() throws android.car.CarNotConnectedException; method public boolean isGetFreezeFrameSupported() throws android.car.CarNotConnectedException; method public boolean isLiveFrameSupported() throws android.car.CarNotConnectedException; method public void onCarDisconnected(); - method public boolean registerListener(android.car.hardware.CarDiagnosticManager.OnDiagnosticEventListener, int, int) throws android.car.CarNotConnectedException, java.lang.IllegalArgumentException; - method public void unregisterListener(android.car.hardware.CarDiagnosticManager.OnDiagnosticEventListener); + method public boolean registerListener(android.car.diagnostic.CarDiagnosticManager.OnDiagnosticEventListener, int, int) throws android.car.CarNotConnectedException, java.lang.IllegalArgumentException; + method public void unregisterListener(android.car.diagnostic.CarDiagnosticManager.OnDiagnosticEventListener); field public static final int FRAME_TYPE_FREEZE = 1; // 0x1 field public static final int FRAME_TYPE_LIVE = 0; // 0x0 } @@ -494,9 +494,126 @@ package android.car.hardware { } public static abstract interface CarDiagnosticManager.OnDiagnosticEventListener { - method public abstract void onDiagnosticEvent(android.car.hardware.CarDiagnosticEvent); + method public abstract void onDiagnosticEvent(android.car.diagnostic.CarDiagnosticEvent); + } + + public final class FloatSensorIndex { + field public static final int ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58; // 0x3a + field public static final int ABSOLUTE_LOAD_VALUE = 48; // 0x30 + field public static final int ABSOLUTE_THROTTLE_POSITION_B = 51; // 0x33 + field public static final int ABSOLUTE_THROTTLE_POSITION_C = 52; // 0x34 + field public static final int ACCELERATOR_PEDAL_POSITION_D = 53; // 0x35 + field public static final int ACCELERATOR_PEDAL_POSITION_E = 54; // 0x36 + field public static final int ACCELERATOR_PEDAL_POSITION_F = 55; // 0x37 + field public static final int CALCULATED_ENGINE_LOAD = 0; // 0x0 + field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44; // 0x2c + field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46; // 0x2e + field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45; // 0x2d + field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47; // 0x2f + field public static final int COMMANDED_EVAPORATIVE_PURGE = 41; // 0x29 + field public static final int COMMANDED_EXHAUST_GAS_RECIRCULATION = 39; // 0x27 + field public static final int COMMANDED_THROTTLE_ACTUATOR = 56; // 0x38 + field public static final int ENGINE_COOLANT_TEMPERATURE = 1; // 0x1 + field public static final int ENGINE_FUEL_RATE = 70; // 0x46 + field public static final int ENGINE_RPM = 8; // 0x8 + field public static final int ETHANOL_FUEL_PERCENTAGE = 57; // 0x39 + field public static final int EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43; // 0x2b + field public static final int EXHAUST_GAS_RECIRCULATION_ERROR = 40; // 0x28 + field public static final int FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49; // 0x31 + field public static final int FUEL_INJECTION_TIMING = 69; // 0x45 + field public static final int FUEL_PRESSURE = 6; // 0x6 + field public static final int FUEL_RAIL_GAUGE_PRESSURE = 38; // 0x26 + field public static final int FUEL_RAIL_PRESSURE = 37; // 0x25 + field public static final int FUEL_TANK_LEVEL_INPUT = 42; // 0x2a + field public static final int HYBRID_BATTERY_PACK_REMAINING_LIFE = 68; // 0x44 + field public static final int INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7; // 0x7 + field public static final int LAST_SYSTEM = 70; // 0x46 + field public static final int LONG_TERM_FUEL_TRIM_BANK1 = 3; // 0x3 + field public static final int LONG_TERM_FUEL_TRIM_BANK2 = 5; // 0x5 + field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63; // 0x3f + field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64; // 0x40 + field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65; // 0x41 + field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66; // 0x42 + field public static final int MAF_AIR_FLOW_RATE = 11; // 0xb + field public static final int OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15; // 0xf + field public static final int OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14; // 0xe + field public static final int OXYGEN_SENSOR1_VOLTAGE = 13; // 0xd + field public static final int OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18; // 0x12 + field public static final int OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17; // 0x11 + field public static final int OXYGEN_SENSOR2_VOLTAGE = 16; // 0x10 + field public static final int OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21; // 0x15 + field public static final int OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20; // 0x14 + field public static final int OXYGEN_SENSOR3_VOLTAGE = 19; // 0x13 + field public static final int OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24; // 0x18 + field public static final int OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23; // 0x17 + field public static final int OXYGEN_SENSOR4_VOLTAGE = 22; // 0x16 + field public static final int OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27; // 0x1b + field public static final int OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26; // 0x1a + field public static final int OXYGEN_SENSOR5_VOLTAGE = 25; // 0x19 + field public static final int OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30; // 0x1e + field public static final int OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29; // 0x1d + field public static final int OXYGEN_SENSOR6_VOLTAGE = 28; // 0x1c + field public static final int OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33; // 0x21 + field public static final int OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32; // 0x20 + field public static final int OXYGEN_SENSOR7_VOLTAGE = 31; // 0x1f + field public static final int OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36; // 0x24 + field public static final int OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35; // 0x23 + field public static final int OXYGEN_SENSOR8_VOLTAGE = 34; // 0x22 + field public static final int RELATIVE_ACCELERATOR_PEDAL_POSITION = 67; // 0x43 + field public static final int RELATIVE_THROTTLE_POSITION = 50; // 0x32 + field public static final int SHORT_TERM_FUEL_TRIM_BANK1 = 2; // 0x2 + field public static final int SHORT_TERM_FUEL_TRIM_BANK2 = 4; // 0x4 + field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59; // 0x3b + field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60; // 0x3c + field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61; // 0x3d + field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62; // 0x3e + field public static final int THROTTLE_POSITION = 12; // 0xc + field public static final int TIMING_ADVANCE = 10; // 0xa + field public static final int VEHICLE_SPEED = 9; // 0x9 + field public static final int VENDOR_START = 71; // 0x47 + } + + public final class IntegerSensorIndex { + field public static final int ABSOLUTE_BAROMETRIC_PRESSURE = 11; // 0xb + field public static final int AMBIENT_AIR_TEMPERATURE = 13; // 0xd + field public static final int COMMANDED_SECONDARY_AIR_STATUS = 5; // 0x5 + field public static final int CONTROL_MODULE_VOLTAGE = 12; // 0xc + field public static final int DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10; // 0xa + field public static final int DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8; // 0x8 + field public static final int DRIVER_DEMAND_PERCENT_TORQUE = 24; // 0x18 + field public static final int ENGINE_ACTUAL_PERCENT_TORQUE = 25; // 0x19 + field public static final int ENGINE_OIL_TEMPERATURE = 23; // 0x17 + field public static final int ENGINE_PERCENT_TORQUE_DATA_IDLE = 27; // 0x1b + field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28; // 0x1c + field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29; // 0x1d + field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30; // 0x1e + field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31; // 0x1f + field public static final int ENGINE_REFERENCE_PERCENT_TORQUE = 26; // 0x1a + field public static final int FUEL_RAIL_ABSOLUTE_PRESSURE = 22; // 0x16 + field public static final int FUEL_SYSTEM_STATUS = 0; // 0x0 + field public static final int FUEL_TYPE = 21; // 0x15 + field public static final int IGNITION_MONITORS_SUPPORTED = 2; // 0x2 + field public static final int IGNITION_SPECIFIC_MONITORS = 3; // 0x3 + field public static final int INTAKE_AIR_TEMPERATURE = 4; // 0x4 + field public static final int LAST_SYSTEM = 31; // 0x1f + field public static final int MALFUNCTION_INDICATOR_LIGHT_ON = 1; // 0x1 + field public static final int MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20; // 0x14 + field public static final int MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16; // 0x10 + field public static final int MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19; // 0x13 + field public static final int MAX_OXYGEN_SENSOR_CURRENT = 18; // 0x12 + field public static final int MAX_OXYGEN_SENSOR_VOLTAGE = 17; // 0x11 + field public static final int NUM_OXYGEN_SENSORS_PRESENT = 6; // 0x6 + field public static final int RUNTIME_SINCE_ENGINE_START = 7; // 0x7 + field public static final int TIME_SINCE_TROUBLE_CODES_CLEARED = 15; // 0xf + field public static final int TIME_WITH_MALFUNCTION_LIGHT_ON = 14; // 0xe + field public static final int VENDOR_START = 32; // 0x20 + field public static final int WARMUPS_SINCE_CODES_CLEARED = 9; // 0x9 } +} + +package android.car.hardware { + public class CarPropertyConfig<T> implements android.os.Parcelable { method public int describeContents(); method public int getAreaCount(); @@ -645,119 +762,6 @@ package android.car.hardware { method public abstract void onErrorEvent(int, int); } - public final class FloatSensorIndex { - field public static final int ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58; // 0x3a - field public static final int ABSOLUTE_LOAD_VALUE = 48; // 0x30 - field public static final int ABSOLUTE_THROTTLE_POSITION_B = 51; // 0x33 - field public static final int ABSOLUTE_THROTTLE_POSITION_C = 52; // 0x34 - field public static final int ACCELERATOR_PEDAL_POSITION_D = 53; // 0x35 - field public static final int ACCELERATOR_PEDAL_POSITION_E = 54; // 0x36 - field public static final int ACCELERATOR_PEDAL_POSITION_F = 55; // 0x37 - field public static final int CALCULATED_ENGINE_LOAD = 0; // 0x0 - field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44; // 0x2c - field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46; // 0x2e - field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45; // 0x2d - field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47; // 0x2f - field public static final int COMMANDED_EVAPORATIVE_PURGE = 41; // 0x29 - field public static final int COMMANDED_EXHAUST_GAS_RECIRCULATION = 39; // 0x27 - field public static final int COMMANDED_THROTTLE_ACTUATOR = 56; // 0x38 - field public static final int ENGINE_COOLANT_TEMPERATURE = 1; // 0x1 - field public static final int ENGINE_FUEL_RATE = 70; // 0x46 - field public static final int ENGINE_RPM = 8; // 0x8 - field public static final int ETHANOL_FUEL_PERCENTAGE = 57; // 0x39 - field public static final int EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43; // 0x2b - field public static final int EXHAUST_GAS_RECIRCULATION_ERROR = 40; // 0x28 - field public static final int FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49; // 0x31 - field public static final int FUEL_INJECTION_TIMING = 69; // 0x45 - field public static final int FUEL_PRESSURE = 6; // 0x6 - field public static final int FUEL_RAIL_GAUGE_PRESSURE = 38; // 0x26 - field public static final int FUEL_RAIL_PRESSURE = 37; // 0x25 - field public static final int FUEL_TANK_LEVEL_INPUT = 42; // 0x2a - field public static final int HYBRID_BATTERY_PACK_REMAINING_LIFE = 68; // 0x44 - field public static final int INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7; // 0x7 - field public static final int LAST_SYSTEM = 70; // 0x46 - field public static final int LONG_TERM_FUEL_TRIM_BANK1 = 3; // 0x3 - field public static final int LONG_TERM_FUEL_TRIM_BANK2 = 5; // 0x5 - field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63; // 0x3f - field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64; // 0x40 - field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65; // 0x41 - field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66; // 0x42 - field public static final int MAF_AIR_FLOW_RATE = 11; // 0xb - field public static final int OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15; // 0xf - field public static final int OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14; // 0xe - field public static final int OXYGEN_SENSOR1_VOLTAGE = 13; // 0xd - field public static final int OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18; // 0x12 - field public static final int OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17; // 0x11 - field public static final int OXYGEN_SENSOR2_VOLTAGE = 16; // 0x10 - field public static final int OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21; // 0x15 - field public static final int OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20; // 0x14 - field public static final int OXYGEN_SENSOR3_VOLTAGE = 19; // 0x13 - field public static final int OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24; // 0x18 - field public static final int OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23; // 0x17 - field public static final int OXYGEN_SENSOR4_VOLTAGE = 22; // 0x16 - field public static final int OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27; // 0x1b - field public static final int OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26; // 0x1a - field public static final int OXYGEN_SENSOR5_VOLTAGE = 25; // 0x19 - field public static final int OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30; // 0x1e - field public static final int OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29; // 0x1d - field public static final int OXYGEN_SENSOR6_VOLTAGE = 28; // 0x1c - field public static final int OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33; // 0x21 - field public static final int OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32; // 0x20 - field public static final int OXYGEN_SENSOR7_VOLTAGE = 31; // 0x1f - field public static final int OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36; // 0x24 - field public static final int OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35; // 0x23 - field public static final int OXYGEN_SENSOR8_VOLTAGE = 34; // 0x22 - field public static final int RELATIVE_ACCELERATOR_PEDAL_POSITION = 67; // 0x43 - field public static final int RELATIVE_THROTTLE_POSITION = 50; // 0x32 - field public static final int SHORT_TERM_FUEL_TRIM_BANK1 = 2; // 0x2 - field public static final int SHORT_TERM_FUEL_TRIM_BANK2 = 4; // 0x4 - field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59; // 0x3b - field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60; // 0x3c - field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61; // 0x3d - field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62; // 0x3e - field public static final int THROTTLE_POSITION = 12; // 0xc - field public static final int TIMING_ADVANCE = 10; // 0xa - field public static final int VEHICLE_SPEED = 9; // 0x9 - field public static final int VENDOR_START = 71; // 0x47 - } - - public final class IntegerSensorIndex { - field public static final int ABSOLUTE_BAROMETRIC_PRESSURE = 11; // 0xb - field public static final int AMBIENT_AIR_TEMPERATURE = 13; // 0xd - field public static final int COMMANDED_SECONDARY_AIR_STATUS = 5; // 0x5 - field public static final int CONTROL_MODULE_VOLTAGE = 12; // 0xc - field public static final int DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10; // 0xa - field public static final int DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8; // 0x8 - field public static final int DRIVER_DEMAND_PERCENT_TORQUE = 24; // 0x18 - field public static final int ENGINE_ACTUAL_PERCENT_TORQUE = 25; // 0x19 - field public static final int ENGINE_OIL_TEMPERATURE = 23; // 0x17 - field public static final int ENGINE_PERCENT_TORQUE_DATA_IDLE = 27; // 0x1b - field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28; // 0x1c - field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29; // 0x1d - field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30; // 0x1e - field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31; // 0x1f - field public static final int ENGINE_REFERENCE_PERCENT_TORQUE = 26; // 0x1a - field public static final int FUEL_RAIL_ABSOLUTE_PRESSURE = 22; // 0x16 - field public static final int FUEL_SYSTEM_STATUS = 0; // 0x0 - field public static final int FUEL_TYPE = 21; // 0x15 - field public static final int IGNITION_MONITORS_SUPPORTED = 2; // 0x2 - field public static final int IGNITION_SPECIFIC_MONITORS = 3; // 0x3 - field public static final int INTAKE_AIR_TEMPERATURE = 4; // 0x4 - field public static final int LAST_SYSTEM = 31; // 0x1f - field public static final int MALFUNCTION_INDICATOR_LIGHT_ON = 1; // 0x1 - field public static final int MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20; // 0x14 - field public static final int MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16; // 0x10 - field public static final int MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19; // 0x13 - field public static final int MAX_OXYGEN_SENSOR_CURRENT = 18; // 0x12 - field public static final int MAX_OXYGEN_SENSOR_VOLTAGE = 17; // 0x11 - field public static final int NUM_OXYGEN_SENSORS_PRESENT = 6; // 0x6 - field public static final int RUNTIME_SINCE_ENGINE_START = 7; // 0x7 - field public static final int TIME_SINCE_TROUBLE_CODES_CLEARED = 15; // 0xf - field public static final int TIME_WITH_MALFUNCTION_LIGHT_ON = 14; // 0xe - field public static final int VENDOR_START = 32; // 0x20 - field public static final int WARMUPS_SINCE_CODES_CLEARED = 9; // 0x9 - } - } package android.car.hardware.cabin { diff --git a/car-lib/src/android/car/Car.java b/car-lib/src/android/car/Car.java index 706f7aa7d2..10d5d03541 100644 --- a/car-lib/src/android/car/Car.java +++ b/car-lib/src/android/car/Car.java @@ -22,7 +22,7 @@ import android.annotation.SystemApi; import android.car.annotation.FutureFeature; import android.car.cluster.CarInstrumentClusterManager; import android.car.content.pm.CarPackageManager; -import android.car.hardware.CarDiagnosticManager; +import android.car.diagnostic.CarDiagnosticManager; import android.car.hardware.CarSensorManager; import android.car.hardware.CarVendorExtensionManager; import android.car.hardware.cabin.CarCabinManager; diff --git a/car-lib/src/android/car/hardware/CarDiagnosticEvent.aidl b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.aidl index 73b184ee61..cd9b9a78cc 100644 --- a/car-lib/src/android/car/hardware/CarDiagnosticEvent.aidl +++ b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.aidl @@ -14,6 +14,6 @@ * limitations under the License. */ -package android.car.hardware; +package android.car.diagnostic; parcelable CarDiagnosticEvent; diff --git a/car-lib/src/android/car/hardware/CarDiagnosticEvent.java b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.java index a065b3b169..e8ec2b5b47 100644 --- a/car-lib/src/android/car/hardware/CarDiagnosticEvent.java +++ b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.car.hardware; +package android.car.diagnostic; import android.annotation.IntDef; import android.annotation.Nullable; @@ -253,13 +253,13 @@ public class CarDiagnosticEvent implements Parcelable { SparseArray<Float> newFloatValues = floatValues.clone(); for (int i = 0; i < intValues.size(); ++i) { int key = intValues.keyAt(i); - if (key >= IntegerSensorIndex.LAST_SYSTEM) { + if (key >= android.car.diagnostic.IntegerSensorIndex.LAST_SYSTEM) { newIntValues.delete(key); } } for (int i = 0; i < floatValues.size(); ++i) { int key = floatValues.keyAt(i); - if (key >= FloatSensorIndex.LAST_SYSTEM) { + if (key >= android.car.diagnostic.FloatSensorIndex.LAST_SYSTEM) { newFloatValues.delete(key); } } @@ -398,7 +398,7 @@ public class CarDiagnosticEvent implements Parcelable { * Returns defaultValue otherwise. */ public int getSystemIntegerSensor( - @IntegerSensorIndex.SensorIndex int sensor, int defaultValue) { + @android.car.diagnostic.IntegerSensorIndex.SensorIndex int sensor, int defaultValue) { return intValues.get(sensor, defaultValue); } @@ -407,7 +407,7 @@ public class CarDiagnosticEvent implements Parcelable { * Returns defaultValue otherwise. */ public float getSystemFloatSensor( - @FloatSensorIndex.SensorIndex int sensor, float defaultValue) { + @android.car.diagnostic.FloatSensorIndex.SensorIndex int sensor, float defaultValue) { return floatValues.get(sensor, defaultValue); } @@ -432,7 +432,7 @@ public class CarDiagnosticEvent implements Parcelable { * Returns null otherwise. */ public @Nullable Integer getSystemIntegerSensor( - @IntegerSensorIndex.SensorIndex int sensor) { + @android.car.diagnostic.IntegerSensorIndex.SensorIndex int sensor) { int index = intValues.indexOfKey(sensor); if (index < 0) return null; return intValues.valueAt(index); @@ -443,7 +443,7 @@ public class CarDiagnosticEvent implements Parcelable { * Returns null otherwise. */ public @Nullable Float getSystemFloatSensor( - @FloatSensorIndex.SensorIndex int sensor) { + @android.car.diagnostic.FloatSensorIndex.SensorIndex int sensor) { int index = floatValues.indexOfKey(sensor); if (index < 0) return null; return floatValues.valueAt(index); @@ -471,7 +471,7 @@ public class CarDiagnosticEvent implements Parcelable { /** * Represents possible states of the fuel system; see {@link - * IntegerSensorIndex#FUEL_SYSTEM_STATUS} + * android.car.diagnostic.IntegerSensorIndex#FUEL_SYSTEM_STATUS} */ public static final class FuelSystemStatus { private FuelSystemStatus() {} @@ -496,7 +496,7 @@ public class CarDiagnosticEvent implements Parcelable { /** * Represents possible states of the secondary air system; see {@link - * IntegerSensorIndex#COMMANDED_SECONDARY_AIR_STATUS} + * android.car.diagnostic.IntegerSensorIndex#COMMANDED_SECONDARY_AIR_STATUS} */ public static final class SecondaryAirStatus { private SecondaryAirStatus() {} @@ -519,7 +519,7 @@ public class CarDiagnosticEvent implements Parcelable { /** * Represents possible types of fuel; see {@link - * IntegerSensorIndex#FUEL_TYPE} + * android.car.diagnostic.IntegerSensorIndex#FUEL_TYPE} */ public static final class FuelType { private FuelType() {} @@ -581,13 +581,7 @@ public class CarDiagnosticEvent implements Parcelable { } /** -<<<<<<< HEAD * Represents the state of an ignition monitor on a vehicle. -======= - * Represents possible states of the ignition monitors on the vehicle; see {@link - * IntegerSensorIndex#IGNITION_MONITORS_SUPPORTED} see {@link - * IntegerSensorIndex#IGNITION_SPECIFIC_MONITORS} ->>>>>>> 49cfe37f... Remove the CarDiagnosticSensorIndices class as it merely acted as a hollow namespace */ public static final class IgnitionMonitor { public final boolean available; @@ -625,14 +619,20 @@ public class CarDiagnosticEvent implements Parcelable { public final IgnitionMonitor fuelSystem; public final IgnitionMonitor misfire; - static final int COMPONENTS_AVAILABLE = 0x1 << 0; - static final int COMPONENTS_INCOMPLETE = 0x1 << 1; + /** @hide */ + public static final int COMPONENTS_AVAILABLE = 0x1 << 0; + /** @hide */ + public static final int COMPONENTS_INCOMPLETE = 0x1 << 1; - static final int FUEL_SYSTEM_AVAILABLE = 0x1 << 2; - static final int FUEL_SYSTEM_INCOMPLETE = 0x1 << 3; + /** @hide */ + public static final int FUEL_SYSTEM_AVAILABLE = 0x1 << 2; + /** @hide */ + public static final int FUEL_SYSTEM_INCOMPLETE = 0x1 << 3; - static final int MISFIRE_AVAILABLE = 0x1 << 4; - static final int MISFIRE_INCOMPLETE = 0x1 << 5; + /** @hide */ + public static final int MISFIRE_AVAILABLE = 0x1 << 4; + /** @hide */ + public static final int MISFIRE_INCOMPLETE = 0x1 << 5; static final IgnitionMonitor.Decoder COMPONENTS_DECODER = new IgnitionMonitor.Decoder(COMPONENTS_AVAILABLE, COMPONENTS_INCOMPLETE); @@ -684,29 +684,45 @@ public class CarDiagnosticEvent implements Parcelable { public final IgnitionMonitor heatedCatalyst; public final IgnitionMonitor catalyst; - static final int EGR_AVAILABLE = 0x1 << 6; - static final int EGR_INCOMPLETE = 0x1 << 7; + /** @hide */ + public static final int EGR_AVAILABLE = 0x1 << 6; + /** @hide */ + public static final int EGR_INCOMPLETE = 0x1 << 7; - static final int OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8; - static final int OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9; + /** @hide */ + public static final int OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8; + /** @hide */ + public static final int OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9; - static final int OXYGEN_SENSOR_AVAILABLE = 0x1 << 10; - static final int OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11; + /** @hide */ + public static final int OXYGEN_SENSOR_AVAILABLE = 0x1 << 10; + /** @hide */ + public static final int OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11; - static final int AC_REFRIGERANT_AVAILABLE = 0x1 << 12; - static final int AC_REFRIGERANT_INCOMPLETE = 0x1 << 13; + /** @hide */ + public static final int AC_REFRIGERANT_AVAILABLE = 0x1 << 12; + /** @hide */ + public static final int AC_REFRIGERANT_INCOMPLETE = 0x1 << 13; - static final int SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14; - static final int SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15; + /** @hide */ + public static final int SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14; + /** @hide */ + public static final int SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15; - static final int EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16; - static final int EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17; + /** @hide */ + public static final int EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16; + /** @hide */ + public static final int EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17; - static final int HEATED_CATALYST_AVAILABLE = 0x1 << 18; - static final int HEATED_CATALYST_INCOMPLETE = 0x1 << 19; + /** @hide */ + public static final int HEATED_CATALYST_AVAILABLE = 0x1 << 18; + /** @hide */ + public static final int HEATED_CATALYST_INCOMPLETE = 0x1 << 19; - static final int CATALYST_AVAILABLE = 0x1 << 20; - static final int CATALYST_INCOMPLETE = 0x1 << 21; + /** @hide */ + public static final int CATALYST_AVAILABLE = 0x1 << 20; + /** @hide */ + public static final int CATALYST_INCOMPLETE = 0x1 << 21; static final IgnitionMonitor.Decoder EGR_DECODER = new IgnitionMonitor.Decoder(EGR_AVAILABLE, EGR_INCOMPLETE); @@ -761,23 +777,35 @@ public class CarDiagnosticEvent implements Parcelable { public final IgnitionMonitor NOxSCR; public final IgnitionMonitor NMHCCatalyst; - static final int EGR_OR_VVT_AVAILABLE = 0x1 << 6; - static final int EGR_OR_VVT_INCOMPLETE = 0x1 << 7; + /** @hide */ + public static final int EGR_OR_VVT_AVAILABLE = 0x1 << 6; + /** @hide */ + public static final int EGR_OR_VVT_INCOMPLETE = 0x1 << 7; - static final int PM_FILTER_AVAILABLE = 0x1 << 8; - static final int PM_FILTER_INCOMPLETE = 0x1 << 9; + /** @hide */ + public static final int PM_FILTER_AVAILABLE = 0x1 << 8; + /** @hide */ + public static final int PM_FILTER_INCOMPLETE = 0x1 << 9; - static final int EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10; - static final int EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11; + /** @hide */ + public static final int EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10; + /** @hide */ + public static final int EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11; - static final int BOOST_PRESSURE_AVAILABLE = 0x1 << 12; - static final int BOOST_PRESSURE_INCOMPLETE = 0x1 << 13; + /** @hide */ + public static final int BOOST_PRESSURE_AVAILABLE = 0x1 << 12; + /** @hide */ + public static final int BOOST_PRESSURE_INCOMPLETE = 0x1 << 13; - static final int NOx_SCR_AVAILABLE = 0x1 << 14; - static final int NOx_SCR_INCOMPLETE = 0x1 << 15; + /** @hide */ + public static final int NOx_SCR_AVAILABLE = 0x1 << 14; + /** @hide */ + public static final int NOx_SCR_INCOMPLETE = 0x1 << 15; - static final int NMHC_CATALYST_AVAILABLE = 0x1 << 16; - static final int NMHC_CATALYST_INCOMPLETE = 0x1 << 17; + /** @hide */ + public static final int NMHC_CATALYST_AVAILABLE = 0x1 << 16; + /** @hide */ + public static final int NMHC_CATALYST_INCOMPLETE = 0x1 << 17; static final IgnitionMonitor.Decoder EGR_OR_VVT_DECODER = new IgnitionMonitor.Decoder(EGR_OR_VVT_AVAILABLE, EGR_OR_VVT_INCOMPLETE); @@ -815,7 +843,7 @@ public class CarDiagnosticEvent implements Parcelable { * Returns null otherwise. */ public @Nullable @FuelSystemStatus.Status Integer getFuelSystemStatus() { - return getSystemIntegerSensor(IntegerSensorIndex.FUEL_SYSTEM_STATUS); + return getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.FUEL_SYSTEM_STATUS); } /** @@ -823,7 +851,7 @@ public class CarDiagnosticEvent implements Parcelable { * Returns null otherwise. */ public @Nullable @SecondaryAirStatus.Status Integer getSecondaryAirStatus() { - return getSystemIntegerSensor(IntegerSensorIndex.COMMANDED_SECONDARY_AIR_STATUS); + return getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.COMMANDED_SECONDARY_AIR_STATUS); } /** @@ -832,9 +860,9 @@ public class CarDiagnosticEvent implements Parcelable { */ public @Nullable CommonIgnitionMonitors getIgnitionMonitors() { Integer ignitionMonitorsType = - getSystemIntegerSensor(IntegerSensorIndex.IGNITION_MONITORS_SUPPORTED); + getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.IGNITION_MONITORS_SUPPORTED); Integer ignitionMonitorsBitmask = - getSystemIntegerSensor(IntegerSensorIndex.IGNITION_SPECIFIC_MONITORS); + getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.IGNITION_SPECIFIC_MONITORS); if (null == ignitionMonitorsType) return null; if (null == ignitionMonitorsBitmask) return null; switch (ignitionMonitorsType) { @@ -852,6 +880,6 @@ public class CarDiagnosticEvent implements Parcelable { * Returns null otherwise. */ public @Nullable @FuelType.Type Integer getFuelType() { - return getSystemIntegerSensor(IntegerSensorIndex.FUEL_TYPE); + return getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.FUEL_TYPE); } } diff --git a/car-lib/src/android/car/hardware/CarDiagnosticManager.java b/car-lib/src/android/car/diagnostic/CarDiagnosticManager.java index 8949a7b951..84cdd3ecd9 100644 --- a/car-lib/src/android/car/hardware/CarDiagnosticManager.java +++ b/car-lib/src/android/car/diagnostic/CarDiagnosticManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.car.hardware; +package android.car.diagnostic; import android.annotation.IntDef; import android.annotation.Nullable; @@ -24,6 +24,7 @@ import android.car.CarApiUtil; import android.car.CarLibLog; import android.car.CarManagerBase; import android.car.CarNotConnectedException; +import android.car.diagnostic.ICarDiagnosticEventListener.Stub; import android.content.Context; import android.os.Handler; import android.os.IBinder; @@ -221,7 +222,8 @@ public final class CarDiagnosticManager implements CarManagerBase { * null if no live frame has been recorded by the vehicle. * @throws CarNotConnectedException */ - public @Nullable CarDiagnosticEvent getLatestLiveFrame() throws CarNotConnectedException { + public @Nullable + CarDiagnosticEvent getLatestLiveFrame() throws CarNotConnectedException { try { return mService.getLatestLiveFrame(); } catch (IllegalStateException e) { @@ -263,7 +265,8 @@ public final class CarDiagnosticManager implements CarManagerBase { * even if it was initially obtained via a call to getFreezeFrameTimestamps(). * @throws CarNotConnectedException */ - public @Nullable CarDiagnosticEvent getFreezeFrame(long timestamp) + public @Nullable + CarDiagnosticEvent getFreezeFrame(long timestamp) throws CarNotConnectedException { try { return mService.getFreezeFrame(timestamp); @@ -363,7 +366,7 @@ public final class CarDiagnosticManager implements CarManagerBase { } private static class CarDiagnosticEventListenerToService - extends ICarDiagnosticEventListener.Stub { + extends Stub { private final WeakReference<CarDiagnosticManager> mManager; public CarDiagnosticEventListenerToService(CarDiagnosticManager manager) { diff --git a/car-lib/src/android/car/hardware/FloatSensorIndex.java b/car-lib/src/android/car/diagnostic/FloatSensorIndex.java index 18d54d7cdf..6ec7e8c2bc 100644 --- a/car-lib/src/android/car/hardware/FloatSensorIndex.java +++ b/car-lib/src/android/car/diagnostic/FloatSensorIndex.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.car.hardware; +package android.car.diagnostic; import android.annotation.IntDef; import android.annotation.SystemApi; diff --git a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl b/car-lib/src/android/car/diagnostic/ICarDiagnostic.aidl index ccddab35f2..3d1808f2e4 100644 --- a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl +++ b/car-lib/src/android/car/diagnostic/ICarDiagnostic.aidl @@ -14,10 +14,10 @@ * limitations under the License. */ -package android.car.hardware; +package android.car.diagnostic; -import android.car.hardware.CarDiagnosticEvent; -import android.car.hardware.ICarDiagnosticEventListener; +import android.car.diagnostic.CarDiagnosticEvent; +import android.car.diagnostic.ICarDiagnosticEventListener; /** @hide */ interface ICarDiagnostic { diff --git a/car-lib/src/android/car/hardware/ICarDiagnosticEventListener.aidl b/car-lib/src/android/car/diagnostic/ICarDiagnosticEventListener.aidl index 3c9a189391..89070aa513 100644 --- a/car-lib/src/android/car/hardware/ICarDiagnosticEventListener.aidl +++ b/car-lib/src/android/car/diagnostic/ICarDiagnosticEventListener.aidl @@ -14,9 +14,9 @@ * limitations under the License. */ -package android.car.hardware; +package android.car.diagnostic; -import android.car.hardware.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticEvent; /** * @hide diff --git a/car-lib/src/android/car/hardware/IntegerSensorIndex.java b/car-lib/src/android/car/diagnostic/IntegerSensorIndex.java index 70ed849b1a..15291f7c44 100644 --- a/car-lib/src/android/car/hardware/IntegerSensorIndex.java +++ b/car-lib/src/android/car/diagnostic/IntegerSensorIndex.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.car.hardware; +package android.car.diagnostic; import android.annotation.IntDef; import android.annotation.SystemApi; diff --git a/service/src/com/android/car/CarDiagnosticService.java b/service/src/com/android/car/CarDiagnosticService.java index a4afc35f80..809439c7a2 100644 --- a/service/src/com/android/car/CarDiagnosticService.java +++ b/service/src/com/android/car/CarDiagnosticService.java @@ -19,11 +19,10 @@ package com.android.car; import android.annotation.NonNull; import android.annotation.Nullable; import android.car.Car; -import android.car.annotation.FutureFeature; -import android.car.hardware.CarDiagnosticEvent; -import android.car.hardware.CarDiagnosticManager; -import android.car.hardware.ICarDiagnostic; -import android.car.hardware.ICarDiagnosticEventListener; +import android.car.diagnostic.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticManager; +import android.car.diagnostic.ICarDiagnostic; +import android.car.diagnostic.ICarDiagnosticEventListener; import android.content.Context; import android.os.IBinder; import android.os.RemoteException; @@ -35,7 +34,6 @@ import com.android.car.Listeners.ClientWithRate; import com.android.car.hal.DiagnosticHalService; import com.android.internal.annotations.GuardedBy; import java.io.PrintWriter; -import java.util.ArrayList; import java.util.Arrays; import java.util.ConcurrentModificationException; import java.util.HashMap; diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java index f58302d3e4..c412b97e14 100644 --- a/service/src/com/android/car/ICarImpl.java +++ b/service/src/com/android/car/ICarImpl.java @@ -27,7 +27,10 @@ import android.hardware.automotive.vehicle.V2_0.IVehicle; import android.os.Binder; import android.os.IBinder; import android.os.Process; +import android.os.Trace; +import android.util.BootTimingsTraceLog; import android.util.Log; +import android.util.Slog; import com.android.car.cluster.InstrumentClusterService; import com.android.car.hal.VehicleHal; import com.android.car.internal.FeatureConfiguration; @@ -76,6 +79,11 @@ public class ICarImpl extends ICar.Stub { private final CarServiceBase[] mAllServices; + private static final String TAG = "ICarImpl"; + private static final String VHAL_TIMING_TAG = "VehicleHalTiming"; + private static final BootTimingsTraceLog mBootTiming = new BootTimingsTraceLog(VHAL_TIMING_TAG, + Trace.TRACE_TAG_HAL); + /** Test only service. Populate it only when necessary. */ @GuardedBy("this") private CarTestService mCarTestService; @@ -150,10 +158,14 @@ public class ICarImpl extends ICar.Stub { } public void init() { + traceBegin("VehicleHal.init"); mHal.init(); + traceEnd(); + traceBegin("CarService.initAllServices"); for (CarServiceBase service : mAllServices) { service.init(); } + traceEnd(); } public void release() { @@ -342,6 +354,15 @@ public class ICarImpl extends ICar.Stub { new CarShellCommand().exec(args, writer); } + private static void traceBegin(String name) { + Slog.i(TAG, name); + mBootTiming.traceBegin(name); + } + + private static void traceEnd() { + mBootTiming.traceEnd(); + } + private class CarShellCommand { private static final String COMMAND_HELP = "-h"; private static final String COMMAND_DAY_NIGHT_MODE = "day-night-mode"; diff --git a/service/src/com/android/car/hal/DiagnosticHalService.java b/service/src/com/android/car/hal/DiagnosticHalService.java index 36cebf11af..9096135d8c 100644 --- a/service/src/com/android/car/hal/DiagnosticHalService.java +++ b/service/src/com/android/car/hal/DiagnosticHalService.java @@ -17,9 +17,8 @@ package com.android.car.hal; import android.annotation.Nullable; -import android.car.annotation.FutureFeature; -import android.car.hardware.CarDiagnosticEvent; -import android.car.hardware.CarDiagnosticManager; +import android.car.diagnostic.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticManager; import android.car.hardware.CarSensorManager; import android.hardware.automotive.vehicle.V2_0.VehiclePropConfig; import android.hardware.automotive.vehicle.V2_0.VehiclePropValue; @@ -33,10 +32,7 @@ import com.android.car.CarLog; import com.android.car.CarServiceUtils; import com.android.car.vehiclehal.VehiclePropValueBuilder; import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Arrays; import java.util.BitSet; -import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.concurrent.CopyOnWriteArraySet; diff --git a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java index 0d630cd916..85d4fc8cdd 100644 --- a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java +++ b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java @@ -15,7 +15,7 @@ */ package com.google.android.car.diagnosticverifier; -import android.car.hardware.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticEvent; import android.util.JsonReader; import com.android.car.vehiclehal.DiagnosticJson; diff --git a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java index 8f547b1877..1b6e44730c 100644 --- a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java +++ b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java @@ -15,7 +15,7 @@ */ package com.google.android.car.diagnosticverifier; -import android.car.hardware.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticEvent; import android.util.JsonWriter; import android.util.Log; diff --git a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java index 2916e23f9f..75db2edc7d 100644 --- a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java +++ b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java @@ -18,8 +18,8 @@ package com.google.android.car.diagnosticverifier; import android.app.Activity; import android.car.Car; import android.car.CarNotConnectedException; -import android.car.hardware.CarDiagnosticEvent; -import android.car.hardware.CarDiagnosticManager; +import android.car.diagnostic.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticManager; import android.car.hardware.CarSensorManager; import android.content.BroadcastReceiver; import android.content.ComponentName; diff --git a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java index 71deee8512..b024bfd9c3 100644 --- a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java +++ b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java @@ -18,12 +18,11 @@ package com.google.android.car.kitchensink.diagnostic; import android.annotation.Nullable; import android.car.Car; -import android.car.hardware.CarDiagnosticEvent; -import android.car.hardware.CarDiagnosticManager; -import android.car.hardware.CarDiagnosticManager.OnDiagnosticEventListener; +import android.car.diagnostic.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticManager; +import android.car.diagnostic.CarDiagnosticManager.OnDiagnosticEventListener; import android.graphics.Color; import android.os.Bundle; -import android.os.Handler; import android.support.car.hardware.CarSensorManager; import android.support.v4.app.Fragment; import android.util.Log; diff --git a/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java b/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java index 21fb5e00ac..878334168e 100644 --- a/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java +++ b/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java @@ -17,8 +17,8 @@ package android.car.apitest; import android.car.Car; -import android.car.hardware.CarDiagnosticEvent; -import android.car.hardware.CarDiagnosticManager; +import android.car.diagnostic.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticManager; import android.content.ComponentName; import android.content.ServiceConnection; import android.os.IBinder; diff --git a/tests/carservice_test/Android.mk b/tests/carservice_test/Android.mk index 105a73a45c..6c380c229b 100644 --- a/tests/carservice_test/Android.mk +++ b/tests/carservice_test/Android.mk @@ -40,7 +40,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test LOCAL_STATIC_JAVA_LIBRARIES += car-service-lib-for-test \ vehicle-hal-support-lib \ car-systemtest \ - android-support-test + android-support-test \ + android.hardware.automotive.vehicle-V2.1-java-static LOCAL_JAVA_LIBRARIES := android.car android.test.runner diff --git a/tests/carservice_test/src/com/android/car/test/CarDiagnosticConstantsTest.java b/tests/carservice_test/src/com/android/car/test/CarDiagnosticConstantsTest.java new file mode 100644 index 0000000000..cd6b98471e --- /dev/null +++ b/tests/carservice_test/src/com/android/car/test/CarDiagnosticConstantsTest.java @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.car.test; + +import android.test.suitebuilder.annotation.MediumTest; +import android.util.Log; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +import junit.framework.TestCase; + +/** + * Validates that diagnostic constants in CarService and Vehicle HAL have the same value + * This is an important assumption to validate because we do not perform any mapping between + * the two layers, instead relying on the constants on both sides having identical values. + */ +@MediumTest +public class CarDiagnosticConstantsTest extends TestCase { + static final String TAG = CarDiagnosticConstantsTest.class.getSimpleName(); + + static class MismatchException extends Exception { + private static String dumpClass(Class<?> clazz) { + StringBuilder builder = new StringBuilder(clazz.getName() + "{\n"); + Arrays.stream(clazz.getFields()).forEach((Field field) -> { + builder.append('\t').append(field.toString()).append('\n'); + }); + return builder.append('}').toString(); + } + + private static void logClasses(Class<?> clazz1, Class<?> clazz2) { + Log.d(TAG, "MismatchException. class1: " + dumpClass(clazz1)); + Log.d(TAG, "MismatchException. class2: " + dumpClass(clazz2)); + } + + MismatchException(String message) { + super(message); + } + + static MismatchException fieldValueMismatch(Class<?> clazz1, Class<?> clazz2, String name, + int value1, int value2) { + logClasses(clazz1, clazz2); + return new MismatchException("In comparison of " + clazz1 + " and " + clazz2 + + " field " + name + " had different values " + value1 + " vs. " + value2); + } + + static MismatchException fieldsOnlyInClass1(Class<?> clazz1, Class<?> clazz2, + Map<String, Integer> fields) { + logClasses(clazz1, clazz2); + return new MismatchException("In comparison of " + clazz1 + " and " + clazz2 + + " some fields were only found in the first class:\n" + + fields.keySet().stream().reduce("", + (String s, String t) -> s + "\n" + t)); + } + + static MismatchException fieldOnlyInClass2(Class<?> clazz1, Class<?> clazz2, String field) { + logClasses(clazz1, clazz2); + return new MismatchException("In comparison of " + clazz1 + " and " + clazz2 + + " field " + field + " was not found in both classes"); + } + } + + static boolean isPublicStaticFinalInt(Field field) { + final int modifiers = field.getModifiers(); + final boolean isPublic = (modifiers & Modifier.PUBLIC) == Modifier.PUBLIC; + final boolean isStatic = (modifiers & Modifier.STATIC) == Modifier.STATIC; + final boolean isFinal = (modifiers & Modifier.FINAL) == Modifier.FINAL; + if (isPublic && isStatic && isFinal) { + return field.getType() == int.class; + } + return false; + } + + static void validateMatch(Class<?> clazz1, Class<?> clazz2) throws Exception { + Map<String, Integer> fields = new HashMap<>(); + + // add all the fields in the first class to a map + Arrays.stream(clazz1.getFields()).filter( + CarDiagnosticConstantsTest::isPublicStaticFinalInt).forEach( (Field field) -> { + final String name = field.getName(); + try { + fields.put(name, field.getInt(null)); + } catch (IllegalAccessException e) { + // this will practically never happen because we checked that it is a + // public static final field before reading from it + Log.wtf(TAG, String.format("attempt to access field %s threw exception", + field.toString()), e); + } + }); + + // check for all fields in the second class, and remove matches from the map + for (Field field2 : clazz2.getFields()) { + if (isPublicStaticFinalInt(field2)) { + final String name = field2.getName(); + if (fields.containsKey(name)) { + try { + final int value2 = field2.getInt(null); + final int value1 = fields.getOrDefault(name, value2+1); + if (value2 != value1) { + throw MismatchException.fieldValueMismatch(clazz1, clazz2, + field2.getName(), value1, value2); + } + fields.remove(name); + } catch (IllegalAccessException e) { + // this will practically never happen because we checked that it is a + // public static final field before reading from it + Log.wtf(TAG, String.format("attempt to access field %s threw exception", + field2.toString()), e); + throw e; + } + } else { + throw MismatchException.fieldOnlyInClass2(clazz1, clazz2, name); + } + } + } + + // if anything is left, we didn't find some fields in the second class + if (!fields.isEmpty()) { + throw MismatchException.fieldsOnlyInClass1(clazz1, clazz2, fields); + } + } + + public void testFuelSystemStatus() throws Exception { + validateMatch(android.hardware.automotive.vehicle.V2_1.Obd2FuelSystemStatus.class, + android.car.diagnostic.CarDiagnosticEvent.FuelSystemStatus.class); + } + + public void testFuelType() throws Exception { + validateMatch(android.hardware.automotive.vehicle.V2_1.Obd2FuelType.class, + android.car.diagnostic.CarDiagnosticEvent.FuelType.class); + } + + public void testSecondaryAirStatus() throws Exception { + validateMatch(android.hardware.automotive.vehicle.V2_1.Obd2SecondaryAirStatus.class, + android.car.diagnostic.CarDiagnosticEvent.SecondaryAirStatus.class); + } + + public void testIgnitionMonitors() throws Exception { + validateMatch(android.hardware.automotive.vehicle.V2_1.Obd2CommonIgnitionMonitors.class, + android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors.class); + + validateMatch(android.hardware.automotive.vehicle.V2_1.Obd2CompressionIgnitionMonitors.class, + android.car.diagnostic.CarDiagnosticEvent.CompressionIgnitionMonitors.class); + + validateMatch(android.hardware.automotive.vehicle.V2_1.Obd2SparkIgnitionMonitors.class, + android.car.diagnostic.CarDiagnosticEvent.SparkIgnitionMonitors.class); + } +} diff --git a/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java b/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java index dfdc9dfd58..7f18204153 100644 --- a/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java +++ b/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java @@ -19,16 +19,16 @@ package com.android.car.test; import static java.lang.Integer.toHexString; import android.car.Car; -import android.car.hardware.CarDiagnosticEvent; -import android.car.hardware.CarDiagnosticEvent.FuelSystemStatus; -import android.car.hardware.CarDiagnosticEvent.FuelType; -import android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors; -import android.car.hardware.CarDiagnosticEvent.CompressionIgnitionMonitors; -import android.car.hardware.CarDiagnosticEvent.SparkIgnitionMonitors; -import android.car.hardware.CarDiagnosticEvent.SecondaryAirStatus; -import android.car.hardware.CarDiagnosticManager; -import android.car.hardware.FloatSensorIndex; -import android.car.hardware.IntegerSensorIndex; +import android.car.diagnostic.CarDiagnosticEvent; +import android.car.diagnostic.CarDiagnosticEvent.FuelSystemStatus; +import android.car.diagnostic.CarDiagnosticEvent.FuelType; +import android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors; +import android.car.diagnostic.CarDiagnosticEvent.CompressionIgnitionMonitors; +import android.car.diagnostic.CarDiagnosticEvent.SparkIgnitionMonitors; +import android.car.diagnostic.CarDiagnosticEvent.SecondaryAirStatus; +import android.car.diagnostic.CarDiagnosticManager; +import android.car.diagnostic.FloatSensorIndex; +import android.car.diagnostic.IntegerSensorIndex; import android.hardware.automotive.vehicle.V2_0.VehiclePropValue; import android.hardware.automotive.vehicle.V2_1.VehicleProperty; import android.os.SystemClock; @@ -36,7 +36,6 @@ import android.test.suitebuilder.annotation.MediumTest; import android.util.JsonReader; import android.util.JsonWriter; import android.util.Log; -import com.android.car.internal.FeatureConfiguration; import com.android.car.vehiclehal.DiagnosticEventBuilder; import com.android.car.vehiclehal.DiagnosticJson; import com.android.car.vehiclehal.VehiclePropValueBuilder; diff --git a/tools/emulator/vhal_consts_2_0.py b/tools/emulator/vhal_consts_2_0.py index 50518fdc5a..38feb9bd98 100644 --- a/tools/emulator/vhal_consts_2_0.py +++ b/tools/emulator/vhal_consts_2_0.py @@ -15,6 +15,92 @@ # DO NOT EDIT MANUALLY # This file was autogenerated by vhal_const_generate.py +# VehicleApPowerStateIndex +VEHICLEAPPOWERSTATEINDEX_STATE = 0x0 +VEHICLEAPPOWERSTATEINDEX_ADDITIONAL = 0x1 + +# Wheel +WHEEL_UNKNOWN = 0x0 +WHEEL_LEFT_FRONT = 0x1 +WHEEL_RIGHT_FRONT = 0x2 +WHEEL_LEFT_REAR = 0x4 +WHEEL_RIGHT_REAR = 0x8 + +# VehicleAudioFocusState +VEHICLEAUDIOFOCUSSTATE_STATE_GAIN = 0x1 +VEHICLEAUDIOFOCUSSTATE_STATE_GAIN_TRANSIENT = 0x2 +VEHICLEAUDIOFOCUSSTATE_STATE_LOSS_TRANSIENT_CAN_DUCK = 0x3 +VEHICLEAUDIOFOCUSSTATE_STATE_LOSS_TRANSIENT = 0x4 +VEHICLEAUDIOFOCUSSTATE_STATE_LOSS = 0x5 +VEHICLEAUDIOFOCUSSTATE_STATE_LOSS_TRANSIENT_EXLCUSIVE = 0x6 + +# VehicleAudioStreamFlag +VEHICLEAUDIOSTREAMFLAG_STREAM0_FLAG = 0x1 +VEHICLEAUDIOSTREAMFLAG_STREAM1_FLAG = 0x2 +VEHICLEAUDIOSTREAMFLAG_STREAM2_FLAG = 0x4 + +# VehicleAudioVolumeIndex +VEHICLEAUDIOVOLUMEINDEX_INDEX_STREAM = 0x0 +VEHICLEAUDIOVOLUMEINDEX_INDEX_VOLUME = 0x1 +VEHICLEAUDIOVOLUMEINDEX_INDEX_STATE = 0x2 + +# VehicleHvacFanDirection +VEHICLEHVACFANDIRECTION_FACE = 0x1 +VEHICLEHVACFANDIRECTION_FLOOR = 0x2 +VEHICLEHVACFANDIRECTION_FACE_AND_FLOOR = 0x3 +VEHICLEHVACFANDIRECTION_DEFROST = 0x4 +VEHICLEHVACFANDIRECTION_DEFROST_AND_FLOOR = 0x5 + +# VehiclePropertyAccess +VEHICLEPROPERTYACCESS_NONE = 0x0 +VEHICLEPROPERTYACCESS_READ = 0x1 +VEHICLEPROPERTYACCESS_WRITE = 0x2 +VEHICLEPROPERTYACCESS_READ_WRITE = 0x3 + +# SubscribeFlags +SUBSCRIBEFLAGS_UNDEFINED = 0x0 +SUBSCRIBEFLAGS_HAL_EVENT = 0x1 +SUBSCRIBEFLAGS_SET_CALL = 0x2 +SUBSCRIBEFLAGS_DEFAULT = 0x1 + +# VehiclePropertyOperation +VEHICLEPROPERTYOPERATION_GENERIC = 0x0 +VEHICLEPROPERTYOPERATION_SET = 0x1 +VEHICLEPROPERTYOPERATION_GET = 0x2 +VEHICLEPROPERTYOPERATION_SUBSCRIBE = 0x3 + +# VehicleAudioVolumeCapabilityFlag +VEHICLEAUDIOVOLUMECAPABILITYFLAG_PERSISTENT_STORAGE = 0x1 +VEHICLEAUDIOVOLUMECAPABILITYFLAG_MASTER_VOLUME_ONLY = 0x2 + +# VehicleApPowerStateShutdownParam +VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_IMMEDIATELY = 0x1 +VEHICLEAPPOWERSTATESHUTDOWNPARAM_CAN_SLEEP = 0x2 +VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_ONLY = 0x3 + +# VehicleIgnitionState +VEHICLEIGNITIONSTATE_UNDEFINED = 0x0 +VEHICLEIGNITIONSTATE_LOCK = 0x1 +VEHICLEIGNITIONSTATE_OFF = 0x2 +VEHICLEIGNITIONSTATE_ACC = 0x3 +VEHICLEIGNITIONSTATE_ON = 0x4 +VEHICLEIGNITIONSTATE_START = 0x5 + +# VehicleAudioContextFlag +VEHICLEAUDIOCONTEXTFLAG_MUSIC_FLAG = 0x1 +VEHICLEAUDIOCONTEXTFLAG_NAVIGATION_FLAG = 0x2 +VEHICLEAUDIOCONTEXTFLAG_VOICE_COMMAND_FLAG = 0x4 +VEHICLEAUDIOCONTEXTFLAG_CALL_FLAG = 0x8 +VEHICLEAUDIOCONTEXTFLAG_ALARM_FLAG = 0x10 +VEHICLEAUDIOCONTEXTFLAG_NOTIFICATION_FLAG = 0x20 +VEHICLEAUDIOCONTEXTFLAG_UNKNOWN_FLAG = 0x40 +VEHICLEAUDIOCONTEXTFLAG_SAFETY_ALERT_FLAG = 0x80 +VEHICLEAUDIOCONTEXTFLAG_CD_ROM_FLAG = 0x100 +VEHICLEAUDIOCONTEXTFLAG_AUX_AUDIO_FLAG = 0x200 +VEHICLEAUDIOCONTEXTFLAG_SYSTEM_SOUND_FLAG = 0x400 +VEHICLEAUDIOCONTEXTFLAG_RADIO_FLAG = 0x800 +VEHICLEAUDIOCONTEXTFLAG_EXT_SOURCE_FLAG = 0x1000 + # VehicleApPowerSetState VEHICLEAPPOWERSETSTATE_BOOT_COMPLETE = 0x1 VEHICLEAPPOWERSETSTATE_DEEP_SLEEP_ENTRY = 0x2 @@ -24,29 +110,20 @@ VEHICLEAPPOWERSETSTATE_SHUTDOWN_START = 0x5 VEHICLEAPPOWERSETSTATE_DISPLAY_OFF = 0x6 VEHICLEAPPOWERSETSTATE_DISPLAY_ON = 0x7 -# VehicleApPowerStateIndex -VEHICLEAPPOWERSTATEINDEX_STATE = 0x0 -VEHICLEAPPOWERSTATEINDEX_ADDITIONAL = 0x1 - -# VehicleAudioFocusRequest -VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN = 0x1 -VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN_TRANSIENT = 0x2 -VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN_TRANSIENT_MAY_DUCK = 0x3 -VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN_TRANSIENT_NO_DUCK = 0x4 -VEHICLEAUDIOFOCUSREQUEST_REQUEST_RELEASE = 0x5 - -# VehicleDisplay -VEHICLEDISPLAY_MAIN = 0x0 -VEHICLEDISPLAY_INSTRUMENT_CLUSTER = 0x1 - -# VehicleRadioConstants -VEHICLERADIOCONSTANTS_VEHICLE_RADIO_PRESET_MIN_VALUE = 0x1 +# StatusCode +STATUSCODE_OK = 0x0 +STATUSCODE_TRY_AGAIN = 0x1 +STATUSCODE_INVALID_ARG = 0x2 +STATUSCODE_NOT_AVAILABLE = 0x3 +STATUSCODE_ACCESS_DENIED = 0x4 +STATUSCODE_INTERNAL_ERROR = 0x5 -# VehicleAudioFocusIndex -VEHICLEAUDIOFOCUSINDEX_FOCUS = 0x0 -VEHICLEAUDIOFOCUSINDEX_STREAMS = 0x1 -VEHICLEAUDIOFOCUSINDEX_EXTERNAL_FOCUS_STATE = 0x2 -VEHICLEAUDIOFOCUSINDEX_AUDIO_CONTEXTS = 0x3 +# VehicleAudioExtFocusFlag +VEHICLEAUDIOEXTFOCUSFLAG_NONE_FLAG = 0x0 +VEHICLEAUDIOEXTFOCUSFLAG_PERMANENT_FLAG = 0x1 +VEHICLEAUDIOEXTFOCUSFLAG_TRANSIENT_FLAG = 0x2 +VEHICLEAUDIOEXTFOCUSFLAG_PLAY_ONLY_FLAG = 0x4 +VEHICLEAUDIOEXTFOCUSFLAG_MUTE_MEDIA_FLAG = 0x8 # VehicleProperty VEHICLEPROPERTY_INVALID = 0x0 @@ -148,65 +225,13 @@ VEHICLEPROPERTY_WINDOW_VENT_POS = 0x11400bc2 VEHICLEPROPERTY_WINDOW_VENT_MOVE = 0x11400bc3 VEHICLEPROPERTY_WINDOW_LOCK = 0x11200bc4 -# VehicleAreaZone -VEHICLEAREAZONE_ROW_1_LEFT = 0x1 -VEHICLEAREAZONE_ROW_1_CENTER = 0x2 -VEHICLEAREAZONE_ROW_1_RIGHT = 0x4 -VEHICLEAREAZONE_ROW_1 = 0x8 -VEHICLEAREAZONE_ROW_2_LEFT = 0x10 -VEHICLEAREAZONE_ROW_2_CENTER = 0x20 -VEHICLEAREAZONE_ROW_2_RIGHT = 0x40 -VEHICLEAREAZONE_ROW_2 = 0x80 -VEHICLEAREAZONE_ROW_3_LEFT = 0x100 -VEHICLEAREAZONE_ROW_3_CENTER = 0x200 -VEHICLEAREAZONE_ROW_3_RIGHT = 0x400 -VEHICLEAREAZONE_ROW_3 = 0x800 -VEHICLEAREAZONE_ROW_4_LEFT = 0x1000 -VEHICLEAREAZONE_ROW_4_CENTER = 0x2000 -VEHICLEAREAZONE_ROW_4_RIGHT = 0x4000 -VEHICLEAREAZONE_ROW_4 = 0x8000 -VEHICLEAREAZONE_WHOLE_CABIN = 0x80000000 - -# SubscribeFlags -SUBSCRIBEFLAGS_UNDEFINED = 0x0 -SUBSCRIBEFLAGS_HAL_EVENT = 0x1 -SUBSCRIBEFLAGS_SET_CALL = 0x2 -SUBSCRIBEFLAGS_DEFAULT = 0x1 - -# Wheel -WHEEL_UNKNOWN = 0x0 -WHEEL_LEFT_FRONT = 0x1 -WHEEL_RIGHT_FRONT = 0x2 -WHEEL_LEFT_REAR = 0x4 -WHEEL_RIGHT_REAR = 0x8 - -# StatusCode -STATUSCODE_OK = 0x0 -STATUSCODE_TRY_AGAIN = 0x1 -STATUSCODE_INVALID_ARG = 0x2 -STATUSCODE_NOT_AVAILABLE = 0x3 -STATUSCODE_ACCESS_DENIED = 0x4 -STATUSCODE_INTERNAL_ERROR = 0x5 - -# VehicleAudioHwVariantConfigFlag -VEHICLEAUDIOHWVARIANTCONFIGFLAG_INTERNAL_RADIO_FLAG = 0x1 - -# VehiclePropertyGroup -VEHICLEPROPERTYGROUP_SYSTEM = 0x10000000 -VEHICLEPROPERTYGROUP_VENDOR = 0x20000000 -VEHICLEPROPERTYGROUP_MASK = 0xf0000000 - -# VehicleAudioStreamFlag -VEHICLEAUDIOSTREAMFLAG_STREAM0_FLAG = 0x1 -VEHICLEAUDIOSTREAMFLAG_STREAM1_FLAG = 0x2 -VEHICLEAUDIOSTREAMFLAG_STREAM2_FLAG = 0x4 - -# VehiclePropertyChangeMode -VEHICLEPROPERTYCHANGEMODE_STATIC = 0x0 -VEHICLEPROPERTYCHANGEMODE_ON_CHANGE = 0x1 -VEHICLEPROPERTYCHANGEMODE_CONTINUOUS = 0x2 -VEHICLEPROPERTYCHANGEMODE_POLL = 0x3 -VEHICLEPROPERTYCHANGEMODE_ON_SET = 0x4 +# VehicleDrivingStatus +VEHICLEDRIVINGSTATUS_UNRESTRICTED = 0x0 +VEHICLEDRIVINGSTATUS_NO_VIDEO = 0x1 +VEHICLEDRIVINGSTATUS_NO_KEYBOARD_INPUT = 0x2 +VEHICLEDRIVINGSTATUS_NO_VOICE_INPUT = 0x4 +VEHICLEDRIVINGSTATUS_NO_CONFIG = 0x8 +VEHICLEDRIVINGSTATUS_LIMIT_MESSAGE_LEN = 0x10 # VehicleAreaSeat VEHICLEAREASEAT_ROW_1_LEFT = 0x1 @@ -219,61 +244,18 @@ VEHICLEAREASEAT_ROW_3_LEFT = 0x100 VEHICLEAREASEAT_ROW_3_CENTER = 0x200 VEHICLEAREASEAT_ROW_3_RIGHT = 0x400 -# VehicleAudioVolumeIndex -VEHICLEAUDIOVOLUMEINDEX_INDEX_STREAM = 0x0 -VEHICLEAUDIOVOLUMEINDEX_INDEX_VOLUME = 0x1 -VEHICLEAUDIOVOLUMEINDEX_INDEX_STATE = 0x2 - -# VehicleUnit -VEHICLEUNIT_SHOULD_NOT_USE = 0x0 -VEHICLEUNIT_METER_PER_SEC = 0x1 -VEHICLEUNIT_RPM = 0x2 -VEHICLEUNIT_HERTZ = 0x3 -VEHICLEUNIT_PERCENTILE = 0x10 -VEHICLEUNIT_MILLIMETER = 0x20 -VEHICLEUNIT_METER = 0x21 -VEHICLEUNIT_KILOMETER = 0x23 -VEHICLEUNIT_CELSIUS = 0x30 -VEHICLEUNIT_FAHRENHEIT = 0x31 -VEHICLEUNIT_KELVIN = 0x32 -VEHICLEUNIT_MILLILITER = 0x40 -VEHICLEUNIT_NANO_SECS = 0x50 -VEHICLEUNIT_SECS = 0x53 -VEHICLEUNIT_YEAR = 0x59 - -# VehicleAreaMirror -VEHICLEAREAMIRROR_DRIVER_LEFT = 0x1 -VEHICLEAREAMIRROR_DRIVER_RIGHT = 0x2 -VEHICLEAREAMIRROR_DRIVER_CENTER = 0x4 - -# VehiclePropertyAccess -VEHICLEPROPERTYACCESS_NONE = 0x0 -VEHICLEPROPERTYACCESS_READ = 0x1 -VEHICLEPROPERTYACCESS_WRITE = 0x2 -VEHICLEPROPERTYACCESS_READ_WRITE = 0x3 +# VehicleRadioConstants +VEHICLERADIOCONSTANTS_VEHICLE_RADIO_PRESET_MIN_VALUE = 0x1 -# VehicleAudioContextFlag -VEHICLEAUDIOCONTEXTFLAG_MUSIC_FLAG = 0x1 -VEHICLEAUDIOCONTEXTFLAG_NAVIGATION_FLAG = 0x2 -VEHICLEAUDIOCONTEXTFLAG_VOICE_COMMAND_FLAG = 0x4 -VEHICLEAUDIOCONTEXTFLAG_CALL_FLAG = 0x8 -VEHICLEAUDIOCONTEXTFLAG_ALARM_FLAG = 0x10 -VEHICLEAUDIOCONTEXTFLAG_NOTIFICATION_FLAG = 0x20 -VEHICLEAUDIOCONTEXTFLAG_UNKNOWN_FLAG = 0x40 -VEHICLEAUDIOCONTEXTFLAG_SAFETY_ALERT_FLAG = 0x80 -VEHICLEAUDIOCONTEXTFLAG_CD_ROM_FLAG = 0x100 -VEHICLEAUDIOCONTEXTFLAG_AUX_AUDIO_FLAG = 0x200 -VEHICLEAUDIOCONTEXTFLAG_SYSTEM_SOUND_FLAG = 0x400 -VEHICLEAUDIOCONTEXTFLAG_RADIO_FLAG = 0x800 -VEHICLEAUDIOCONTEXTFLAG_EXT_SOURCE_FLAG = 0x1000 +# VehicleAudioFocusIndex +VEHICLEAUDIOFOCUSINDEX_FOCUS = 0x0 +VEHICLEAUDIOFOCUSINDEX_STREAMS = 0x1 +VEHICLEAUDIOFOCUSINDEX_EXTERNAL_FOCUS_STATE = 0x2 +VEHICLEAUDIOFOCUSINDEX_AUDIO_CONTEXTS = 0x3 -# VehicleDrivingStatus -VEHICLEDRIVINGSTATUS_UNRESTRICTED = 0x0 -VEHICLEDRIVINGSTATUS_NO_VIDEO = 0x1 -VEHICLEDRIVINGSTATUS_NO_KEYBOARD_INPUT = 0x2 -VEHICLEDRIVINGSTATUS_NO_VOICE_INPUT = 0x4 -VEHICLEDRIVINGSTATUS_NO_CONFIG = 0x8 -VEHICLEDRIVINGSTATUS_LIMIT_MESSAGE_LEN = 0x10 +# VehicleAudioVolumeLimitIndex +VEHICLEAUDIOVOLUMELIMITINDEX_STREAM = 0x0 +VEHICLEAUDIOVOLUMELIMITINDEX_MAX_VOLUME = 0x1 # VehicleGear VEHICLEGEAR_GEAR_NEUTRAL = 0x1 @@ -291,64 +273,74 @@ VEHICLEGEAR_GEAR_7 = 0x400 VEHICLEGEAR_GEAR_8 = 0x800 VEHICLEGEAR_GEAR_9 = 0x1000 -# VehicleTurnSignal -VEHICLETURNSIGNAL_NONE = 0x0 -VEHICLETURNSIGNAL_RIGHT = 0x1 -VEHICLETURNSIGNAL_LEFT = 0x2 -VEHICLETURNSIGNAL_EMERGENCY = 0x4 +# VehicleDisplay +VEHICLEDISPLAY_MAIN = 0x0 +VEHICLEDISPLAY_INSTRUMENT_CLUSTER = 0x1 -# VehicleApPowerStateShutdownParam -VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_IMMEDIATELY = 0x1 -VEHICLEAPPOWERSTATESHUTDOWNPARAM_CAN_SLEEP = 0x2 -VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_ONLY = 0x3 +# VehicleAudioRoutingPolicyIndex +VEHICLEAUDIOROUTINGPOLICYINDEX_STREAM = 0x0 +VEHICLEAUDIOROUTINGPOLICYINDEX_CONTEXTS = 0x1 -# VehiclePropertyOperation -VEHICLEPROPERTYOPERATION_GENERIC = 0x0 -VEHICLEPROPERTYOPERATION_SET = 0x1 -VEHICLEPROPERTYOPERATION_GET = 0x2 -VEHICLEPROPERTYOPERATION_SUBSCRIBE = 0x3 +# VehicleAreaMirror +VEHICLEAREAMIRROR_DRIVER_LEFT = 0x1 +VEHICLEAREAMIRROR_DRIVER_RIGHT = 0x2 +VEHICLEAREAMIRROR_DRIVER_CENTER = 0x4 -# VehiclePropertyType -VEHICLEPROPERTYTYPE_STRING = 0x100000 -VEHICLEPROPERTYTYPE_BOOLEAN = 0x200000 -VEHICLEPROPERTYTYPE_INT32 = 0x400000 -VEHICLEPROPERTYTYPE_INT32_VEC = 0x410000 -VEHICLEPROPERTYTYPE_INT64 = 0x500000 -VEHICLEPROPERTYTYPE_FLOAT = 0x600000 -VEHICLEPROPERTYTYPE_FLOAT_VEC = 0x610000 -VEHICLEPROPERTYTYPE_BYTES = 0x700000 -VEHICLEPROPERTYTYPE_COMPLEX = 0xe00000 -VEHICLEPROPERTYTYPE_MASK = 0xff0000 +# VehicleInstrumentClusterType +VEHICLEINSTRUMENTCLUSTERTYPE_NONE = 0x0 +VEHICLEINSTRUMENTCLUSTERTYPE_HAL_INTERFACE = 0x1 +VEHICLEINSTRUMENTCLUSTERTYPE_EXTERNAL_DISPLAY = 0x2 -# VehicleAreaDoor -VEHICLEAREADOOR_ROW_1_LEFT = 0x1 -VEHICLEAREADOOR_ROW_1_RIGHT = 0x4 -VEHICLEAREADOOR_ROW_2_LEFT = 0x10 -VEHICLEAREADOOR_ROW_2_RIGHT = 0x40 -VEHICLEAREADOOR_ROW_3_LEFT = 0x100 -VEHICLEAREADOOR_ROW_3_RIGHT = 0x400 -VEHICLEAREADOOR_HOOD = 0x10000000 -VEHICLEAREADOOR_REAR = 0x20000000 +# VehicleAreaZone +VEHICLEAREAZONE_ROW_1_LEFT = 0x1 +VEHICLEAREAZONE_ROW_1_CENTER = 0x2 +VEHICLEAREAZONE_ROW_1_RIGHT = 0x4 +VEHICLEAREAZONE_ROW_1 = 0x8 +VEHICLEAREAZONE_ROW_2_LEFT = 0x10 +VEHICLEAREAZONE_ROW_2_CENTER = 0x20 +VEHICLEAREAZONE_ROW_2_RIGHT = 0x40 +VEHICLEAREAZONE_ROW_2 = 0x80 +VEHICLEAREAZONE_ROW_3_LEFT = 0x100 +VEHICLEAREAZONE_ROW_3_CENTER = 0x200 +VEHICLEAREAZONE_ROW_3_RIGHT = 0x400 +VEHICLEAREAZONE_ROW_3 = 0x800 +VEHICLEAREAZONE_ROW_4_LEFT = 0x1000 +VEHICLEAREAZONE_ROW_4_CENTER = 0x2000 +VEHICLEAREAZONE_ROW_4_RIGHT = 0x4000 +VEHICLEAREAZONE_ROW_4 = 0x8000 +VEHICLEAREAZONE_WHOLE_CABIN = 0x80000000 + +# VehicleApPowerState +VEHICLEAPPOWERSTATE_OFF = 0x0 +VEHICLEAPPOWERSTATE_DEEP_SLEEP = 0x1 +VEHICLEAPPOWERSTATE_ON_DISP_OFF = 0x2 +VEHICLEAPPOWERSTATE_ON_FULL = 0x3 +VEHICLEAPPOWERSTATE_SHUTDOWN_PREPARE = 0x4 # VehicleHwKeyInputAction VEHICLEHWKEYINPUTACTION_ACTION_DOWN = 0x0 VEHICLEHWKEYINPUTACTION_ACTION_UP = 0x1 +# VehicleAudioStream +VEHICLEAUDIOSTREAM_STREAM0 = 0x0 +VEHICLEAUDIOSTREAM_STREAM1 = 0x1 + # VehicleApPowerStateConfigFlag VEHICLEAPPOWERSTATECONFIGFLAG_ENABLE_DEEP_SLEEP_FLAG = 0x1 VEHICLEAPPOWERSTATECONFIGFLAG_CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2 -# VehicleIgnitionState -VEHICLEIGNITIONSTATE_UNDEFINED = 0x0 -VEHICLEIGNITIONSTATE_LOCK = 0x1 -VEHICLEIGNITIONSTATE_OFF = 0x2 -VEHICLEIGNITIONSTATE_ACC = 0x3 -VEHICLEIGNITIONSTATE_ON = 0x4 -VEHICLEIGNITIONSTATE_START = 0x5 +# VehicleTurnSignal +VEHICLETURNSIGNAL_NONE = 0x0 +VEHICLETURNSIGNAL_RIGHT = 0x1 +VEHICLETURNSIGNAL_LEFT = 0x2 +VEHICLETURNSIGNAL_EMERGENCY = 0x4 -# VehicleAudioVolumeLimitIndex -VEHICLEAUDIOVOLUMELIMITINDEX_STREAM = 0x0 -VEHICLEAUDIOVOLUMELIMITINDEX_MAX_VOLUME = 0x1 +# VehiclePropertyChangeMode +VEHICLEPROPERTYCHANGEMODE_STATIC = 0x0 +VEHICLEPROPERTYCHANGEMODE_ON_CHANGE = 0x1 +VEHICLEPROPERTYCHANGEMODE_CONTINUOUS = 0x2 +VEHICLEPROPERTYCHANGEMODE_POLL = 0x3 +VEHICLEPROPERTYCHANGEMODE_ON_SET = 0x4 # VehicleAreaWindow VEHICLEAREAWINDOW_FRONT_WINDSHIELD = 0x1 @@ -361,61 +353,6 @@ VEHICLEAREAWINDOW_ROW_2_RIGHT = 0x200 VEHICLEAREAWINDOW_ROW_3_LEFT = 0x1000 VEHICLEAREAWINDOW_ROW_3_RIGHT = 0x2000 -# VehicleAudioFocusState -VEHICLEAUDIOFOCUSSTATE_STATE_GAIN = 0x1 -VEHICLEAUDIOFOCUSSTATE_STATE_GAIN_TRANSIENT = 0x2 -VEHICLEAUDIOFOCUSSTATE_STATE_LOSS_TRANSIENT_CAN_DUCK = 0x3 -VEHICLEAUDIOFOCUSSTATE_STATE_LOSS_TRANSIENT = 0x4 -VEHICLEAUDIOFOCUSSTATE_STATE_LOSS = 0x5 -VEHICLEAUDIOFOCUSSTATE_STATE_LOSS_TRANSIENT_EXLCUSIVE = 0x6 - -# VehicleAudioVolumeCapabilityFlag -VEHICLEAUDIOVOLUMECAPABILITYFLAG_PERSISTENT_STORAGE = 0x1 -VEHICLEAUDIOVOLUMECAPABILITYFLAG_MASTER_VOLUME_ONLY = 0x2 - -# VehicleApPowerState -VEHICLEAPPOWERSTATE_OFF = 0x0 -VEHICLEAPPOWERSTATE_DEEP_SLEEP = 0x1 -VEHICLEAPPOWERSTATE_ON_DISP_OFF = 0x2 -VEHICLEAPPOWERSTATE_ON_FULL = 0x3 -VEHICLEAPPOWERSTATE_SHUTDOWN_PREPARE = 0x4 - -# VehicleAudioVolumeState -VEHICLEAUDIOVOLUMESTATE_STATE_OK = 0x0 -VEHICLEAUDIOVOLUMESTATE_LIMIT_REACHED = 0x1 - -# VehicleAudioRoutingPolicyIndex -VEHICLEAUDIOROUTINGPOLICYINDEX_STREAM = 0x0 -VEHICLEAUDIOROUTINGPOLICYINDEX_CONTEXTS = 0x1 - -# VehicleAudioStream -VEHICLEAUDIOSTREAM_STREAM0 = 0x0 -VEHICLEAUDIOSTREAM_STREAM1 = 0x1 - -# VehicleInstrumentClusterType -VEHICLEINSTRUMENTCLUSTERTYPE_NONE = 0x0 -VEHICLEINSTRUMENTCLUSTERTYPE_HAL_INTERFACE = 0x1 -VEHICLEINSTRUMENTCLUSTERTYPE_EXTERNAL_DISPLAY = 0x2 - -# VehicleAudioExtFocusFlag -VEHICLEAUDIOEXTFOCUSFLAG_NONE_FLAG = 0x0 -VEHICLEAUDIOEXTFOCUSFLAG_PERMANENT_FLAG = 0x1 -VEHICLEAUDIOEXTFOCUSFLAG_TRANSIENT_FLAG = 0x2 -VEHICLEAUDIOEXTFOCUSFLAG_PLAY_ONLY_FLAG = 0x4 -VEHICLEAUDIOEXTFOCUSFLAG_MUTE_MEDIA_FLAG = 0x8 - -# VehicleHvacFanDirection -VEHICLEHVACFANDIRECTION_FACE = 0x1 -VEHICLEHVACFANDIRECTION_FLOOR = 0x2 -VEHICLEHVACFANDIRECTION_FACE_AND_FLOOR = 0x3 -VEHICLEHVACFANDIRECTION_DEFROST = 0x4 -VEHICLEHVACFANDIRECTION_DEFROST_AND_FLOOR = 0x5 - -# VehicleApPowerBootupReason -VEHICLEAPPOWERBOOTUPREASON_USER_POWER_ON = 0x0 -VEHICLEAPPOWERBOOTUPREASON_USER_UNLOCK = 0x1 -VEHICLEAPPOWERBOOTUPREASON_TIMER = 0x2 - # VehicleArea VEHICLEAREA_GLOBAL = 0x1000000 VEHICLEAREA_ZONE = 0x2000000 @@ -425,6 +362,69 @@ VEHICLEAREA_SEAT = 0x5000000 VEHICLEAREA_DOOR = 0x6000000 VEHICLEAREA_MASK = 0xf000000 +# VehicleApPowerBootupReason +VEHICLEAPPOWERBOOTUPREASON_USER_POWER_ON = 0x0 +VEHICLEAPPOWERBOOTUPREASON_USER_UNLOCK = 0x1 +VEHICLEAPPOWERBOOTUPREASON_TIMER = 0x2 + +# VehicleAreaDoor +VEHICLEAREADOOR_ROW_1_LEFT = 0x1 +VEHICLEAREADOOR_ROW_1_RIGHT = 0x4 +VEHICLEAREADOOR_ROW_2_LEFT = 0x10 +VEHICLEAREADOOR_ROW_2_RIGHT = 0x40 +VEHICLEAREADOOR_ROW_3_LEFT = 0x100 +VEHICLEAREADOOR_ROW_3_RIGHT = 0x400 +VEHICLEAREADOOR_HOOD = 0x10000000 +VEHICLEAREADOOR_REAR = 0x20000000 + +# VehiclePropertyGroup +VEHICLEPROPERTYGROUP_SYSTEM = 0x10000000 +VEHICLEPROPERTYGROUP_VENDOR = 0x20000000 +VEHICLEPROPERTYGROUP_MASK = 0xf0000000 + +# VehicleAudioFocusRequest +VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN = 0x1 +VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN_TRANSIENT = 0x2 +VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN_TRANSIENT_MAY_DUCK = 0x3 +VEHICLEAUDIOFOCUSREQUEST_REQUEST_GAIN_TRANSIENT_NO_DUCK = 0x4 +VEHICLEAUDIOFOCUSREQUEST_REQUEST_RELEASE = 0x5 + +# VehiclePropertyType +VEHICLEPROPERTYTYPE_STRING = 0x100000 +VEHICLEPROPERTYTYPE_BOOLEAN = 0x200000 +VEHICLEPROPERTYTYPE_INT32 = 0x400000 +VEHICLEPROPERTYTYPE_INT32_VEC = 0x410000 +VEHICLEPROPERTYTYPE_INT64 = 0x500000 +VEHICLEPROPERTYTYPE_FLOAT = 0x600000 +VEHICLEPROPERTYTYPE_FLOAT_VEC = 0x610000 +VEHICLEPROPERTYTYPE_BYTES = 0x700000 +VEHICLEPROPERTYTYPE_COMPLEX = 0xe00000 +VEHICLEPROPERTYTYPE_MASK = 0xff0000 + +# VehicleAudioVolumeState +VEHICLEAUDIOVOLUMESTATE_STATE_OK = 0x0 +VEHICLEAUDIOVOLUMESTATE_LIMIT_REACHED = 0x1 + +# VehicleUnit +VEHICLEUNIT_SHOULD_NOT_USE = 0x0 +VEHICLEUNIT_METER_PER_SEC = 0x1 +VEHICLEUNIT_RPM = 0x2 +VEHICLEUNIT_HERTZ = 0x3 +VEHICLEUNIT_PERCENTILE = 0x10 +VEHICLEUNIT_MILLIMETER = 0x20 +VEHICLEUNIT_METER = 0x21 +VEHICLEUNIT_KILOMETER = 0x23 +VEHICLEUNIT_CELSIUS = 0x30 +VEHICLEUNIT_FAHRENHEIT = 0x31 +VEHICLEUNIT_KELVIN = 0x32 +VEHICLEUNIT_MILLILITER = 0x40 +VEHICLEUNIT_NANO_SECS = 0x50 +VEHICLEUNIT_SECS = 0x53 +VEHICLEUNIT_YEAR = 0x59 + +# VehicleAudioHwVariantConfigFlag +VEHICLEAUDIOHWVARIANTCONFIGFLAG_INTERNAL_RADIO_FLAG = 0x1 + # Create a container of value_type constants to be used by vhal_emulator class vhal_types_2_0: TYPE_STRING = [VEHICLEPROPERTYTYPE_STRING] diff --git a/tools/emulator/vhal_consts_2_1.py b/tools/emulator/vhal_consts_2_1.py index d367b85896..49d892d01a 100644 --- a/tools/emulator/vhal_consts_2_1.py +++ b/tools/emulator/vhal_consts_2_1.py @@ -16,223 +16,169 @@ # This file was autogenerated by vhal_const_generate.py from vhal_consts_2_0 import * -# FuelType -FUELTYPE_NOT_AVAILABLE = 0x0 -FUELTYPE_GASOLINE = 0x1 -FUELTYPE_METHANOL = 0x2 -FUELTYPE_ETHANOL = 0x3 -FUELTYPE_DIESEL = 0x4 -FUELTYPE_LPG = 0x5 -FUELTYPE_CNG = 0x6 -FUELTYPE_PROPANE = 0x7 -FUELTYPE_ELECTRIC = 0x8 -FUELTYPE_BIFUEL_RUNNING_GASOLINE = 0x9 -FUELTYPE_BIFUEL_RUNNING_METHANOL = 0xa -FUELTYPE_BIFUEL_RUNNING_ETHANOL = 0xb -FUELTYPE_BIFUEL_RUNNING_LPG = 0xc -FUELTYPE_BIFUEL_RUNNING_CNG = 0xd -FUELTYPE_BIFUEL_RUNNING_PROPANE = 0xe -FUELTYPE_BIFUEL_RUNNING_ELECTRIC = 0xf -FUELTYPE_BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 0x10 -FUELTYPE_HYBRID_GASOLINE = 0x11 -FUELTYPE_HYBRID_ETHANOL = 0x12 -FUELTYPE_HYBRID_DIESEL = 0x13 -FUELTYPE_HYBRID_ELECTRIC = 0x14 -FUELTYPE_HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 0x15 -FUELTYPE_HYBRID_REGENERATIVE = 0x16 -FUELTYPE_BIFUEL_RUNNING_DIESEL = 0x17 +# VmsMessageWithLayerAndPublisherIdIntegerValuesIndex +VMSMESSAGEWITHLAYERANDPUBLISHERIDINTEGERVALUESINDEX_PUBLISHER_ID = 0x4 -# VmsBaseMessageIntegerValuesIndex -VMSBASEMESSAGEINTEGERVALUESINDEX_VMS_MESSAGE_TYPE = 0x0 +# VmsAvailabilityStateIntegerValuesIndex +VMSAVAILABILITYSTATEINTEGERVALUESINDEX_SEQUENCE_NUMBER = 0x1 +VMSAVAILABILITYSTATEINTEGERVALUESINDEX_NUMBER_OF_ASSOCIATED_LAYERS = 0x2 +VMSAVAILABILITYSTATEINTEGERVALUESINDEX_LAYERS_START = 0x3 + +# VmsSubscriptionsStateIntegerValuesIndex +VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_SEQUENCE_NUMBER = 0x1 +VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_NUMBER_OF_LAYERS = 0x2 +VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_NUMBER_OF_ASSOCIATED_LAYERS = 0x3 +VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_SUBSCRIPTIONS_START = 0x4 -# SparkIgnitionMonitors -SPARKIGNITIONMONITORS_EGR_AVAILABLE = 0x40 -SPARKIGNITIONMONITORS_EGR_INCOMPLETE = 0x80 -SPARKIGNITIONMONITORS_OXYGEN_SENSOR_HEATER_AVAILABLE = 0x100 -SPARKIGNITIONMONITORS_OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x200 -SPARKIGNITIONMONITORS_OXYGEN_SENSOR_AVAILABLE = 0x400 -SPARKIGNITIONMONITORS_OXYGEN_SENSOR_INCOMPLETE = 0x800 -SPARKIGNITIONMONITORS_AC_REFRIGERANT_AVAILABLE = 0x1000 -SPARKIGNITIONMONITORS_AC_REFRIGERANT_INCOMPLETE = 0x2000 -SPARKIGNITIONMONITORS_SECONDARY_AIR_SYSTEM_AVAILABLE = 0x4000 -SPARKIGNITIONMONITORS_SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x8000 -SPARKIGNITIONMONITORS_EVAPORATIVE_SYSTEM_AVAILABLE = 0x10000 -SPARKIGNITIONMONITORS_EVAPORATIVE_SYSTEM_INCOMPLETE = 0x20000 -SPARKIGNITIONMONITORS_HEATED_CATALYST_AVAILABLE = 0x40000 -SPARKIGNITIONMONITORS_HEATED_CATALYST_INCOMPLETE = 0x80000 -SPARKIGNITIONMONITORS_CATALYST_AVAILABLE = 0x100000 -SPARKIGNITIONMONITORS_CATALYST_INCOMPLETE = 0x200000 +# Obd2IgnitionMonitorKind +OBD2IGNITIONMONITORKIND_SPARK = 0x0 +OBD2IGNITIONMONITORKIND_COMPRESSION = 0x1 -# Obd2FloatSensorIndex -OBD2FLOATSENSORINDEX_CALCULATED_ENGINE_LOAD = 0x0 -OBD2FLOATSENSORINDEX_ENGINE_COOLANT_TEMPERATURE = 0x1 -OBD2FLOATSENSORINDEX_SHORT_TERM_FUEL_TRIM_BANK1 = 0x2 -OBD2FLOATSENSORINDEX_LONG_TERM_FUEL_TRIM_BANK1 = 0x3 -OBD2FLOATSENSORINDEX_SHORT_TERM_FUEL_TRIM_BANK2 = 0x4 -OBD2FLOATSENSORINDEX_LONG_TERM_FUEL_TRIM_BANK2 = 0x5 -OBD2FLOATSENSORINDEX_FUEL_PRESSURE = 0x6 -OBD2FLOATSENSORINDEX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 0x7 -OBD2FLOATSENSORINDEX_ENGINE_RPM = 0x8 -OBD2FLOATSENSORINDEX_VEHICLE_SPEED = 0x9 -OBD2FLOATSENSORINDEX_TIMING_ADVANCE = 0xa -OBD2FLOATSENSORINDEX_MAF_AIR_FLOW_RATE = 0xb -OBD2FLOATSENSORINDEX_THROTTLE_POSITION = 0xc -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR1_VOLTAGE = 0xd -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 0xe -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 0xf -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR2_VOLTAGE = 0x10 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 0x11 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 0x12 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR3_VOLTAGE = 0x13 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 0x14 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 0x15 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR4_VOLTAGE = 0x16 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 0x17 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 0x18 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR5_VOLTAGE = 0x19 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 0x1a -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 0x1b -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR6_VOLTAGE = 0x1c -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 0x1d -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 0x1e -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR7_VOLTAGE = 0x1f -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 0x20 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 0x21 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR8_VOLTAGE = 0x22 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 0x23 -OBD2FLOATSENSORINDEX_OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 0x24 -OBD2FLOATSENSORINDEX_FUEL_RAIL_PRESSURE = 0x25 -OBD2FLOATSENSORINDEX_FUEL_RAIL_GAUGE_PRESSURE = 0x26 -OBD2FLOATSENSORINDEX_COMMANDED_EXHAUST_GAS_RECIRCULATION = 0x27 -OBD2FLOATSENSORINDEX_EXHAUST_GAS_RECIRCULATION_ERROR = 0x28 -OBD2FLOATSENSORINDEX_COMMANDED_EVAPORATIVE_PURGE = 0x29 -OBD2FLOATSENSORINDEX_FUEL_TANK_LEVEL_INPUT = 0x2a -OBD2FLOATSENSORINDEX_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 0x2b -OBD2FLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK1_SENSOR1 = 0x2c -OBD2FLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK2_SENSOR1 = 0x2d -OBD2FLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK1_SENSOR2 = 0x2e -OBD2FLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK2_SENSOR2 = 0x2f -OBD2FLOATSENSORINDEX_ABSOLUTE_LOAD_VALUE = 0x30 -OBD2FLOATSENSORINDEX_FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 0x31 -OBD2FLOATSENSORINDEX_RELATIVE_THROTTLE_POSITION = 0x32 -OBD2FLOATSENSORINDEX_ABSOLUTE_THROTTLE_POSITION_B = 0x33 -OBD2FLOATSENSORINDEX_ABSOLUTE_THROTTLE_POSITION_C = 0x34 -OBD2FLOATSENSORINDEX_ACCELERATOR_PEDAL_POSITION_D = 0x35 -OBD2FLOATSENSORINDEX_ACCELERATOR_PEDAL_POSITION_E = 0x36 -OBD2FLOATSENSORINDEX_ACCELERATOR_PEDAL_POSITION_F = 0x37 -OBD2FLOATSENSORINDEX_COMMANDED_THROTTLE_ACTUATOR = 0x38 -OBD2FLOATSENSORINDEX_ETHANOL_FUEL_PERCENTAGE = 0x39 -OBD2FLOATSENSORINDEX_ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 0x3a -OBD2FLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 0x3b -OBD2FLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 0x3c -OBD2FLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 0x3d -OBD2FLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 0x3e -OBD2FLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 0x3f -OBD2FLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 0x40 -OBD2FLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 0x41 -OBD2FLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 0x42 -OBD2FLOATSENSORINDEX_RELATIVE_ACCELERATOR_PEDAL_POSITION = 0x43 -OBD2FLOATSENSORINDEX_HYBRID_BATTERY_PACK_REMAINING_LIFE = 0x44 -OBD2FLOATSENSORINDEX_FUEL_INJECTION_TIMING = 0x45 -OBD2FLOATSENSORINDEX_ENGINE_FUEL_RATE = 0x46 -OBD2FLOATSENSORINDEX_LAST_SYSTEM_INDEX = 0x46 +# VmsOfferingMessageIntegerValuesIndex +VMSOFFERINGMESSAGEINTEGERVALUESINDEX_PUBLISHER_ID = 0x1 +VMSOFFERINGMESSAGEINTEGERVALUESINDEX_NUMBER_OF_OFFERS = 0x2 +VMSOFFERINGMESSAGEINTEGERVALUESINDEX_OFFERING_START = 0x3 -# CommonIgnitionMonitors -COMMONIGNITIONMONITORS_COMPONENTS_AVAILABLE = 0x1 -COMMONIGNITIONMONITORS_COMPONENTS_INCOMPLETE = 0x2 -COMMONIGNITIONMONITORS_FUEL_SYSTEM_AVAILABLE = 0x4 -COMMONIGNITIONMONITORS_FUEL_SYSTEM_INCOMPLETE = 0x8 -COMMONIGNITIONMONITORS_MISFIRE_AVAILABLE = 0x10 -COMMONIGNITIONMONITORS_MISFIRE_INCOMPLETE = 0x20 +# VehicleProperty +VEHICLEPROPERTY_WHEEL_TICK = 0x11e00306 +VEHICLEPROPERTY_ABS_ACTIVE = 0x1120040a +VEHICLEPROPERTY_TRACTION_CONTROL_ACTIVE = 0x1120040b +VEHICLEPROPERTY_HVAC_AUTO_RECIRC_ON = 0x12200512 +VEHICLEPROPERTY_VEHICLE_MAP_SERVICE = 0x11e00c00 +VEHICLEPROPERTY_OBD2_LIVE_FRAME = 0x11e00d00 +VEHICLEPROPERTY_OBD2_FREEZE_FRAME = 0x11e00d01 +VEHICLEPROPERTY_OBD2_FREEZE_FRAME_INFO = 0x11e00d02 +VEHICLEPROPERTY_OBD2_FREEZE_FRAME_CLEAR = 0x11e00d03 -# IgnitionMonitorKind -IGNITIONMONITORKIND_SPARK = 0x0 -IGNITIONMONITORKIND_COMPRESSION = 0x1 +# VmsMessageWithLayerIntegerValuesIndex +VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_TYPE = 0x1 +VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_SUBTYPE = 0x2 +VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_VERSION = 0x3 -# SecondaryAirStatus -SECONDARYAIRSTATUS_UPSTREAM = 0x1 -SECONDARYAIRSTATUS_DOWNSTREAM_OF_CATALYCIC_CONVERTER = 0x2 -SECONDARYAIRSTATUS_FROM_OUTSIDE_OR_OFF = 0x4 -SECONDARYAIRSTATUS_PUMP_ON_FOR_DIAGNOSTICS = 0x8 +# Obd2CompressionIgnitionMonitors +OBD2COMPRESSIONIGNITIONMONITORS_EGR_OR_VVT_AVAILABLE = 0x40 +OBD2COMPRESSIONIGNITIONMONITORS_EGR_OR_VVT_INCOMPLETE = 0x80 +OBD2COMPRESSIONIGNITIONMONITORS_PM_FILTER_AVAILABLE = 0x100 +OBD2COMPRESSIONIGNITIONMONITORS_PM_FILTER_INCOMPLETE = 0x200 +OBD2COMPRESSIONIGNITIONMONITORS_EXHAUST_GAS_SENSOR_AVAILABLE = 0x400 +OBD2COMPRESSIONIGNITIONMONITORS_EXHAUST_GAS_SENSOR_INCOMPLETE = 0x800 +OBD2COMPRESSIONIGNITIONMONITORS_BOOST_PRESSURE_AVAILABLE = 0x1000 +OBD2COMPRESSIONIGNITIONMONITORS_BOOST_PRESSURE_INCOMPLETE = 0x2000 +OBD2COMPRESSIONIGNITIONMONITORS_NOx_SCR__AVAILABLE = 0x4000 +OBD2COMPRESSIONIGNITIONMONITORS_NOx_SCR_INCOMPLETE = 0x8000 +OBD2COMPRESSIONIGNITIONMONITORS_NMHC_CATALYST_AVAILABLE = 0x10000 +OBD2COMPRESSIONIGNITIONMONITORS_NMHC_CATALYST_INCOMPLETE = 0x20000 -# VmsMessageType -VMSMESSAGETYPE_SUBSCRIBE = 0x1 -VMSMESSAGETYPE_UNSUBSCRIBE = 0x2 -VMSMESSAGETYPE_DATA = 0x3 -VMSMESSAGETYPE_OFFERING = 0x4 -VMSMESSAGETYPE_AVAILABILITY_REQUEST = 0x5 -VMSMESSAGETYPE_AVAILABILITY_RESPONSE = 0x6 -VMSMESSAGETYPE_SUBSCRIPTION_REQUEST = 0x7 -VMSMESSAGETYPE_SUBSCRIPTION_RESPONSE = 0x8 +# VmsBaseMessageIntegerValuesIndex +VMSBASEMESSAGEINTEGERVALUESINDEX_MESSAGE_TYPE = 0x0 -# CompressionIgnitionMonitors -COMPRESSIONIGNITIONMONITORS_EGR_OR_VVT_AVAILABLE = 0x40 -COMPRESSIONIGNITIONMONITORS_EGR_OR_VVT_INCOMPLETE = 0x80 -COMPRESSIONIGNITIONMONITORS_PM_FILTER_AVAILABLE = 0x100 -COMPRESSIONIGNITIONMONITORS_PM_FILTER_INCOMPLETE = 0x200 -COMPRESSIONIGNITIONMONITORS_EXHAUST_GAS_SENSOR_AVAILABLE = 0x400 -COMPRESSIONIGNITIONMONITORS_EXHAUST_GAS_SENSOR_INCOMPLETE = 0x800 -COMPRESSIONIGNITIONMONITORS_BOOST_PRESSURE_AVAILABLE = 0x1000 -COMPRESSIONIGNITIONMONITORS_BOOST_PRESSURE_INCOMPLETE = 0x2000 -COMPRESSIONIGNITIONMONITORS_NOx_SCR__AVAILABLE = 0x4000 -COMPRESSIONIGNITIONMONITORS_NOx_SCR_INCOMPLETE = 0x8000 -COMPRESSIONIGNITIONMONITORS_NMHC_CATALYST_AVAILABLE = 0x10000 -COMPRESSIONIGNITIONMONITORS_NMHC_CATALYST_INCOMPLETE = 0x20000 +# Obd2CommonIgnitionMonitors +OBD2COMMONIGNITIONMONITORS_COMPONENTS_AVAILABLE = 0x1 +OBD2COMMONIGNITIONMONITORS_COMPONENTS_INCOMPLETE = 0x2 +OBD2COMMONIGNITIONMONITORS_FUEL_SYSTEM_AVAILABLE = 0x4 +OBD2COMMONIGNITIONMONITORS_FUEL_SYSTEM_INCOMPLETE = 0x8 +OBD2COMMONIGNITIONMONITORS_MISFIRE_AVAILABLE = 0x10 +OBD2COMMONIGNITIONMONITORS_MISFIRE_INCOMPLETE = 0x20 # VehiclePropertyGroup VEHICLEPROPERTYGROUP_SYSTEM = 0x10000000 VEHICLEPROPERTYGROUP_VENDOR = 0x20000000 VEHICLEPROPERTYGROUP_MASK = 0xf0000000 -# Obd2IntegerSensorIndex -OBD2INTEGERSENSORINDEX_FUEL_SYSTEM_STATUS = 0x0 -OBD2INTEGERSENSORINDEX_MALFUNCTION_INDICATOR_LIGHT_ON = 0x1 -OBD2INTEGERSENSORINDEX_IGNITION_MONITORS_SUPPORTED = 0x2 -OBD2INTEGERSENSORINDEX_IGNITION_SPECIFIC_MONITORS = 0x3 -OBD2INTEGERSENSORINDEX_INTAKE_AIR_TEMPERATURE = 0x4 -OBD2INTEGERSENSORINDEX_COMMANDED_SECONDARY_AIR_STATUS = 0x5 -OBD2INTEGERSENSORINDEX_NUM_OXYGEN_SENSORS_PRESENT = 0x6 -OBD2INTEGERSENSORINDEX_RUNTIME_SINCE_ENGINE_START = 0x7 -OBD2INTEGERSENSORINDEX_DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 0x8 -OBD2INTEGERSENSORINDEX_WARMUPS_SINCE_CODES_CLEARED = 0x9 -OBD2INTEGERSENSORINDEX_DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 0xa -OBD2INTEGERSENSORINDEX_ABSOLUTE_BAROMETRIC_PRESSURE = 0xb -OBD2INTEGERSENSORINDEX_CONTROL_MODULE_VOLTAGE = 0xc -OBD2INTEGERSENSORINDEX_AMBIENT_AIR_TEMPERATURE = 0xd -OBD2INTEGERSENSORINDEX_TIME_WITH_MALFUNCTION_LIGHT_ON = 0xe -OBD2INTEGERSENSORINDEX_TIME_SINCE_TROUBLE_CODES_CLEARED = 0xf -OBD2INTEGERSENSORINDEX_MAX_FUEL_AIR_EQUIVALENCE_RATIO = 0x10 -OBD2INTEGERSENSORINDEX_MAX_OXYGEN_SENSOR_VOLTAGE = 0x11 -OBD2INTEGERSENSORINDEX_MAX_OXYGEN_SENSOR_CURRENT = 0x12 -OBD2INTEGERSENSORINDEX_MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 0x13 -OBD2INTEGERSENSORINDEX_MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 0x14 -OBD2INTEGERSENSORINDEX_FUEL_TYPE = 0x15 -OBD2INTEGERSENSORINDEX_FUEL_RAIL_ABSOLUTE_PRESSURE = 0x16 -OBD2INTEGERSENSORINDEX_ENGINE_OIL_TEMPERATURE = 0x17 -OBD2INTEGERSENSORINDEX_DRIVER_DEMAND_PERCENT_TORQUE = 0x18 -OBD2INTEGERSENSORINDEX_ENGINE_ACTUAL_PERCENT_TORQUE = 0x19 -OBD2INTEGERSENSORINDEX_ENGINE_REFERENCE_PERCENT_TORQUE = 0x1a -OBD2INTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_IDLE = 0x1b -OBD2INTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT1 = 0x1c -OBD2INTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT2 = 0x1d -OBD2INTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT3 = 0x1e -OBD2INTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT4 = 0x1f -OBD2INTEGERSENSORINDEX_LAST_SYSTEM_INDEX = 0x1f +# Obd2FuelSystemStatus +OBD2FUELSYSTEMSTATUS_OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 0x1 +OBD2FUELSYSTEMSTATUS_CLOSED_LOOP = 0x2 +OBD2FUELSYSTEMSTATUS_OPEN_ENGINE_LOAD_OR_DECELERATION = 0x4 +OBD2FUELSYSTEMSTATUS_OPEN_SYSTEM_FAILURE = 0x8 +OBD2FUELSYSTEMSTATUS_CLOSED_LOOP_BUT_FEEDBACK_FAULT = 0x10 -# VehicleProperty -VEHICLEPROPERTY_WHEEL_TICK = 0x11610306 -VEHICLEPROPERTY_OBD2_LIVE_FRAME = 0x11e00d00 -VEHICLEPROPERTY_OBD2_FREEZE_FRAME = 0x11e00d01 -VEHICLEPROPERTY_OBD2_FREEZE_FRAME_INFO = 0x11e00d02 -VEHICLEPROPERTY_OBD2_FREEZE_FRAME_CLEAR = 0x11e00d03 -VEHICLEPROPERTY_VEHICLE_MAP_SERVICE = 0x11e00c00 +# VmsMessageType +VMSMESSAGETYPE_SUBSCRIBE = 0x1 +VMSMESSAGETYPE_SUBSCRIBE_TO_PUBLISHER = 0x2 +VMSMESSAGETYPE_UNSUBSCRIBE = 0x3 +VMSMESSAGETYPE_UNSUBSCRIBE_TO_PUBLISHER = 0x4 +VMSMESSAGETYPE_OFFERING = 0x5 +VMSMESSAGETYPE_AVAILABILITY_REQUEST = 0x6 +VMSMESSAGETYPE_SUBSCRIPTIONS_REQUEST = 0x7 +VMSMESSAGETYPE_AVAILABILITY_RESPONSE = 0x8 +VMSMESSAGETYPE_AVAILABILITY_CHANGE = 0x9 +VMSMESSAGETYPE_SUBSCRIPTIONS_RESPONSE = 0xa +VMSMESSAGETYPE_SUBSCRIPTIONS_CHANGE = 0xb +VMSMESSAGETYPE_DATA = 0xc -# FuelSystemStatus -FUELSYSTEMSTATUS_OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 0x1 -FUELSYSTEMSTATUS_CLOSED_LOOP = 0x2 -FUELSYSTEMSTATUS_OPEN_ENGINE_LOAD_OR_DECELERATION = 0x4 -FUELSYSTEMSTATUS_OPEN_SYSTEM_FAILURE = 0x8 -FUELSYSTEMSTATUS_CLOSED_LOOP_BUT_FEEDBACK_FAULT = 0x10 +# DiagnosticFloatSensorIndex +DIAGNOSTICFLOATSENSORINDEX_CALCULATED_ENGINE_LOAD = 0x0 +DIAGNOSTICFLOATSENSORINDEX_ENGINE_COOLANT_TEMPERATURE = 0x1 +DIAGNOSTICFLOATSENSORINDEX_SHORT_TERM_FUEL_TRIM_BANK1 = 0x2 +DIAGNOSTICFLOATSENSORINDEX_LONG_TERM_FUEL_TRIM_BANK1 = 0x3 +DIAGNOSTICFLOATSENSORINDEX_SHORT_TERM_FUEL_TRIM_BANK2 = 0x4 +DIAGNOSTICFLOATSENSORINDEX_LONG_TERM_FUEL_TRIM_BANK2 = 0x5 +DIAGNOSTICFLOATSENSORINDEX_FUEL_PRESSURE = 0x6 +DIAGNOSTICFLOATSENSORINDEX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 0x7 +DIAGNOSTICFLOATSENSORINDEX_ENGINE_RPM = 0x8 +DIAGNOSTICFLOATSENSORINDEX_VEHICLE_SPEED = 0x9 +DIAGNOSTICFLOATSENSORINDEX_TIMING_ADVANCE = 0xa +DIAGNOSTICFLOATSENSORINDEX_MAF_AIR_FLOW_RATE = 0xb +DIAGNOSTICFLOATSENSORINDEX_THROTTLE_POSITION = 0xc +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR1_VOLTAGE = 0xd +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 0xe +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 0xf +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR2_VOLTAGE = 0x10 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 0x11 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 0x12 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR3_VOLTAGE = 0x13 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 0x14 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 0x15 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR4_VOLTAGE = 0x16 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 0x17 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 0x18 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR5_VOLTAGE = 0x19 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 0x1a +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 0x1b +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR6_VOLTAGE = 0x1c +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 0x1d +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 0x1e +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR7_VOLTAGE = 0x1f +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 0x20 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 0x21 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR8_VOLTAGE = 0x22 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 0x23 +DIAGNOSTICFLOATSENSORINDEX_OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 0x24 +DIAGNOSTICFLOATSENSORINDEX_FUEL_RAIL_PRESSURE = 0x25 +DIAGNOSTICFLOATSENSORINDEX_FUEL_RAIL_GAUGE_PRESSURE = 0x26 +DIAGNOSTICFLOATSENSORINDEX_COMMANDED_EXHAUST_GAS_RECIRCULATION = 0x27 +DIAGNOSTICFLOATSENSORINDEX_EXHAUST_GAS_RECIRCULATION_ERROR = 0x28 +DIAGNOSTICFLOATSENSORINDEX_COMMANDED_EVAPORATIVE_PURGE = 0x29 +DIAGNOSTICFLOATSENSORINDEX_FUEL_TANK_LEVEL_INPUT = 0x2a +DIAGNOSTICFLOATSENSORINDEX_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 0x2b +DIAGNOSTICFLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK1_SENSOR1 = 0x2c +DIAGNOSTICFLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK2_SENSOR1 = 0x2d +DIAGNOSTICFLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK1_SENSOR2 = 0x2e +DIAGNOSTICFLOATSENSORINDEX_CATALYST_TEMPERATURE_BANK2_SENSOR2 = 0x2f +DIAGNOSTICFLOATSENSORINDEX_ABSOLUTE_LOAD_VALUE = 0x30 +DIAGNOSTICFLOATSENSORINDEX_FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 0x31 +DIAGNOSTICFLOATSENSORINDEX_RELATIVE_THROTTLE_POSITION = 0x32 +DIAGNOSTICFLOATSENSORINDEX_ABSOLUTE_THROTTLE_POSITION_B = 0x33 +DIAGNOSTICFLOATSENSORINDEX_ABSOLUTE_THROTTLE_POSITION_C = 0x34 +DIAGNOSTICFLOATSENSORINDEX_ACCELERATOR_PEDAL_POSITION_D = 0x35 +DIAGNOSTICFLOATSENSORINDEX_ACCELERATOR_PEDAL_POSITION_E = 0x36 +DIAGNOSTICFLOATSENSORINDEX_ACCELERATOR_PEDAL_POSITION_F = 0x37 +DIAGNOSTICFLOATSENSORINDEX_COMMANDED_THROTTLE_ACTUATOR = 0x38 +DIAGNOSTICFLOATSENSORINDEX_ETHANOL_FUEL_PERCENTAGE = 0x39 +DIAGNOSTICFLOATSENSORINDEX_ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 0x3a +DIAGNOSTICFLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 0x3b +DIAGNOSTICFLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 0x3c +DIAGNOSTICFLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 0x3d +DIAGNOSTICFLOATSENSORINDEX_SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 0x3e +DIAGNOSTICFLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 0x3f +DIAGNOSTICFLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 0x40 +DIAGNOSTICFLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 0x41 +DIAGNOSTICFLOATSENSORINDEX_LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 0x42 +DIAGNOSTICFLOATSENSORINDEX_RELATIVE_ACCELERATOR_PEDAL_POSITION = 0x43 +DIAGNOSTICFLOATSENSORINDEX_HYBRID_BATTERY_PACK_REMAINING_LIFE = 0x44 +DIAGNOSTICFLOATSENSORINDEX_FUEL_INJECTION_TIMING = 0x45 +DIAGNOSTICFLOATSENSORINDEX_ENGINE_FUEL_RATE = 0x46 +DIAGNOSTICFLOATSENSORINDEX_LAST_SYSTEM_INDEX = 0x46 # VehiclePropertyType VEHICLEPROPERTYTYPE_STRING = 0x100000 @@ -246,10 +192,6 @@ VEHICLEPROPERTYTYPE_BYTES = 0x700000 VEHICLEPROPERTYTYPE_COMPLEX = 0xe00000 VEHICLEPROPERTYTYPE_MASK = 0xff0000 -# VmsSimpleMessageIntegerValuesIndex -VMSSIMPLEMESSAGEINTEGERVALUESINDEX_VMS_LAYER_ID = 0x1 -VMSSIMPLEMESSAGEINTEGERVALUESINDEX_VMS_LAYER_VERSION = 0x2 - # VehicleArea VEHICLEAREA_GLOBAL = 0x1000000 VEHICLEAREA_ZONE = 0x2000000 @@ -259,11 +201,87 @@ VEHICLEAREA_SEAT = 0x5000000 VEHICLEAREA_DOOR = 0x6000000 VEHICLEAREA_MASK = 0xf000000 -# VmsOfferingMessageIntegerValuesIndex -VMSOFFERINGMESSAGEINTEGERVALUESINDEX_VMS_NUMBER_OF_LAYERS_DEPENDENCIES = 0x1 -VMSOFFERINGMESSAGEINTEGERVALUESINDEX_FIRST_DEPENDENCIES_INDEX = 0x2 +# Obd2FuelType +OBD2FUELTYPE_NOT_AVAILABLE = 0x0 +OBD2FUELTYPE_GASOLINE = 0x1 +OBD2FUELTYPE_METHANOL = 0x2 +OBD2FUELTYPE_ETHANOL = 0x3 +OBD2FUELTYPE_DIESEL = 0x4 +OBD2FUELTYPE_LPG = 0x5 +OBD2FUELTYPE_CNG = 0x6 +OBD2FUELTYPE_PROPANE = 0x7 +OBD2FUELTYPE_ELECTRIC = 0x8 +OBD2FUELTYPE_BIFUEL_RUNNING_GASOLINE = 0x9 +OBD2FUELTYPE_BIFUEL_RUNNING_METHANOL = 0xa +OBD2FUELTYPE_BIFUEL_RUNNING_ETHANOL = 0xb +OBD2FUELTYPE_BIFUEL_RUNNING_LPG = 0xc +OBD2FUELTYPE_BIFUEL_RUNNING_CNG = 0xd +OBD2FUELTYPE_BIFUEL_RUNNING_PROPANE = 0xe +OBD2FUELTYPE_BIFUEL_RUNNING_ELECTRIC = 0xf +OBD2FUELTYPE_BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 0x10 +OBD2FUELTYPE_HYBRID_GASOLINE = 0x11 +OBD2FUELTYPE_HYBRID_ETHANOL = 0x12 +OBD2FUELTYPE_HYBRID_DIESEL = 0x13 +OBD2FUELTYPE_HYBRID_ELECTRIC = 0x14 +OBD2FUELTYPE_HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 0x15 +OBD2FUELTYPE_HYBRID_REGENERATIVE = 0x16 +OBD2FUELTYPE_BIFUEL_RUNNING_DIESEL = 0x17 + +# DiagnosticIntegerSensorIndex +DIAGNOSTICINTEGERSENSORINDEX_FUEL_SYSTEM_STATUS = 0x0 +DIAGNOSTICINTEGERSENSORINDEX_MALFUNCTION_INDICATOR_LIGHT_ON = 0x1 +DIAGNOSTICINTEGERSENSORINDEX_IGNITION_MONITORS_SUPPORTED = 0x2 +DIAGNOSTICINTEGERSENSORINDEX_IGNITION_SPECIFIC_MONITORS = 0x3 +DIAGNOSTICINTEGERSENSORINDEX_INTAKE_AIR_TEMPERATURE = 0x4 +DIAGNOSTICINTEGERSENSORINDEX_COMMANDED_SECONDARY_AIR_STATUS = 0x5 +DIAGNOSTICINTEGERSENSORINDEX_NUM_OXYGEN_SENSORS_PRESENT = 0x6 +DIAGNOSTICINTEGERSENSORINDEX_RUNTIME_SINCE_ENGINE_START = 0x7 +DIAGNOSTICINTEGERSENSORINDEX_DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 0x8 +DIAGNOSTICINTEGERSENSORINDEX_WARMUPS_SINCE_CODES_CLEARED = 0x9 +DIAGNOSTICINTEGERSENSORINDEX_DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 0xa +DIAGNOSTICINTEGERSENSORINDEX_ABSOLUTE_BAROMETRIC_PRESSURE = 0xb +DIAGNOSTICINTEGERSENSORINDEX_CONTROL_MODULE_VOLTAGE = 0xc +DIAGNOSTICINTEGERSENSORINDEX_AMBIENT_AIR_TEMPERATURE = 0xd +DIAGNOSTICINTEGERSENSORINDEX_TIME_WITH_MALFUNCTION_LIGHT_ON = 0xe +DIAGNOSTICINTEGERSENSORINDEX_TIME_SINCE_TROUBLE_CODES_CLEARED = 0xf +DIAGNOSTICINTEGERSENSORINDEX_MAX_FUEL_AIR_EQUIVALENCE_RATIO = 0x10 +DIAGNOSTICINTEGERSENSORINDEX_MAX_OXYGEN_SENSOR_VOLTAGE = 0x11 +DIAGNOSTICINTEGERSENSORINDEX_MAX_OXYGEN_SENSOR_CURRENT = 0x12 +DIAGNOSTICINTEGERSENSORINDEX_MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 0x13 +DIAGNOSTICINTEGERSENSORINDEX_MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 0x14 +DIAGNOSTICINTEGERSENSORINDEX_FUEL_TYPE = 0x15 +DIAGNOSTICINTEGERSENSORINDEX_FUEL_RAIL_ABSOLUTE_PRESSURE = 0x16 +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_OIL_TEMPERATURE = 0x17 +DIAGNOSTICINTEGERSENSORINDEX_DRIVER_DEMAND_PERCENT_TORQUE = 0x18 +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_ACTUAL_PERCENT_TORQUE = 0x19 +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_REFERENCE_PERCENT_TORQUE = 0x1a +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_IDLE = 0x1b +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT1 = 0x1c +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT2 = 0x1d +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT3 = 0x1e +DIAGNOSTICINTEGERSENSORINDEX_ENGINE_PERCENT_TORQUE_DATA_POINT4 = 0x1f +DIAGNOSTICINTEGERSENSORINDEX_LAST_SYSTEM_INDEX = 0x1f + +# Obd2SparkIgnitionMonitors +OBD2SPARKIGNITIONMONITORS_EGR_AVAILABLE = 0x40 +OBD2SPARKIGNITIONMONITORS_EGR_INCOMPLETE = 0x80 +OBD2SPARKIGNITIONMONITORS_OXYGEN_SENSOR_HEATER_AVAILABLE = 0x100 +OBD2SPARKIGNITIONMONITORS_OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x200 +OBD2SPARKIGNITIONMONITORS_OXYGEN_SENSOR_AVAILABLE = 0x400 +OBD2SPARKIGNITIONMONITORS_OXYGEN_SENSOR_INCOMPLETE = 0x800 +OBD2SPARKIGNITIONMONITORS_AC_REFRIGERANT_AVAILABLE = 0x1000 +OBD2SPARKIGNITIONMONITORS_AC_REFRIGERANT_INCOMPLETE = 0x2000 +OBD2SPARKIGNITIONMONITORS_SECONDARY_AIR_SYSTEM_AVAILABLE = 0x4000 +OBD2SPARKIGNITIONMONITORS_SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x8000 +OBD2SPARKIGNITIONMONITORS_EVAPORATIVE_SYSTEM_AVAILABLE = 0x10000 +OBD2SPARKIGNITIONMONITORS_EVAPORATIVE_SYSTEM_INCOMPLETE = 0x20000 +OBD2SPARKIGNITIONMONITORS_HEATED_CATALYST_AVAILABLE = 0x40000 +OBD2SPARKIGNITIONMONITORS_HEATED_CATALYST_INCOMPLETE = 0x80000 +OBD2SPARKIGNITIONMONITORS_CATALYST_AVAILABLE = 0x100000 +OBD2SPARKIGNITIONMONITORS_CATALYST_INCOMPLETE = 0x200000 -# VmsSubscriptionResponseFormat -VMSSUBSCRIPTIONRESPONSEFORMAT_SEQUENCE_NUMBER = 0x1 -VMSSUBSCRIPTIONRESPONSEFORMAT_NUMBER_OF_LAYERS = 0x2 -VMSSUBSCRIPTIONRESPONSEFORMAT_FIRST_LAYER = 0x3 +# Obd2SecondaryAirStatus +OBD2SECONDARYAIRSTATUS_UPSTREAM = 0x1 +OBD2SECONDARYAIRSTATUS_DOWNSTREAM_OF_CATALYCIC_CONVERTER = 0x2 +OBD2SECONDARYAIRSTATUS_FROM_OUTSIDE_OR_OFF = 0x4 +OBD2SECONDARYAIRSTATUS_PUMP_ON_FOR_DIAGNOSTICS = 0x8 diff --git a/tools/emulator/vhal_emulator_test.py b/tools/emulator/vhal_emulator_test.py index 1d0ada042a..ea4030d694 100755 --- a/tools/emulator/vhal_emulator_test.py +++ b/tools/emulator/vhal_emulator_test.py @@ -37,7 +37,7 @@ import sys sys.dont_write_bytecode = True import VehicleHalProto_pb2 -import vhal_consts_2_0 +import vhal_consts_2_1 import vhal_emulator import logging @@ -47,6 +47,16 @@ class VhalTest: _configs = 0 # List of configs from DUT _log = 0 # Logger module _vhal = 0 # Handle to VHAL object that communicates over socket to DUT + # TODO: b/38203109 - Fix OBD2 values, implement handling for complex properties + _skipProps = [ + vhal_consts_2_1.VEHICLEPROPERTY_OBD2_LIVE_FRAME, + vhal_consts_2_1.VEHICLEPROPERTY_OBD2_FREEZE_FRAME, + vhal_consts_2_1.VEHICLEPROPERTY_OBD2_FREEZE_FRAME_INFO, + vhal_consts_2_1.VEHICLEPROPERTY_OBD2_FREEZE_FRAME_CLEAR, + vhal_consts_2_1.VEHICLEPROPERTY_VEHICLE_MAP_SERVICE, + vhal_consts_2_1.VEHICLEPROPERTY_WHEEL_TICK, # Need to support complex properties + 0x21E00666 # FakeDataControllingProperty - an internal test property + ] def _getMidpoint(self, minVal, maxVal): retVal = minVal + (maxVal - minVal)/2 @@ -60,7 +70,7 @@ class VhalTest: elif valType in self._types.TYPE_BYTES: # Generate array of integers counting from 0 testValue = list(range(len(origValue))) - elif valType == vhal_consts_2_0.VEHICLEPROPERTYTYPE_BOOLEAN: + elif valType == vhal_consts_2_1.VEHICLEPROPERTYTYPE_BOOLEAN: testValue = origValue ^ 1 elif valType in self._types.TYPE_INT32: try: @@ -87,7 +97,7 @@ class VhalTest: testValue = "%.5f" % testValue testValue = float(testValue) else: - self._log.error("generateTestValue: valType=%d is not handled", valType) + self._log.error("generateTestValue: valType=0x%X is not handled", valType) testValue = None return testValue @@ -103,7 +113,7 @@ class VhalTest: value = rxMsg.value[0].string_value elif valType in self._types.TYPE_BYTES: value = rxMsg.value[0].bytes_value - elif valType == vhal_consts_2_0.VEHICLEPROPERTYTYPE_BOOLEAN: + elif valType == vhal_consts_2_1.VEHICLEPROPERTYTYPE_BOOLEAN: value = rxMsg.value[0].int32_values[0] elif valType in self._types.TYPE_INT32: value = rxMsg.value[0].int32_values[0] @@ -115,7 +125,7 @@ class VhalTest: value = "%.5f" % value value = float(value) else: - self._log.error("getValuesFromMsg: valType=%d is not handled", valType) + self._log.error("getValueFromMsg: valType=0x%X is not handled", valType) value = None return value @@ -126,10 +136,10 @@ class VhalTest: retVal = 1 rxMsg = self._vhal.rxMsg() if rxMsg.msg_type != expectedType: - self._log.error("rxMsg Type expected: %d, received: %d", expectedType, rxMsg.msg_type) + self._log.error("rxMsg Type expected: 0x%X, received: 0x%X", expectedType, rxMsg.msg_type) retVal = 0 if rxMsg.status != expectedStatus: - self._log.error("rxMsg Status expected: %d, received: %d", expectedStatus, rxMsg.status) + self._log.error("rxMsg Status expected: 0x%X, received: 0x%X", expectedStatus, rxMsg.status) retVal = 0 return rxMsg, retVal @@ -138,13 +148,13 @@ class VhalTest: def testGetConfig(self): self._log.info("Starting testGetConfig...") for cfg in self._configs: - self._log.debug(" Getting config for propId=%d", cfg.prop) + self._log.debug(" Getting config for propId=0x%X", cfg.prop) self._vhal.getConfig(cfg.prop) rxMsg, retVal = self._rxMsgAndValidate(VehicleHalProto_pb2.GET_CONFIG_RESP, VehicleHalProto_pb2.RESULT_OK) if retVal: if rxMsg.config[0] != cfg: - self._log.error("testGetConfig failed. prop=%d, expected:\n%s\nreceived:\n%s", + self._log.error("testGetConfig failed. prop=0x%X, expected:\n%s\nreceived:\n%s", cfg.prop, str(cfg), str(rxMsg.config)) self._log.info(" Finished testGetConfig!") @@ -152,13 +162,13 @@ class VhalTest: def testGetBadConfig(self): self._log.info("Starting testGetBadConfig...") for prop in self._badProps: - self._log.debug(" Testing bad propId=%d", prop) + self._log.debug(" Testing bad propId=0x%X", prop) self._vhal.getConfig(prop) rxMsg, retVal = self._rxMsgAndValidate(VehicleHalProto_pb2.GET_CONFIG_RESP, VehicleHalProto_pb2.ERROR_INVALID_PROPERTY) if retVal: for cfg in rxMsg.config: - self._log.error("testGetBadConfig prop=%d, expected:None, received:\n%s", + self._log.error("testGetBadConfig prop=0x%X, expected:None, received:\n%s", cfg.prop, str(rxMsg.config)) self._log.info(" Finished testGetBadConfig!") @@ -177,6 +187,11 @@ class VhalTest: def testGetSet(self): self._log.info("Starting testGetSet()...") for cfg in self._configs: + if cfg.prop in self._skipProps: + # Skip properties that cannot be handled properly by this test. + self._log.warning(" Skipping propId=0x%X", cfg.prop) + continue + areas = cfg.supported_areas idx = -1 while (idx == -1) | (areas != 0): @@ -188,7 +203,7 @@ class VhalTest: # Remove the area from areas areas ^= area - self._log.debug(" Testing propId=%d, area=%d", cfg.prop, area) + self._log.debug(" Testing propId=0x%X, area=0x%X", cfg.prop, area) # Get the current value self._vhal.getProperty(cfg.prop, area) @@ -198,21 +213,21 @@ class VhalTest: # Save the original value origValue = self._getValueFromMsg(rxMsg) if origValue == None: - self._log.error("testGetSet: Could not get value for prop=%d, area=%d", + self._log.error("testGetSet: Could not get value for prop=0x%X, area=0x%X", cfg.prop, area) continue # Generate the test value testValue = self._generateTestValue(cfg, idx, origValue) if testValue == None: - self._log.error("testGetSet: Cannot generate test value for prop=%d, area=%d", + self._log.error("testGetSet: Cannot generate test value for prop=0x%X, area=0x%X", cfg.prop, area) continue # Send the new value self._vhal.setProperty(cfg.prop, area, testValue) rxMsg, retVal = self._rxMsgAndValidate(VehicleHalProto_pb2.SET_PROPERTY_RESP, - VehicleHalProto_pb2.RESULT_OK) + VehicleHalProto_pb2.RESULT_OK) # Get the new value and verify it self._vhal.getProperty(cfg.prop, area) @@ -220,7 +235,7 @@ class VhalTest: VehicleHalProto_pb2.RESULT_OK) newValue = self._getValueFromMsg(rxMsg) if newValue != testValue: - self._log.error("testGetSet: set failed for propId=%d, area=%d", cfg.prop, area) + self._log.error("testGetSet: set failed for propId=0x%X, area=0x%X", cfg.prop, area) print("testValue= ", testValue, "newValue= ", newValue) continue @@ -233,13 +248,13 @@ class VhalTest: def testGetBadProperty(self): self._log.info("Starting testGetBadProperty()...") for prop in self._badProps: - self._log.debug(" Testing bad propId=%d", prop) + self._log.debug(" Testing bad propId=0x%X", prop) self._vhal.getProperty(prop, 0) rxMsg, retVal = self._rxMsgAndValidate(VehicleHalProto_pb2.GET_PROPERTY_RESP, VehicleHalProto_pb2.ERROR_INVALID_PROPERTY) if retVal: for value in rxMsg.value: - self._log.error("testGetBadProperty prop=%d, expected:None, received:\n%s", + self._log.error("testGetBadProperty prop=0x%X, expected:None, received:\n%s", prop, str(rxMsg)) self._log.info(" Finished testGetBadProperty()!") @@ -248,12 +263,12 @@ class VhalTest: area = 1 value = 100 for prop in self._badProps: - self._log.debug(" Testing bad propId=%d", prop) + self._log.debug(" Testing bad propId=0x%X", prop) area = area + 1 value = value + 1 try: self._vhal.setProperty(prop, area, value) - self._log.error("testGetBadProperty failed. prop=%d, area=%d, value=%d", + self._log.error("testGetBadProperty failed. prop=0x%X, area=0x%X, value=%d", prop, area, value) except ValueError as e: # Received expected error @@ -290,5 +305,5 @@ class VhalTest: self._configs = self._vhal.rxMsg().config if __name__ == '__main__': - v = VhalTest(vhal_consts_2_0.vhal_types_2_0) + v = VhalTest(vhal_consts_2_1.vhal_types_2_0) v.runTests() diff --git a/tools/update-obd2-sensors.py b/tools/update-obd2-sensors.py index 6528b16198..e161258558 100755 --- a/tools/update-obd2-sensors.py +++ b/tools/update-obd2-sensors.py @@ -126,7 +126,7 @@ class JavaSensorPolicy(SensorPolicy): " * limitations under the License.\n" + \ "*/\n" + \ "\n" + \ -"package android.car.hardware;\n" + \ +"package android.car.diagnostic;\n" + \ "\n" + \ "import android.annotation.IntDef;\n" + \ "import android.annotation.SystemApi;\n" + \ @@ -281,9 +281,9 @@ def load(filepath): import os if len(sys.argv) != 4: - print('syntax: update-obd2-sensors.py <path/to/types.hal> <path/to/*SensorIndices.java> <path/to/diagnostic_sensors.py>') + print('syntax: update-obd2-sensors.py <path/to/types.hal> <path/to/android.car.diagnostic> <path/to/diagnostic_sensors.py>') print('This script will parse types.hal, and use the resulting', end='') - print('parse tree to generate CarDiagnosticSensorIndices.java.') + print('parse tree to generate Java and Python lists of sensor identifiers.') sys.exit(1) load(sys.argv[1]) generateJava(sys.argv[2]) |