Package: android.hardware.automotive.vehicle@2.0

IVehicle

interface IVehicle

Methods

getAllPropConfigs

getAllPropConfigs ()
generates (vec<VehiclePropConfig> propConfigs)

Returns a list of all property configurations supported by this vehicle HAL.

Details
Generates
propConfigs

getPropConfigs

getPropConfigs (vec<int32_t> props)
generates (StatusCode status, vec<VehiclePropConfig> propConfigs)

Returns a list of property configurations for given properties.

If requested VehicleProperty wasn't found it must return StatusCode::INVALID_ARG, otherwise a list of vehicle property configurations with StatusCode::OK

Details
Parameters
props
Generates
status
propConfigs

get

get (VehiclePropValue requestedPropValue)
generates (StatusCode status, VehiclePropValue propValue)

Get a vehicle property value.

For VehiclePropertyChangeMode::STATIC properties, this method must always return the same value always.For VehiclePropertyChangeMode::ON_CHANGE properties, it must return the latest available value.

Some properties like AUDIO_VOLUME requires to pass additional data in GET request in VehiclePropValue object.

If there is no data available yet, which can happen during initial stage, this call must return immediately with an error code of StatusCode::TRY_AGAIN.

Details
Parameters
requestedPropValue
Generates
status
propValue

set

set (VehiclePropValue propValue)
generates (StatusCode status)

Set a vehicle property value.

Timestamp of data must be ignored for set operation.

Setting some properties require having initial state available.If initial data is not available yet this call must return StatusCode::TRY_AGAIN.For a property with separate power control this call must return StatusCode::NOT_AVAILABLE error if property is not powered on.

Details
Parameters
propValue
Generates
status

subscribe

subscribe (IVehicleCallback callback, vec<SubscribeOptions> options)
generates (StatusCode status)

Subscribes to property events.

Clients must be able to subscribe to multiple properties at a time depending on data provided in options argument.

Details
Parameters
callback
options
List of options to subscribe.SubscribeOption contains information such as property Id, area Id, sample rate, etc.
Generates
status

unsubscribe

unsubscribe (IVehicleCallback callback, int32_t propId)
generates (StatusCode status)

Unsubscribes from property events.

If this client wasn't subscribed to the given property, this method must return StatusCode::INVALID_ARG.

Details
Parameters
callback
propId
Generates
status

debugDump

debugDump ()
generates (string s)

Print out debugging state for the vehicle hal.

The text must be in ASCII encoding only.

Performance requirements:

The HAL must return from this call in less than 10ms.This call must avoid deadlocks, as it may be called at any point of operation.Any synchronization primitives used(such as mutex locks or semaphores)must be acquired with a timeout.

Details
Generates
s