platform_hardware_interfaces/automotive/vehicle/2.0
Felipe Leme 75a27f8b37 Implemented IVehicle::debug() on default Vehicle HAL implementation.
This function allows developer to drive (no pun intend) the VHAL behaviour
using lshal, which is useful when implementing new CarService functionalities
that depend on VHAL properties.

Examples:

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --help
Usage:

[no args]: dumps (id and value) all supported properties
--help: shows this help
--list: lists the ids of all supported properties
--get <PROP1> [PROP2] [PROPN]: dumps the value of specific properties
--set <PROP> <i|s> <VALUE>: sets the value of property PROP, using an arbitrary number
  of key/value parameters (i for int32, s for string)

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default | head -2
dumping 87 properties
1: {.timestamp = 0, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [3]{42, 1, 10}, .floatValues = [0]{}, .int64Values = [0]{},
.bytes = [0]{}, .stringValue = ""}}

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default \
  --set 299896583 s Numbers i 4 i 8 i 15 i 16 i 23 i 42
Set property {.timestamp = 0, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [6]{4, 8, 15, 16, 23, 42}, .floatValues = [0]{},
.int64Values = [0]{}, .bytes = [0]{}, .stringValue = "Numbers"}}

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default \
  --get 299896583

{.timestamp = 102372810363603, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [6]{4, 8, 15, 16, 23, 42}, .floatValues = [0]{},
.int64Values = [0]{}, .bytes = [0]{}, .stringValue = "Numbers"}}

Bug: 146207078
Test: see examples above
Test: atest android.hardware.automotive.vehicle@2.0-manager-unit-tests \
      android.hardware.automotive.vehicle@2.0-default-impl-unit-tests

Change-Id: I2a9bd6f39f2938653a404cab43bdae9e45476529
2020-02-05 15:22:50 -08:00
..
default Implemented IVehicle::debug() on default Vehicle HAL implementation. 2020-02-05 15:22:50 -08:00
Android.bp Update hidl makefiles for bpfmt 2019-04-17 09:38:50 -07:00
IVehicle.hal Removes deprecated audio property in vehicle hal 2018-01-18 21:01:24 +00:00
IVehicleCallback.hal Update VHAL types.hal 2018-04-02 22:45:20 -07:00
types.hal Added more properties associated with user management: 2020-02-04 19:01:40 -08:00