Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 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_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 Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 21 | #include <vehicle_hal_manager/VehicleUtils.h> |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 22 | |
| 23 | namespace android { |
| 24 | namespace hardware { |
| 25 | namespace vehicle { |
| 26 | namespace V2_0 { |
| 27 | |
| 28 | namespace impl { |
| 29 | |
| 30 | const 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 Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 39 | .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 Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 81 | .prop = VehicleProperty::HVAC_FAN_SPEED, |
| 82 | .access = VehiclePropertyAccess::READ_WRITE, |
| 83 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
| 84 | .permissionModel = VehiclePermissionModel::NO_RESTRICTION, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 85 | .supportedAreas = toInt(VehicleAreaZone::ROW_1), |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame^] | 86 | .areaConfigs = { |
| 87 | VehicleAreaConfig { |
| 88 | .areaId = toInt(VehicleAreaZone::ROW_1), |
| 89 | .minInt32Value = 1, |
| 90 | .maxInt32Value = 7 |
| 91 | } |
| 92 | } |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 93 | }, |
| 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 Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame^] | 111 | .areaConfigs = { |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 112 | 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 Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame^] | 121 | } |
| 122 | } |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 123 | }, |
| 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 Maltsev | b5e5109 | 2016-11-22 11:01:03 -0800 | [diff] [blame] | 133 | .prop = VehicleProperty::DRIVING_STATUS, |
| 134 | .access = VehiclePropertyAccess::READ, |
| 135 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
| 136 | .permissionModel = VehiclePermissionModel::NO_RESTRICTION, |
| 137 | }, |
| 138 | |
| 139 | { |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 140 | .prop = VehicleProperty::GEAR_SELECTION, |
| 141 | .access = VehiclePropertyAccess::READ, |
| 142 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
| 143 | .permissionModel = VehiclePermissionModel::NO_RESTRICTION, |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 144 | }, |
| 145 | |
| 146 | { |
| 147 | .prop = VehicleProperty::INFO_FUEL_CAPACITY, |
| 148 | .access = VehiclePropertyAccess::READ, |
| 149 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
| 150 | .permissionModel = VehiclePermissionModel::OEM_ONLY, |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame^] | 151 | .areaConfigs = { |
| 152 | VehicleAreaConfig { |
| 153 | .minFloatValue = 0, |
| 154 | .maxFloatValue = 1.0 |
| 155 | } |
| 156 | } |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 157 | }, |
| 158 | |
| 159 | { |
| 160 | .prop = VehicleProperty::DISPLAY_BRIGHTNESS, |
| 161 | .access = VehiclePropertyAccess::READ_WRITE, |
| 162 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
| 163 | .permissionModel = VehiclePermissionModel::OEM_ONLY, |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame^] | 164 | .areaConfigs = { |
| 165 | VehicleAreaConfig { |
| 166 | .minInt32Value = 0, |
| 167 | .maxInt32Value = 10 |
| 168 | } |
| 169 | } |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 170 | } |
| 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_ |