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::KILOMETERS_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::HW_KEY_INPUT), 378 .access = VehiclePropertyAccess::READ, 379 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 380 }, 381 .initialValue = {.int32Values = {0, 0, 0}}}, 382 383 {.config = 384 { 385 .prop = toInt(VehicleProperty::HW_ROTARY_INPUT), 386 .access = VehiclePropertyAccess::READ, 387 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 388 }, 389 .initialValue = {.int32Values = {0, 0, 0}}}, 390 391 {.config = 392 { 393 .prop = toInt(VehicleProperty::HW_CUSTOM_INPUT), 394 .access = VehiclePropertyAccess::READ, 395 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 396 .configArray = {0, 0, 0, 3, 0, 0, 0, 0, 0}, 397 }, 398 .initialValue = 399 { 400 .int32Values = {0, 0, 0}, 401 }}, 402 403 {.config = {.prop = toInt(VehicleProperty::HVAC_POWER_ON), 404 .access = VehiclePropertyAccess::READ_WRITE, 405 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 406 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}, 407 // TODO(bryaneyler): Ideally, this is generated dynamically from 408 // kHvacPowerProperties. 409 .configArray = {toInt(VehicleProperty::HVAC_FAN_SPEED), 410 toInt(VehicleProperty::HVAC_FAN_DIRECTION)}}, 411 .initialValue = {.int32Values = {1}}}, 412 413 { 414 .config = {.prop = toInt(VehicleProperty::HVAC_DEFROSTER), 415 .access = VehiclePropertyAccess::READ_WRITE, 416 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 417 .areaConfigs = 418 {VehicleAreaConfig{ 419 .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, 420 VehicleAreaConfig{ 421 .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, 422 .initialValue = {.int32Values = {0}} // Will be used for all areas. 423 }, 424 { 425 .config = {.prop = toInt(VehicleProperty::HVAC_ELECTRIC_DEFROSTER_ON), 426 .access = VehiclePropertyAccess::READ_WRITE, 427 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 428 .areaConfigs = 429 {VehicleAreaConfig{ 430 .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, 431 VehicleAreaConfig{ 432 .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, 433 .initialValue = {.int32Values = {0}} // Will be used for all areas. 434 }, 435 436 {.config = {.prop = toInt(VehicleProperty::HVAC_MAX_DEFROST_ON), 437 .access = VehiclePropertyAccess::READ_WRITE, 438 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 439 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 440 .initialValue = {.int32Values = {0}}}, 441 442 {.config = {.prop = toInt(VehicleProperty::HVAC_RECIRC_ON), 443 .access = VehiclePropertyAccess::READ_WRITE, 444 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 445 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 446 .initialValue = {.int32Values = {1}}}, 447 448 {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_RECIRC_ON), 449 .access = VehiclePropertyAccess::READ_WRITE, 450 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 451 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 452 .initialValue = {.int32Values = {0}}}, 453 454 {.config = {.prop = toInt(VehicleProperty::HVAC_AC_ON), 455 .access = VehiclePropertyAccess::READ_WRITE, 456 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 457 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 458 .initialValue = {.int32Values = {1}}}, 459 460 {.config = {.prop = toInt(VehicleProperty::HVAC_MAX_AC_ON), 461 .access = VehiclePropertyAccess::READ_WRITE, 462 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 463 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 464 .initialValue = {.int32Values = {0}}}, 465 466 {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_ON), 467 .access = VehiclePropertyAccess::READ_WRITE, 468 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 469 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 470 .initialValue = {.int32Values = {1}}}, 471 472 {.config = {.prop = toInt(VehicleProperty::HVAC_DUAL_ON), 473 .access = VehiclePropertyAccess::READ_WRITE, 474 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 475 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 476 .initialValue = {.int32Values = {0}}}, 477 478 {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_SPEED), 479 .access = VehiclePropertyAccess::READ_WRITE, 480 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 481 .areaConfigs = {VehicleAreaConfig{ 482 .areaId = HVAC_ALL, .minInt32Value = 1, .maxInt32Value = 7}}}, 483 .initialValue = {.int32Values = {3}}}, 484 485 {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION), 486 .access = VehiclePropertyAccess::READ_WRITE, 487 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 488 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 489 .initialValue = {.int32Values = {toInt(VehicleHvacFanDirection::FACE)}}}, 490 491 {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION_AVAILABLE), 492 .access = VehiclePropertyAccess::READ, 493 .changeMode = VehiclePropertyChangeMode::STATIC, 494 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}}, 495 .initialValue = {.int32Values = {FAN_DIRECTION_FACE, FAN_DIRECTION_FLOOR, 496 FAN_DIRECTION_FACE | FAN_DIRECTION_FLOOR}}}, 497 498 {.config = {.prop = toInt(VehicleProperty::HVAC_SEAT_VENTILATION), 499 .access = VehiclePropertyAccess::READ_WRITE, 500 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 501 .areaConfigs = {VehicleAreaConfig{ 502 .areaId = SEAT_1_LEFT, 503 .minInt32Value = 0, 504 .maxInt32Value = 3, 505 }, 506 VehicleAreaConfig{ 507 .areaId = SEAT_1_RIGHT, 508 .minInt32Value = 0, 509 .maxInt32Value = 3, 510 }}}, 511 .initialValue = 512 {.int32Values = {0}}}, // 0 is off and +ve values indicate ventilation level. 513 514 {.config = {.prop = toInt(VehicleProperty::HVAC_STEERING_WHEEL_HEAT), 515 .access = VehiclePropertyAccess::READ_WRITE, 516 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 517 .areaConfigs = {VehicleAreaConfig{ 518 .areaId = (0), .minInt32Value = -2, .maxInt32Value = 2}}}, 519 .initialValue = {.int32Values = {0}}}, // +ve values for heating and -ve for cooling 520 521 {.config = {.prop = toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE), 522 .access = VehiclePropertyAccess::READ_WRITE, 523 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 524 .areaConfigs = {VehicleAreaConfig{ 525 .areaId = SEAT_1_LEFT, 526 .minInt32Value = -2, 527 .maxInt32Value = 2, 528 }, 529 VehicleAreaConfig{ 530 .areaId = SEAT_1_RIGHT, 531 .minInt32Value = -2, 532 .maxInt32Value = 2, 533 }}}, 534 .initialValue = {.int32Values = {0}}}, // +ve values for heating and -ve for cooling 535 536 {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET), 537 .access = VehiclePropertyAccess::READ_WRITE, 538 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 539 .configArray = {160, 280, 5, 605, 825, 10}, 540 .areaConfigs = {VehicleAreaConfig{ 541 .areaId = HVAC_LEFT, 542 .minFloatValue = 16, 543 .maxFloatValue = 32, 544 }, 545 VehicleAreaConfig{ 546 .areaId = HVAC_RIGHT, 547 .minFloatValue = 16, 548 .maxFloatValue = 32, 549 }}}, 550 .initialAreaValues = {{HVAC_LEFT, {.floatValues = {16}}}, 551 {HVAC_RIGHT, {.floatValues = {20}}}}}, 552 553 {.config = 554 { 555 .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION), 556 .access = VehiclePropertyAccess::READ_WRITE, 557 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 558 }, 559 .initialValue = {.floatValues = {66.2f, (float)VehicleUnit::FAHRENHEIT, 19.0f, 66.5f}}}, 560 561 {.config = 562 { 563 .prop = toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE), 564 .access = VehiclePropertyAccess::READ, 565 // TODO(bryaneyler): Support ON_CHANGE as well. 566 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 567 .minSampleRate = 1.0f, 568 .maxSampleRate = 2.0f, 569 }, 570 .initialValue = {.floatValues = {25.0f}}}, 571 572 {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS), 573 .access = VehiclePropertyAccess::READ_WRITE, 574 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 575 .configArray = {(int)VehicleUnit::FAHRENHEIT, (int)VehicleUnit::CELSIUS}}, 576 .initialValue = {.int32Values = {(int)VehicleUnit::FAHRENHEIT}}}, 577 578 {.config = 579 { 580 .prop = toInt(VehicleProperty::DISTANCE_DISPLAY_UNITS), 581 .access = VehiclePropertyAccess::READ_WRITE, 582 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 583 .areaConfigs = {VehicleAreaConfig{.areaId = (0)}}, 584 .configArray = {(int)VehicleUnit::KILOMETER, (int)VehicleUnit::MILE}, 585 }, 586 .initialValue = {.int32Values = {(int)VehicleUnit::MILE}}}, 587 588 {.config = 589 { 590 .prop = toInt(VehicleProperty::NIGHT_MODE), 591 .access = VehiclePropertyAccess::READ, 592 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 593 }, 594 .initialValue = {.int32Values = {0}}}, 595 596 {.config = 597 { 598 .prop = toInt(VehicleProperty::GEAR_SELECTION), 599 .access = VehiclePropertyAccess::READ, 600 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 601 .configArray = {(int)VehicleGear::GEAR_PARK, 602 (int)VehicleGear::GEAR_NEUTRAL, 603 (int)VehicleGear::GEAR_REVERSE, 604 (int)VehicleGear::GEAR_DRIVE, (int)VehicleGear::GEAR_1, 605 (int)VehicleGear::GEAR_2, (int)VehicleGear::GEAR_3, 606 (int)VehicleGear::GEAR_4, (int)VehicleGear::GEAR_5}, 607 }, 608 .initialValue = {.int32Values = {toInt(VehicleGear::GEAR_PARK)}}}, 609 610 {.config = 611 { 612 .prop = toInt(VehicleProperty::TURN_SIGNAL_STATE), 613 .access = VehiclePropertyAccess::READ, 614 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 615 }, 616 .initialValue = {.int32Values = {toInt(VehicleTurnSignal::NONE)}}}, 617 618 {.config = 619 { 620 .prop = toInt(VehicleProperty::IGNITION_STATE), 621 .access = VehiclePropertyAccess::READ, 622 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 623 }, 624 .initialValue = {.int32Values = {toInt(VehicleIgnitionState::ON)}}}, 625 626 {.config = 627 { 628 .prop = toInt(VehicleProperty::ENGINE_OIL_LEVEL), 629 .access = VehiclePropertyAccess::READ, 630 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 631 }, 632 .initialValue = {.int32Values = {toInt(VehicleOilLevel::NORMAL)}}}, 633 634 {.config = 635 { 636 .prop = toInt(VehicleProperty::ENGINE_OIL_TEMP), 637 .access = VehiclePropertyAccess::READ, 638 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 639 .minSampleRate = 0.1, // 0.1 Hz, every 10 seconds 640 .maxSampleRate = 10, // 10 Hz, every 100 ms 641 }, 642 .initialValue = {.floatValues = {101.0f}}}, 643 644 { 645 .config = 646 { 647 .prop = kGenerateFakeDataControllingProperty, 648 .access = VehiclePropertyAccess::WRITE, 649 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 650 .configArray = {1, 0, 0, 2, 0, 0, 0, 0, 0}, 651 }, 652 }, 653 654 { 655 .config = 656 { 657 .prop = kSetIntPropertyFromVehicleForTest, 658 .access = VehiclePropertyAccess::WRITE, 659 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 660 .configArray = {0, 0, 0, 2, 1, 0, 0, 0, 0}, 661 }, 662 }, 663 664 { 665 .config = 666 { 667 .prop = kSetFloatPropertyFromVehicleForTest, 668 .access = VehiclePropertyAccess::WRITE, 669 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 670 .configArray = {0, 0, 1, 0, 1, 0, 1, 0, 0}, 671 }, 672 }, 673 674 { 675 .config = 676 { 677 .prop = kSetBooleanPropertyFromVehicleForTest, 678 .access = VehiclePropertyAccess::WRITE, 679 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 680 .configArray = {0, 1, 1, 0, 1, 0, 0, 0, 0}, 681 }, 682 }, 683 684 { 685 .config = {.prop = kMixedTypePropertyForTest, 686 .access = VehiclePropertyAccess::READ_WRITE, 687 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 688 .configArray = {1, 1, 0, 2, 0, 0, 1, 0, 0}}, 689 .initialValue = 690 { 691 .int32Values = {1 /* indicate TRUE boolean value */, 2, 3}, 692 .floatValues = {4.5f}, 693 .stringValue = "MIXED property", 694 }, 695 }, 696 697 {.config = {.prop = toInt(VehicleProperty::DOOR_LOCK), 698 .access = VehiclePropertyAccess::READ_WRITE, 699 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 700 .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT}, 701 VehicleAreaConfig{.areaId = DOOR_1_RIGHT}, 702 VehicleAreaConfig{.areaId = DOOR_2_LEFT}, 703 VehicleAreaConfig{.areaId = DOOR_2_RIGHT}}}, 704 .initialAreaValues = {{DOOR_1_LEFT, {.int32Values = {1}}}, 705 {DOOR_1_RIGHT, {.int32Values = {1}}}, 706 {DOOR_2_LEFT, {.int32Values = {1}}}, 707 {DOOR_2_RIGHT, {.int32Values = {1}}}}}, 708 709 {.config = {.prop = toInt(VehicleProperty::DOOR_POS), 710 .access = VehiclePropertyAccess::READ_WRITE, 711 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 712 .areaConfigs = 713 {VehicleAreaConfig{ 714 .areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, 715 VehicleAreaConfig{.areaId = DOOR_1_RIGHT, 716 .minInt32Value = 0, 717 .maxInt32Value = 1}, 718 VehicleAreaConfig{ 719 .areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, 720 VehicleAreaConfig{.areaId = DOOR_2_RIGHT, 721 .minInt32Value = 0, 722 .maxInt32Value = 1}, 723 VehicleAreaConfig{ 724 .areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}}, 725 .initialValue = {.int32Values = {0}}}, 726 727 {.config = {.prop = toInt(VehicleProperty::WINDOW_LOCK), 728 .access = VehiclePropertyAccess::READ_WRITE, 729 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 730 .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_RIGHT | WINDOW_2_LEFT | 731 WINDOW_2_RIGHT}}}, 732 .initialAreaValues = {{WINDOW_1_RIGHT | WINDOW_2_LEFT | WINDOW_2_RIGHT, 733 {.int32Values = {0}}}}}, 734 735 {.config = {.prop = toInt(VehicleProperty::WINDOW_POS), 736 .access = VehiclePropertyAccess::READ_WRITE, 737 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 738 .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT, 739 .minInt32Value = 0, 740 .maxInt32Value = 10}, 741 VehicleAreaConfig{.areaId = WINDOW_1_RIGHT, 742 .minInt32Value = 0, 743 .maxInt32Value = 10}, 744 VehicleAreaConfig{.areaId = WINDOW_2_LEFT, 745 .minInt32Value = 0, 746 .maxInt32Value = 10}, 747 VehicleAreaConfig{.areaId = WINDOW_2_RIGHT, 748 .minInt32Value = 0, 749 .maxInt32Value = 10}, 750 VehicleAreaConfig{.areaId = WINDOW_ROOF_TOP_1, 751 .minInt32Value = -10, 752 .maxInt32Value = 10}}}, 753 .initialValue = {.int32Values = {0}}}, 754 755 {.config = 756 { 757 .prop = WHEEL_TICK, 758 .access = VehiclePropertyAccess::READ, 759 .changeMode = VehiclePropertyChangeMode::CONTINUOUS, 760 .configArray = {ALL_WHEELS, 50000, 50000, 50000, 50000}, 761 .minSampleRate = 1.0f, 762 .maxSampleRate = 10.0f, 763 }, 764 .initialValue = {.int64Values = {0, 100000, 200000, 300000, 400000}}}, 765 766 {.config = {.prop = ABS_ACTIVE, 767 .access = VehiclePropertyAccess::READ, 768 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 769 .initialValue = {.int32Values = {0}}}, 770 771 {.config = {.prop = TRACTION_CONTROL_ACTIVE, 772 .access = VehiclePropertyAccess::READ, 773 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 774 .initialValue = {.int32Values = {0}}}, 775 776 {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), 777 .access = VehiclePropertyAccess::READ, 778 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 779 .configArray = {3}}, 780 .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}}}, 781 782 {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), 783 .access = VehiclePropertyAccess::READ_WRITE, 784 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 785 .initialValue = {.int32Values = {toInt(VehicleApPowerStateReport::WAIT_FOR_VHAL), 0}}}, 786 787 {.config = {.prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS), 788 .access = VehiclePropertyAccess::READ_WRITE, 789 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 790 .areaConfigs = {VehicleAreaConfig{.minInt32Value = 0, .maxInt32Value = 100}}}, 791 .initialValue = {.int32Values = {100}}}, 792 793 { 794 .config = {.prop = OBD2_LIVE_FRAME, 795 .access = VehiclePropertyAccess::READ, 796 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 797 .configArray = {0, 0}}, 798 }, 799 800 { 801 .config = {.prop = OBD2_FREEZE_FRAME, 802 .access = VehiclePropertyAccess::READ, 803 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 804 .configArray = {0, 0}}, 805 }, 806 807 { 808 .config = {.prop = OBD2_FREEZE_FRAME_INFO, 809 .access = VehiclePropertyAccess::READ, 810 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 811 }, 812 813 { 814 .config = {.prop = OBD2_FREEZE_FRAME_CLEAR, 815 .access = VehiclePropertyAccess::WRITE, 816 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 817 .configArray = {1}}, 818 }, 819 820 {.config = 821 { 822 .prop = toInt(VehicleProperty::HEADLIGHTS_STATE), 823 .access = VehiclePropertyAccess::READ, 824 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 825 }, 826 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 827 828 {.config = 829 { 830 .prop = toInt(VehicleProperty::HIGH_BEAM_LIGHTS_STATE), 831 .access = VehiclePropertyAccess::READ, 832 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 833 }, 834 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 835 836 {.config = 837 { 838 .prop = toInt(VehicleProperty::FOG_LIGHTS_STATE), 839 .access = VehiclePropertyAccess::READ, 840 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 841 }, 842 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 843 844 {.config = 845 { 846 .prop = toInt(VehicleProperty::HAZARD_LIGHTS_STATE), 847 .access = VehiclePropertyAccess::READ, 848 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 849 }, 850 .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, 851 852 {.config = 853 { 854 .prop = toInt(VehicleProperty::HEADLIGHTS_SWITCH), 855 .access = VehiclePropertyAccess::READ_WRITE, 856 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 857 }, 858 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 859 860 {.config = 861 { 862 .prop = toInt(VehicleProperty::HIGH_BEAM_LIGHTS_SWITCH), 863 .access = VehiclePropertyAccess::READ_WRITE, 864 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 865 }, 866 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 867 868 {.config = 869 { 870 .prop = toInt(VehicleProperty::FOG_LIGHTS_SWITCH), 871 .access = VehiclePropertyAccess::READ_WRITE, 872 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 873 }, 874 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 875 876 {.config = 877 { 878 .prop = toInt(VehicleProperty::HAZARD_LIGHTS_SWITCH), 879 .access = VehiclePropertyAccess::READ_WRITE, 880 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 881 }, 882 .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, 883 884 {.config = 885 { 886 .prop = toInt(VehicleProperty::EVS_SERVICE_REQUEST), 887 .access = VehiclePropertyAccess::READ, 888 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 889 }, 890 .initialValue = {.int32Values = {toInt(EvsServiceType::REARVIEW), 891 toInt(EvsServiceState::OFF)}}}, 892 893 {.config = {.prop = VEHICLE_MAP_SERVICE, 894 .access = VehiclePropertyAccess::READ_WRITE, 895 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}}, 896 897 // Example Vendor Extension properties for testing 898 {.config = {.prop = VENDOR_EXTENSION_BOOLEAN_PROPERTY, 899 .access = VehiclePropertyAccess::READ_WRITE, 900 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 901 .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT}, 902 VehicleAreaConfig{.areaId = DOOR_1_RIGHT}, 903 VehicleAreaConfig{.areaId = DOOR_2_LEFT}, 904 VehicleAreaConfig{.areaId = DOOR_2_RIGHT}}}, 905 .initialAreaValues = {{DOOR_1_LEFT, {.int32Values = {1}}}, 906 {DOOR_1_RIGHT, {.int32Values = {1}}}, 907 {DOOR_2_LEFT, {.int32Values = {0}}}, 908 {DOOR_2_RIGHT, {.int32Values = {0}}}}}, 909 910 {.config = {.prop = VENDOR_EXTENSION_FLOAT_PROPERTY, 911 .access = VehiclePropertyAccess::READ_WRITE, 912 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 913 .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_LEFT, 914 .minFloatValue = -10, 915 .maxFloatValue = 10}, 916 VehicleAreaConfig{.areaId = HVAC_RIGHT, 917 .minFloatValue = -10, 918 .maxFloatValue = 10}}}, 919 .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}}, 920 {HVAC_RIGHT, {.floatValues = {2}}}}}, 921 922 {.config = {.prop = VENDOR_EXTENSION_INT_PROPERTY, 923 .access = VehiclePropertyAccess::READ_WRITE, 924 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 925 .areaConfigs = 926 {VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD, 927 .minInt32Value = -100, 928 .maxInt32Value = 100}, 929 VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::REAR_WINDSHIELD, 930 .minInt32Value = -100, 931 .maxInt32Value = 100}, 932 VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::ROOF_TOP_1, 933 .minInt32Value = -100, 934 .maxInt32Value = 100}}}, 935 .initialAreaValues = {{(int)VehicleAreaWindow::FRONT_WINDSHIELD, {.int32Values = {1}}}, 936 {(int)VehicleAreaWindow::REAR_WINDSHIELD, {.int32Values = {0}}}, 937 {(int)VehicleAreaWindow::ROOF_TOP_1, {.int32Values = {-1}}}}}, 938 939 {.config = {.prop = VENDOR_EXTENSION_STRING_PROPERTY, 940 .access = VehiclePropertyAccess::READ_WRITE, 941 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 942 .initialValue = {.stringValue = "Vendor String Property"}}, 943 944 {.config = {.prop = toInt(VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_TYPE), 945 .access = VehiclePropertyAccess::READ, 946 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 947 .initialValue = {.int32Values = {0}}}, 948 949 {.config = {.prop = toInt(VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_STATUS), 950 .access = VehiclePropertyAccess::READ, 951 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, 952 .initialValue = {.int32Values = {0}}}, 953 954 {.config = 955 { 956 .prop = toInt(VehicleProperty::SUPPORT_CUSTOMIZE_VENDOR_PERMISSION), 957 .access = VehiclePropertyAccess::READ, 958 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 959 .configArray = 960 {kMixedTypePropertyForTest, 961 (int)VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_INFO, 962 (int)VehicleVendorPermission::PERMISSION_SET_VENDOR_CATEGORY_INFO, 963 VENDOR_EXTENSION_INT_PROPERTY, 964 (int)VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_SEAT, 965 (int)VehicleVendorPermission::PERMISSION_NOT_ACCESSIBLE, 966 VENDOR_EXTENSION_FLOAT_PROPERTY, 967 (int)VehicleVendorPermission::PERMISSION_DEFAULT, 968 (int)VehicleVendorPermission::PERMISSION_DEFAULT}, 969 }, 970 .initialValue = {.int32Values = {1}}}, 971 972 { 973 .config = 974 { 975 .prop = toInt(VehicleProperty::INITIAL_USER_INFO), 976 .access = VehiclePropertyAccess::READ_WRITE, 977 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 978 }, 979 }, 980 { 981 .config = 982 { 983 .prop = toInt(VehicleProperty::SWITCH_USER), 984 .access = VehiclePropertyAccess::READ_WRITE, 985 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 986 }, 987 }, 988 { 989 .config = 990 { 991 .prop = toInt(VehicleProperty::CREATE_USER), 992 .access = VehiclePropertyAccess::READ_WRITE, 993 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 994 }, 995 }, 996 { 997 .config = 998 { 999 .prop = toInt(VehicleProperty::REMOVE_USER), 1000 .access = VehiclePropertyAccess::READ_WRITE, 1001 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1002 }, 1003 }, 1004 { 1005 .config = 1006 { 1007 .prop = toInt(VehicleProperty::USER_IDENTIFICATION_ASSOCIATION), 1008 .access = VehiclePropertyAccess::READ_WRITE, 1009 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1010 }, 1011 }, 1012 { 1013 .config = 1014 { 1015 .prop = toInt(VehicleProperty::POWER_POLICY_REQ), 1016 .access = VehiclePropertyAccess::READ, 1017 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1018 }, 1019 }, 1020 { 1021 .config = 1022 { 1023 .prop = toInt(VehicleProperty::POWER_POLICY_GROUP_REQ), 1024 .access = VehiclePropertyAccess::READ, 1025 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1026 }, 1027 }, 1028 { 1029 .config = 1030 { 1031 .prop = toInt(VehicleProperty::CURRENT_POWER_POLICY), 1032 .access = VehiclePropertyAccess::READ_WRITE, 1033 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1034 }, 1035 }, 1036 { 1037 .config = 1038 { 1039 .prop = toInt(VehicleProperty::EPOCH_TIME), 1040 .access = VehiclePropertyAccess::WRITE, 1041 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1042 }, 1043 }, 1044 { 1045 .config = 1046 { 1047 .prop = toInt(VehicleProperty::WATCHDOG_ALIVE), 1048 .access = VehiclePropertyAccess::WRITE, 1049 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1050 }, 1051 }, 1052 { 1053 .config = 1054 { 1055 .prop = toInt(VehicleProperty::WATCHDOG_TERMINATED_PROCESS), 1056 .access = VehiclePropertyAccess::WRITE, 1057 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1058 }, 1059 }, 1060 { 1061 .config = 1062 { 1063 .prop = toInt(VehicleProperty::VHAL_HEARTBEAT), 1064 .access = VehiclePropertyAccess::READ, 1065 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1066 }, 1067 }, 1068 { 1069 .config = 1070 { 1071 .prop = toInt(VehicleProperty::CLUSTER_SWITCH_UI), 1072 .access = VehiclePropertyAccess::READ, 1073 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1074 }, 1075 .initialValue = {.int32Values = {0 /* ClusterHome */, -1 /* ClusterNone */}}, 1076 }, 1077 { 1078 .config = 1079 { 1080 .prop = toInt(VehicleProperty::CLUSTER_DISPLAY_STATE), 1081 .access = VehiclePropertyAccess::READ, 1082 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1083 }, 1084 .initialValue = {.int32Values = {0 /* Off */, -1, -1, -1, -1 /* Bounds */, -1, -1, 1085 -1, -1 /* Insets */}}, 1086 }, 1087 { 1088 .config = 1089 { 1090 .prop = toInt(VehicleProperty::CLUSTER_REPORT_STATE), 1091 .access = VehiclePropertyAccess::WRITE, 1092 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1093 .configArray = {0, 0, 0, 11, 0, 0, 0, 0, 16}, 1094 }, 1095 }, 1096 { 1097 .config = 1098 { 1099 .prop = toInt(VehicleProperty::CLUSTER_REQUEST_DISPLAY), 1100 .access = VehiclePropertyAccess::WRITE, 1101 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1102 }, 1103 }, 1104 { 1105 .config = 1106 { 1107 .prop = toInt(VehicleProperty::CLUSTER_NAVIGATION_STATE), 1108 .access = VehiclePropertyAccess::WRITE, 1109 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1110 }, 1111 }, 1112 { 1113 .config = 1114 { 1115 .prop = PLACEHOLDER_PROPERTY_INT, 1116 .access = VehiclePropertyAccess::READ_WRITE, 1117 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1118 }, 1119 .initialValue = {.int32Values = {0}}, 1120 }, 1121 { 1122 .config = 1123 { 1124 .prop = PLACEHOLDER_PROPERTY_FLOAT, 1125 .access = VehiclePropertyAccess::READ_WRITE, 1126 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1127 }, 1128 .initialValue = {.floatValues = {0.0f}}, 1129 }, 1130 { 1131 .config = 1132 { 1133 .prop = PLACEHOLDER_PROPERTY_BOOLEAN, 1134 .access = VehiclePropertyAccess::READ_WRITE, 1135 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1136 }, 1137 .initialValue = {.int32Values = {0 /* false */}}, 1138 }, 1139 { 1140 .config = 1141 { 1142 .prop = PLACEHOLDER_PROPERTY_STRING, 1143 .access = VehiclePropertyAccess::READ_WRITE, 1144 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1145 }, 1146 .initialValue = {.stringValue = {"Test"}}, 1147 }, 1148 #ifdef ENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING 1149 // Vendor propetry for E2E ClusterHomeService testing. 1150 { 1151 .config = 1152 { 1153 .prop = VENDOR_CLUSTER_SWITCH_UI, 1154 .access = VehiclePropertyAccess::WRITE, 1155 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1156 }, 1157 }, 1158 { 1159 .config = 1160 { 1161 .prop = VENDOR_CLUSTER_DISPLAY_STATE, 1162 .access = VehiclePropertyAccess::WRITE, 1163 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1164 }, 1165 }, 1166 { 1167 .config = 1168 { 1169 .prop = VENDOR_CLUSTER_REPORT_STATE, 1170 .access = VehiclePropertyAccess::READ, 1171 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1172 .configArray = {0, 0, 0, 11, 0, 0, 0, 0, 16}, 1173 }, 1174 .initialValue = {.int32Values = {0 /* Off */, -1, -1, -1, -1 /* Bounds */, -1, -1, 1175 -1, -1 /* Insets */, 0 /* ClusterHome */, 1176 -1 /* ClusterNone */}}, 1177 }, 1178 { 1179 .config = 1180 { 1181 .prop = VENDOR_CLUSTER_REQUEST_DISPLAY, 1182 .access = VehiclePropertyAccess::READ, 1183 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1184 }, 1185 .initialValue = {.int32Values = {0 /* ClusterHome */}}, 1186 }, 1187 { 1188 .config = 1189 { 1190 .prop = VENDOR_CLUSTER_NAVIGATION_STATE, 1191 .access = VehiclePropertyAccess::READ, 1192 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 1193 }, 1194 }, 1195 #endif // ENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING 1196 }; 1197 1198 } // impl 1199 1200 } // namespace V2_0 1201 } // namespace vehicle 1202 } // namespace automotive 1203 } // namespace hardware 1204 } // namespace android 1205 1206 #endif // android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ 1207