- hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
const ConfigDeclaration kVehicleProperties[]{
{
.config = {
.prop = VENDOR_WRITE_PROP,
.access = VehiclePropertyAccess::READ_WRITE,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE
},
.initialValue = {.int32Values = {123}}},
//другой реквизит
Код: Выделить всё
VENDOR_WRITE_PROP = 0x105 + 0x20000000 + 0x03000000 + 0x00400000,
- hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v_2_0/PropertyUtils.h
constexpr int VENDOR_WRITE_PROP = (int)(0x105 | VehiclePropertyGroup::VENDOR | VehiclePropertyType::STRING | VehicleArea::GLOBAL);
Код: Выделить всё
{ "property": "TestVendorProperty::VENDOR_WRITE_PROP", "defaultValue": { "stringValue": "Vendor Property" }, "access": "VehiclePropertyAccess::READ_WRITE", "changeMode": "VehiclePropertyChangeMode::ON_CHANGE"},
Также проверено с помощью приведенной ниже команды: Но это недавно добавленное свойство VHAL недоступно.
adb Shell dumpsys car_service get-property-value
Дайте мне знать, чего мне не хватает?
Подробнее здесь: https://stackoverflow.com/questions/794 ... omotive-14
Мобильная версия