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