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