Merge "Add README.md & fix vhal_consts_2_0.py errors" into rvc-qpr-dev am: 2cb3b3d54d am: 0d121cb02c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Car/+/12709849
Change-Id: I8c8b11acfa591bf3b367b03a8785090d5368ecc7
diff --git a/tools/emulator/README.md b/tools/emulator/README.md
new file mode 100644
index 0000000..45708f8
--- /dev/null
+++ b/tools/emulator/README.md
@@ -0,0 +1,84 @@
+# VHAL Host Emulator
+This is a collection of python modules as tools for VHAL development.
+
+[TOC]
+
+## vhal_emulator.py
+This allow you to create script to interate with the Vehicle HAL in an AAOS
+device from a host.
+
+* It sends and receives messages to/from the Vehicle HAL via port forwarding
+over ADB to communicate with the AAOS device.
+* On the device side, VHAL module VehicleService creates VehicleEmulator to
+setup SocketComm to serve the requests.
+ * hardware/interfaces/automotive/vehicle/2.0/default/VehicleService.cpp
+ * hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.cpp
+ * hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/SocketComm.cpp
+* vhal_emulator_test.py tests the Vehicle HAL via adb socket.
+ * Note: This may outdated becuase there is no dedicated resrouce. Contribution is welcome.
+
+## vhal_const_generate.py
+This generates vhal_consts_2_0.py to update definitions for property ID, value
+type, zone, etc. from the types.hal. Run this script whenever types.hal is
+changed.
+
+* Must re-generate when the types.hal file changes.
+
+```
+packages/services/Car/tools/emulator/vhal_const_generate.py
+```
+
+* hardware/interfaces/automotive/vehicle/2.0/types.hal
+
+## VehicleHalProto_pb2.py
+This defines message interface to VHAL Emulator from VehicleHalProto.proto.
+
+* Must re-generate whenever the proto file changes.
+* Generated from hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/VehicleHalProto.proto
+
+```
+protoDir=$ANDROID_BUILD_TOP/hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto
+outDir=$ANDROID_BUILD_TOP/packages/services/Car/tools/emulator
+# or protoc if perferred
+aprotoc -I=$protoDir --python_out=$outDir $protoDir/VehicleHalProto.proto
+
+```
+
+* It requires Protocol Buffers. You may build one from Android, e.g.
+
+```
+. build/envsetup.sh
+lunch sdk_gcar_x86-userdebug
+m aprotoc -j16
+```
+
+
+## OBD2 Diagnostic Injector
+These scripts are useful for testing the Diagnostics API
+
+### diagnostic_builder.py
+
+* Helper class used by diagnostic_injector.py
+* Stores diagnostic sensor values and bitmasks
+* VehiclePropValue-compatible
+
+### diagnostic_injector.py
+
+* Deserializes JSON into diagnostic events
+* Sends over HAL Emulator Interface
+* Diagnostic JSON Format example: diagjson.example
+
+```
+./diagnostic_injector.py ./diagjson.example
+```
+
+## Python GUI Example
+gui.py is an example to create an GUI to set the property.
+
+* packages/services/Car/tools/emulator/gui.py
+* GUI runs on host machine (PyQt4-based widgets)
+* Drives VHAL on target
+ * Works only with default VHAL
+ * Interactions generate SET messages
+* Supports bench testing of apps
+* Easy to add support for more properties
diff --git a/tools/emulator/vhal_consts_2_0.py b/tools/emulator/vhal_consts_2_0.py
index d4e3b61..12857b9 100644
--- a/tools/emulator/vhal_consts_2_0.py
+++ b/tools/emulator/vhal_consts_2_0.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 The Android Open Source Project
+# Copyright (C) 2020 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.
@@ -15,283 +15,6 @@
# DO NOT EDIT MANUALLY
# This file was autogenerated by vhal_const_generate.py
-# 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_MILE = 0x24
-VEHICLEUNIT_CELSIUS = 0x30
-VEHICLEUNIT_FAHRENHEIT = 0x31
-VEHICLEUNIT_KELVIN = 0x32
-VEHICLEUNIT_MILLILITER = 0x40
-VEHICLEUNIT_LITER = 0x41
-VEHICLEUNIT_GALLON = 0x42
-VEHICLEUNIT_US_GALLON = 0x42
-VEHICLEUNIT_IMPERIAL_GALLON = 0x43
-VEHICLEUNIT_NANO_SECS = 0x50
-VEHICLEUNIT_SECS = 0x53
-VEHICLEUNIT_YEAR = 0x59
-VEHICLEUNIT_WATT_HOUR = 0x60
-VEHICLEUNIT_MILLIAMPERE = 0x61
-VEHICLEUNIT_MILLIVOLT = 0x62
-VEHICLEUNIT_MILLIWATTS = 0x63
-VEHICLEUNIT_AMPERE_HOURS = 0x64
-VEHICLEUNIT_KILOWATT_HOUR = 0x65
-VEHICLEUNIT_KILOPASCAL = 0x70
-VEHICLEUNIT_PSI = 0x71
-VEHICLEUNIT_BAR = 0x72
-VEHICLEUNIT_DEGREES = 0x80
-VEHICLEUNIT_MILES_PER_HOUR = 0x90
-VEHICLEUNIT_KILOMETERS_PER_HOUR = 0x91
-
-# VehicleLightSwitch
-VEHICLELIGHTSWITCH_OFF = 0x0
-VEHICLELIGHTSWITCH_ON = 0x1
-VEHICLELIGHTSWITCH_DAYTIME_RUNNING = 0x2
-VEHICLELIGHTSWITCH_AUTOMATIC = 0x100
-
-# VmsMessageWithLayerIntegerValuesIndex
-VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_TYPE = 0x1
-VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_SUBTYPE = 0x2
-VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_VERSION = 0x3
-
-# VehiclePropertyGroup
-VEHICLEPROPERTYGROUP_SYSTEM = 0x10000000
-VEHICLEPROPERTYGROUP_VENDOR = 0x20000000
-VEHICLEPROPERTYGROUP_MASK = 0xf0000000
-
-# VehicleApPowerStateShutdownParam
-VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_IMMEDIATELY = 0x1
-VEHICLEAPPOWERSTATESHUTDOWNPARAM_CAN_SLEEP = 0x2
-VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_ONLY = 0x3
-
-# 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
-
-# PortLocationType
-PORTLOCATIONTYPE_UNKNOWN = 0x0
-PORTLOCATIONTYPE_FRONT_LEFT = 0x1
-PORTLOCATIONTYPE_FRONT_RIGHT = 0x2
-PORTLOCATIONTYPE_REAR_RIGHT = 0x3
-PORTLOCATIONTYPE_REAR_LEFT = 0x4
-PORTLOCATIONTYPE_FRONT = 0x5
-PORTLOCATIONTYPE_REAR = 0x6
-
-# 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
-
-# VmsSubscriptionsStateIntegerValuesIndex
-VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_SEQUENCE_NUMBER = 0x1
-VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_NUMBER_OF_LAYERS = 0x2
-VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_NUMBER_OF_ASSOCIATED_LAYERS = 0x3
-VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_SUBSCRIPTIONS_START = 0x4
-
-# VehicleApPowerStateReq
-VEHICLEAPPOWERSTATEREQ_ON = 0x0
-VEHICLEAPPOWERSTATEREQ_SHUTDOWN_PREPARE = 0x1
-VEHICLEAPPOWERSTATEREQ_CANCEL_SHUTDOWN = 0x2
-VEHICLEAPPOWERSTATEREQ_FINISHED = 0x3
-
-# VehicleApPowerStateReqIndex
-VEHICLEAPPOWERSTATEREQINDEX_STATE = 0x0
-VEHICLEAPPOWERSTATEREQINDEX_ADDITIONAL = 0x1
-
-# Obd2IgnitionMonitorKind
-OBD2IGNITIONMONITORKIND_SPARK = 0x0
-OBD2IGNITIONMONITORKIND_COMPRESSION = 0x1
-
-# VehiclePropertyAccess
-VEHICLEPROPERTYACCESS_NONE = 0x0
-VEHICLEPROPERTYACCESS_READ = 0x1
-VEHICLEPROPERTYACCESS_WRITE = 0x2
-VEHICLEPROPERTYACCESS_READ_WRITE = 0x3
-
-# VehicleOilLevel
-VEHICLEOILLEVEL_CRITICALLY_LOW = 0x0
-VEHICLEOILLEVEL_LOW = 0x1
-VEHICLEOILLEVEL_NORMAL = 0x2
-VEHICLEOILLEVEL_HIGH = 0x3
-VEHICLEOILLEVEL_ERROR = 0x4
-
-# VmsBaseMessageIntegerValuesIndex
-VMSBASEMESSAGEINTEGERVALUESINDEX_MESSAGE_TYPE = 0x0
-
-# StatusCode
-STATUSCODE_OK = 0x0
-STATUSCODE_TRY_AGAIN = 0x1
-STATUSCODE_INVALID_ARG = 0x2
-STATUSCODE_NOT_AVAILABLE = 0x3
-STATUSCODE_ACCESS_DENIED = 0x4
-STATUSCODE_INTERNAL_ERROR = 0x5
-
-# VehicleLightState
-VEHICLELIGHTSTATE_OFF = 0x0
-VEHICLELIGHTSTATE_ON = 0x1
-VEHICLELIGHTSTATE_DAYTIME_RUNNING = 0x2
-
-# VmsStartSessionMessageIntegerValuesIndex
-VMSSTARTSESSIONMESSAGEINTEGERVALUESINDEX_SERVICE_ID = 0x1
-VMSSTARTSESSIONMESSAGEINTEGERVALUESINDEX_CLIENT_ID = 0x2
-
-# VmsPublisherInformationIntegerValuesIndex
-VMSPUBLISHERINFORMATIONINTEGERVALUESINDEX_PUBLISHER_ID = 0x1
-
-# VehiclePropertyChangeMode
-VEHICLEPROPERTYCHANGEMODE_STATIC = 0x0
-VEHICLEPROPERTYCHANGEMODE_ON_CHANGE = 0x1
-VEHICLEPROPERTYCHANGEMODE_CONTINUOUS = 0x2
-
-# 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
-VMSMESSAGETYPE_PUBLISHER_ID_REQUEST = 0xd
-VMSMESSAGETYPE_PUBLISHER_ID_RESPONSE = 0xe
-VMSMESSAGETYPE_PUBLISHER_INFORMATION_REQUEST = 0xf
-VMSMESSAGETYPE_PUBLISHER_INFORMATION_RESPONSE = 0x10
-VMSMESSAGETYPE_START_SESSION = 0x11
-VMSMESSAGETYPE_LAST_VMS_MESSAGE_TYPE = 0x11
-
-# 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
-
-# VmsMessageWithLayerAndPublisherIdIntegerValuesIndex
-VMSMESSAGEWITHLAYERANDPUBLISHERIDINTEGERVALUESINDEX_PUBLISHER_ID = 0x4
-
-# VmsOfferingMessageIntegerValuesIndex
-VMSOFFERINGMESSAGEINTEGERVALUESINDEX_PUBLISHER_ID = 0x1
-VMSOFFERINGMESSAGEINTEGERVALUESINDEX_NUMBER_OF_OFFERS = 0x2
-VMSOFFERINGMESSAGEINTEGERVALUESINDEX_OFFERING_START = 0x3
-
-# VehicleApPowerStateConfigFlag
-VEHICLEAPPOWERSTATECONFIGFLAG_ENABLE_DEEP_SLEEP_FLAG = 0x1
-VEHICLEAPPOWERSTATECONFIGFLAG_CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2
-
-# FuelType
-FUELTYPE_FUEL_TYPE_UNKNOWN = 0x0
-FUELTYPE_FUEL_TYPE_UNLEADED = 0x1
-FUELTYPE_FUEL_TYPE_LEADED = 0x2
-FUELTYPE_FUEL_TYPE_DIESEL_1 = 0x3
-FUELTYPE_FUEL_TYPE_DIESEL_2 = 0x4
-FUELTYPE_FUEL_TYPE_BIODIESEL = 0x5
-FUELTYPE_FUEL_TYPE_E85 = 0x6
-FUELTYPE_FUEL_TYPE_LPG = 0x7
-FUELTYPE_FUEL_TYPE_CNG = 0x8
-FUELTYPE_FUEL_TYPE_LNG = 0x9
-FUELTYPE_FUEL_TYPE_ELECTRIC = 0xa
-FUELTYPE_FUEL_TYPE_HYDROGEN = 0xb
-FUELTYPE_FUEL_TYPE_OTHER = 0xc
-
-# VehicleSeatOccupancyState
-VEHICLESEATOCCUPANCYSTATE_UNKNOWN = 0x0
-VEHICLESEATOCCUPANCYSTATE_VACANT = 0x1
-VEHICLESEATOCCUPANCYSTATE_OCCUPIED = 0x2
-
-# VehicleIgnitionState
-VEHICLEIGNITIONSTATE_UNDEFINED = 0x0
-VEHICLEIGNITIONSTATE_LOCK = 0x1
-VEHICLEIGNITIONSTATE_OFF = 0x2
-VEHICLEIGNITIONSTATE_ACC = 0x3
-VEHICLEIGNITIONSTATE_ON = 0x4
-VEHICLEIGNITIONSTATE_START = 0x5
-
-# VehicleAreaSeat
-VEHICLEAREASEAT_ROW_1_LEFT = 0x1
-VEHICLEAREASEAT_ROW_1_CENTER = 0x2
-VEHICLEAREASEAT_ROW_1_RIGHT = 0x4
-VEHICLEAREASEAT_ROW_2_LEFT = 0x10
-VEHICLEAREASEAT_ROW_2_CENTER = 0x20
-VEHICLEAREASEAT_ROW_2_RIGHT = 0x40
-VEHICLEAREASEAT_ROW_3_LEFT = 0x100
-VEHICLEAREASEAT_ROW_3_CENTER = 0x200
-VEHICLEAREASEAT_ROW_3_RIGHT = 0x400
-
-# VehicleTurnSignal
-VEHICLETURNSIGNAL_NONE = 0x0
-VEHICLETURNSIGNAL_RIGHT = 0x1
-VEHICLETURNSIGNAL_LEFT = 0x2
-
-# EvConnectorType
-EVCONNECTORTYPE_UNKNOWN = 0x0
-EVCONNECTORTYPE_IEC_TYPE_1_AC = 0x1
-EVCONNECTORTYPE_IEC_TYPE_2_AC = 0x2
-EVCONNECTORTYPE_IEC_TYPE_3_AC = 0x3
-EVCONNECTORTYPE_IEC_TYPE_4_DC = 0x4
-EVCONNECTORTYPE_IEC_TYPE_1_CCS_DC = 0x5
-EVCONNECTORTYPE_IEC_TYPE_2_CCS_DC = 0x6
-EVCONNECTORTYPE_TESLA_ROADSTER = 0x7
-EVCONNECTORTYPE_TESLA_HPWC = 0x8
-EVCONNECTORTYPE_TESLA_SUPERCHARGER = 0x9
-EVCONNECTORTYPE_GBT_AC = 0xa
-EVCONNECTORTYPE_GBT_DC = 0xb
-EVCONNECTORTYPE_OTHER = 0x65
-
# VehiclePropertyType
VEHICLEPROPERTYTYPE_STRING = 0x100000
VEHICLEPROPERTYTYPE_BOOLEAN = 0x200000
@@ -305,102 +28,19 @@
VEHICLEPROPERTYTYPE_MIXED = 0xe00000
VEHICLEPROPERTYTYPE_MASK = 0xff0000
-# VehicleAreaMirror
-VEHICLEAREAMIRROR_DRIVER_LEFT = 0x1
-VEHICLEAREAMIRROR_DRIVER_RIGHT = 0x2
-VEHICLEAREAMIRROR_DRIVER_CENTER = 0x4
+# VehicleArea
+VEHICLEAREA_GLOBAL = 0x1000000
+VEHICLEAREA_WINDOW = 0x3000000
+VEHICLEAREA_MIRROR = 0x4000000
+VEHICLEAREA_SEAT = 0x5000000
+VEHICLEAREA_DOOR = 0x6000000
+VEHICLEAREA_WHEEL = 0x7000000
+VEHICLEAREA_MASK = 0xf000000
-# 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
-
-# Obd2SecondaryAirStatus
-OBD2SECONDARYAIRSTATUS_UPSTREAM = 0x1
-OBD2SECONDARYAIRSTATUS_DOWNSTREAM_OF_CATALYCIC_CONVERTER = 0x2
-OBD2SECONDARYAIRSTATUS_FROM_OUTSIDE_OR_OFF = 0x4
-OBD2SECONDARYAIRSTATUS_PUMP_ON_FOR_DIAGNOSTICS = 0x8
-
-# VehicleAreaWheel
-VEHICLEAREAWHEEL_UNKNOWN = 0x0
-VEHICLEAREAWHEEL_LEFT_FRONT = 0x1
-VEHICLEAREAWHEEL_RIGHT_FRONT = 0x2
-VEHICLEAREAWHEEL_LEFT_REAR = 0x4
-VEHICLEAREAWHEEL_RIGHT_REAR = 0x8
-
-# VehicleGear
-VEHICLEGEAR_GEAR_NEUTRAL = 0x1
-VEHICLEGEAR_GEAR_REVERSE = 0x2
-VEHICLEGEAR_GEAR_PARK = 0x4
-VEHICLEGEAR_GEAR_DRIVE = 0x8
-VEHICLEGEAR_GEAR_1 = 0x10
-VEHICLEGEAR_GEAR_2 = 0x20
-VEHICLEGEAR_GEAR_3 = 0x40
-VEHICLEGEAR_GEAR_4 = 0x80
-VEHICLEGEAR_GEAR_5 = 0x100
-VEHICLEGEAR_GEAR_6 = 0x200
-VEHICLEGEAR_GEAR_7 = 0x400
-VEHICLEGEAR_GEAR_8 = 0x800
-VEHICLEGEAR_GEAR_9 = 0x1000
-
-# VmsAvailabilityStateIntegerValuesIndex
-VMSAVAILABILITYSTATEINTEGERVALUESINDEX_SEQUENCE_NUMBER = 0x1
-VMSAVAILABILITYSTATEINTEGERVALUESINDEX_NUMBER_OF_ASSOCIATED_LAYERS = 0x2
-VMSAVAILABILITYSTATEINTEGERVALUESINDEX_LAYERS_START = 0x3
-
-# VehicleHwKeyInputAction
-VEHICLEHWKEYINPUTACTION_ACTION_DOWN = 0x0
-VEHICLEHWKEYINPUTACTION_ACTION_UP = 0x1
-
-# VehicleApPowerStateReport
-VEHICLEAPPOWERSTATEREPORT_WAIT_FOR_VHAL = 0x1
-VEHICLEAPPOWERSTATEREPORT_DEEP_SLEEP_ENTRY = 0x2
-VEHICLEAPPOWERSTATEREPORT_DEEP_SLEEP_EXIT = 0x3
-VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_POSTPONE = 0x4
-VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_START = 0x5
-VEHICLEAPPOWERSTATEREPORT_ON = 0x6
-VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_PREPARE = 0x7
-VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_CANCELLED = 0x8
-
-# VehicleDisplay
-VEHICLEDISPLAY_MAIN = 0x0
-VEHICLEDISPLAY_INSTRUMENT_CLUSTER = 0x1
-
-# 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
-
-# VehicleHvacFanDirection
-VEHICLEHVACFANDIRECTION_FACE = 0x1
-VEHICLEHVACFANDIRECTION_FLOOR = 0x2
-VEHICLEHVACFANDIRECTION_DEFROST = 0x4
-
-# 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
-
-# SubscribeFlags
-SUBSCRIBEFLAGS_UNDEFINED = 0x0
-SUBSCRIBEFLAGS_EVENTS_FROM_CAR = 0x1
-SUBSCRIBEFLAGS_EVENTS_FROM_ANDROID = 0x2
+# VehiclePropertyGroup
+VEHICLEPROPERTYGROUP_SYSTEM = 0x10000000
+VEHICLEPROPERTYGROUP_VENDOR = 0x20000000
+VEHICLEPROPERTYGROUP_MASK = 0xf0000000
# VehicleProperty
VEHICLEPROPERTY_INVALID = 0x0
@@ -415,10 +55,13 @@
VEHICLEPROPERTY_INFO_FUEL_DOOR_LOCATION = 0x11400108
VEHICLEPROPERTY_INFO_EV_PORT_LOCATION = 0x11400109
VEHICLEPROPERTY_INFO_DRIVER_SEAT = 0x1540010a
+VEHICLEPROPERTY_INFO_EXTERIOR_DIMENSIONS = 0x1141010b
+VEHICLEPROPERTY_INFO_MULTI_EV_PORT_LOCATIONS = 0x1141010c
VEHICLEPROPERTY_PERF_ODOMETER = 0x11600204
VEHICLEPROPERTY_PERF_VEHICLE_SPEED = 0x11600207
VEHICLEPROPERTY_PERF_VEHICLE_SPEED_DISPLAY = 0x11600208
VEHICLEPROPERTY_PERF_STEERING_ANGLE = 0x11600209
+VEHICLEPROPERTY_PERF_REAR_STEERING_ANGLE = 0x11600210
VEHICLEPROPERTY_ENGINE_COOLANT_TEMP = 0x11600301
VEHICLEPROPERTY_ENGINE_OIL_LEVEL = 0x11400303
VEHICLEPROPERTY_ENGINE_OIL_TEMP = 0x11600304
@@ -462,6 +105,7 @@
VEHICLEPROPERTY_HVAC_FAN_DIRECTION_AVAILABLE = 0x15410511
VEHICLEPROPERTY_HVAC_AUTO_RECIRC_ON = 0x15200512
VEHICLEPROPERTY_HVAC_SEAT_VENTILATION = 0x15400513
+VEHICLEPROPERTY_HVAC_ELECTRIC_DEFROSTER_ON = 0x13200514
VEHICLEPROPERTY_DISTANCE_DISPLAY_UNITS = 0x11400600
VEHICLEPROPERTY_FUEL_VOLUME_DISPLAY_UNITS = 0x11400601
VEHICLEPROPERTY_TIRE_PRESSURE_DISPLAY_UNITS = 0x11400602
@@ -474,6 +118,7 @@
VEHICLEPROPERTY_AP_POWER_BOOTUP_REASON = 0x11400a02
VEHICLEPROPERTY_DISPLAY_BRIGHTNESS = 0x11400a03
VEHICLEPROPERTY_HW_KEY_INPUT = 0x11410a10
+VEHICLEPROPERTY_HW_ROTARY_INPUT = 0x11410a20
VEHICLEPROPERTY_DOOR_POS = 0x16400b00
VEHICLEPROPERTY_DOOR_MOVE = 0x16400b01
VEHICLEPROPERTY_DOOR_LOCK = 0x16200b02
@@ -531,6 +176,355 @@
VEHICLEPROPERTY_CABIN_LIGHTS_SWITCH = 0x11400f02
VEHICLEPROPERTY_READING_LIGHTS_STATE = 0x15400f03
VEHICLEPROPERTY_READING_LIGHTS_SWITCH = 0x15400f04
+VEHICLEPROPERTY_SUPPORT_CUSTOMIZE_VENDOR_PERMISSION = 0x11200f05
+VEHICLEPROPERTY_DISABLED_OPTIONAL_FEATURES = 0x11100f06
+VEHICLEPROPERTY_INITIAL_USER_INFO = 0x11e00f07
+VEHICLEPROPERTY_SWITCH_USER = 0x11e00f08
+VEHICLEPROPERTY_CREATE_USER = 0x11e00f09
+VEHICLEPROPERTY_REMOVE_USER = 0x11e00f0a
+VEHICLEPROPERTY_USER_IDENTIFICATION_ASSOCIATION = 0x11e00f0b
+
+# VehicleVendorPermission
+VEHICLEVENDORPERMISSION_PERMISSION_DEFAULT = 0x0
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_WINDOW = 0x1
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_WINDOW = 0x2
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_DOOR = 0x3
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_DOOR = 0x4
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_SEAT = 0x5
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_SEAT = 0x6
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_MIRROR = 0x7
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_MIRROR = 0x8
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_INFO = 0x9
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_INFO = 0xa
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_ENGINE = 0xb
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_ENGINE = 0xc
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_HVAC = 0xd
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_HVAC = 0xe
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_LIGHT = 0xf
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_LIGHT = 0x10
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_1 = 0x10000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_1 = 0x11000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_2 = 0x20000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_2 = 0x21000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_3 = 0x30000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_3 = 0x31000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_4 = 0x40000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_4 = 0x41000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_5 = 0x50000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_5 = 0x51000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_6 = 0x60000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_6 = 0x61000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_7 = 0x70000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_7 = 0x71000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_8 = 0x80000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_8 = 0x81000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_9 = 0x90000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_9 = 0x91000
+VEHICLEVENDORPERMISSION_PERMISSION_SET_VENDOR_CATEGORY_10 = 0xa0000
+VEHICLEVENDORPERMISSION_PERMISSION_GET_VENDOR_CATEGORY_10 = 0xa1000
+VEHICLEVENDORPERMISSION_PERMISSION_NOT_ACCESSIBLE = 0xf0000000
+
+# VehicleSeatOccupancyState
+VEHICLESEATOCCUPANCYSTATE_UNKNOWN = 0x0
+VEHICLESEATOCCUPANCYSTATE_VACANT = 0x1
+VEHICLESEATOCCUPANCYSTATE_OCCUPIED = 0x2
+
+# VehicleLightState
+VEHICLELIGHTSTATE_OFF = 0x0
+VEHICLELIGHTSTATE_ON = 0x1
+VEHICLELIGHTSTATE_DAYTIME_RUNNING = 0x2
+
+# VehicleLightSwitch
+VEHICLELIGHTSWITCH_OFF = 0x0
+VEHICLELIGHTSWITCH_ON = 0x1
+VEHICLELIGHTSWITCH_DAYTIME_RUNNING = 0x2
+VEHICLELIGHTSWITCH_AUTOMATIC = 0x100
+
+# EvConnectorType
+EVCONNECTORTYPE_UNKNOWN = 0x0
+EVCONNECTORTYPE_IEC_TYPE_1_AC = 0x1
+EVCONNECTORTYPE_IEC_TYPE_2_AC = 0x2
+EVCONNECTORTYPE_IEC_TYPE_3_AC = 0x3
+EVCONNECTORTYPE_IEC_TYPE_4_DC = 0x4
+EVCONNECTORTYPE_IEC_TYPE_1_CCS_DC = 0x5
+EVCONNECTORTYPE_IEC_TYPE_2_CCS_DC = 0x6
+EVCONNECTORTYPE_TESLA_ROADSTER = 0x7
+EVCONNECTORTYPE_TESLA_HPWC = 0x8
+EVCONNECTORTYPE_TESLA_SUPERCHARGER = 0x9
+EVCONNECTORTYPE_GBT_AC = 0xa
+EVCONNECTORTYPE_GBT_DC = 0xb
+EVCONNECTORTYPE_OTHER = 0x65
+
+# PortLocationType
+PORTLOCATIONTYPE_UNKNOWN = 0x0
+PORTLOCATIONTYPE_FRONT_LEFT = 0x1
+PORTLOCATIONTYPE_FRONT_RIGHT = 0x2
+PORTLOCATIONTYPE_REAR_RIGHT = 0x3
+PORTLOCATIONTYPE_REAR_LEFT = 0x4
+PORTLOCATIONTYPE_FRONT = 0x5
+PORTLOCATIONTYPE_REAR = 0x6
+
+# FuelType
+FUELTYPE_FUEL_TYPE_UNKNOWN = 0x0
+FUELTYPE_FUEL_TYPE_UNLEADED = 0x1
+FUELTYPE_FUEL_TYPE_LEADED = 0x2
+FUELTYPE_FUEL_TYPE_DIESEL_1 = 0x3
+FUELTYPE_FUEL_TYPE_DIESEL_2 = 0x4
+FUELTYPE_FUEL_TYPE_BIODIESEL = 0x5
+FUELTYPE_FUEL_TYPE_E85 = 0x6
+FUELTYPE_FUEL_TYPE_LPG = 0x7
+FUELTYPE_FUEL_TYPE_CNG = 0x8
+FUELTYPE_FUEL_TYPE_LNG = 0x9
+FUELTYPE_FUEL_TYPE_ELECTRIC = 0xa
+FUELTYPE_FUEL_TYPE_HYDROGEN = 0xb
+FUELTYPE_FUEL_TYPE_OTHER = 0xc
+
+# VehicleHvacFanDirection
+VEHICLEHVACFANDIRECTION_UNKNOWN = 0x0
+VEHICLEHVACFANDIRECTION_FACE = 0x1
+VEHICLEHVACFANDIRECTION_FLOOR = 0x2
+VEHICLEHVACFANDIRECTION_FACE_AND_FLOOR = 0x3
+VEHICLEHVACFANDIRECTION_DEFROST = 0x4
+VEHICLEHVACFANDIRECTION_DEFROST_AND_FLOOR = 0x6
+
+# VehicleOilLevel
+VEHICLEOILLEVEL_CRITICALLY_LOW = 0x0
+VEHICLEOILLEVEL_LOW = 0x1
+VEHICLEOILLEVEL_NORMAL = 0x2
+VEHICLEOILLEVEL_HIGH = 0x3
+VEHICLEOILLEVEL_ERROR = 0x4
+
+# VehicleApPowerStateConfigFlag
+VEHICLEAPPOWERSTATECONFIGFLAG_ENABLE_DEEP_SLEEP_FLAG = 0x1
+VEHICLEAPPOWERSTATECONFIGFLAG_CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2
+
+# VehicleApPowerStateReq
+VEHICLEAPPOWERSTATEREQ_ON = 0x0
+VEHICLEAPPOWERSTATEREQ_SHUTDOWN_PREPARE = 0x1
+VEHICLEAPPOWERSTATEREQ_CANCEL_SHUTDOWN = 0x2
+VEHICLEAPPOWERSTATEREQ_FINISHED = 0x3
+
+# VehicleApPowerStateReqIndex
+VEHICLEAPPOWERSTATEREQINDEX_STATE = 0x0
+VEHICLEAPPOWERSTATEREQINDEX_ADDITIONAL = 0x1
+
+# VehicleApPowerStateShutdownParam
+VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_IMMEDIATELY = 0x1
+VEHICLEAPPOWERSTATESHUTDOWNPARAM_CAN_SLEEP = 0x2
+VEHICLEAPPOWERSTATESHUTDOWNPARAM_SHUTDOWN_ONLY = 0x3
+VEHICLEAPPOWERSTATESHUTDOWNPARAM_SLEEP_IMMEDIATELY = 0x4
+
+# VehicleApPowerStateReport
+VEHICLEAPPOWERSTATEREPORT_WAIT_FOR_VHAL = 0x1
+VEHICLEAPPOWERSTATEREPORT_DEEP_SLEEP_ENTRY = 0x2
+VEHICLEAPPOWERSTATEREPORT_DEEP_SLEEP_EXIT = 0x3
+VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_POSTPONE = 0x4
+VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_START = 0x5
+VEHICLEAPPOWERSTATEREPORT_ON = 0x6
+VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_PREPARE = 0x7
+VEHICLEAPPOWERSTATEREPORT_SHUTDOWN_CANCELLED = 0x8
+
+# VehicleHwKeyInputAction
+VEHICLEHWKEYINPUTACTION_ACTION_DOWN = 0x0
+VEHICLEHWKEYINPUTACTION_ACTION_UP = 0x1
+
+# VehicleDisplay
+VEHICLEDISPLAY_MAIN = 0x0
+VEHICLEDISPLAY_INSTRUMENT_CLUSTER = 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_MILE = 0x24
+VEHICLEUNIT_CELSIUS = 0x30
+VEHICLEUNIT_FAHRENHEIT = 0x31
+VEHICLEUNIT_KELVIN = 0x32
+VEHICLEUNIT_MILLILITER = 0x40
+VEHICLEUNIT_LITER = 0x41
+VEHICLEUNIT_GALLON = 0x42
+VEHICLEUNIT_US_GALLON = 0x42
+VEHICLEUNIT_IMPERIAL_GALLON = 0x43
+VEHICLEUNIT_NANO_SECS = 0x50
+VEHICLEUNIT_SECS = 0x53
+VEHICLEUNIT_YEAR = 0x59
+VEHICLEUNIT_WATT_HOUR = 0x60
+VEHICLEUNIT_MILLIAMPERE = 0x61
+VEHICLEUNIT_MILLIVOLT = 0x62
+VEHICLEUNIT_MILLIWATTS = 0x63
+VEHICLEUNIT_AMPERE_HOURS = 0x64
+VEHICLEUNIT_KILOWATT_HOUR = 0x65
+VEHICLEUNIT_KILOPASCAL = 0x70
+VEHICLEUNIT_PSI = 0x71
+VEHICLEUNIT_BAR = 0x72
+VEHICLEUNIT_DEGREES = 0x80
+VEHICLEUNIT_MILES_PER_HOUR = 0x90
+VEHICLEUNIT_KILOMETERS_PER_HOUR = 0x91
+
+# VehiclePropertyChangeMode
+VEHICLEPROPERTYCHANGEMODE_STATIC = 0x0
+VEHICLEPROPERTYCHANGEMODE_ON_CHANGE = 0x1
+VEHICLEPROPERTYCHANGEMODE_CONTINUOUS = 0x2
+
+# VehiclePropertyAccess
+VEHICLEPROPERTYACCESS_NONE = 0x0
+VEHICLEPROPERTYACCESS_READ = 0x1
+VEHICLEPROPERTYACCESS_WRITE = 0x2
+VEHICLEPROPERTYACCESS_READ_WRITE = 0x3
+
+# VehiclePropertyStatus
+VEHICLEPROPERTYSTATUS_AVAILABLE = 0x0
+VEHICLEPROPERTYSTATUS_UNAVAILABLE = 0x1
+VEHICLEPROPERTYSTATUS_ERROR = 0x2
+
+# VehicleGear
+VEHICLEGEAR_GEAR_UNKNOWN = 0x0
+VEHICLEGEAR_GEAR_NEUTRAL = 0x1
+VEHICLEGEAR_GEAR_REVERSE = 0x2
+VEHICLEGEAR_GEAR_PARK = 0x4
+VEHICLEGEAR_GEAR_DRIVE = 0x8
+VEHICLEGEAR_GEAR_1 = 0x10
+VEHICLEGEAR_GEAR_2 = 0x20
+VEHICLEGEAR_GEAR_3 = 0x40
+VEHICLEGEAR_GEAR_4 = 0x80
+VEHICLEGEAR_GEAR_5 = 0x100
+VEHICLEGEAR_GEAR_6 = 0x200
+VEHICLEGEAR_GEAR_7 = 0x400
+VEHICLEGEAR_GEAR_8 = 0x800
+VEHICLEGEAR_GEAR_9 = 0x1000
+
+# VehicleAreaSeat
+VEHICLEAREASEAT_ROW_1_LEFT = 0x1
+VEHICLEAREASEAT_ROW_1_CENTER = 0x2
+VEHICLEAREASEAT_ROW_1_RIGHT = 0x4
+VEHICLEAREASEAT_ROW_2_LEFT = 0x10
+VEHICLEAREASEAT_ROW_2_CENTER = 0x20
+VEHICLEAREASEAT_ROW_2_RIGHT = 0x40
+VEHICLEAREASEAT_ROW_3_LEFT = 0x100
+VEHICLEAREASEAT_ROW_3_CENTER = 0x200
+VEHICLEAREASEAT_ROW_3_RIGHT = 0x400
+
+# VehicleAreaWindow
+VEHICLEAREAWINDOW_FRONT_WINDSHIELD = 0x1
+VEHICLEAREAWINDOW_REAR_WINDSHIELD = 0x2
+VEHICLEAREAWINDOW_ROW_1_LEFT = 0x10
+VEHICLEAREAWINDOW_ROW_1_RIGHT = 0x40
+VEHICLEAREAWINDOW_ROW_2_LEFT = 0x100
+VEHICLEAREAWINDOW_ROW_2_RIGHT = 0x400
+VEHICLEAREAWINDOW_ROW_3_LEFT = 0x1000
+VEHICLEAREAWINDOW_ROW_3_RIGHT = 0x4000
+VEHICLEAREAWINDOW_ROOF_TOP_1 = 0x10000
+VEHICLEAREAWINDOW_ROOF_TOP_2 = 0x20000
+
+# 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
+
+# VehicleAreaMirror
+VEHICLEAREAMIRROR_DRIVER_LEFT = 0x1
+VEHICLEAREAMIRROR_DRIVER_RIGHT = 0x2
+VEHICLEAREAMIRROR_DRIVER_CENTER = 0x4
+
+# VehicleTurnSignal
+VEHICLETURNSIGNAL_NONE = 0x0
+VEHICLETURNSIGNAL_RIGHT = 0x1
+VEHICLETURNSIGNAL_LEFT = 0x2
+
+# VehicleIgnitionState
+VEHICLEIGNITIONSTATE_UNDEFINED = 0x0
+VEHICLEIGNITIONSTATE_LOCK = 0x1
+VEHICLEIGNITIONSTATE_OFF = 0x2
+VEHICLEIGNITIONSTATE_ACC = 0x3
+VEHICLEIGNITIONSTATE_ON = 0x4
+VEHICLEIGNITIONSTATE_START = 0x5
+
+# SubscribeFlags
+SUBSCRIBEFLAGS_UNDEFINED = 0x0
+SUBSCRIBEFLAGS_EVENTS_FROM_CAR = 0x1
+SUBSCRIBEFLAGS_EVENTS_FROM_ANDROID = 0x2
+
+# StatusCode
+STATUSCODE_OK = 0x0
+STATUSCODE_TRY_AGAIN = 0x1
+STATUSCODE_INVALID_ARG = 0x2
+STATUSCODE_NOT_AVAILABLE = 0x3
+STATUSCODE_ACCESS_DENIED = 0x4
+STATUSCODE_INTERNAL_ERROR = 0x5
+
+# VehicleAreaWheel
+VEHICLEAREAWHEEL_UNKNOWN = 0x0
+VEHICLEAREAWHEEL_LEFT_FRONT = 0x1
+VEHICLEAREAWHEEL_RIGHT_FRONT = 0x2
+VEHICLEAREAWHEEL_LEFT_REAR = 0x4
+VEHICLEAREAWHEEL_RIGHT_REAR = 0x8
+
+# 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
+
+# Obd2IgnitionMonitorKind
+OBD2IGNITIONMONITORKIND_SPARK = 0x0
+OBD2IGNITIONMONITORKIND_COMPRESSION = 0x1
+
+# 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
+
+# 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
+
+# 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
+
+# Obd2SecondaryAirStatus
+OBD2SECONDARYAIRSTATUS_UPSTREAM = 0x1
+OBD2SECONDARYAIRSTATUS_DOWNSTREAM_OF_CATALYCIC_CONVERTER = 0x2
+OBD2SECONDARYAIRSTATUS_FROM_OUTSIDE_OR_OFF = 0x4
+OBD2SECONDARYAIRSTATUS_PUMP_ON_FOR_DIAGNOSTICS = 0x8
# Obd2FuelType
OBD2FUELTYPE_NOT_AVAILABLE = 0x0
@@ -558,17 +552,40 @@
OBD2FUELTYPE_HYBRID_REGENERATIVE = 0x16
OBD2FUELTYPE_BIFUEL_RUNNING_DIESEL = 0x17
-# VehicleAreaWindow
-VEHICLEAREAWINDOW_FRONT_WINDSHIELD = 0x1
-VEHICLEAREAWINDOW_REAR_WINDSHIELD = 0x2
-VEHICLEAREAWINDOW_ROW_1_LEFT = 0x10
-VEHICLEAREAWINDOW_ROW_1_RIGHT = 0x40
-VEHICLEAREAWINDOW_ROW_2_LEFT = 0x100
-VEHICLEAREAWINDOW_ROW_2_RIGHT = 0x400
-VEHICLEAREAWINDOW_ROW_3_LEFT = 0x1000
-VEHICLEAREAWINDOW_ROW_3_RIGHT = 0x4000
-VEHICLEAREAWINDOW_ROOF_TOP_1 = 0x10000
-VEHICLEAREAWINDOW_ROOF_TOP_2 = 0x20000
+# 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
# DiagnosticFloatSensorIndex
DIAGNOSTICFLOATSENSORINDEX_CALCULATED_ENGINE_LOAD = 0x0
@@ -644,19 +661,116 @@
DIAGNOSTICFLOATSENSORINDEX_ENGINE_FUEL_RATE = 0x46
DIAGNOSTICFLOATSENSORINDEX_LAST_SYSTEM_INDEX = 0x46
-# VehicleArea
-VEHICLEAREA_GLOBAL = 0x1000000
-VEHICLEAREA_WINDOW = 0x3000000
-VEHICLEAREA_MIRROR = 0x4000000
-VEHICLEAREA_SEAT = 0x5000000
-VEHICLEAREA_DOOR = 0x6000000
-VEHICLEAREA_WHEEL = 0x7000000
-VEHICLEAREA_MASK = 0xf000000
+# 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
+VMSMESSAGETYPE_PUBLISHER_ID_REQUEST = 0xd
+VMSMESSAGETYPE_PUBLISHER_ID_RESPONSE = 0xe
+VMSMESSAGETYPE_PUBLISHER_INFORMATION_REQUEST = 0xf
+VMSMESSAGETYPE_PUBLISHER_INFORMATION_RESPONSE = 0x10
+VMSMESSAGETYPE_START_SESSION = 0x11
+VMSMESSAGETYPE_LAST_VMS_MESSAGE_TYPE = 0x11
-# VehiclePropertyStatus
-VEHICLEPROPERTYSTATUS_AVAILABLE = 0x0
-VEHICLEPROPERTYSTATUS_UNAVAILABLE = 0x1
-VEHICLEPROPERTYSTATUS_ERROR = 0x2
+# VmsBaseMessageIntegerValuesIndex
+VMSBASEMESSAGEINTEGERVALUESINDEX_MESSAGE_TYPE = 0x0
+
+# VmsStartSessionMessageIntegerValuesIndex
+VMSSTARTSESSIONMESSAGEINTEGERVALUESINDEX_SERVICE_ID = 0x1
+VMSSTARTSESSIONMESSAGEINTEGERVALUESINDEX_CLIENT_ID = 0x2
+
+# VmsMessageWithLayerIntegerValuesIndex
+VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_TYPE = 0x1
+VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_SUBTYPE = 0x2
+VMSMESSAGEWITHLAYERINTEGERVALUESINDEX_LAYER_VERSION = 0x3
+
+# VmsMessageWithLayerAndPublisherIdIntegerValuesIndex
+VMSMESSAGEWITHLAYERANDPUBLISHERIDINTEGERVALUESINDEX_PUBLISHER_ID = 0x4
+
+# VmsOfferingMessageIntegerValuesIndex
+VMSOFFERINGMESSAGEINTEGERVALUESINDEX_PUBLISHER_ID = 0x1
+VMSOFFERINGMESSAGEINTEGERVALUESINDEX_NUMBER_OF_OFFERS = 0x2
+VMSOFFERINGMESSAGEINTEGERVALUESINDEX_OFFERING_START = 0x3
+
+# VmsSubscriptionsStateIntegerValuesIndex
+VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_SEQUENCE_NUMBER = 0x1
+VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_NUMBER_OF_LAYERS = 0x2
+VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_NUMBER_OF_ASSOCIATED_LAYERS = 0x3
+VMSSUBSCRIPTIONSSTATEINTEGERVALUESINDEX_SUBSCRIPTIONS_START = 0x4
+
+# VmsAvailabilityStateIntegerValuesIndex
+VMSAVAILABILITYSTATEINTEGERVALUESINDEX_SEQUENCE_NUMBER = 0x1
+VMSAVAILABILITYSTATEINTEGERVALUESINDEX_NUMBER_OF_ASSOCIATED_LAYERS = 0x2
+VMSAVAILABILITYSTATEINTEGERVALUESINDEX_LAYERS_START = 0x3
+
+# VmsPublisherInformationIntegerValuesIndex
+VMSPUBLISHERINFORMATIONINTEGERVALUESINDEX_PUBLISHER_ID = 0x1
+
+# UserFlags
+USERFLAGS_NONE = 0x0
+USERFLAGS_SYSTEM = 0x1
+USERFLAGS_GUEST = 0x2
+USERFLAGS_EPHEMERAL = 0x4
+USERFLAGS_ADMIN = 0x8
+USERFLAGS_DISABLED = 0x10
+USERFLAGS_PROFILE = 0x20
+
+# InitialUserInfoRequestType
+INITIALUSERINFOREQUESTTYPE_FIRST_BOOT = 0x1
+INITIALUSERINFOREQUESTTYPE_FIRST_BOOT_AFTER_OTA = 0x2
+INITIALUSERINFOREQUESTTYPE_COLD_BOOT = 0x3
+INITIALUSERINFOREQUESTTYPE_RESUME = 0x4
+
+# InitialUserInfoResponseAction
+INITIALUSERINFORESPONSEACTION_DEFAULT = 0x0
+INITIALUSERINFORESPONSEACTION_SWITCH = 0x1
+INITIALUSERINFORESPONSEACTION_CREATE = 0x2
+
+# SwitchUserMessageType
+SWITCHUSERMESSAGETYPE_LEGACY_ANDROID_SWITCH = 0x1
+SWITCHUSERMESSAGETYPE_ANDROID_SWITCH = 0x2
+SWITCHUSERMESSAGETYPE_VEHICLE_RESPONSE = 0x3
+SWITCHUSERMESSAGETYPE_VEHICLE_REQUEST = 0x4
+SWITCHUSERMESSAGETYPE_ANDROID_POST_SWITCH = 0x5
+
+# SwitchUserStatus
+SWITCHUSERSTATUS_SUCCESS = 0x1
+SWITCHUSERSTATUS_FAILURE = 0x2
+
+# CreateUserStatus
+CREATEUSERSTATUS_SUCCESS = 0x1
+CREATEUSERSTATUS_FAILURE = 0x2
+
+# UserIdentificationAssociationType
+USERIDENTIFICATIONASSOCIATIONTYPE_KEY_FOB = 0x1
+USERIDENTIFICATIONASSOCIATIONTYPE_CUSTOM_1 = 0x65
+USERIDENTIFICATIONASSOCIATIONTYPE_CUSTOM_2 = 0x66
+USERIDENTIFICATIONASSOCIATIONTYPE_CUSTOM_3 = 0x67
+USERIDENTIFICATIONASSOCIATIONTYPE_CUSTOM_4 = 0x68
+
+# UserIdentificationAssociationValue
+USERIDENTIFICATIONASSOCIATIONVALUE_UNKNOWN = 0x1
+USERIDENTIFICATIONASSOCIATIONVALUE_ASSOCIATED_CURRENT_USER = 0x2
+USERIDENTIFICATIONASSOCIATIONVALUE_ASSOCIATED_ANOTHER_USER = 0x3
+USERIDENTIFICATIONASSOCIATIONVALUE_NOT_ASSOCIATED_ANY_USER = 0x4
+
+# UserIdentificationAssociationSetValue
+USERIDENTIFICATIONASSOCIATIONSETVALUE_ASSOCIATE_CURRENT_USER = 0x1
+USERIDENTIFICATIONASSOCIATIONSETVALUE_DISASSOCIATE_CURRENT_USER = 0x2
+USERIDENTIFICATIONASSOCIATIONSETVALUE_DISASSOCIATE_ALL_USERS = 0x3
+
+# RotaryInputType
+ROTARYINPUTTYPE_ROTARY_INPUT_TYPE_SYSTEM_NAVIGATION = 0x0
+ROTARYINPUTTYPE_ROTARY_INPUT_TYPE_AUDIO_VOLUME = 0x1
# Create a container of value_type constants to be used by vhal_emulator
class vhal_types_2_0:
diff --git a/tools/emulator/vhal_emulator_test.py b/tools/emulator/vhal_emulator_test.py
index 14ec844..bf9cce1 100755
--- a/tools/emulator/vhal_emulator_test.py
+++ b/tools/emulator/vhal_emulator_test.py
@@ -125,6 +125,12 @@
# Truncate float to 5 decimal places
value = "%.5f" % value
value = float(value)
+ elif valType in self._types.TYPE_MIXED:
+ # Quick stub to unblock most tests
+ # Todo: proper implement according to VehiclePropertyType in types.hal
+ value = rxMsg.value[0].float_values[0]
+ value = "%.5f" % value
+ value = float(value)
else:
self._log.error("getValueFromMsg: valType=0x%X is not handled", valType)
value = None
diff --git a/tools/hidl_parser/parser.py b/tools/hidl_parser/parser.py
index 6ef19d5..c660cdb 100644
--- a/tools/hidl_parser/parser.py
+++ b/tools/hidl_parser/parser.py
@@ -29,14 +29,14 @@
import ply
-tokens = ('package', 'import', 'enum', 'struct',
+tokens = ('package', 'import', 'enum', 'struct', 'typedef',
'COLON', 'IDENTIFIER', 'COMMENT', 'NUMBER', 'HEX', 'OR', 'EQUALS',
'LPAREN', 'RPAREN', 'LBRACE', 'RBRACE', 'DOT', 'SEMICOLON', 'VERSION',
'COMMA', 'SHIFT', 'LESSTHAN', 'GREATERTHAN')
t_COLON = r':'
t_NUMBER = r'[0-9]+'
-t_HEX = r'0x[0-9A-Fa-f]+'
+t_HEX = r'0[x|X][0-9A-Fa-f]+'
t_OR = r'\|'
t_EQUALS = r'='
t_LPAREN = r'\('
@@ -67,6 +67,8 @@
t.type = 'enum'
elif t.value == 'struct':
t.type = 'struct'
+ elif t.value == 'typedef':
+ t.type = 'typedef'
return t
def t_error(t):
@@ -111,6 +113,13 @@
def __str__(self):
return 'struct %s' % self.name
+class TypedefHeader(object):
+ def __init__(self, name):
+ self.name = name
+
+ def __str__(self):
+ return 'typedef %s' % self.name
+
class EnumDecl(object):
def __init__(self, header, cases):
self.header = header
@@ -150,6 +159,18 @@
def __repr__(self):
return self.__str__()
+class TypedefDecl(object):
+ def __init__(self, header, name):
+ self.header = header
+ self.name = name
+
+ def __str__(self):
+ return '%s {\n%s\n}' % (self.header,
+ self.name)
+
+ def __repr__(self):
+ return self.__str__()
+
class StructElement(object):
pass
@@ -220,7 +241,7 @@
return self.value
def resolve(self, enum, document):
- if self.value.startswith("0x"):
+ if self.value.lower().startswith("0x"):
return int(self.value, 16)
else:
return int(self.value, 10)
@@ -284,6 +305,14 @@
enum = document['enums'][self.where]
return EnumValueLocalRef(self.ref).resolve(enum, document)
+class Typedef(object):
+ def __init__(self, header, name):
+ self.header = header
+ self.name = name
+
+ def __str__(self):
+ return 'typedef %s %s' % (self.typename, self.name)
+
# Error rule for syntax errors
def p_error(p):
print("Syntax error in input: %s" % p)
@@ -297,13 +326,18 @@
'document : header type_decls'
enums = {}
structs = {}
+ typedefs = {}
for enum in t[2]:
if not isinstance(enum, EnumDecl): continue
enums[enum.header.name] = enum
for struct in t[2]:
if not isinstance(struct, StructDecl): continue
structs[struct.header.name] = struct
- t[0] = {'header' : t[1], 'enums' : enums, 'structs' : structs}
+ for typedef in t[2]:
+ if not isinstance(typedef, TypedefDecl): continue
+ typedefs[typedef.header.name] = typedef
+
+ t[0] = {'header' : t[1], 'enums' : enums, 'structs' : structs, 'typedefs' : typedef}
def p_type_decls_1(t):
'type_decls : type_decl'
@@ -318,6 +352,9 @@
def p_type_decl_s(t):
'type_decl : struct_decl'
t[0] = t[1]
+def p_type_decl_t(t):
+ 'type_decl : typedef_decl'
+ t[0] = t[1]
def p_enum_cases_1(t):
'enum_cases : enum_case'
@@ -340,6 +377,10 @@
'enum_base : IDENTIFIER'
t[0] = t[1]
+def p_typedef_name(t):
+ 'typedef_name : IDENTIFIER'
+ t[0] = t[1]
+
def p_struct_header(t):
'struct_header : struct IDENTIFIER'
t[0] = StructHeader(t[2])
@@ -351,6 +392,10 @@
'enum_header : enum IDENTIFIER COLON enum_base'
t[0] = EnumHeader(t[2], t[4])
+def p_typedef_header(t):
+ 'typedef_header : typedef IDENTIFIER'
+ t[0] = TypedefHeader(t[2])
+
def p_struct_decl(t):
'struct_decl : struct_header LBRACE struct_elements RBRACE SEMICOLON'
t[0] = StructDecl(t[1], t[3])
@@ -362,6 +407,10 @@
'enum_decl : enum_header LBRACE enum_cases COMMA RBRACE SEMICOLON'
t[0] = EnumDecl(t[1], t[3])
+def p_typedef_decl(t):
+ 'typedef_decl : typedef_header typedef_name SEMICOLON'
+ t[0] = TypedefDecl(t[1], t[2])
+
def p_enum_value_1(t):
'''enum_value : NUMBER
| HEX'''
@@ -442,6 +491,8 @@
class SilentLogger(object):
def warning(*args):
pass
+ def error(*args):
+ print(args)
import ply.yacc as yacc
parser = yacc.yacc(debug=False, write_tables=False, errorlog=SilentLogger())