Property configurations

Each supported property is specified by a property configuration defined through VehiclePropConfig structure and has the following fields.

Field Description
prop

The property ID. This must be either one of the defined system properties from the Supported System Properties or a vendor property. The property ID is constructed using bit-or of the following fields (right to left):

  • (0x00000000) 16 bits: a unique ID from range 0x0100 - 0xffff.
  • (0x00000000) 8 bits: Property types which defines the type for the property.
  • (0x00000000) 4 bits: Area types.
  • (0x00000000) 4 bits: VehiclePropertyGroup> This is either SYSTEM (0x10000000) or VENDOR (0x20000000). See Vendor Properties for properties you can customize.

For example,
INFO_VIN (0x11100100) = UniqueID (0x00000100) | VehiclePropertyType.STRING (0x00100000) | VehicleArea.GLOBAL (0x01000000) | VehiclePropertyGroup.SYSTEM (0x10000000)

access The access mode for the property. Must be one of READ, WRITE, or READ_WRITE. This must be equal to the access mode defined in Supported System Properties.
changeMode
  • Change mode for the property. Must be one of STATIC, ON_CHANGE, or CONTINUOUS. STATIC means the property value never changes after a system boot. ON_CHANGE means the VHAL must report when the value changes. CONTINUOUS means the property value changes continuously and VHAL must report based on the subscription sample rate.
  • Change mode must be equal to the change mode defined in Supported System Properties.
configArray An optional array to contain property specific configuration. Can be empty.
configString An optional string to contain property specific configuration. Can be empty.
minSampleRate and maxSampleRate

The minimum and maximum supported sample rate for continuous property. Not used if property is not continuous.

Property types

Defined as enums in VehiclePropertyType.aidl. Supported property types are listed in the following table.

Property type Value Description
STRING 0x00100000 String property, uses the stringValue field in Vehicle Property Value.
BOOLEAN 0x00200000 Boolean property, uses the first element in int32Values field in Vehicle property value. 0 means false, None 0 means true.
INT32 0x00400000 Integer property, uses the first element in int32Values field in Vehicle property value.
INT32_VEC 0x00410000 Integer[] property, uses the elements in the int32Values field in Vehicle property value.
INT64 0x00500000 Long property, uses the first element in int64Values field in Vehicle property value.
INT64_VEC 0x00510000 Long[] property, uses the elements in int64Values field in Vehicle property value.
FLOAT 0x00600000 Float property, uses the first element in floatValues field in Vehicle property value.
FLOAT_VEC 0x00610000 Float[] property, uses the elements in floatValues field in Vehicle property value.
BYTES 0x00700000 byte[] property, uses the elements in byteValues field in Vehicle property value.
MIXED 0x00e00000 Mixed type property. Any combination of scalar or vector types. The exact format must be provided in the config array in the property configuration.

For vendor MIXED type properties, configArray needs to be formatted in this structure:

  • configArray[0], 1 indicates the property has a String value
  • configArray[1], 1 indicates the property has a Boolean value
  • configArray[2], 1 indicates the property has an Integer value
  • configArray[3], the number indicates the size of Integer[] in the property
  • configArray[4], 1 indicates the property has a Long value
  • configArray[5], the number indicates the size of Long[] in the property
  • configArray[6], 1 indicates the property has a Float value
  • configArray[7], the number indicates the size of Float[] in the property
  • configArray[8], the number indicates the size of byte[] in the property.

For example, configArray = {1, 1, 1, 3, 0, 0, 0, 0, 0} indicates the property has a String value, a Boolean value, an Integer value, and an array with three integers.

Area ID configuration

Each property configuration also may contain a list of area ID configurations. This list is optional for global properties and required for zoned properties (properties with multiple supported areas). Each area ID configuration has the following fields.

Field Description
areaId The ID for this area. See Area IDs.
minInt32Value and maxInt32Value
  • Optional minimum and maximum value for INT32 type properties. Ignored for all other types. Ignored if both are 0.
  • For global property, if min and max value needs to be defined, one area configuration with the area ID 0 must be used.
minInt64Value and maxInt64Value
  • Optional minimum and maximum value for INT64 type properties. Ignored for all other types. Ignored if both are 0.
  • For global property, if min and max value needs to be defined, one area configuration with the area ID 0 must be used.
minFloatValue and maxFloatValue
  • Optional minimum and maximum value for Float type properties. Ignored for all other types. Ignored if both are 0.0.
  • For global property, if min and max value needs to be defined, one area configuration with the area ID 0 must be used.
(New in Android 14)
supportedEnumValues
  • Optional list of supported values if the property is defined as an enum type property. If not specified (empty) or before Android 14, it is assumed all enum values are supported.
  • For global property, if supported enum values need to be defined, one area configuration with the area ID 0 must be used.

Area types

Defined as enums in VehicleArea.aidl. The supported area types are listed below.

Area type Value Description
GLOBAL 0x01000000 This property is a global property and does not have multiple areas.
WINDOW 0x03000000 Area based on windows, uses VehicleAreaWindow enum.
MIRROR 0x04000000 Area based on mirrors, uses VehicleAreaMirror enum.
SEAT 0x05000000 Area based on seats, uses VehicleAreaSeat enum.
DOOR 0x06000000 Area based on doors, uses VehicleAreaDoor enum.
WHEEL 0x07000000 Area based on wheels, uses VehicleAreaWheel enum.

Each zoned property must use a pre-defined area type. Each area type has a set of bit flags defined in an enum for the area type. For example, the SEAT area defines VehicleAreaSeat enums:

  • ROW_1_LEFT = 0x0001
  • ROW_1_CENTER = 0x0002
  • ROW_1_RIGHT = 0x0004
  • ROW_2_LEFT = 0x0010
  • ROW_2_CENTER = 0x0020
  • ROW_2_RIGHT = 0x0040
  • ROW_3_LEFT = 0x0100
  • ...

Area IDs

Zoned properties are addressed through Area IDs. Each zoned property may support one or more Area IDs. An Area ID consists of one or more flags from its respective enum. For example, a property using VehicleAreaSeat might use the following Area IDs:

Item Description
ROW_1_LEFT | ROW_1_RIGHT The Area ID applies to both front seats.
ROW_2_LEFT Applies only to the rear left seat.
ROW_2_RIGHT Applies only to the rear right seat.

To learn more, see HVAC.