blob: e4ca5ca038d458e111aef0831340b6601be08446 [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
17#ifndef android_hardware_vehicle_V2_0_impl_DefaultConfig_H_
18#define android_hardware_vehicle_V2_0_impl_DefaultConfig_H_
19
20#include <android/hardware/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 {
25namespace vehicle {
26namespace V2_0 {
27
28namespace impl {
29
30const VehiclePropConfig kVehicleProperties[] = {
31 {
32 .prop = VehicleProperty::INFO_MAKE,
33 .access = VehiclePropertyAccess::READ,
34 .changeMode = VehiclePropertyChangeMode::STATIC,
35 .permissionModel = VehiclePermissionModel::OEM_ONLY,
36 },
37
38 {
Pavel Maltsev30c84c32016-11-14 16:23:36 -080039 .prop = VehicleProperty::HVAC_POWER_ON,
40 .access = VehiclePropertyAccess::READ_WRITE,
41 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
42 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
43 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
44 },
45
46 {
47 .prop = VehicleProperty::HVAC_DEFROSTER,
48 .access = VehiclePropertyAccess::READ_WRITE,
49 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
50 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
51 .supportedAreas =
52 VehicleAreaWindow::FRONT_WINDSHIELD
53 | VehicleAreaWindow::REAR_WINDSHIELD
54 },
55
56 {
57 .prop = VehicleProperty::HVAC_RECIRC_ON,
58 .access = VehiclePropertyAccess::READ_WRITE,
59 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
60 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
61 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
62 },
63
64 {
65 .prop = VehicleProperty::HVAC_AC_ON,
66 .access = VehiclePropertyAccess::READ_WRITE,
67 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
68 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
69 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
70 },
71
72 {
73 .prop = VehicleProperty::HVAC_AUTO_ON,
74 .access = VehiclePropertyAccess::READ_WRITE,
75 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
76 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
77 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
78 },
79
80 {
Pavel Maltseve2603e32016-10-25 16:03:23 -070081 .prop = VehicleProperty::HVAC_FAN_SPEED,
82 .access = VehiclePropertyAccess::READ_WRITE,
83 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
84 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080085 .supportedAreas = toInt(VehicleAreaZone::ROW_1),
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080086 .areaConfigs = {
87 VehicleAreaConfig {
88 .areaId = toInt(VehicleAreaZone::ROW_1),
89 .minInt32Value = 1,
90 .maxInt32Value = 7
91 }
92 }
Pavel Maltsev30c84c32016-11-14 16:23:36 -080093 },
94
95 {
96 .prop = VehicleProperty::HVAC_FAN_DIRECTION,
97 .access = VehiclePropertyAccess::READ_WRITE,
98 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
99 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
100 .supportedAreas = toInt(VehicleAreaZone::ROW_1),
101 },
102
103 {
104 .prop = VehicleProperty::HVAC_TEMPERATURE_SET,
105 .access = VehiclePropertyAccess::READ_WRITE,
106 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
107 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
108 .supportedAreas =
109 VehicleAreaZone::ROW_1_LEFT
110 | VehicleAreaZone::ROW_1_RIGHT,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800111 .areaConfigs = {
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800112 VehicleAreaConfig {
113 .areaId = toInt(VehicleAreaZone::ROW_1_LEFT),
114 .minFloatValue = 16,
115 .maxFloatValue = 32,
116 },
117 VehicleAreaConfig {
118 .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT),
119 .minFloatValue = 16,
120 .maxFloatValue = 32,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800121 }
122 }
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800123 },
124
125 {
126 .prop = VehicleProperty::NIGHT_MODE,
127 .access = VehiclePropertyAccess::READ,
128 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
129 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
130 },
131
132 {
Pavel Maltsevb5e51092016-11-22 11:01:03 -0800133 .prop = VehicleProperty::DRIVING_STATUS,
134 .access = VehiclePropertyAccess::READ,
135 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
136 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
137 },
138
139 {
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800140 .prop = VehicleProperty::GEAR_SELECTION,
141 .access = VehiclePropertyAccess::READ,
142 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
143 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
Pavel Maltseve2603e32016-10-25 16:03:23 -0700144 },
145
146 {
147 .prop = VehicleProperty::INFO_FUEL_CAPACITY,
148 .access = VehiclePropertyAccess::READ,
149 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
150 .permissionModel = VehiclePermissionModel::OEM_ONLY,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800151 .areaConfigs = {
152 VehicleAreaConfig {
153 .minFloatValue = 0,
154 .maxFloatValue = 1.0
155 }
156 }
Pavel Maltseve2603e32016-10-25 16:03:23 -0700157 },
158
159 {
160 .prop = VehicleProperty::DISPLAY_BRIGHTNESS,
161 .access = VehiclePropertyAccess::READ_WRITE,
162 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
163 .permissionModel = VehiclePermissionModel::OEM_ONLY,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800164 .areaConfigs = {
165 VehicleAreaConfig {
166 .minInt32Value = 0,
167 .maxInt32Value = 10
168 }
169 }
Pavel Maltseve2603e32016-10-25 16:03:23 -0700170 }
171};
172
173} // impl
174
175} // namespace V2_0
176} // namespace vehicle
177} // namespace hardware
178} // namespace android
179
180#endif // android_hardware_vehicle_V2_0_impl_DefaultConfig_H_