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):
For example, |
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 |
|
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:
For example, |
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 |
|
minInt64Value and maxInt64Value |
|
minFloatValue and maxFloatValue |
|
(New in Android 14)supportedEnumValues |
|
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.