blob: 7985737ea5fbad2de34711d04bfd273b53ffdb14 [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 Maltseve2603e32016-10-25 16:03:23 -070086 .areaConfigs = init_hidl_vec({
Pavel Maltsev30c84c32016-11-14 16:23:36 -080087 VehicleAreaConfig {
88 .areaId = toInt(VehicleAreaZone::ROW_1),
89 .minInt32Value = 1,
90 .maxInt32Value = 7
91 }})
92 },
93
94 {
95 .prop = VehicleProperty::HVAC_FAN_DIRECTION,
96 .access = VehiclePropertyAccess::READ_WRITE,
97 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
98 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
99 .supportedAreas = toInt(VehicleAreaZone::ROW_1),
100 },
101
102 {
103 .prop = VehicleProperty::HVAC_TEMPERATURE_SET,
104 .access = VehiclePropertyAccess::READ_WRITE,
105 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
106 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
107 .supportedAreas =
108 VehicleAreaZone::ROW_1_LEFT
109 | VehicleAreaZone::ROW_1_RIGHT,
110 .areaConfigs = init_hidl_vec({
111 VehicleAreaConfig {
112 .areaId = toInt(VehicleAreaZone::ROW_1_LEFT),
113 .minFloatValue = 16,
114 .maxFloatValue = 32,
115 },
116 VehicleAreaConfig {
117 .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT),
118 .minFloatValue = 16,
119 .maxFloatValue = 32,
120 }})
121 },
122
123 {
124 .prop = VehicleProperty::NIGHT_MODE,
125 .access = VehiclePropertyAccess::READ,
126 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
127 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
128 },
129
130 {
131 .prop = VehicleProperty::GEAR_SELECTION,
132 .access = VehiclePropertyAccess::READ,
133 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
134 .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
Pavel Maltseve2603e32016-10-25 16:03:23 -0700135 },
136
137 {
138 .prop = VehicleProperty::INFO_FUEL_CAPACITY,
139 .access = VehiclePropertyAccess::READ,
140 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
141 .permissionModel = VehiclePermissionModel::OEM_ONLY,
142 .areaConfigs = init_hidl_vec({
143 VehicleAreaConfig {
144 .minFloatValue = 0,
145 .maxFloatValue = 1.0
146 }
147 })
148 },
149
150 {
151 .prop = VehicleProperty::DISPLAY_BRIGHTNESS,
152 .access = VehiclePropertyAccess::READ_WRITE,
153 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
154 .permissionModel = VehiclePermissionModel::OEM_ONLY,
155 .areaConfigs = init_hidl_vec({
156 VehicleAreaConfig {
157 .minInt32Value = 0,
158 .maxInt32Value = 10
159 }
160 })
161 }
162};
163
164} // impl
165
166} // namespace V2_0
167} // namespace vehicle
168} // namespace hardware
169} // namespace android
170
171#endif // android_hardware_vehicle_V2_0_impl_DefaultConfig_H_