1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ 18 #define android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ 19 20 #include "BackportedPropertyHelper.h" 21 #include "PropertyUtils.h" 22 23 #include <map> 24 25 namespace android { 26 namespace hardware { 27 namespace automotive { 28 namespace vehicle { 29 namespace V2_0 { 30 31 namespace impl { 32 33 using ::android::hardware::automotive::vehicle::V2_0::backportedproperty::LOCATION_CHARACTERIZATION; 34 using ::android::hardware::automotive::vehicle::V2_0::backportedproperty::LocationCharacterization; 35 36 struct ConfigDeclaration { 37 VehiclePropConfig config; 38 39 /* This value will be used as an initial value for the property. If this field is specified for 40 * property that supports multiple areas then it will be used for all areas unless particular 41 * area is overridden in initialAreaValue field. */ 42 VehiclePropValue::RawValue initialValue; 43 /* Use initialAreaValues if it is necessary to specify different values per each area. */ 44 std::map<int32_t, VehiclePropValue::RawValue> initialAreaValues; 45 }; 46 47 const ConfigDeclaration kVehicleProperties[]{ 48 {.config = 49 { 50 .prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY), 51 .access = VehiclePropertyAccess::READ, 52 .changeMode = VehiclePropertyChangeMode::STATIC, 53 }, 54 .initialValue = {.floatValues = {15000.0f}}}, 55 56 {.config = 57 { 58 .prop = toInt(VehicleProperty::INFO_FUEL_TYPE), 59 .access = VehiclePropertyAccess::READ, 60 .changeMode = VehiclePropertyChangeMode::STATIC, 61 }, 62 .initialValue = {.int32Values = {(int)FuelType::FUEL_TYPE_UNLEADED}}}, 63 64 {.config = 65 { 66 .prop = toInt(VehicleProperty::INFO_EV_BATTERY_CAPACITY), 67 .access = VehiclePropertyAccess::READ, 68 .changeMode = VehiclePropertyChangeMode::STATIC, 69 }, 70 .initialValue = {.floatValues = {150000.0f}}}, 71 72 {.config = 73 { 74 .prop = toInt(VehicleProperty::INFO_EV_CONNECTOR_TYPE), 75 .access = VehiclePropertyAccess::READ, 76 .changeMode = VehiclePropertyChangeMode::STATIC, 77 }, 78 .initialValue = {.int32Values = {(int)EvConnectorType::IEC_TYPE_1_AC}}}, 79 80 {.config = 81 { 82 .prop = toInt(VehicleProperty::INFO_FUEL_DOOR_LOCATION), 83 .access = VehiclePropertyAccess::READ, 84 .changeMode = VehiclePropertyChangeMode::STATIC, 85 }, 86 .initialValue = {.int32Values = {FUEL_DOOR_REAR_LEFT}}}, 87 88 {.config = 89 { 90 .prop = toInt(VehicleProperty::INFO_EV_PORT_LOCATION), 91 .access = VehiclePropertyAccess::READ, 92 .changeMode = VehiclePropertyChangeMode::STATIC, 93 }, 94 .initialValue = {.int32Values = {CHARGE_PORT_FRONT_LEFT}}}, 95 96 {.config = 97 { 98 .prop = toInt(VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS), 99 .access = VehiclePropertyAccess::READ, 100 .changeMode = VehiclePropertyChangeMode::STATIC, 101 }, 102 .initialValue = {.int32Values = {CHARGE_PORT_FRONT_LEFT, CHARGE_PORT_REAR_LEFT}}}, 103 104 {.config = 105 { 106 .prop = toInt(VehicleProperty::INFO_MAKE), 107 .access = VehiclePropertyAccess::READ, 108 .changeMode = VehiclePropertyChangeMode::STATIC, 109 }, 110 .initialValue = {.stringValue = "Toy Vehicle"}}, 111 {.config = 112 { 113 .prop = toInt(VehicleProperty::INFO_MODEL), 114 .access = VehiclePropertyAccess::READ, 115 .changeMode = VehiclePropertyChangeMode::STATIC, 116 }, 117 .initialValue = {.stringValue = "Speedy Model"}}, 118 {.config = 119 { 120 .prop = toInt(VehicleProperty::INFO_MODEL_YEAR), 121 .access = VehiclePropertyAccess::READ, 122 .changeMode = VehiclePropertyChangeMode::STATIC, 123 }, 124 .initialValue = {.int32Values = {2020}}}, 125 {.config = 126 { 127 .prop = toInt(VehicleProperty::INFO_EXTERIOR_DIMENSIONS), 128 .access = VehiclePropertyAccess::READ, 129 .changeMode = VehiclePropertyChangeMode::STATIC, 130 }, 131 .initialValue = {.int32Values = {1776, 4950, 2008, 2140, 2984, 1665, 1667, 11800}}}, 132 {.config = 133 { 134 .prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED), 135 .access = VehiclePropertyAccess::READ, 136 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 137 .minSampleRate = 1.0f, 138 .maxSampleRate = 10.0f, 139 }, 140 .initialValue = {.floatValues = {0.0f}}}, 141 142 {.config = 143 { 144 .prop = toInt(VehicleProperty::VEHICLE_SPEED_DISPLAY_UNITS), 145 .access = VehiclePropertyAccess::READ_WRITE, 146 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 147 .configArray = {(int)VehicleUnit::METER_PER_SEC, 148 (int)VehicleUnit::MILES_PER_HOUR, 149 (int)VehicleUnit::KILOMETERS_PER_HOUR}, 150 }, 151 .initialValue = {.int32Values = {(int)VehicleUnit::MILES_PER_HOUR}}}, 152 153 {.config = 154 { 155 .prop = toInt(VehicleProperty::SEAT_OCCUPANCY), 156 .access = VehiclePropertyAccess::READ, 157 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 158 .areaConfigs = {VehicleAreaConfig{.areaId = (SEAT_1_LEFT)}, 159 VehicleAreaConfig{.areaId = (SEAT_1_RIGHT)}}, 160 }, 161 .initialAreaValues = {{SEAT_1_LEFT, 162 {.int32Values = {(int)VehicleSeatOccupancyState::VACANT}}}, 163 {SEAT_1_RIGHT, 164 {.int32Values = {(int)VehicleSeatOccupancyState::VACANT}}}}}, 165 166 {.config = 167 { 168 .prop = toInt(VehicleProperty::INFO_DRIVER_SEAT), 169 .access = VehiclePropertyAccess::READ, 170 .changeMode = VehiclePropertyChangeMode::STATIC, 171 // this was a zoned property on an old vhal, but it is meant to be global 172 .areaConfigs = {VehicleAreaConfig{.areaId = (0)}}, 173 }, 174 .initialValue = {.int32Values = {SEAT_1_LEFT}}}, 175 176 {.config = 177 { 178 .prop = toInt(VehicleProperty::PERF_ODOMETER), 179 .access = VehiclePropertyAccess::READ, 180 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 181 .minSampleRate = 1.0f, 182 .maxSampleRate = 10.0f, 183 }, 184 .initialValue = {.floatValues = {0.0f}}}, 185 {.config = 186 { 187 .prop = toInt(VehicleProperty::PERF_STEERING_ANGLE), 188 .access = VehiclePropertyAccess::READ, 189 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 190 .minSampleRate = 1.0f, 191 .maxSampleRate = 10.0f, 192 }, 193 .initialValue = {.floatValues = {0.0f}}}, 194 {.config = 195 { 196 .prop = toInt(VehicleProperty::PERF_REAR_STEERING_ANGLE), 197 .access = VehiclePropertyAccess::READ, 198 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 199 .minSampleRate = 1.0f, 200 .maxSampleRate = 10.0f, 201 }, 202 .initialValue = {.floatValues = {0.0f}}}, 203 { 204 .config = 205 { 206 .prop = toInt(VehicleProperty::ENGINE_RPM), 207 .access = VehiclePropertyAccess::READ, 208 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 209 .minSampleRate = 1.0f, 210 .maxSampleRate = 10.0f, 211 }, 212 .initialValue = {.floatValues = {0.0f}}, 213 }, 214 215 {.config = 216 { 217 .prop = toInt(VehicleProperty::FUEL_LEVEL), 218 .access = VehiclePropertyAccess::READ, 219 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 220 .minSampleRate = 1.0f, 221 .maxSampleRate = 100.0f, 222 }, 223 .initialValue = {.floatValues = {15000.0f}}}, 224 225 {.config = 226 { 227 .prop = toInt(VehicleProperty::FUEL_DOOR_OPEN), 228 .access = VehiclePropertyAccess::READ_WRITE, 229 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 230 }, 231 .initialValue = {.int32Values = {0}}}, 232 233 {.config = 234 { 235 .prop = toInt(VehicleProperty::EV_BATTERY_LEVEL), 236 .access = VehiclePropertyAccess::READ, 237 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 238 .minSampleRate = 1.0f, 239 .maxSampleRate = 100.0f, 240 }, 241 .initialValue = {.floatValues = {150000.0f}}}, 242 243 {.config = 244 { 245 .prop = toInt(VehicleProperty::EV_CHARGE_PORT_OPEN), 246 .access = VehiclePropertyAccess::READ_WRITE, 247 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 248 }, 249 .initialValue = {.int32Values = {0}}}, 250 251 {.config = 252 { 253 .prop = toInt(VehicleProperty::EV_CHARGE_PORT_CONNECTED), 254 .access = VehiclePropertyAccess::READ, 255 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 256 }, 257 .initialValue = {.int32Values = {0}}}, 258 259 {.config = 260 { 261 .prop = toInt(VehicleProperty::EV_BATTERY_INSTANTANEOUS_CHARGE_RATE), 262 .access = VehiclePropertyAccess::READ, 263 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 264 .minSampleRate = 1.0f, 265 .maxSampleRate = 10.0f, 266 }, 267 .initialValue = {.floatValues = {0.0f}}}, 268 269 {.config = 270 { 271 .prop = toInt(VehicleProperty::RANGE_REMAINING), 272 .access = VehiclePropertyAccess::READ_WRITE, 273 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 274 .minSampleRate = 1.0f, 275 .maxSampleRate = 2.0f, 276 }, 277 .initialValue = {.floatValues = {50000.0f}}}, // units in meters 278 279 {.config = 280 { 281 .prop = toInt(VehicleProperty::TIRE_PRESSURE), 282 .access = VehiclePropertyAccess::READ, 283 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 284 .areaConfigs = {VehicleAreaConfig{ 285 .areaId = WHEEL_FRONT_LEFT, 286 .minFloatValue = 193.0f, 287 .maxFloatValue = 300.0f, 288 }, 289 VehicleAreaConfig{ 290 .areaId = WHEEL_FRONT_RIGHT, 291 .minFloatValue = 193.0f, 292 .maxFloatValue = 300.0f, 293 }, 294 VehicleAreaConfig{ 295 .areaId = WHEEL_REAR_LEFT, 296 .minFloatValue = 193.0f, 297 .maxFloatValue = 300.0f, 298 }, 299 VehicleAreaConfig{ 300 .areaId = WHEEL_REAR_RIGHT, 301 .minFloatValue = 193.0f, 302 .maxFloatValue = 300.0f, 303 }}, 304 .minSampleRate = 1.0f, 305 .maxSampleRate = 2.0f, 306 }, 307 .initialValue = {.floatValues = {200.0f}}}, // units in kPa 308 309 {.config = 310 { 311 .prop = toInt(VehicleProperty::CRITICALLY_LOW_TIRE_PRESSURE), 312 .access = VehiclePropertyAccess::READ, 313 .changeMode = VehiclePropertyChangeMode::STATIC, 314 .areaConfigs = {VehicleAreaConfig{ 315 .areaId = WHEEL_FRONT_LEFT, 316 }, 317 VehicleAreaConfig{ 318 .areaId = WHEEL_FRONT_RIGHT, 319 }, 320 VehicleAreaConfig{ 321 .areaId = WHEEL_REAR_LEFT, 322 }, 323 VehicleAreaConfig{ 324 .areaId = WHEEL_REAR_RIGHT, 325 }}, 326 }, 327 .initialAreaValues = {{WHEEL_FRONT_LEFT, {.floatValues = {137.0f}}}, 328 {WHEEL_FRONT_RIGHT, {.floatValues = {137.0f}}}, 329 {WHEEL_REAR_RIGHT, {.floatValues = {137.0f}}}, 330 {WHEEL_REAR_LEFT, {.floatValues = {137.0f}}}}}, 331 332 {.config = 333 { 334 .prop = toInt(VehicleProperty::TIRE_PRESSURE_DISPLAY_UNITS), 335 .access = VehiclePropertyAccess::READ_WRITE, 336 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 337 .configArray = {(int)VehicleUnit::KILOPASCAL, (int)VehicleUnit::PSI, 338 (int)VehicleUnit::BAR}, 339 }, 340 .initialValue = {.int32Values = {toInt(VehicleUnit::PSI)}}}, 341 342 {.config = 343 { 344 .prop = toInt(VehicleProperty::CURRENT_GEAR), 345 .access = VehiclePropertyAccess::READ, 346 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 347 .configArray = {(int)VehicleGear::GEAR_PARK, 348 (int)VehicleGear::GEAR_NEUTRAL, 349 (int)VehicleGear::GEAR_REVERSE, (int)VehicleGear::GEAR_1, 350 (int)VehicleGear::GEAR_2, (int)VehicleGear::GEAR_3, 351 (int)VehicleGear::GEAR_4, (int)VehicleGear::GEAR_5}, 352 }, 353 .initialValue = {.int32Values = {toInt(VehicleGear::GEAR_PARK)}}}, 354 355 {.config = 356 { 357 .prop = toInt(VehicleProperty::PARKING_BRAKE_ON), 358 .access = VehiclePropertyAccess::READ, 359 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 360 }, 361 .initialValue = {.int32Values = {1}}}, 362 363 {.config = 364 { 365 .prop = toInt(VehicleProperty::PARKING_BRAKE_AUTO_APPLY), 366 .access = VehiclePropertyAccess::READ, 367 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 368 }, 369 .initialValue = {.int32Values = {1}}}, 370 371 {.config = 372 { 373 .prop = toInt(VehicleProperty::FUEL_LEVEL_LOW), 374 .access = VehiclePropertyAccess::READ, 375 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 376 }, 377 .initialValue = {.int32Values = {0}}}, 378 379 {.config = 380 { 381 .prop = toInt(VehicleProperty::FUEL_VOLUME_DISPLAY_UNITS), 382 .access = VehiclePropertyAccess::READ_WRITE, 383 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 384 .configArray = {(int)VehicleUnit::LITER, (int)VehicleUnit::US_GALLON}, 385 }, 386 .initialValue = {.int32Values = {(int)VehicleUnit::US_GALLON}}}, 387 388 {.config = 389 { 390 .prop = toInt(VehicleProperty::HW_KEY_INPUT), 391 .access = VehiclePropertyAccess::READ, 392 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 393 }, 394 .initialValue = {.int32Values = {0, 0, 0}}}, 395 396 {.config = 397 { 398 .prop = toInt(VehicleProperty::HW_ROTARY_INPUT), 399 .access = VehiclePropertyAccess::READ, 400 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 401 }, 402 .initialValue = {.int32Values = {0, 0, 0}}}, 403 404 {.config = 405 { 406 .prop = toInt(VehicleProperty::HW_CUSTOM_INPUT), 407 .access = VehiclePropertyAccess::READ, 408 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 409 .configArray = {0, 0, 0, 3, 0, 0, 0, 0, 0}, 410 }, 411 .initialValue = 412 { 413 .int32Values = {0, 0, 0}, 414 }}, 415 416 {.config = {.prop = toInt(VehicleProperty::HVAC_POWER_ON), 417 .access = VehiclePropertyAccess::READ_WRITE, 418 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 419 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}, 420 // TODO(bryaneyler): Ideally, this is generated dynamically from 421 // kHvacPowerProperties. 422 .configArray = {toInt(VehicleProperty::HVAC_FAN_SPEED), 423 toInt(VehicleProperty::HVAC_FAN_DIRECTION)}}, 424 .initialValue = {.int32Values = {1}}}, 425 426 { 427 .config = {.prop = toInt(VehicleProperty::HVAC_DEFROSTER), 428 .access = VehiclePropertyAccess::READ_WRITE, 429 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 430 .areaConfigs = 431 {VehicleAreaConfig{ 432 .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, 433 VehicleAreaConfig{ 434 .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, 435 .initialValue = {.int32Values = {0}} // Will be used for all areas. 436 }, 437 { 438 .config = {.prop = toInt(VehicleProperty::HVAC_ELECTRIC_DEFROSTER_ON), 439 .access = VehiclePropertyAccess::READ_WRITE, 440 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 441 .areaConfigs = 442 {VehicleAreaConfig{ 443 .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, 444 VehicleAreaConfig{ 445 .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, 446 .initialValue = {.int32Values = {0}} // Will be used for all areas. 447 }, 448 449 {.config = {.prop = toInt(VehicleProperty::HVAC_MAX_DEFROST_ON), 450 .access = VehiclePropertyAccess::READ_WRITE, 451 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 452 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_FRONT_ROW}, 453 VehicleAreaConfig{.areaId = HVAC_REAR_ROW}}}, 454 .initialValue = {.int32Values = {0}}}, 455 456 {.config = {.prop = toInt(VehicleProperty::HVAC_RECIRC_ON), 457 .access = VehiclePropertyAccess::READ_WRITE, 458 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 459 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 460 .initialValue = {.int32Values = {1}}}, 461 462 {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_RECIRC_ON), 463 .access = VehiclePropertyAccess::READ_WRITE, 464 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 465 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 466 .initialValue = {.int32Values = {0}}}, 467 468 {.config = {.prop = toInt(VehicleProperty::HVAC_AC_ON), 469 .access = VehiclePropertyAccess::READ_WRITE, 470 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 471 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 472 .initialValue = {.int32Values = {1}}}, 473 474 {.config = {.prop = toInt(VehicleProperty::HVAC_MAX_AC_ON), 475 .access = VehiclePropertyAccess::READ_WRITE, 476 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 477 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 478 .initialValue = {.int32Values = {0}}}, 479 480 {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_ON), 481 .access = VehiclePropertyAccess::READ_WRITE, 482 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 483 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 484 .initialValue = {.int32Values = {1}}}, 485 486 {.config = {.prop = toInt(VehicleProperty::HVAC_DUAL_ON), 487 .access = VehiclePropertyAccess::READ_WRITE, 488 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 489 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 490 .initialValue = {.int32Values = {0}}}, 491 492 {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_SPEED), 493 .access = VehiclePropertyAccess::READ_WRITE, 494 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 495 .areaConfigs = {VehicleAreaConfig{ 496 .areaId = HVAC_ALL, .minInt32Value = 1, .maxInt32Value = 7}}}, 497 .initialValue = {.int32Values = {3}}}, 498 499 {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION), 500 .access = VehiclePropertyAccess::READ_WRITE, 501 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 502 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 503 .initialValue = {.int32Values = {toInt(VehicleHvacFanDirection::FACE)}}}, 504 505 {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION_AVAILABLE), 506 .access = VehiclePropertyAccess::READ, 507 .changeMode = VehiclePropertyChangeMode::STATIC, 508 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 509 .initialValue = {.int32Values = {FAN_DIRECTION_FACE, FAN_DIRECTION_FLOOR, 510 FAN_DIRECTION_FACE | FAN_DIRECTION_FLOOR, 511 FAN_DIRECTION_DEFROST, 512 FAN_DIRECTION_FACE | FAN_DIRECTION_DEFROST, 513 FAN_DIRECTION_FLOOR | FAN_DIRECTION_DEFROST, 514 FAN_DIRECTION_FLOOR | FAN_DIRECTION_DEFROST | 515 FAN_DIRECTION_FACE}}}, 516 {.config = {.prop = toInt(VehicleProperty::HVAC_SEAT_VENTILATION), 517 .access = VehiclePropertyAccess::READ_WRITE, 518 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 519 .areaConfigs = {VehicleAreaConfig{ 520 .areaId = SEAT_1_LEFT, 521 .minInt32Value = 0, 522 .maxInt32Value = 3, 523 }, 524 VehicleAreaConfig{ 525 .areaId = SEAT_1_RIGHT, 526 .minInt32Value = 0, 527 .maxInt32Value = 3, 528 }}}, 529 .initialValue = 530 {.int32Values = {0}}}, // 0 is off and +ve values indicate ventilation level. 531 532 {.config = {.prop = toInt(VehicleProperty::HVAC_STEERING_WHEEL_HEAT), 533 .access = VehiclePropertyAccess::READ_WRITE, 534 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 535 .areaConfigs = {VehicleAreaConfig{ 536 .areaId = (0), .minInt32Value = -2, .maxInt32Value = 2}}}, 537 .initialValue = {.int32Values = {0}}}, // +ve values for heating and -ve for cooling 538 539 {.config = {.prop = toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE), 540 .access = VehiclePropertyAccess::READ_WRITE, 541 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 542 .areaConfigs = {VehicleAreaConfig{ 543 .areaId = SEAT_1_LEFT, 544 .minInt32Value = -2, 545 .maxInt32Value = 2, 546 }, 547 VehicleAreaConfig{ 548 .areaId = SEAT_1_RIGHT, 549 .minInt32Value = -2, 550 .maxInt32Value = 2, 551 }}}, 552 .initialValue = {.int32Values = {0}}}, // +ve values for heating and -ve for cooling 553 554 {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET), 555 .access = VehiclePropertyAccess::READ_WRITE, 556 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 557 .configArray = {160, 280, 5, 605, 825, 10}, 558 .areaConfigs = {VehicleAreaConfig{ 559 .areaId = HVAC_LEFT, 560 .minFloatValue = 16, 561 .maxFloatValue = 32, 562 }, 563 VehicleAreaConfig{ 564 .areaId = HVAC_RIGHT, 565 .minFloatValue = 16, 566 .maxFloatValue = 32, 567 }}}, 568 .initialAreaValues = {{HVAC_LEFT, {.floatValues = {16}}}, 569 {HVAC_RIGHT, {.floatValues = {20}}}}}, 570 571 {.config = 572 { 573 .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION), 574 .access = VehiclePropertyAccess::READ_WRITE, 575 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 576 }, 577 .initialValue = {.floatValues = {66.2f, (float)VehicleUnit::FAHRENHEIT, 19.0f, 66.5f}}}, 578 579 {.config = 580 { 581 .prop = toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE), 582 .access = VehiclePropertyAccess::READ, 583 // TODO(bryaneyler): Support ON_CHANGE as well. 584 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 585 .minSampleRate = 1.0f, 586 .maxSampleRate = 2.0f, 587 }, 588 .initialValue = {.floatValues = {25.0f}}}, 589 590 {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS), 591 .access = VehiclePropertyAccess::READ_WRITE, 592 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 593 .configArray = {(int)VehicleUnit::FAHRENHEIT, (int)VehicleUnit::CELSIUS}}, 594 .initialValue = {.int32Values = {(int)VehicleUnit::FAHRENHEIT}}}, 595 596 {.config = 597 { 598 .prop = toInt(VehicleProperty::DISTANCE_DISPLAY_UNITS), 599 .access = VehiclePropertyAccess::READ_WRITE, 600 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 601 .areaConfigs = {VehicleAreaConfig{.areaId = (0)}}, 602 .configArray = {(int)VehicleUnit::KILOMETER, (int)VehicleUnit::MILE}, 603 }, 604 .initialValue = {.int32Values = {(int)VehicleUnit::MILE}}}, 605 606 {.config = 607 { 608 .prop = toInt(VehicleProperty::NIGHT_MODE), 609 .access = VehiclePropertyAccess::READ, 610 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 611 }, 612 .initialValue = {.int32Values = {0}}}, 613 614 {.config = 615 { 616 .prop = toInt(VehicleProperty::GEAR_SELECTION), 617 .access = VehiclePropertyAccess::READ, 618 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 619 .configArray = {(int)VehicleGear::GEAR_PARK, 620 (int)VehicleGear::GEAR_NEUTRAL, 621 (int)VehicleGear::GEAR_REVERSE, 622 (int)VehicleGear::GEAR_DRIVE, (int)VehicleGear::GEAR_1, 623 (int)VehicleGear::GEAR_2, (int)VehicleGear::GEAR_3, 624 (int)VehicleGear::GEAR_4, (int)VehicleGear::GEAR_5}, 625 }, 626 .initialValue = {.int32Values = {toInt(VehicleGear::GEAR_PARK)}}}, 627 628 {.config = 629 { 630 .prop = toInt(VehicleProperty::TURN_SIGNAL_STATE), 631 .access = VehiclePropertyAccess::READ, 632 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 633 }, 634 .initialValue = {.int32Values = {toInt(VehicleTurnSignal::NONE)}}}, 635 636 {.config = 637 { 638 .prop = toInt(VehicleProperty::IGNITION_STATE), 639 .access = VehiclePropertyAccess::READ, 640 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 641 }, 642 .initialValue = {.int32Values = {toInt(VehicleIgnitionState::ON)}}}, 643 644 {.config = 645 { 646 .prop = toInt(VehicleProperty::ENGINE_OIL_LEVEL), 647 .access = VehiclePropertyAccess::READ, 648 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 649 }, 650 .initialValue = {.int32Values = {toInt(VehicleOilLevel::NORMAL)}}}, 651 652 {.config = 653 { 654 .prop = toInt(VehicleProperty::ENGINE_OIL_TEMP), 655 .access = VehiclePropertyAccess::READ, 656 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 657 .minSampleRate = 0.1, // 0.1 Hz, every 10 seconds 658 .maxSampleRate = 10, // 10 Hz, every 100 ms 659 }, 660 .initialValue = {.floatValues = {101.0f}}}, 661 662 { 663 .config = {.prop = kMixedTypePropertyForTest, 664 .access = VehiclePropertyAccess::READ_WRITE, 665 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 666 .configArray = {1, 1, 0, 2, 0, 0, 1, 0, 0}}, 667 .initialValue = 668 { 669 .int32Values = {1 /* indicate TRUE boolean value */, 2, 3}, 670 .floatValues = {4.5f}, 671 .stringValue = "MIXED property", 672 }, 673 }, 674 675 {.config = {.prop = toInt(VehicleProperty::DOOR_LOCK), 676 .access = VehiclePropertyAccess::READ_WRITE, 677 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 678 .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT}, 679 VehicleAreaConfig{.areaId = DOOR_1_RIGHT}, 680 VehicleAreaConfig{.areaId = DOOR_2_LEFT}, 681 VehicleAreaConfig{.areaId = DOOR_2_RIGHT}}}, 682 .initialAreaValues = {{DOOR_1_LEFT, {.int32Values = {1}}}, 683 {DOOR_1_RIGHT, {.int32Values = {1}}}, 684 {DOOR_2_LEFT, {.int32Values = {1}}}, 685 {DOOR_2_RIGHT, {.int32Values = {1}}}}}, 686 687 {.config = {.prop = toInt(VehicleProperty::DOOR_POS), 688 .access = VehiclePropertyAccess::READ_WRITE, 689 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 690 .areaConfigs = 691 {VehicleAreaConfig{ 692 .areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, 693 VehicleAreaConfig{.areaId = DOOR_1_RIGHT, 694 .minInt32Value = 0, 695 .maxInt32Value = 1}, 696 VehicleAreaConfig{ 697 .areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, 698 VehicleAreaConfig{.areaId = DOOR_2_RIGHT, 699 .minInt32Value = 0, 700 .maxInt32Value = 1}, 701 VehicleAreaConfig{ 702 .areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}}, 703 .initialValue = {.int32Values = {0}}}, 704 705 {.config = {.prop = toInt(VehicleProperty::WINDOW_LOCK), 706 .access = VehiclePropertyAccess::READ_WRITE, 707 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 708 .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_RIGHT | WINDOW_2_LEFT | 709 WINDOW_2_RIGHT}}}, 710 .initialAreaValues = {{WINDOW_1_RIGHT | WINDOW_2_LEFT | WINDOW_2_RIGHT, 711 {.int32Values = {0}}}}}, 712 713 {.config = {.prop = toInt(VehicleProperty::WINDOW_POS), 714 .access = VehiclePropertyAccess::READ_WRITE, 715 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 716 .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT, 717 .minInt32Value = 0, 718 .maxInt32Value = 10}, 719 VehicleAreaConfig{.areaId = WINDOW_1_RIGHT, 720 .minInt32Value = 0, 721 .maxInt32Value = 10}, 722 VehicleAreaConfig{.areaId = WINDOW_2_LEFT, 723 .minInt32Value = 0, 724 .maxInt32Value = 10}, 725 VehicleAreaConfig{.areaId = WINDOW_2_RIGHT, 726 .minInt32Value = 0, 727 .maxInt32Value = 10}, 728 VehicleAreaConfig{.areaId = WINDOW_ROOF_TOP_1, 729 .minInt32Value = -10, 730 .maxInt32Value = 10}}}, 731 .initialValue = {.int32Values = {0}}}, 732 733 {.config = 734 { 735 .prop = WHEEL_TICK, 736 .access = VehiclePropertyAccess::READ, 737 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 738 .configArray = {ALL_WHEELS, 50000, 50000, 50000, 50000}, 739 .minSampleRate = 1.0f, 740 .maxSampleRate = 10.0f, 741 }, 742 .initialValue = {.int64Values = {0, 100000, 200000, 300000, 400000}}}, 743 744 {.config = {.prop = ABS_ACTIVE, 745 .access = VehiclePropertyAccess::READ, 746 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 747 .initialValue = {.int32Values = {0}}}, 748 749 {.config = {.prop = TRACTION_CONTROL_ACTIVE, 750 .access = VehiclePropertyAccess::READ, 751 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 752 .initialValue = {.int32Values = {0}}}, 753 754 {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), 755 .access = VehiclePropertyAccess::READ, 756 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 757 .configArray = {3}}, 758 .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}}}, 759 760 {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), 761 .access = VehiclePropertyAccess::READ_WRITE, 762 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 763 .initialValue = {.int32Values = {toInt(VehicleApPowerStateReport::WAIT_FOR_VHAL), 0}}}, 764 765 {.config = {.prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS), 766 .access = VehiclePropertyAccess::READ_WRITE, 767 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 768 .areaConfigs = {VehicleAreaConfig{.minInt32Value = 0, .maxInt32Value = 100}}}, 769 .initialValue = {.int32Values = {100}}}, 770 771 { 772 .config = {.prop = OBD2_LIVE_FRAME, 773 .access = VehiclePropertyAccess::READ, 774 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 775 .configArray = {0, 0}}, 776 }, 777 778 { 779 .config = {.prop = OBD2_FREEZE_FRAME, 780 .access = VehiclePropertyAccess::READ, 781 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 782 .configArray = {0, 0}}, 783 }, 784 785 { 786 .config = {.prop = OBD2_FREEZE_FRAME_INFO, 787 .access = VehiclePropertyAccess::READ, 788 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 789 }, 790 791 { 792 .config = {.prop = OBD2_FREEZE_FRAME_CLEAR, 793 .access = VehiclePropertyAccess::WRITE, 794 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 795 .configArray = {1}}, 796 }, 797 798 {.config = 799 { 800 .prop = toInt(VehicleProperty::HEADLIGHTS_STATE), 801 .access = VehiclePropertyAccess::READ, 802 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 803 }, 804 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 805 806 {.config = 807 { 808 .prop = toInt(VehicleProperty::HIGH_BEAM_LIGHTS_STATE), 809 .access = VehiclePropertyAccess::READ, 810 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 811 }, 812 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 813 814 {.config = 815 { 816 .prop = toInt(VehicleProperty::FOG_LIGHTS_STATE), 817 .access = VehiclePropertyAccess::READ, 818 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 819 }, 820 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 821 822 {.config = 823 { 824 .prop = toInt(VehicleProperty::HAZARD_LIGHTS_STATE), 825 .access = VehiclePropertyAccess::READ, 826 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 827 }, 828 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 829 830 {.config = 831 { 832 .prop = toInt(VehicleProperty::HEADLIGHTS_SWITCH), 833 .access = VehiclePropertyAccess::READ_WRITE, 834 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 835 }, 836 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 837 838 {.config = 839 { 840 .prop = toInt(VehicleProperty::HIGH_BEAM_LIGHTS_SWITCH), 841 .access = VehiclePropertyAccess::READ_WRITE, 842 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 843 }, 844 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 845 846 {.config = 847 { 848 .prop = toInt(VehicleProperty::FOG_LIGHTS_SWITCH), 849 .access = VehiclePropertyAccess::READ_WRITE, 850 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 851 }, 852 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 853 854 {.config = 855 { 856 .prop = toInt(VehicleProperty::HAZARD_LIGHTS_SWITCH), 857 .access = VehiclePropertyAccess::READ_WRITE, 858 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 859 }, 860 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 861 862 {.config = 863 { 864 .prop = toInt(VehicleProperty::EVS_SERVICE_REQUEST), 865 .access = VehiclePropertyAccess::READ, 866 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 867 }, 868 .initialValue = {.int32Values = {toInt(EvsServiceType::REARVIEW), 869 toInt(EvsServiceState::OFF)}}}, 870 871 {.config = {.prop = VEHICLE_MAP_SERVICE, 872 .access = VehiclePropertyAccess::READ_WRITE, 873 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}}, 874 875 // Example Vendor Extension properties for testing 876 {.config = {.prop = VENDOR_EXTENSION_BOOLEAN_PROPERTY, 877 .access = VehiclePropertyAccess::READ_WRITE, 878 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 879 .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT}, 880 VehicleAreaConfig{.areaId = DOOR_1_RIGHT}, 881 VehicleAreaConfig{.areaId = DOOR_2_LEFT}, 882 VehicleAreaConfig{.areaId = DOOR_2_RIGHT}}}, 883 .initialAreaValues = {{DOOR_1_LEFT, {.int32Values = {1}}}, 884 {DOOR_1_RIGHT, {.int32Values = {1}}}, 885 {DOOR_2_LEFT, {.int32Values = {0}}}, 886 {DOOR_2_RIGHT, {.int32Values = {0}}}}}, 887 888 {.config = {.prop = VENDOR_EXTENSION_FLOAT_PROPERTY, 889 .access = VehiclePropertyAccess::READ_WRITE, 890 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 891 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_LEFT, 892 .minFloatValue = -10, 893 .maxFloatValue = 10}, 894 VehicleAreaConfig{.areaId = HVAC_RIGHT, 895 .minFloatValue = -10, 896 .maxFloatValue = 10}}}, 897 .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}}, 898 {HVAC_RIGHT, {.floatValues = {2}}}}}, 899 900 {.config = {.prop = VENDOR_EXTENSION_INT_PROPERTY, 901 .access = VehiclePropertyAccess::READ_WRITE, 902 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 903 .areaConfigs = 904 {VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD, 905 .minInt32Value = -100, 906 .maxInt32Value = 100}, 907 VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::REAR_WINDSHIELD, 908 .minInt32Value = -100, 909 .maxInt32Value = 100}, 910 VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::ROOF_TOP_1, 911 .minInt32Value = -100, 912 .maxInt32Value = 100}}}, 913 .initialAreaValues = {{(int)VehicleAreaWindow::FRONT_WINDSHIELD, {.int32Values = {1}}}, 914 {(int)VehicleAreaWindow::REAR_WINDSHIELD, {.int32Values = {0}}}, 915 {(int)VehicleAreaWindow::ROOF_TOP_1, {.int32Values = {-1}}}}}, 916 917 {.config = {.prop = VENDOR_EXTENSION_STRING_PROPERTY, 918 .access = VehiclePropertyAccess::READ_WRITE, 919 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 920 .initialValue = {.stringValue = "Vendor String Property"}}, 921 922 {.config = {.prop = toInt(VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_TYPE), 923 .access = VehiclePropertyAccess::READ, 924 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 925 .initialValue = {.int32Values = {0}}}, 926 927 {.config = {.prop = toInt(VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_STATUS), 928 .access = VehiclePropertyAccess::READ, 929 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 930 .initialValue = {.int32Values = {0}}}, 931 932 {.config = 933 { 934 .prop = toInt(VehicleProperty::SUPPORT_CUSTOMIZE_VENDOR_PERMISSION), 935 .access = VehiclePropertyAccess::READ, 936 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 937 .configArray = 938 {kMixedTypePropertyForTest, 939 (int)VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_INFO, 940 (int)VehicleVendorPermission::PERMISSION_SET_VENDOR_CATEGORY_INFO, 941 VENDOR_EXTENSION_INT_PROPERTY, 942 (int)VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_SEAT, 943 (int)VehicleVendorPermission::PERMISSION_NOT_ACCESSIBLE, 944 VENDOR_EXTENSION_FLOAT_PROPERTY, 945 (int)VehicleVendorPermission::PERMISSION_DEFAULT, 946 (int)VehicleVendorPermission::PERMISSION_DEFAULT, 947 LOCATION_CHARACTERIZATION, 948 (int)VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_INFO, 949 (int)VehicleVendorPermission::PERMISSION_NOT_ACCESSIBLE}, 950 }, 951 .initialValue = {.int32Values = {1}}}, 952 953 { 954 .config = 955 { 956 .prop = toInt(VehicleProperty::INITIAL_USER_INFO), 957 .access = VehiclePropertyAccess::READ_WRITE, 958 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 959 }, 960 }, 961 { 962 .config = 963 { 964 .prop = toInt(VehicleProperty::SWITCH_USER), 965 .access = VehiclePropertyAccess::READ_WRITE, 966 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 967 }, 968 }, 969 { 970 .config = 971 { 972 .prop = toInt(VehicleProperty::CREATE_USER), 973 .access = VehiclePropertyAccess::READ_WRITE, 974 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 975 }, 976 }, 977 { 978 .config = 979 { 980 .prop = toInt(VehicleProperty::REMOVE_USER), 981 .access = VehiclePropertyAccess::READ_WRITE, 982 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 983 }, 984 }, 985 { 986 .config = 987 { 988 .prop = toInt(VehicleProperty::USER_IDENTIFICATION_ASSOCIATION), 989 .access = VehiclePropertyAccess::READ_WRITE, 990 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 991 }, 992 }, 993 { 994 .config = 995 { 996 .prop = toInt(VehicleProperty::POWER_POLICY_REQ), 997 .access = VehiclePropertyAccess::READ, 998 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 999 }, 1000 }, 1001 { 1002 .config = 1003 { 1004 .prop = toInt(VehicleProperty::POWER_POLICY_GROUP_REQ), 1005 .access = VehiclePropertyAccess::READ, 1006 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1007 }, 1008 }, 1009 { 1010 .config = 1011 { 1012 .prop = toInt(VehicleProperty::CURRENT_POWER_POLICY), 1013 .access = VehiclePropertyAccess::READ_WRITE, 1014 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1015 }, 1016 }, 1017 { 1018 .config = 1019 { 1020 .prop = toInt(VehicleProperty::EPOCH_TIME), 1021 .access = VehiclePropertyAccess::WRITE, 1022 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1023 }, 1024 }, 1025 { 1026 .config = 1027 { 1028 .prop = toInt(VehicleProperty::WATCHDOG_ALIVE), 1029 .access = VehiclePropertyAccess::WRITE, 1030 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1031 }, 1032 }, 1033 { 1034 .config = 1035 { 1036 .prop = toInt(VehicleProperty::WATCHDOG_TERMINATED_PROCESS), 1037 .access = VehiclePropertyAccess::WRITE, 1038 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1039 }, 1040 }, 1041 { 1042 .config = 1043 { 1044 .prop = toInt(VehicleProperty::VHAL_HEARTBEAT), 1045 .access = VehiclePropertyAccess::READ, 1046 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1047 }, 1048 }, 1049 { 1050 .config = 1051 { 1052 .prop = toInt(VehicleProperty::CLUSTER_SWITCH_UI), 1053 .access = VehiclePropertyAccess::READ, 1054 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1055 }, 1056 .initialValue = {.int32Values = {0 /* ClusterHome */}}, 1057 }, 1058 { 1059 .config = 1060 { 1061 .prop = toInt(VehicleProperty::CLUSTER_DISPLAY_STATE), 1062 .access = VehiclePropertyAccess::READ, 1063 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1064 }, 1065 .initialValue = {.int32Values = {0 /* Off */, -1, -1, -1, -1 /* Bounds */, -1, -1, 1066 -1, -1 /* Insets */}}, 1067 }, 1068 { 1069 .config = 1070 { 1071 .prop = toInt(VehicleProperty::CLUSTER_REPORT_STATE), 1072 .access = VehiclePropertyAccess::WRITE, 1073 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1074 .configArray = {0, 0, 0, 11, 0, 0, 0, 0, 16}, 1075 }, 1076 }, 1077 { 1078 .config = 1079 { 1080 .prop = toInt(VehicleProperty::CLUSTER_REQUEST_DISPLAY), 1081 .access = VehiclePropertyAccess::WRITE, 1082 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1083 }, 1084 }, 1085 { 1086 .config = 1087 { 1088 .prop = toInt(VehicleProperty::CLUSTER_NAVIGATION_STATE), 1089 .access = VehiclePropertyAccess::WRITE, 1090 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1091 }, 1092 }, 1093 { 1094 .config = 1095 { 1096 .prop = PLACEHOLDER_PROPERTY_INT, 1097 .access = VehiclePropertyAccess::READ_WRITE, 1098 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1099 }, 1100 .initialValue = {.int32Values = {0}}, 1101 }, 1102 { 1103 .config = 1104 { 1105 .prop = PLACEHOLDER_PROPERTY_FLOAT, 1106 .access = VehiclePropertyAccess::READ_WRITE, 1107 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1108 }, 1109 .initialValue = {.floatValues = {0.0f}}, 1110 }, 1111 { 1112 .config = 1113 { 1114 .prop = PLACEHOLDER_PROPERTY_BOOLEAN, 1115 .access = VehiclePropertyAccess::READ_WRITE, 1116 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1117 }, 1118 .initialValue = {.int32Values = {0 /* false */}}, 1119 }, 1120 { 1121 .config = 1122 { 1123 .prop = PLACEHOLDER_PROPERTY_STRING, 1124 .access = VehiclePropertyAccess::READ_WRITE, 1125 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1126 }, 1127 .initialValue = {.stringValue = {"Test"}}, 1128 }, 1129 // This property is later defined in the AIDL VHAL interface. However, HIDL VHAL might 1130 // require support for this property to meet EU regulation. 1131 { 1132 .config = 1133 { 1134 // GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT 1135 .prop = 0x11400F47, 1136 .access = VehiclePropertyAccess::READ, 1137 .changeMode = VehiclePropertyChangeMode::STATIC, 1138 }, 1139 // GsrComplianceRequirementType::GSR_COMPLIANCE_REQUIRED_V1 1140 .initialValue = {.int32Values = {1}}, 1141 }, 1142 { 1143 .config = 1144 { 1145 .prop = LOCATION_CHARACTERIZATION, 1146 .access = VehiclePropertyAccess::READ, 1147 .changeMode = VehiclePropertyChangeMode::STATIC, 1148 }, 1149 .initialValue = {.int32Values = {toInt(LocationCharacterization::RAW_GNSS_ONLY)}}, 1150 }, 1151 #ifdef ENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING 1152 // Vendor propetry for E2E ClusterHomeService testing. 1153 { 1154 .config = 1155 { 1156 .prop = VENDOR_CLUSTER_SWITCH_UI, 1157 .access = VehiclePropertyAccess::WRITE, 1158 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1159 }, 1160 }, 1161 { 1162 .config = 1163 { 1164 .prop = VENDOR_CLUSTER_DISPLAY_STATE, 1165 .access = VehiclePropertyAccess::WRITE, 1166 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1167 }, 1168 }, 1169 { 1170 .config = 1171 { 1172 .prop = VENDOR_CLUSTER_REPORT_STATE, 1173 .access = VehiclePropertyAccess::READ, 1174 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1175 .configArray = {0, 0, 0, 11, 0, 0, 0, 0, 16}, 1176 }, 1177 .initialValue = {.int32Values = {0 /* Off */, -1, -1, -1, -1 /* Bounds */, -1, -1, 1178 -1, -1 /* Insets */, 0 /* ClusterHome */, 1179 -1 /* ClusterNone */}}, 1180 }, 1181 { 1182 .config = 1183 { 1184 .prop = VENDOR_CLUSTER_REQUEST_DISPLAY, 1185 .access = VehiclePropertyAccess::READ, 1186 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1187 }, 1188 .initialValue = {.int32Values = {0 /* ClusterHome */}}, 1189 }, 1190 { 1191 .config = 1192 { 1193 .prop = VENDOR_CLUSTER_NAVIGATION_STATE, 1194 .access = VehiclePropertyAccess::READ, 1195 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1196 }, 1197 }, 1198 #endif // ENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING 1199 #ifdef ENABLE_GET_PROP_CONFIGS_BY_MULTIPLE_REQUESTS 1200 { 1201 .config = 1202 { 1203 // SUPPORTED_PROPERTY_IDS 1204 .prop = 289476424, 1205 .access = VehiclePropertyAccess::READ, 1206 .changeMode = VehiclePropertyChangeMode::STATIC, 1207 // Fetch 100 configs in one request. This number is just arbitrarily 1208 // chosen here. But some HAL impl with bigger config data may need a 1209 // smaller number to make sure the configs returned in one request 1210 // fits the binder data size limitation. 1211 .configArray = {100}, 1212 }, 1213 // All supported property IDs. This list is checked by 1214 // DefaultConfigSupportedPropertyIds_test. 1215 .initialValue = {.int32Values = {291504388, 1216 289472773, 1217 291504390, 1218 289472775, 1219 289407240, 1220 289407241, 1221 289472780, 1222 286261505, 1223 286261506, 1224 289407235, 1225 289472779, 1226 291504647, 1227 289408517, 1228 356518832, 1229 356516106, 1230 291504644, 1231 291504649, 1232 291504656, 1233 291504901, 1234 291504903, 1235 287310600, 1236 291504905, 1237 287310602, 1238 287310603, 1239 291504908, 1240 291504904, 1241 392168201, 1242 392168202, 1243 289408514, 1244 289408001, 1245 287310850, 1246 287310851, 1247 287310853, 1248 289408513, 1249 289475088, 1250 289475104, 1251 289475120, 1252 354419984, 1253 320865540, 1254 320865556, 1255 354419975, 1256 354419976, 1257 354419986, 1258 354419973, 1259 354419974, 1260 354419978, 1261 354419977, 1262 356517120, 1263 356517121, 1264 356582673, 1265 356517139, 1266 289408269, 1267 356517131, 1268 358614275, 1269 291570965, 1270 291505923, 1271 289408270, 1272 289408512, 1273 287310855, 1274 289408000, 1275 289408008, 1276 289408009, 1277 289407747, 1278 291504900, 1279 568332561, 1280 371198722, 1281 373295872, 1282 320867268, 1283 322964416, 1284 290521862, 1285 287310858, 1286 287310859, 1287 289475072, 1288 289475073, 1289 289409539, 1290 299896064, 1291 299896065, 1292 299896066, 1293 299896067, 1294 289410560, 1295 289410561, 1296 289410562, 1297 289410563, 1298 289410576, 1299 289410577, 1300 289410578, 1301 289410579, 1302 289476368, 1303 299895808, 1304 639631617, 1305 627048706, 1306 591397123, 1307 554696964, 1308 289410873, 1309 289410874, 1310 287313669, 1311 299896583, 1312 299896584, 1313 299896585, 1314 299896586, 1315 299896587, 1316 286265121, 1317 286265122, 1318 286265123, 1319 290457094, 1320 290459441, 1321 299896626, 1322 290459443, 1323 289410868, 1324 289476405, 1325 299896630, 1326 289410871, 1327 292556600, 1328 557853201, 1329 559950353, 1330 555756049, 1331 554707473, 1332 289410887, 1333 557846324, 1334 557911861, 1335 568332086, 1336 557846327, 1337 560992056, 1338 289476424, 1339 LOCATION_CHARACTERIZATION}}, 1340 }, 1341 #endif // ENABLE_GET_PROP_CONFIGS_BY_MULTIPLE_REQUESTS 1342 }; 1343 1344 } // impl 1345 1346 } // namespace V2_0 1347 } // namespace vehicle 1348 } // namespace automotive 1349 } // namespace hardware 1350 } // namespace android 1351 1352 #endif // android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ 1353