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 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 32 | .prop = toInt(VehicleProperty::INFO_MAKE), |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 33 | .access = VehiclePropertyAccess::READ, |
| 34 | .changeMode = VehiclePropertyChangeMode::STATIC, |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 35 | }, |
| 36 | |
| 37 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 38 | .prop = toInt(VehicleProperty::HVAC_POWER_ON), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 39 | .access = VehiclePropertyAccess::READ_WRITE, |
| 40 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 41 | .supportedAreas = toInt(VehicleAreaZone::ROW_1) |
| 42 | }, |
| 43 | |
| 44 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 45 | .prop = toInt(VehicleProperty::HVAC_DEFROSTER), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 46 | .access = VehiclePropertyAccess::READ_WRITE, |
| 47 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 48 | .supportedAreas = |
| 49 | VehicleAreaWindow::FRONT_WINDSHIELD |
| 50 | | VehicleAreaWindow::REAR_WINDSHIELD |
| 51 | }, |
| 52 | |
| 53 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 54 | .prop = toInt(VehicleProperty::HVAC_RECIRC_ON), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 55 | .access = VehiclePropertyAccess::READ_WRITE, |
| 56 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 57 | .supportedAreas = toInt(VehicleAreaZone::ROW_1) |
| 58 | }, |
| 59 | |
| 60 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 61 | .prop = toInt(VehicleProperty::HVAC_AC_ON), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 62 | .access = VehiclePropertyAccess::READ_WRITE, |
| 63 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 64 | .supportedAreas = toInt(VehicleAreaZone::ROW_1) |
| 65 | }, |
| 66 | |
| 67 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 68 | .prop = toInt(VehicleProperty::HVAC_AUTO_ON), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 69 | .access = VehiclePropertyAccess::READ_WRITE, |
| 70 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 71 | .supportedAreas = toInt(VehicleAreaZone::ROW_1) |
| 72 | }, |
| 73 | |
| 74 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 75 | .prop = toInt(VehicleProperty::HVAC_FAN_SPEED), |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 76 | .access = VehiclePropertyAccess::READ_WRITE, |
| 77 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 78 | .supportedAreas = toInt(VehicleAreaZone::ROW_1), |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 79 | .areaConfigs = { |
| 80 | VehicleAreaConfig { |
| 81 | .areaId = toInt(VehicleAreaZone::ROW_1), |
| 82 | .minInt32Value = 1, |
| 83 | .maxInt32Value = 7 |
| 84 | } |
| 85 | } |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 86 | }, |
| 87 | |
| 88 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 89 | .prop = toInt(VehicleProperty::HVAC_FAN_DIRECTION), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 90 | .access = VehiclePropertyAccess::READ_WRITE, |
| 91 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 92 | .supportedAreas = toInt(VehicleAreaZone::ROW_1), |
| 93 | }, |
| 94 | |
| 95 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 96 | .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 97 | .access = VehiclePropertyAccess::READ_WRITE, |
| 98 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 99 | .supportedAreas = |
| 100 | VehicleAreaZone::ROW_1_LEFT |
| 101 | | VehicleAreaZone::ROW_1_RIGHT, |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 102 | .areaConfigs = { |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 103 | VehicleAreaConfig { |
| 104 | .areaId = toInt(VehicleAreaZone::ROW_1_LEFT), |
| 105 | .minFloatValue = 16, |
| 106 | .maxFloatValue = 32, |
| 107 | }, |
| 108 | VehicleAreaConfig { |
| 109 | .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT), |
| 110 | .minFloatValue = 16, |
| 111 | .maxFloatValue = 32, |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 112 | } |
| 113 | } |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 114 | }, |
| 115 | |
| 116 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 117 | .prop = toInt(VehicleProperty::NIGHT_MODE), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 118 | .access = VehiclePropertyAccess::READ, |
| 119 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 120 | }, |
| 121 | |
| 122 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 123 | .prop = toInt(VehicleProperty::DRIVING_STATUS), |
Pavel Maltsev | b5e5109 | 2016-11-22 11:01:03 -0800 | [diff] [blame] | 124 | .access = VehiclePropertyAccess::READ, |
| 125 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | b5e5109 | 2016-11-22 11:01:03 -0800 | [diff] [blame] | 126 | }, |
| 127 | |
| 128 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 129 | .prop = toInt(VehicleProperty::GEAR_SELECTION), |
Pavel Maltsev | 30c84c3 | 2016-11-14 16:23:36 -0800 | [diff] [blame] | 130 | .access = VehiclePropertyAccess::READ, |
| 131 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 132 | }, |
| 133 | |
| 134 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 135 | .prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY), |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 136 | .access = VehiclePropertyAccess::READ, |
| 137 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 138 | .areaConfigs = { |
| 139 | VehicleAreaConfig { |
| 140 | .minFloatValue = 0, |
| 141 | .maxFloatValue = 1.0 |
| 142 | } |
| 143 | } |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 144 | }, |
| 145 | |
| 146 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 147 | .prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS), |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 148 | .access = VehiclePropertyAccess::READ_WRITE, |
| 149 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 150 | .areaConfigs = { |
| 151 | VehicleAreaConfig { |
| 152 | .minInt32Value = 0, |
| 153 | .maxInt32Value = 10 |
| 154 | } |
| 155 | } |
Pavel Maltsev | d567a2a | 2016-12-14 16:07:29 -0800 | [diff] [blame] | 156 | }, |
| 157 | |
| 158 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 159 | .prop = toInt(VehicleProperty::IGNITION_STATE), |
Pavel Maltsev | d567a2a | 2016-12-14 16:07:29 -0800 | [diff] [blame] | 160 | .access = VehiclePropertyAccess::READ, |
| 161 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Enrico Granata | 4dcdf00 | 2017-01-11 11:47:37 -0800 | [diff] [blame] | 162 | }, |
| 163 | |
| 164 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 165 | .prop = toInt(VehicleProperty::OBD2_LIVE_FRAME), |
Enrico Granata | 4dcdf00 | 2017-01-11 11:47:37 -0800 | [diff] [blame] | 166 | .access = VehiclePropertyAccess::READ, |
| 167 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Enrico Granata | adcb7c7 | 2017-01-25 12:07:15 -0800 | [diff] [blame] | 168 | .configArray = {0,0} |
Enrico Granata | 4dcdf00 | 2017-01-11 11:47:37 -0800 | [diff] [blame] | 169 | }, |
| 170 | |
| 171 | { |
Pavel Maltsev | 8e624b3 | 2017-02-01 16:30:25 -0800 | [diff] [blame] | 172 | .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME), |
Enrico Granata | 4dcdf00 | 2017-01-11 11:47:37 -0800 | [diff] [blame] | 173 | .access = VehiclePropertyAccess::READ, |
| 174 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
Enrico Granata | adcb7c7 | 2017-01-25 12:07:15 -0800 | [diff] [blame] | 175 | .configArray = {0,0} |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 176 | } |
| 177 | }; |
| 178 | |
| 179 | } // impl |
| 180 | |
| 181 | } // namespace V2_0 |
| 182 | } // namespace vehicle |
| 183 | } // namespace hardware |
| 184 | } // namespace android |
| 185 | |
| 186 | #endif // android_hardware_vehicle_V2_0_impl_DefaultConfig_H_ |