blob: 270bf8c71264a790b55164d7a147fb44b5441a02 [file] [log] [blame]
Pavel Maltseve2603e32016-10-25 16:03:23 -07001/*
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
Pavel Maltsev2579fb72017-02-02 12:39:36 -080017#ifndef android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_
18#define android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_
Pavel Maltseve2603e32016-10-25 16:03:23 -070019
Pavel Maltsev2579fb72017-02-02 12:39:36 -080020#include <android/hardware/automotive/vehicle/2.0/IVehicle.h>
Pavel Maltsev30c84c32016-11-14 16:23:36 -080021#include <vehicle_hal_manager/VehicleUtils.h>
Pavel Maltseve2603e32016-10-25 16:03:23 -070022
23namespace android {
24namespace hardware {
Pavel Maltsev2579fb72017-02-02 12:39:36 -080025namespace automotive {
Pavel Maltseve2603e32016-10-25 16:03:23 -070026namespace vehicle {
27namespace V2_0 {
28
29namespace impl {
30
31const VehiclePropConfig kVehicleProperties[] = {
32 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080033 .prop = toInt(VehicleProperty::INFO_MAKE),
Pavel Maltseve2603e32016-10-25 16:03:23 -070034 .access = VehiclePropertyAccess::READ,
35 .changeMode = VehiclePropertyChangeMode::STATIC,
Pavel Maltseve2603e32016-10-25 16:03:23 -070036 },
37
38 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080039 .prop = toInt(VehicleProperty::HVAC_POWER_ON),
Pavel Maltsev30c84c32016-11-14 16:23:36 -080040 .access = VehiclePropertyAccess::READ_WRITE,
41 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080042 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
43 },
44
45 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080046 .prop = toInt(VehicleProperty::HVAC_DEFROSTER),
Pavel Maltsev30c84c32016-11-14 16:23:36 -080047 .access = VehiclePropertyAccess::READ_WRITE,
48 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080049 .supportedAreas =
50 VehicleAreaWindow::FRONT_WINDSHIELD
51 | VehicleAreaWindow::REAR_WINDSHIELD
52 },
53
54 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080055 .prop = toInt(VehicleProperty::HVAC_RECIRC_ON),
Pavel Maltsev30c84c32016-11-14 16:23:36 -080056 .access = VehiclePropertyAccess::READ_WRITE,
57 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080058 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
59 },
60
61 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080062 .prop = toInt(VehicleProperty::HVAC_AC_ON),
Pavel Maltsev30c84c32016-11-14 16:23:36 -080063 .access = VehiclePropertyAccess::READ_WRITE,
64 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080065 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
66 },
67
68 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080069 .prop = toInt(VehicleProperty::HVAC_AUTO_ON),
Pavel Maltsev30c84c32016-11-14 16:23:36 -080070 .access = VehiclePropertyAccess::READ_WRITE,
71 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080072 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
73 },
74
75 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080076 .prop = toInt(VehicleProperty::HVAC_FAN_SPEED),
Pavel Maltseve2603e32016-10-25 16:03:23 -070077 .access = VehiclePropertyAccess::READ_WRITE,
78 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080079 .supportedAreas = toInt(VehicleAreaZone::ROW_1),
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080080 .areaConfigs = {
81 VehicleAreaConfig {
82 .areaId = toInt(VehicleAreaZone::ROW_1),
83 .minInt32Value = 1,
84 .maxInt32Value = 7
85 }
86 }
Pavel Maltsev30c84c32016-11-14 16:23:36 -080087 },
88
89 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080090 .prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION),
Pavel Maltsev30c84c32016-11-14 16:23:36 -080091 .access = VehiclePropertyAccess::READ_WRITE,
92 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080093 .supportedAreas = toInt(VehicleAreaZone::ROW_1),
94 },
95
96 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -080097 .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET),
Pavel Maltsev30c84c32016-11-14 16:23:36 -080098 .access = VehiclePropertyAccess::READ_WRITE,
99 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800100 .supportedAreas =
101 VehicleAreaZone::ROW_1_LEFT
102 | VehicleAreaZone::ROW_1_RIGHT,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800103 .areaConfigs = {
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800104 VehicleAreaConfig {
105 .areaId = toInt(VehicleAreaZone::ROW_1_LEFT),
106 .minFloatValue = 16,
107 .maxFloatValue = 32,
108 },
109 VehicleAreaConfig {
110 .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT),
111 .minFloatValue = 16,
112 .maxFloatValue = 32,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800113 }
114 }
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800115 },
116
117 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800118 .prop = toInt(VehicleProperty::NIGHT_MODE),
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800119 .access = VehiclePropertyAccess::READ,
120 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800121 },
122
123 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800124 .prop = toInt(VehicleProperty::DRIVING_STATUS),
Pavel Maltsevb5e51092016-11-22 11:01:03 -0800125 .access = VehiclePropertyAccess::READ,
126 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsevb5e51092016-11-22 11:01:03 -0800127 },
128
129 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800130 .prop = toInt(VehicleProperty::GEAR_SELECTION),
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800131 .access = VehiclePropertyAccess::READ,
132 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltseve2603e32016-10-25 16:03:23 -0700133 },
134
135 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800136 .prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY),
Pavel Maltseve2603e32016-10-25 16:03:23 -0700137 .access = VehiclePropertyAccess::READ,
138 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800139 .areaConfigs = {
140 VehicleAreaConfig {
141 .minFloatValue = 0,
142 .maxFloatValue = 1.0
143 }
144 }
Pavel Maltseve2603e32016-10-25 16:03:23 -0700145 },
146
147 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800148 .prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS),
Pavel Maltseve2603e32016-10-25 16:03:23 -0700149 .access = VehiclePropertyAccess::READ_WRITE,
150 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800151 .areaConfigs = {
152 VehicleAreaConfig {
153 .minInt32Value = 0,
154 .maxInt32Value = 10
155 }
156 }
Pavel Maltsevd567a2a2016-12-14 16:07:29 -0800157 },
158
159 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800160 .prop = toInt(VehicleProperty::IGNITION_STATE),
Pavel Maltsevd567a2a2016-12-14 16:07:29 -0800161 .access = VehiclePropertyAccess::READ,
162 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Enrico Granata4dcdf002017-01-11 11:47:37 -0800163 },
164
165 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800166 .prop = toInt(VehicleProperty::OBD2_LIVE_FRAME),
Enrico Granata4dcdf002017-01-11 11:47:37 -0800167 .access = VehiclePropertyAccess::READ,
168 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Enrico Granataadcb7c72017-01-25 12:07:15 -0800169 .configArray = {0,0}
Enrico Granata4dcdf002017-01-11 11:47:37 -0800170 },
171
172 {
Pavel Maltsev8e624b32017-02-01 16:30:25 -0800173 .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME),
Enrico Granata4dcdf002017-01-11 11:47:37 -0800174 .access = VehiclePropertyAccess::READ,
175 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Enrico Granataadcb7c72017-01-25 12:07:15 -0800176 .configArray = {0,0}
Pavel Maltseve2603e32016-10-25 16:03:23 -0700177 }
178};
179
180} // impl
181
182} // namespace V2_0
183} // namespace vehicle
Pavel Maltsev2579fb72017-02-02 12:39:36 -0800184} // namespace automotive
Pavel Maltseve2603e32016-10-25 16:03:23 -0700185} // namespace hardware
186} // namespace android
187
Pavel Maltsev2579fb72017-02-02 12:39:36 -0800188#endif // android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_