Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +14 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,12 @@ constexpr int WHEEL_REAR_RIGHT = (int)VehicleAreaWheel::RIGHT_REAR; const int32_t kGenerateFakeDataControllingProperty = 0x0666 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED; /** * This property is used for test purpose. End to end tests use this property to test set and get * method for MIXED type properties. */ const int32_t kMixedTypePropertyForTest = 0x1111 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED; /** * FakeDataCommand enum defines the supported command type for kGenerateFakeDataControllingProperty. * All those commands can be send independently with each other. And each will override the one sent Loading Loading @@ -625,6 +631,14 @@ const ConfigDeclaration kVehicleProperties[]{ }, }, {.config = {.prop = kMixedTypePropertyForTest, .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .configArray = {1, 1, 0, 2, 0, 0, 1, 0, 0}}, .initialValue = {.stringValue = "MIXED property", .int32Values = {1 /* indicate TRUE boolean value */, 2, 3}, .floatValues = {4.5f}}}, {.config = {.prop = toInt(VehicleProperty::DOOR_LOCK), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, Loading automotive/vehicle/2.0/types.hal +15 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,21 @@ enum VehiclePropertyType : int32_t { /** * Any combination of scalar or vector types. The exact format must be * provided in the description of the property. * * 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: * {@code 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 3 integers. */ MIXED = 0x00e00000, Loading Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +14 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,12 @@ constexpr int WHEEL_REAR_RIGHT = (int)VehicleAreaWheel::RIGHT_REAR; const int32_t kGenerateFakeDataControllingProperty = 0x0666 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED; /** * This property is used for test purpose. End to end tests use this property to test set and get * method for MIXED type properties. */ const int32_t kMixedTypePropertyForTest = 0x1111 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED; /** * FakeDataCommand enum defines the supported command type for kGenerateFakeDataControllingProperty. * All those commands can be send independently with each other. And each will override the one sent Loading Loading @@ -625,6 +631,14 @@ const ConfigDeclaration kVehicleProperties[]{ }, }, {.config = {.prop = kMixedTypePropertyForTest, .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .configArray = {1, 1, 0, 2, 0, 0, 1, 0, 0}}, .initialValue = {.stringValue = "MIXED property", .int32Values = {1 /* indicate TRUE boolean value */, 2, 3}, .floatValues = {4.5f}}}, {.config = {.prop = toInt(VehicleProperty::DOOR_LOCK), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, Loading
automotive/vehicle/2.0/types.hal +15 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,21 @@ enum VehiclePropertyType : int32_t { /** * Any combination of scalar or vector types. The exact format must be * provided in the description of the property. * * 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: * {@code 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 3 integers. */ MIXED = 0x00e00000, Loading