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
Loading
Please register or sign in to comment