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 <android/hardware/automotive/vehicle/2.0/types.h>
21 #include <vhal_v2_0/VehicleUtils.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 // Some handy constants to avoid conversions from enum to int.
34 constexpr int ABS_ACTIVE = (int)VehicleProperty::ABS_ACTIVE;
35 constexpr int AP_POWER_STATE_REQ = (int)VehicleProperty::AP_POWER_STATE_REQ;
36 constexpr int AP_POWER_STATE_REPORT = (int)VehicleProperty::AP_POWER_STATE_REPORT;
37 constexpr int DOOR_1_LEFT = (int)VehicleAreaDoor::ROW_1_LEFT;
38 constexpr int DOOR_1_RIGHT = (int)VehicleAreaDoor::ROW_1_RIGHT;
39 constexpr int DOOR_2_LEFT = (int)VehicleAreaDoor::ROW_2_LEFT;
40 constexpr int DOOR_2_RIGHT = (int)VehicleAreaDoor::ROW_2_RIGHT;
41 constexpr int DOOR_REAR = (int)VehicleAreaDoor::REAR;
42 constexpr int WINDOW_1_LEFT = (int)VehicleAreaWindow::ROW_1_LEFT;
43 constexpr int WINDOW_1_RIGHT = (int)VehicleAreaWindow::ROW_1_RIGHT;
44 constexpr int WINDOW_2_LEFT = (int)VehicleAreaWindow::ROW_2_LEFT;
45 constexpr int WINDOW_2_RIGHT = (int)VehicleAreaWindow::ROW_2_RIGHT;
46 constexpr int WINDOW_ROOF_TOP_1 = (int)VehicleAreaWindow::ROOF_TOP_1;
47 constexpr int FAN_DIRECTION_FACE = (int)VehicleHvacFanDirection::FACE;
48 constexpr int FAN_DIRECTION_FLOOR = (int)VehicleHvacFanDirection::FLOOR;
49 constexpr int OBD2_LIVE_FRAME = (int)VehicleProperty::OBD2_LIVE_FRAME;
50 constexpr int OBD2_FREEZE_FRAME = (int)VehicleProperty::OBD2_FREEZE_FRAME;
51 constexpr int OBD2_FREEZE_FRAME_INFO = (int)VehicleProperty::OBD2_FREEZE_FRAME_INFO;
52 constexpr int OBD2_FREEZE_FRAME_CLEAR = (int)VehicleProperty::OBD2_FREEZE_FRAME_CLEAR;
53 constexpr int TRACTION_CONTROL_ACTIVE = (int)VehicleProperty::TRACTION_CONTROL_ACTIVE;
54 constexpr int VEHICLE_MAP_SERVICE = (int)VehicleProperty::VEHICLE_MAP_SERVICE;
55 constexpr int WHEEL_TICK = (int)VehicleProperty::WHEEL_TICK;
56 constexpr int ALL_WHEELS =
57     (int)(VehicleAreaWheel::LEFT_FRONT | VehicleAreaWheel::RIGHT_FRONT |
58           VehicleAreaWheel::LEFT_REAR | VehicleAreaWheel::RIGHT_REAR);
59 constexpr int SEAT_1_LEFT = (int)(VehicleAreaSeat::ROW_1_LEFT);
60 constexpr int SEAT_1_RIGHT = (int)(VehicleAreaSeat::ROW_1_RIGHT);
61 constexpr int HVAC_LEFT = (int)(VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_2_LEFT |
62                                 VehicleAreaSeat::ROW_2_CENTER);
63 constexpr int HVAC_RIGHT = (int)(VehicleAreaSeat::ROW_1_RIGHT | VehicleAreaSeat::ROW_2_RIGHT);
64 constexpr int HVAC_ALL = HVAC_LEFT | HVAC_RIGHT;
65 constexpr int VENDOR_EXTENSION_BOOLEAN_PROPERTY =
66     (int)(0x101 | VehiclePropertyGroup::VENDOR | VehiclePropertyType::BOOLEAN | VehicleArea::DOOR);
67 constexpr int VENDOR_EXTENSION_FLOAT_PROPERTY =
68     (int)(0x102 | VehiclePropertyGroup::VENDOR | VehiclePropertyType::FLOAT | VehicleArea::SEAT);
69 constexpr int VENDOR_EXTENSION_INT_PROPERTY =
70     (int)(0x103 | VehiclePropertyGroup::VENDOR | VehiclePropertyType::INT32 | VehicleArea::WINDOW);
71 constexpr int VENDOR_EXTENSION_STRING_PROPERTY =
72     (int)(0x104 | VehiclePropertyGroup::VENDOR | VehiclePropertyType::STRING | VehicleArea::GLOBAL);
73 constexpr int FUEL_DOOR_REAR_LEFT = (int)PortLocationType::REAR_LEFT;
74 constexpr int CHARGE_PORT_FRONT_LEFT = (int)PortLocationType::FRONT_LEFT;
75 constexpr int CHARGE_PORT_REAR_LEFT = (int)PortLocationType::REAR_LEFT;
76 constexpr int LIGHT_STATE_ON = (int)VehicleLightState::ON;
77 constexpr int LIGHT_SWITCH_AUTO = (int)VehicleLightSwitch::AUTOMATIC;
78 constexpr int WHEEL_FRONT_LEFT = (int)VehicleAreaWheel::LEFT_FRONT;
79 constexpr int WHEEL_FRONT_RIGHT = (int)VehicleAreaWheel::RIGHT_FRONT;
80 constexpr int WHEEL_REAR_LEFT = (int)VehicleAreaWheel::LEFT_REAR;
81 constexpr int WHEEL_REAR_RIGHT = (int)VehicleAreaWheel::RIGHT_REAR;
82 
83 /**
84  * This property is used for test purpose to generate fake events. Here is the test package that
85  * is referencing this property definition: packages/services/Car/tests/vehiclehal_test
86  */
87 const int32_t kGenerateFakeDataControllingProperty =
88     0x0666 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED;
89 
90 /**
91  * This property is used for test purpose to set properties' value from vehicle.
92  * For example: Mocking hard button press triggering a HVAC fan speed change.
93  * Android set kSetPropertyFromVehicleForTest with an array of integer {HVAC_FAN_SPEED, value of
94  * fan speed} and a long value indicates the timestamp of the events .
95  * It only works with integer type properties.
96  */
97 const int32_t kSetIntPropertyFromVehicleForTest =
98         0x1112 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED;
99 /**
100  * This property is used for test purpose to set properties' value from vehicle.
101  * It only works with float type properties.
102  */
103 const int32_t kSetFloatPropertyFromVehicleForTest =
104         0x1113 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED;
105 /**
106  * This property is used for test purpose to set properties' value from vehicle.
107  * It only works with boolean type properties.
108  */
109 const int32_t kSetBooleanPropertyFromVehicleForTest =
110         0x1114 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED;
111 
112 /**
113  * This property is used for test purpose. End to end tests use this property to test set and get
114  * method for MIXED type properties.
115  */
116 const int32_t kMixedTypePropertyForTest =
117         0x1111 | VehiclePropertyGroup::VENDOR | VehicleArea::GLOBAL | VehiclePropertyType::MIXED;
118 /**
119  * FakeDataCommand enum defines the supported command type for kGenerateFakeDataControllingProperty.
120  * All those commands can be send independently with each other. And each will override the one sent
121  * previously.
122  *
123  * The controlling property has the following format:
124  *
125  *     int32Values[0] - command enum defined in FakeDataCommand
126  *
127  * The format of the arguments is defined for each command type as below:
128  */
129 enum class FakeDataCommand : int32_t {
130     /**
131      * Starts linear fake data generation. Caller must provide additional data:
132      *     int32Values[1] - vehicle property to which command applies
133      *     int64Values[0] - periodic interval in nanoseconds
134      *     floatValues[0] - initial value
135      *     floatValues[1] - dispersion defines the min/max value relative to initial value, where
136      *                      max = initial_value + dispersion, min = initial_value - dispersion.
137      *                      Dispersion should be non-negative, otherwise the behavior is undefined.
138      *     floatValues[2] - increment, with every timer tick the value will be incremented by this
139      *                      amount. When reaching to max value, the current value will be set to
140      *                      min. It should be non-negative, otherwise the behavior is undefined.
141      */
142     StartLinear = 0,
143 
144     /** Stops linear fake data generation that was triggered by StartLinear commands.
145      *     int32Values[1] - vehicle property to which command applies. VHAL will stop the
146      *                      corresponding linear generation for that property.
147      */
148     StopLinear = 1,
149 
150     /**
151      * Starts JSON-based fake data generation. It iterates through JSON-encoded VHAL events from a
152      * file and inject them to VHAL. The iteration can be repeated multiple times or infinitely.
153      * Caller must provide additional data:
154      *     int32Values[1] - number of iterations. If it is not provided or -1. The iteration will be
155      *                      repeated infinite times.
156      *     stringValue    - path to the fake values JSON file
157      */
158     StartJson = 2,
159 
160     /**
161      * Stops JSON-based fake data generation. As multiple JSON-based generation can happen at the
162      * same time. Caller must provide the path of fake value JSON file to stop the corresponding
163      * generation:
164      *     stringValue    - path to the fake values JSON file
165      */
166     StopJson = 3,
167 
168     /**
169      * Injects key press event (HAL incorporates UP/DOWN acction and triggers 2 HAL events for every
170      * key-press). We set the enum with high number to leave space for future start/stop commands.
171      * Caller must provide the following data:
172      *     int32Values[2] - Android key code
173      *     int32Values[3] - target display (0 - for main display, 1 - for instrument cluster, see
174      *                      VehicleDisplay)
175      */
176     KeyPress = 100,
177 };
178 
179 const int32_t kHvacPowerProperties[] = {
180     toInt(VehicleProperty::HVAC_FAN_SPEED),
181     toInt(VehicleProperty::HVAC_FAN_DIRECTION),
182 };
183 
184 struct ConfigDeclaration {
185     VehiclePropConfig config;
186 
187     /* This value will be used as an initial value for the property. If this field is specified for
188      * property that supports multiple areas then it will be used for all areas unless particular
189      * area is overridden in initialAreaValue field. */
190     VehiclePropValue::RawValue initialValue;
191     /* Use initialAreaValues if it is necessary to specify different values per each area. */
192     std::map<int32_t, VehiclePropValue::RawValue> initialAreaValues;
193 };
194 
195 const ConfigDeclaration kVehicleProperties[]{
196         {.config =
197                  {
198                          .prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY),
199                          .access = VehiclePropertyAccess::READ,
200                          .changeMode = VehiclePropertyChangeMode::STATIC,
201                  },
202          .initialValue = {.floatValues = {15000.0f}}},
203 
204         {.config =
205                  {
206                          .prop = toInt(VehicleProperty::INFO_FUEL_TYPE),
207                          .access = VehiclePropertyAccess::READ,
208                          .changeMode = VehiclePropertyChangeMode::STATIC,
209                  },
210          .initialValue = {.int32Values = {(int)FuelType::FUEL_TYPE_UNLEADED}}},
211 
212         {.config =
213                  {
214                          .prop = toInt(VehicleProperty::INFO_EV_BATTERY_CAPACITY),
215                          .access = VehiclePropertyAccess::READ,
216                          .changeMode = VehiclePropertyChangeMode::STATIC,
217                  },
218          .initialValue = {.floatValues = {150000.0f}}},
219 
220         {.config =
221                  {
222                          .prop = toInt(VehicleProperty::INFO_EV_CONNECTOR_TYPE),
223                          .access = VehiclePropertyAccess::READ,
224                          .changeMode = VehiclePropertyChangeMode::STATIC,
225                  },
226          .initialValue = {.int32Values = {(int)EvConnectorType::IEC_TYPE_1_AC}}},
227 
228         {.config =
229                  {
230                          .prop = toInt(VehicleProperty::INFO_DRIVER_SEAT),
231                          .access = VehiclePropertyAccess::READ,
232                          .changeMode = VehiclePropertyChangeMode::STATIC,
233                  },
234          .initialValue = {.int32Values = {SEAT_1_LEFT}}},
235 
236         {.config =
237                  {
238                          .prop = toInt(VehicleProperty::INFO_FUEL_DOOR_LOCATION),
239                          .access = VehiclePropertyAccess::READ,
240                          .changeMode = VehiclePropertyChangeMode::STATIC,
241                  },
242          .initialValue = {.int32Values = {FUEL_DOOR_REAR_LEFT}}},
243 
244         {.config =
245                  {
246                          .prop = toInt(VehicleProperty::INFO_EV_PORT_LOCATION),
247                          .access = VehiclePropertyAccess::READ,
248                          .changeMode = VehiclePropertyChangeMode::STATIC,
249                  },
250          .initialValue = {.int32Values = {CHARGE_PORT_FRONT_LEFT}}},
251 
252         {.config =
253                  {
254                          .prop = toInt(VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS),
255                          .access = VehiclePropertyAccess::READ,
256                          .changeMode = VehiclePropertyChangeMode::STATIC,
257                  },
258          .initialValue = {.int32Values = {CHARGE_PORT_FRONT_LEFT, CHARGE_PORT_REAR_LEFT}}},
259 
260         {.config =
261                  {
262                          .prop = toInt(VehicleProperty::INFO_MAKE),
263                          .access = VehiclePropertyAccess::READ,
264                          .changeMode = VehiclePropertyChangeMode::STATIC,
265                  },
266          .initialValue = {.stringValue = "Toy Vehicle"}},
267         {.config =
268                  {
269                          .prop = toInt(VehicleProperty::INFO_EXTERIOR_DIMENSIONS),
270                          .access = VehiclePropertyAccess::READ,
271                          .changeMode = VehiclePropertyChangeMode::STATIC,
272                  },
273          .initialValue = {.floatValues = {1776, 4950, 2008, 2140, 2984, 1665, 1667, 11800}}},
274         {.config =
275                  {
276                          .prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED),
277                          .access = VehiclePropertyAccess::READ,
278                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
279                          .minSampleRate = 1.0f,
280                          .maxSampleRate = 10.0f,
281                  },
282          .initialValue = {.floatValues = {0.0f}}},
283 
284         {.config =
285                  {
286                          .prop = toInt(VehicleProperty::VEHICLE_SPEED_DISPLAY_UNITS),
287                          .access = VehiclePropertyAccess::READ_WRITE,
288                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
289                          .configArray = {(int)VehicleUnit::METER_PER_SEC,
290                                          (int)VehicleUnit::MILES_PER_HOUR,
291                                          (int)VehicleUnit::KILOMETERS_PER_HOUR},
292                  },
293          .initialValue = {.int32Values = {(int)VehicleUnit::KILOMETERS_PER_HOUR}}},
294 
295         {.config =
296                  {
297                          .prop = toInt(VehicleProperty::INFO_DRIVER_SEAT),
298                          .access = VehiclePropertyAccess::READ,
299                          .changeMode = VehiclePropertyChangeMode::STATIC,
300                          // this was a zoned property on an old vhal, but it is meant to be global
301                          .areaConfigs = {VehicleAreaConfig{.areaId = (0)}},
302                  },
303          .initialValue = {.int32Values = {SEAT_1_LEFT}}},
304 
305         {.config =
306                  {
307                          .prop = toInt(VehicleProperty::PERF_ODOMETER),
308                          .access = VehiclePropertyAccess::READ,
309                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
310                          .minSampleRate = 0.0f,
311                          .maxSampleRate = 10.0f,
312                  },
313          .initialValue = {.floatValues = {0.0f}}},
314         {.config =
315                  {
316                          .prop = toInt(VehicleProperty::PERF_STEERING_ANGLE),
317                          .access = VehiclePropertyAccess::READ,
318                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
319                          .minSampleRate = 0.0f,
320                          .maxSampleRate = 10.0f,
321                  },
322          .initialValue = {.floatValues = {0.0f}}},
323         {.config =
324                  {
325                          .prop = toInt(VehicleProperty::PERF_REAR_STEERING_ANGLE),
326                          .access = VehiclePropertyAccess::READ,
327                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
328                          .minSampleRate = 0.0f,
329                          .maxSampleRate = 10.0f,
330                  },
331          .initialValue = {.floatValues = {0.0f}}},
332         {
333                 .config =
334                         {
335                                 .prop = toInt(VehicleProperty::ENGINE_RPM),
336                                 .access = VehiclePropertyAccess::READ,
337                                 .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
338                                 .minSampleRate = 1.0f,
339                                 .maxSampleRate = 10.0f,
340                         },
341                 .initialValue = {.floatValues = {0.0f}},
342         },
343 
344         {.config =
345                  {
346                          .prop = toInt(VehicleProperty::FUEL_LEVEL),
347                          .access = VehiclePropertyAccess::READ,
348                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
349                          .minSampleRate = 0.0f,
350                          .maxSampleRate = 100.0f,
351                  },
352          .initialValue = {.floatValues = {15000.0f}}},
353 
354         {.config =
355                  {
356                          .prop = toInt(VehicleProperty::FUEL_DOOR_OPEN),
357                          .access = VehiclePropertyAccess::READ_WRITE,
358                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
359                  },
360          .initialValue = {.int32Values = {0}}},
361 
362         {.config =
363                  {
364                          .prop = toInt(VehicleProperty::EV_BATTERY_LEVEL),
365                          .access = VehiclePropertyAccess::READ,
366                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
367                          .minSampleRate = 0.0f,
368                          .maxSampleRate = 100.0f,
369                  },
370          .initialValue = {.floatValues = {150000.0f}}},
371 
372         {.config =
373                  {
374                          .prop = toInt(VehicleProperty::EV_CHARGE_PORT_OPEN),
375                          .access = VehiclePropertyAccess::READ_WRITE,
376                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
377                  },
378          .initialValue = {.int32Values = {0}}},
379 
380         {.config =
381                  {
382                          .prop = toInt(VehicleProperty::EV_CHARGE_PORT_CONNECTED),
383                          .access = VehiclePropertyAccess::READ,
384                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
385                  },
386          .initialValue = {.int32Values = {0}}},
387 
388         {.config =
389                  {
390                          .prop = toInt(VehicleProperty::EV_BATTERY_INSTANTANEOUS_CHARGE_RATE),
391                          .access = VehiclePropertyAccess::READ,
392                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
393                          .minSampleRate = 1.0f,
394                          .maxSampleRate = 10.0f,
395                  },
396          .initialValue = {.floatValues = {0.0f}}},
397 
398         {.config =
399                  {
400                          .prop = toInt(VehicleProperty::RANGE_REMAINING),
401                          .access = VehiclePropertyAccess::READ_WRITE,
402                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
403                          .minSampleRate = 1.0f,
404                          .maxSampleRate = 2.0f,
405                  },
406          .initialValue = {.floatValues = {100.0f}}},  // units in meters
407 
408         {.config =
409                  {
410                          .prop = toInt(VehicleProperty::TIRE_PRESSURE),
411                          .access = VehiclePropertyAccess::READ,
412                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
413                          .areaConfigs = {VehicleAreaConfig{
414                                                  .areaId = WHEEL_FRONT_LEFT,
415                                                  .minFloatValue = 100.0f,
416                                                  .maxFloatValue = 300.0f,
417                                          },
418                                          VehicleAreaConfig{
419                                                  .areaId = WHEEL_FRONT_RIGHT,
420                                                  .minFloatValue = 100.0f,
421                                                  .maxFloatValue = 300.0f,
422                                          },
423                                          VehicleAreaConfig{
424                                                  .areaId = WHEEL_REAR_LEFT,
425                                                  .minFloatValue = 100.0f,
426                                                  .maxFloatValue = 300.0f,
427                                          },
428                                          VehicleAreaConfig{
429                                                  .areaId = WHEEL_REAR_RIGHT,
430                                                  .minFloatValue = 100.0f,
431                                                  .maxFloatValue = 300.0f,
432                                          }},
433                          .minSampleRate = 1.0f,
434                          .maxSampleRate = 2.0f,
435                  },
436          .initialValue = {.floatValues = {200.0f}}},  // units in kPa
437 
438         {.config =
439                  {
440                          .prop = toInt(VehicleProperty::TIRE_PRESSURE_DISPLAY_UNITS),
441                          .access = VehiclePropertyAccess::READ_WRITE,
442                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
443                          .configArray = {(int)VehicleUnit::KILOPASCAL, (int)VehicleUnit::PSI,
444                                          (int)VehicleUnit::BAR},
445                  },
446          .initialValue = {.int32Values = {toInt(VehicleUnit::PSI)}}},
447 
448         {.config =
449                  {
450                          .prop = toInt(VehicleProperty::CURRENT_GEAR),
451                          .access = VehiclePropertyAccess::READ,
452                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
453                  },
454          .initialValue = {.int32Values = {toInt(VehicleGear::GEAR_PARK)}}},
455 
456         {.config =
457                  {
458                          .prop = toInt(VehicleProperty::PARKING_BRAKE_ON),
459                          .access = VehiclePropertyAccess::READ,
460                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
461                  },
462          .initialValue = {.int32Values = {1}}},
463 
464         {.config =
465                  {
466                          .prop = toInt(VehicleProperty::FUEL_LEVEL_LOW),
467                          .access = VehiclePropertyAccess::READ,
468                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
469                  },
470          .initialValue = {.int32Values = {0}}},
471 
472         {.config =
473                  {
474                          .prop = toInt(VehicleProperty::HW_KEY_INPUT),
475                          .access = VehiclePropertyAccess::READ,
476                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
477                  },
478          .initialValue = {.int32Values = {0, 0, 0}}},
479 
480         {.config =
481                  {
482                          .prop = toInt(VehicleProperty::HW_ROTARY_INPUT),
483                          .access = VehiclePropertyAccess::READ,
484                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
485                  },
486          .initialValue = {.int32Values = {0, 0, 0}}},
487 
488         {.config = {.prop = toInt(VehicleProperty::HVAC_POWER_ON),
489                     .access = VehiclePropertyAccess::READ_WRITE,
490                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
491                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}},
492                     // TODO(bryaneyler): Ideally, this is generated dynamically from
493                     // kHvacPowerProperties.
494                     .configArray = {toInt(VehicleProperty::HVAC_FAN_SPEED),
495                                     toInt(VehicleProperty::HVAC_FAN_DIRECTION)}},
496          .initialValue = {.int32Values = {1}}},
497 
498         {
499                 .config = {.prop = toInt(VehicleProperty::HVAC_DEFROSTER),
500                            .access = VehiclePropertyAccess::READ_WRITE,
501                            .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
502                            .areaConfigs =
503                                    {VehicleAreaConfig{
504                                             .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)},
505                                     VehicleAreaConfig{
506                                             .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}},
507                 .initialValue = {.int32Values = {0}}  // Will be used for all areas.
508         },
509         {
510                 .config = {.prop = toInt(VehicleProperty::HVAC_ELECTRIC_DEFROSTER_ON),
511                            .access = VehiclePropertyAccess::READ_WRITE,
512                            .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
513                            .areaConfigs =
514                                    {VehicleAreaConfig{
515                                             .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)},
516                                     VehicleAreaConfig{
517                                             .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}},
518                 .initialValue = {.int32Values = {0}}  // Will be used for all areas.
519         },
520 
521         {.config = {.prop = toInt(VehicleProperty::HVAC_MAX_DEFROST_ON),
522                     .access = VehiclePropertyAccess::READ_WRITE,
523                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
524                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
525          .initialValue = {.int32Values = {0}}},
526 
527         {.config = {.prop = toInt(VehicleProperty::HVAC_RECIRC_ON),
528                     .access = VehiclePropertyAccess::READ_WRITE,
529                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
530                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
531          .initialValue = {.int32Values = {1}}},
532 
533         {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_RECIRC_ON),
534                     .access = VehiclePropertyAccess::READ_WRITE,
535                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
536                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
537          .initialValue = {.int32Values = {0}}},
538 
539         {.config = {.prop = toInt(VehicleProperty::HVAC_AC_ON),
540                     .access = VehiclePropertyAccess::READ_WRITE,
541                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
542                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
543          .initialValue = {.int32Values = {1}}},
544 
545         {.config = {.prop = toInt(VehicleProperty::HVAC_MAX_AC_ON),
546                     .access = VehiclePropertyAccess::READ_WRITE,
547                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
548                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
549          .initialValue = {.int32Values = {0}}},
550 
551         {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_ON),
552                     .access = VehiclePropertyAccess::READ_WRITE,
553                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
554                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
555          .initialValue = {.int32Values = {1}}},
556 
557         {.config = {.prop = toInt(VehicleProperty::HVAC_DUAL_ON),
558                     .access = VehiclePropertyAccess::READ_WRITE,
559                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
560                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
561          .initialValue = {.int32Values = {0}}},
562 
563         {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_SPEED),
564                     .access = VehiclePropertyAccess::READ_WRITE,
565                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
566                     .areaConfigs = {VehicleAreaConfig{
567                             .areaId = HVAC_ALL, .minInt32Value = 1, .maxInt32Value = 7}}},
568          .initialValue = {.int32Values = {3}}},
569 
570         {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION),
571                     .access = VehiclePropertyAccess::READ_WRITE,
572                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
573                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
574          .initialValue = {.int32Values = {toInt(VehicleHvacFanDirection::FACE)}}},
575 
576         {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION_AVAILABLE),
577                     .access = VehiclePropertyAccess::READ,
578                     .changeMode = VehiclePropertyChangeMode::STATIC,
579                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
580          .initialValue = {.int32Values = {FAN_DIRECTION_FACE, FAN_DIRECTION_FLOOR,
581                                           FAN_DIRECTION_FACE | FAN_DIRECTION_FLOOR}}},
582 
583         {.config = {.prop = toInt(VehicleProperty::HVAC_SEAT_VENTILATION),
584                     .access = VehiclePropertyAccess::READ_WRITE,
585                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
586                     .areaConfigs = {VehicleAreaConfig{
587                                             .areaId = SEAT_1_LEFT,
588                                             .minInt32Value = 0,
589                                             .maxInt32Value = 3,
590                                     },
591                                     VehicleAreaConfig{
592                                             .areaId = SEAT_1_RIGHT,
593                                             .minInt32Value = 0,
594                                             .maxInt32Value = 3,
595                                     }}},
596          .initialValue =
597                  {.int32Values = {0}}},  // 0 is off and +ve values indicate ventilation level.
598 
599         {.config = {.prop = toInt(VehicleProperty::HVAC_STEERING_WHEEL_HEAT),
600                     .access = VehiclePropertyAccess::READ_WRITE,
601                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
602                     .areaConfigs = {VehicleAreaConfig{
603                             .areaId = (0), .minInt32Value = -2, .maxInt32Value = 2}}},
604          .initialValue = {.int32Values = {0}}},  // +ve values for heating and -ve for cooling
605 
606         {.config = {.prop = toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE),
607                     .access = VehiclePropertyAccess::READ_WRITE,
608                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
609                     .areaConfigs = {VehicleAreaConfig{
610                                             .areaId = SEAT_1_LEFT,
611                                             .minInt32Value = -2,
612                                             .maxInt32Value = 2,
613                                     },
614                                     VehicleAreaConfig{
615                                             .areaId = SEAT_1_RIGHT,
616                                             .minInt32Value = -2,
617                                             .maxInt32Value = 2,
618                                     }}},
619          .initialValue = {.int32Values = {0}}},  // +ve values for heating and -ve for cooling
620 
621         {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET),
622                     .access = VehiclePropertyAccess::READ_WRITE,
623                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
624                     .areaConfigs = {VehicleAreaConfig{
625                                             .areaId = HVAC_LEFT,
626                                             .minFloatValue = 16,
627                                             .maxFloatValue = 32,
628                                     },
629                                     VehicleAreaConfig{
630                                             .areaId = HVAC_RIGHT,
631                                             .minFloatValue = 16,
632                                             .maxFloatValue = 32,
633                                     }}},
634          .initialAreaValues = {{HVAC_LEFT, {.floatValues = {16}}},
635                                {HVAC_RIGHT, {.floatValues = {20}}}}},
636 
637         {.config =
638                  {
639                          .prop = toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE),
640                          .access = VehiclePropertyAccess::READ,
641                          // TODO(bryaneyler): Support ON_CHANGE as well.
642                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
643                          .minSampleRate = 1.0f,
644                          .maxSampleRate = 2.0f,
645                  },
646          .initialValue = {.floatValues = {25.0f}}},
647 
648         {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS),
649                     .access = VehiclePropertyAccess::READ_WRITE,
650                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
651                     .configArray = {(int)VehicleUnit::FAHRENHEIT, (int)VehicleUnit::CELSIUS}},
652          .initialValue = {.int32Values = {(int)VehicleUnit::FAHRENHEIT}}},
653 
654         {.config =
655                  {
656                          .prop = toInt(VehicleProperty::DISTANCE_DISPLAY_UNITS),
657                          .access = VehiclePropertyAccess::READ_WRITE,
658                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
659                          .areaConfigs = {VehicleAreaConfig{.areaId = (0)}},
660                          .configArray = {(int)VehicleUnit::KILOMETER, (int)VehicleUnit::MILE},
661                  },
662          .initialValue = {.int32Values = {(int)VehicleUnit::MILE}}},
663 
664         {.config =
665                  {
666                          .prop = toInt(VehicleProperty::NIGHT_MODE),
667                          .access = VehiclePropertyAccess::READ,
668                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
669                  },
670          .initialValue = {.int32Values = {0}}},
671 
672         {.config =
673                  {
674                          .prop = toInt(VehicleProperty::GEAR_SELECTION),
675                          .access = VehiclePropertyAccess::READ,
676                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
677                  },
678          .initialValue = {.int32Values = {toInt(VehicleGear::GEAR_PARK)}}},
679 
680         {.config =
681                  {
682                          .prop = toInt(VehicleProperty::TURN_SIGNAL_STATE),
683                          .access = VehiclePropertyAccess::READ,
684                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
685                  },
686          .initialValue = {.int32Values = {toInt(VehicleTurnSignal::NONE)}}},
687 
688         {.config =
689                  {
690                          .prop = toInt(VehicleProperty::IGNITION_STATE),
691                          .access = VehiclePropertyAccess::READ,
692                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
693                  },
694          .initialValue = {.int32Values = {toInt(VehicleIgnitionState::ON)}}},
695 
696         {.config =
697                  {
698                          .prop = toInt(VehicleProperty::ENGINE_OIL_LEVEL),
699                          .access = VehiclePropertyAccess::READ,
700                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
701                  },
702          .initialValue = {.int32Values = {toInt(VehicleOilLevel::NORMAL)}}},
703 
704         {.config =
705                  {
706                          .prop = toInt(VehicleProperty::ENGINE_OIL_TEMP),
707                          .access = VehiclePropertyAccess::READ,
708                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
709                          .minSampleRate = 0.1,  // 0.1 Hz, every 10 seconds
710                          .maxSampleRate = 10,   // 10 Hz, every 100 ms
711                  },
712          .initialValue = {.floatValues = {101.0f}}},
713 
714         {
715                 .config =
716                         {
717                                 .prop = kGenerateFakeDataControllingProperty,
718                                 .access = VehiclePropertyAccess::WRITE,
719                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
720                                 .configArray = {1, 0, 0, 2, 0, 0, 0, 0, 0},
721                         },
722         },
723 
724         {
725                 .config =
726                         {
727                                 .prop = kSetIntPropertyFromVehicleForTest,
728                                 .access = VehiclePropertyAccess::WRITE,
729                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
730                                 .configArray = {0, 0, 0, 2, 1, 0, 0, 0, 0},
731                         },
732         },
733 
734         {
735                 .config =
736                         {
737                                 .prop = kSetFloatPropertyFromVehicleForTest,
738                                 .access = VehiclePropertyAccess::WRITE,
739                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
740                                 .configArray = {0, 0, 1, 0, 1, 0, 1, 0, 0},
741                         },
742         },
743 
744         {
745                 .config =
746                         {
747                                 .prop = kSetBooleanPropertyFromVehicleForTest,
748                                 .access = VehiclePropertyAccess::WRITE,
749                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
750                                 .configArray = {0, 1, 1, 0, 1, 0, 0, 0, 0},
751                         },
752         },
753 
754         {
755                 .config = {.prop = kMixedTypePropertyForTest,
756                            .access = VehiclePropertyAccess::READ_WRITE,
757                            .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
758                            .configArray = {1, 1, 0, 2, 0, 0, 1, 0, 0}},
759                 .initialValue =
760                         {
761                                 .int32Values = {1 /* indicate TRUE boolean value */, 2, 3},
762                                 .floatValues = {4.5f},
763                                 .stringValue = "MIXED property",
764                         },
765         },
766 
767         {.config = {.prop = toInt(VehicleProperty::DOOR_LOCK),
768                     .access = VehiclePropertyAccess::READ_WRITE,
769                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
770                     .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT},
771                                     VehicleAreaConfig{.areaId = DOOR_1_RIGHT},
772                                     VehicleAreaConfig{.areaId = DOOR_2_LEFT},
773                                     VehicleAreaConfig{.areaId = DOOR_2_RIGHT}}},
774          .initialAreaValues = {{DOOR_1_LEFT, {.int32Values = {1}}},
775                                {DOOR_1_RIGHT, {.int32Values = {1}}},
776                                {DOOR_2_LEFT, {.int32Values = {1}}},
777                                {DOOR_2_RIGHT, {.int32Values = {1}}}}},
778 
779         {.config = {.prop = toInt(VehicleProperty::DOOR_POS),
780                     .access = VehiclePropertyAccess::READ_WRITE,
781                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
782                     .areaConfigs =
783                             {VehicleAreaConfig{
784                                      .areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1},
785                              VehicleAreaConfig{.areaId = DOOR_1_RIGHT,
786                                                .minInt32Value = 0,
787                                                .maxInt32Value = 1},
788                              VehicleAreaConfig{
789                                      .areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1},
790                              VehicleAreaConfig{.areaId = DOOR_2_RIGHT,
791                                                .minInt32Value = 0,
792                                                .maxInt32Value = 1},
793                              VehicleAreaConfig{
794                                      .areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}},
795          .initialValue = {.int32Values = {0}}},
796 
797         {.config = {.prop = toInt(VehicleProperty::WINDOW_LOCK),
798                     .access = VehiclePropertyAccess::READ_WRITE,
799                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
800                     .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_RIGHT | WINDOW_2_LEFT |
801                                                                 WINDOW_2_RIGHT}}},
802          .initialAreaValues = {{WINDOW_1_RIGHT | WINDOW_2_LEFT | WINDOW_2_RIGHT,
803                                 {.int32Values = {0}}}}},
804 
805         {.config = {.prop = toInt(VehicleProperty::WINDOW_POS),
806                     .access = VehiclePropertyAccess::READ_WRITE,
807                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
808                     .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT,
809                                                       .minInt32Value = 0,
810                                                       .maxInt32Value = 10},
811                                     VehicleAreaConfig{.areaId = WINDOW_1_RIGHT,
812                                                       .minInt32Value = 0,
813                                                       .maxInt32Value = 10},
814                                     VehicleAreaConfig{.areaId = WINDOW_2_LEFT,
815                                                       .minInt32Value = 0,
816                                                       .maxInt32Value = 10},
817                                     VehicleAreaConfig{.areaId = WINDOW_2_RIGHT,
818                                                       .minInt32Value = 0,
819                                                       .maxInt32Value = 10},
820                                     VehicleAreaConfig{.areaId = WINDOW_ROOF_TOP_1,
821                                                       .minInt32Value = -10,
822                                                       .maxInt32Value = 10}}},
823          .initialValue = {.int32Values = {0}}},
824 
825         {.config =
826                  {
827                          .prop = WHEEL_TICK,
828                          .access = VehiclePropertyAccess::READ,
829                          .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
830                          .configArray = {ALL_WHEELS, 50000, 50000, 50000, 50000},
831                          .minSampleRate = 1.0f,
832                          .maxSampleRate = 10.0f,
833                  },
834          .initialValue = {.int64Values = {0, 100000, 200000, 300000, 400000}}},
835 
836         {.config = {.prop = ABS_ACTIVE,
837                     .access = VehiclePropertyAccess::READ,
838                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
839          .initialValue = {.int32Values = {0}}},
840 
841         {.config = {.prop = TRACTION_CONTROL_ACTIVE,
842                     .access = VehiclePropertyAccess::READ,
843                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
844          .initialValue = {.int32Values = {0}}},
845 
846         {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
847                     .access = VehiclePropertyAccess::READ,
848                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
849                     .configArray = {3}},
850          .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}}},
851 
852         {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
853                     .access = VehiclePropertyAccess::READ_WRITE,
854                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
855          .initialValue = {.int32Values = {toInt(VehicleApPowerStateReport::WAIT_FOR_VHAL), 0}}},
856 
857         {.config = {.prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS),
858                     .access = VehiclePropertyAccess::READ_WRITE,
859                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
860                     .areaConfigs = {VehicleAreaConfig{.minInt32Value = 0, .maxInt32Value = 100}}},
861          .initialValue = {.int32Values = {100}}},
862 
863         {
864                 .config = {.prop = OBD2_LIVE_FRAME,
865                            .access = VehiclePropertyAccess::READ,
866                            .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
867                            .configArray = {0, 0}},
868         },
869 
870         {
871                 .config = {.prop = OBD2_FREEZE_FRAME,
872                            .access = VehiclePropertyAccess::READ,
873                            .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
874                            .configArray = {0, 0}},
875         },
876 
877         {
878                 .config = {.prop = OBD2_FREEZE_FRAME_INFO,
879                            .access = VehiclePropertyAccess::READ,
880                            .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
881         },
882 
883         {
884                 .config = {.prop = OBD2_FREEZE_FRAME_CLEAR,
885                            .access = VehiclePropertyAccess::WRITE,
886                            .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
887                            .configArray = {1}},
888         },
889 
890         {.config =
891                  {
892                          .prop = toInt(VehicleProperty::HEADLIGHTS_STATE),
893                          .access = VehiclePropertyAccess::READ,
894                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
895                  },
896          .initialValue = {.int32Values = {LIGHT_STATE_ON}}},
897 
898         {.config =
899                  {
900                          .prop = toInt(VehicleProperty::HIGH_BEAM_LIGHTS_STATE),
901                          .access = VehiclePropertyAccess::READ,
902                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
903                  },
904          .initialValue = {.int32Values = {LIGHT_STATE_ON}}},
905 
906         {.config =
907                  {
908                          .prop = toInt(VehicleProperty::FOG_LIGHTS_STATE),
909                          .access = VehiclePropertyAccess::READ,
910                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
911                  },
912          .initialValue = {.int32Values = {LIGHT_STATE_ON}}},
913 
914         {.config =
915                  {
916                          .prop = toInt(VehicleProperty::HAZARD_LIGHTS_STATE),
917                          .access = VehiclePropertyAccess::READ,
918                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
919                  },
920          .initialValue = {.int32Values = {LIGHT_STATE_ON}}},
921 
922         {.config =
923                  {
924                          .prop = toInt(VehicleProperty::HEADLIGHTS_SWITCH),
925                          .access = VehiclePropertyAccess::READ_WRITE,
926                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
927                  },
928          .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}},
929 
930         {.config =
931                  {
932                          .prop = toInt(VehicleProperty::HIGH_BEAM_LIGHTS_SWITCH),
933                          .access = VehiclePropertyAccess::READ_WRITE,
934                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
935                  },
936          .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}},
937 
938         {.config =
939                  {
940                          .prop = toInt(VehicleProperty::FOG_LIGHTS_SWITCH),
941                          .access = VehiclePropertyAccess::READ_WRITE,
942                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
943                  },
944          .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}},
945 
946         {.config =
947                  {
948                          .prop = toInt(VehicleProperty::HAZARD_LIGHTS_SWITCH),
949                          .access = VehiclePropertyAccess::READ_WRITE,
950                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
951                  },
952          .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}},
953 
954         {.config = {.prop = VEHICLE_MAP_SERVICE,
955                     .access = VehiclePropertyAccess::READ_WRITE,
956                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE}},
957 
958         // Example Vendor Extension properties for testing
959         {.config = {.prop = VENDOR_EXTENSION_BOOLEAN_PROPERTY,
960                     .access = VehiclePropertyAccess::READ_WRITE,
961                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
962                     .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT},
963                                     VehicleAreaConfig{.areaId = DOOR_1_RIGHT},
964                                     VehicleAreaConfig{.areaId = DOOR_2_LEFT},
965                                     VehicleAreaConfig{.areaId = DOOR_2_RIGHT}}},
966          .initialAreaValues = {{DOOR_1_LEFT, {.int32Values = {1}}},
967                                {DOOR_1_RIGHT, {.int32Values = {1}}},
968                                {DOOR_2_LEFT, {.int32Values = {0}}},
969                                {DOOR_2_RIGHT, {.int32Values = {0}}}}},
970 
971         {.config = {.prop = VENDOR_EXTENSION_FLOAT_PROPERTY,
972                     .access = VehiclePropertyAccess::READ_WRITE,
973                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
974                     .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_LEFT,
975                                                       .minFloatValue = -10,
976                                                       .maxFloatValue = 10},
977                                     VehicleAreaConfig{.areaId = HVAC_RIGHT,
978                                                       .minFloatValue = -10,
979                                                       .maxFloatValue = 10}}},
980          .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}},
981                                {HVAC_RIGHT, {.floatValues = {2}}}}},
982 
983         {.config = {.prop = VENDOR_EXTENSION_INT_PROPERTY,
984                     .access = VehiclePropertyAccess::READ_WRITE,
985                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
986                     .areaConfigs =
987                             {VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD,
988                                                .minInt32Value = -100,
989                                                .maxInt32Value = 100},
990                              VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::REAR_WINDSHIELD,
991                                                .minInt32Value = -100,
992                                                .maxInt32Value = 100},
993                              VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::ROOF_TOP_1,
994                                                .minInt32Value = -100,
995                                                .maxInt32Value = 100}}},
996          .initialAreaValues = {{(int)VehicleAreaWindow::FRONT_WINDSHIELD, {.int32Values = {1}}},
997                                {(int)VehicleAreaWindow::REAR_WINDSHIELD, {.int32Values = {0}}},
998                                {(int)VehicleAreaWindow::ROOF_TOP_1, {.int32Values = {-1}}}}},
999 
1000         {.config = {.prop = VENDOR_EXTENSION_STRING_PROPERTY,
1001                     .access = VehiclePropertyAccess::READ_WRITE,
1002                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
1003          .initialValue = {.stringValue = "Vendor String Property"}},
1004 
1005         {.config =
1006                  {
1007                          .prop = toInt(VehicleProperty::SUPPORT_CUSTOMIZE_VENDOR_PERMISSION),
1008                          .access = VehiclePropertyAccess::READ_WRITE,
1009                          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
1010                          .configArray =
1011                                  {kMixedTypePropertyForTest,
1012                                   (int)VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_INFO,
1013                                   (int)VehicleVendorPermission::PERMISSION_SET_VENDOR_CATEGORY_INFO,
1014                                   VENDOR_EXTENSION_INT_PROPERTY,
1015                                   (int)VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_SEAT,
1016                                   (int)VehicleVendorPermission::PERMISSION_NOT_ACCESSIBLE,
1017                                   VENDOR_EXTENSION_FLOAT_PROPERTY,
1018                                   (int)VehicleVendorPermission::PERMISSION_DEFAULT,
1019                                   (int)VehicleVendorPermission::PERMISSION_DEFAULT},
1020                  },
1021          .initialValue = {.int32Values = {1}}},
1022 
1023         {
1024                 .config =
1025                         {
1026                                 .prop = toInt(VehicleProperty::INITIAL_USER_INFO),
1027                                 .access = VehiclePropertyAccess::READ_WRITE,
1028                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
1029                         },
1030         },
1031         {
1032                 .config =
1033                         {
1034                                 .prop = toInt(VehicleProperty::SWITCH_USER),
1035                                 .access = VehiclePropertyAccess::READ_WRITE,
1036                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
1037                         },
1038         },
1039         {
1040                 .config =
1041                         {
1042                                 .prop = toInt(VehicleProperty::CREATE_USER),
1043                                 .access = VehiclePropertyAccess::READ_WRITE,
1044                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
1045                         },
1046         },
1047         {
1048                 .config =
1049                         {
1050                                 .prop = toInt(VehicleProperty::REMOVE_USER),
1051                                 .access = VehiclePropertyAccess::READ_WRITE,
1052                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
1053                         },
1054         },
1055         {
1056                 .config =
1057                         {
1058                                 .prop = toInt(VehicleProperty::USER_IDENTIFICATION_ASSOCIATION),
1059                                 .access = VehiclePropertyAccess::READ_WRITE,
1060                                 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
1061                         },
1062         },
1063 };
1064 
1065 }  // impl
1066 
1067 }  // namespace V2_0
1068 }  // namespace vehicle
1069 }  // namespace automotive
1070 }  // namespace hardware
1071 }  // namespace android
1072 
1073 #endif // android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_
1074