diff options
author | android-build-team Robot | 2018-04-04 02:26:44 -0500 |
---|---|---|
committer | android-build-team Robot | 2018-04-04 02:26:44 -0500 |
commit | 88839af1d666a4bb71a2a0975c1d071b53663dfd (patch) | |
tree | c588a047744c542737df40adde889c5398403218 | |
parent | 13470a1d66eb96f3f3067d0c2261af911b67a2d1 (diff) | |
parent | eac7714719a230194b8161cf8d3aa3af038bcde0 (diff) | |
download | platform-hardware-interfaces-88839af1d666a4bb71a2a0975c1d071b53663dfd.tar.gz platform-hardware-interfaces-88839af1d666a4bb71a2a0975c1d071b53663dfd.tar.xz platform-hardware-interfaces-88839af1d666a4bb71a2a0975c1d071b53663dfd.zip |
Snap for 4698807 from eac7714719a230194b8161cf8d3aa3af038bcde0 to pi-release
Change-Id: Ic51077d9a0aa566208cee58de9f7423add0e3dc1
-rw-r--r-- | automotive/vehicle/2.0/Android.bp | 12 | ||||
-rw-r--r-- | automotive/vehicle/2.0/IVehicleCallback.hal | 2 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleObjectPool.h | 2 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp | 2 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp | 20 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h | 43 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp | 4 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp | 48 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp | 23 | ||||
-rw-r--r-- | automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h | 95 | ||||
-rw-r--r-- | automotive/vehicle/2.0/types.hal | 1038 | ||||
-rw-r--r-- | compatibility_matrices/Android.mk | 6 | ||||
-rw-r--r-- | compatibility_matrices/compatibility_matrix.3.xml (renamed from compatibility_matrices/compatibility_matrix.current.xml) | 0 | ||||
-rw-r--r-- | current.txt | 6 | ||||
-rw-r--r-- | nfc/1.1/types.hal | 3 |
15 files changed, 702 insertions, 602 deletions
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp index 3e32b3e8..4b93008e 100644 --- a/automotive/vehicle/2.0/Android.bp +++ b/automotive/vehicle/2.0/Android.bp | |||
@@ -26,14 +26,15 @@ hidl_interface { | |||
26 | "Obd2IgnitionMonitorKind", | 26 | "Obd2IgnitionMonitorKind", |
27 | "Obd2SecondaryAirStatus", | 27 | "Obd2SecondaryAirStatus", |
28 | "Obd2SparkIgnitionMonitors", | 28 | "Obd2SparkIgnitionMonitors", |
29 | "PortLocationType", | ||
29 | "StatusCode", | 30 | "StatusCode", |
30 | "SubscribeFlags", | 31 | "SubscribeFlags", |
31 | "SubscribeOptions", | 32 | "SubscribeOptions", |
32 | "VehicleApPowerBootupReason", | 33 | "VehicleApPowerBootupReason", |
33 | "VehicleApPowerSetState", | ||
34 | "VehicleApPowerState", | ||
35 | "VehicleApPowerStateConfigFlag", | 34 | "VehicleApPowerStateConfigFlag", |
36 | "VehicleApPowerStateIndex", | 35 | "VehicleApPowerStateReq", |
36 | "VehicleApPowerStateReqIndex", | ||
37 | "VehicleApPowerStateReport", | ||
37 | "VehicleApPowerStateShutdownParam", | 38 | "VehicleApPowerStateShutdownParam", |
38 | "VehicleArea", | 39 | "VehicleArea", |
39 | "VehicleAreaConfig", | 40 | "VehicleAreaConfig", |
@@ -41,12 +42,13 @@ hidl_interface { | |||
41 | "VehicleAreaMirror", | 42 | "VehicleAreaMirror", |
42 | "VehicleAreaSeat", | 43 | "VehicleAreaSeat", |
43 | "VehicleAreaWindow", | 44 | "VehicleAreaWindow", |
44 | "VehicleAreaZone", | ||
45 | "VehicleDisplay", | 45 | "VehicleDisplay", |
46 | "VehicleGear", | 46 | "VehicleGear", |
47 | "VehicleHvacFanDirection", | 47 | "VehicleHvacFanDirection", |
48 | "VehicleHwKeyInputAction", | 48 | "VehicleHwKeyInputAction", |
49 | "VehicleIgnitionState", | 49 | "VehicleIgnitionState", |
50 | "VehicleLightState", | ||
51 | "VehicleLightSwitch", | ||
50 | "VehicleOilLevel", | 52 | "VehicleOilLevel", |
51 | "VehiclePropConfig", | 53 | "VehiclePropConfig", |
52 | "VehiclePropValue", | 54 | "VehiclePropValue", |
@@ -54,10 +56,8 @@ hidl_interface { | |||
54 | "VehiclePropertyAccess", | 56 | "VehiclePropertyAccess", |
55 | "VehiclePropertyChangeMode", | 57 | "VehiclePropertyChangeMode", |
56 | "VehiclePropertyGroup", | 58 | "VehiclePropertyGroup", |
57 | "VehiclePropertyOperation", | ||
58 | "VehiclePropertyStatus", | 59 | "VehiclePropertyStatus", |
59 | "VehiclePropertyType", | 60 | "VehiclePropertyType", |
60 | "VehicleRadioConstants", | ||
61 | "VehicleTurnSignal", | 61 | "VehicleTurnSignal", |
62 | "VehicleUnit", | 62 | "VehicleUnit", |
63 | "VmsAvailabilityStateIntegerValuesIndex", | 63 | "VmsAvailabilityStateIntegerValuesIndex", |
diff --git a/automotive/vehicle/2.0/IVehicleCallback.hal b/automotive/vehicle/2.0/IVehicleCallback.hal index 70604186..c4a756ab 100644 --- a/automotive/vehicle/2.0/IVehicleCallback.hal +++ b/automotive/vehicle/2.0/IVehicleCallback.hal | |||
@@ -33,7 +33,7 @@ interface IVehicleCallback { | |||
33 | 33 | ||
34 | /** | 34 | /** |
35 | * This method gets called if the client was subscribed to a property using | 35 | * This method gets called if the client was subscribed to a property using |
36 | * SubscribeFlags::SET_CALL flag and IVehicle#set(...) method was called. | 36 | * SubscribeFlags::EVENTS_FROM_ANDROID flag and IVehicle#set(...) method was called. |
37 | * | 37 | * |
38 | * These events must be delivered to subscriber immediately without any | 38 | * These events must be delivered to subscriber immediately without any |
39 | * batching. | 39 | * batching. |
diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleObjectPool.h b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleObjectPool.h index 359bb6df..946e74dd 100644 --- a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleObjectPool.h +++ b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleObjectPool.h | |||
@@ -152,7 +152,7 @@ private: | |||
152 | * VehiclePropValuePool pool; | 152 | * VehiclePropValuePool pool; |
153 | * auto v = pool.obtain(VehiclePropertyType::INT32); | 153 | * auto v = pool.obtain(VehiclePropertyType::INT32); |
154 | * v->propId = VehicleProperty::HVAC_FAN_SPEED; | 154 | * v->propId = VehicleProperty::HVAC_FAN_SPEED; |
155 | * v->areaId = VehicleAreaZone::ROW_1_LEFT; | 155 | * v->areaId = VehicleAreaSeat::ROW_1_LEFT; |
156 | * v->timestamp = elapsedRealtimeNano(); | 156 | * v->timestamp = elapsedRealtimeNano(); |
157 | * v->value->int32Values[0] = 42; | 157 | * v->value->int32Values[0] = 42; |
158 | * | 158 | * |
diff --git a/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp b/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp index a7d5f509..97aeca67 100644 --- a/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp +++ b/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp | |||
@@ -106,7 +106,7 @@ StatusCode SubscriptionManager::addOrUpdateSubscription( | |||
106 | 106 | ||
107 | addClientToPropMapLocked(opts.propId, client); | 107 | addClientToPropMapLocked(opts.propId, client); |
108 | 108 | ||
109 | if (SubscribeFlags::HAL_EVENT & opts.flags) { | 109 | if (SubscribeFlags::EVENTS_FROM_CAR & opts.flags) { |
110 | SubscribeOptions updated; | 110 | SubscribeOptions updated; |
111 | if (updateHalEventSubscriptionLocked(opts, &updated)) { | 111 | if (updateHalEventSubscriptionLocked(opts, &updated)) { |
112 | outUpdatedSubscriptions->push_back(updated); | 112 | outUpdatedSubscriptions->push_back(updated); |
diff --git a/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp b/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp index 1918421a..b5de2625 100644 --- a/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp +++ b/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp | |||
@@ -216,7 +216,7 @@ void VehicleHalManager::onHalPropertySetError(StatusCode errorCode, | |||
216 | int32_t property, | 216 | int32_t property, |
217 | int32_t areaId) { | 217 | int32_t areaId) { |
218 | const auto& clients = | 218 | const auto& clients = |
219 | mSubscriptionManager.getSubscribedClients(property, SubscribeFlags::HAL_EVENT); | 219 | mSubscriptionManager.getSubscribedClients(property, SubscribeFlags::EVENTS_FROM_CAR); |
220 | 220 | ||
221 | for (auto client : clients) { | 221 | for (auto client : clients) { |
222 | client->getCallback()->onPropertySetError(errorCode, property, areaId); | 222 | client->getCallback()->onPropertySetError(errorCode, property, areaId); |
@@ -224,8 +224,8 @@ void VehicleHalManager::onHalPropertySetError(StatusCode errorCode, | |||
224 | } | 224 | } |
225 | 225 | ||
226 | void VehicleHalManager::onBatchHalEvent(const std::vector<VehiclePropValuePtr>& values) { | 226 | void VehicleHalManager::onBatchHalEvent(const std::vector<VehiclePropValuePtr>& values) { |
227 | const auto& clientValues = mSubscriptionManager.distributeValuesToClients( | 227 | const auto& clientValues = |
228 | values, SubscribeFlags::HAL_EVENT); | 228 | mSubscriptionManager.distributeValuesToClients(values, SubscribeFlags::EVENTS_FROM_CAR); |
229 | 229 | ||
230 | for (const HalClientValues& cv : clientValues) { | 230 | for (const HalClientValues& cv : clientValues) { |
231 | auto vecSize = cv.values.size(); | 231 | auto vecSize = cv.values.size(); |
@@ -250,8 +250,7 @@ void VehicleHalManager::onBatchHalEvent(const std::vector<VehiclePropValuePtr>& | |||
250 | } | 250 | } |
251 | 251 | ||
252 | bool VehicleHalManager::isSampleRateFixed(VehiclePropertyChangeMode mode) { | 252 | bool VehicleHalManager::isSampleRateFixed(VehiclePropertyChangeMode mode) { |
253 | return (mode & VehiclePropertyChangeMode::ON_SET) | 253 | return (mode & VehiclePropertyChangeMode::ON_CHANGE); |
254 | || (mode & VehiclePropertyChangeMode::ON_CHANGE); | ||
255 | } | 254 | } |
256 | 255 | ||
257 | float VehicleHalManager::checkSampleRate(const VehiclePropConfig &config, | 256 | float VehicleHalManager::checkSampleRate(const VehiclePropConfig &config, |
@@ -281,7 +280,7 @@ bool VehicleHalManager::isSubscribable(const VehiclePropConfig& config, | |||
281 | SubscribeFlags flags) { | 280 | SubscribeFlags flags) { |
282 | bool isReadable = config.access & VehiclePropertyAccess::READ; | 281 | bool isReadable = config.access & VehiclePropertyAccess::READ; |
283 | 282 | ||
284 | if (!isReadable && (SubscribeFlags::HAL_EVENT & flags)) { | 283 | if (!isReadable && (SubscribeFlags::EVENTS_FROM_CAR & flags)) { |
285 | ALOGW("Cannot subscribe, property 0x%x is not readable", config.prop); | 284 | ALOGW("Cannot subscribe, property 0x%x is not readable", config.prop); |
286 | return false; | 285 | return false; |
287 | } | 286 | } |
@@ -289,12 +288,6 @@ bool VehicleHalManager::isSubscribable(const VehiclePropConfig& config, | |||
289 | ALOGW("Cannot subscribe, property 0x%x is static", config.prop); | 288 | ALOGW("Cannot subscribe, property 0x%x is static", config.prop); |
290 | return false; | 289 | return false; |
291 | } | 290 | } |
292 | |||
293 | //TODO: extend to support event notification for set from android | ||
294 | if (config.changeMode == VehiclePropertyChangeMode::POLL) { | ||
295 | ALOGW("Cannot subscribe, property 0x%x is poll only", config.prop); | ||
296 | return false; | ||
297 | } | ||
298 | return true; | 291 | return true; |
299 | } | 292 | } |
300 | 293 | ||
@@ -317,7 +310,8 @@ bool VehicleHalManager::checkReadPermission(const VehiclePropConfig &config) con | |||
317 | } | 310 | } |
318 | 311 | ||
319 | void VehicleHalManager::handlePropertySetEvent(const VehiclePropValue& value) { | 312 | void VehicleHalManager::handlePropertySetEvent(const VehiclePropValue& value) { |
320 | auto clients = mSubscriptionManager.getSubscribedClients(value.prop, SubscribeFlags::SET_CALL); | 313 | auto clients = |
314 | mSubscriptionManager.getSubscribedClients(value.prop, SubscribeFlags::EVENTS_FROM_ANDROID); | ||
321 | for (auto client : clients) { | 315 | for (auto client : clients) { |
322 | client->getCallback()->onPropertySet(value); | 316 | client->getCallback()->onPropertySet(value); |
323 | } | 317 | } |
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h index 479f8af6..56813ce4 100644 --- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h | |||
@@ -30,7 +30,8 @@ namespace impl { | |||
30 | // | 30 | // |
31 | // Some handy constants to avoid conversions from enum to int. | 31 | // Some handy constants to avoid conversions from enum to int. |
32 | constexpr int ABS_ACTIVE = (int)VehicleProperty::ABS_ACTIVE; | 32 | constexpr int ABS_ACTIVE = (int)VehicleProperty::ABS_ACTIVE; |
33 | constexpr int AP_POWER_STATE = (int)VehicleProperty::AP_POWER_STATE; | 33 | constexpr int AP_POWER_STATE_REQ = (int)VehicleProperty::AP_POWER_STATE_REQ; |
34 | constexpr int AP_POWER_STATE_REPORT = (int)VehicleProperty::AP_POWER_STATE_REPORT; | ||
34 | constexpr int OBD2_LIVE_FRAME = (int)VehicleProperty::OBD2_LIVE_FRAME; | 35 | constexpr int OBD2_LIVE_FRAME = (int)VehicleProperty::OBD2_LIVE_FRAME; |
35 | constexpr int OBD2_FREEZE_FRAME = (int)VehicleProperty::OBD2_FREEZE_FRAME; | 36 | constexpr int OBD2_FREEZE_FRAME = (int)VehicleProperty::OBD2_FREEZE_FRAME; |
36 | constexpr int OBD2_FREEZE_FRAME_INFO = (int)VehicleProperty::OBD2_FREEZE_FRAME_INFO; | 37 | constexpr int OBD2_FREEZE_FRAME_INFO = (int)VehicleProperty::OBD2_FREEZE_FRAME_INFO; |
@@ -149,14 +150,6 @@ const ConfigDeclaration kVehicleProperties[]{ | |||
149 | }, | 150 | }, |
150 | .initialValue = {.floatValues = {0.0f}}}, | 151 | .initialValue = {.floatValues = {0.0f}}}, |
151 | 152 | ||
152 | {.config = | ||
153 | { | ||
154 | .prop = toInt(VehicleProperty::ENGINE_ON), | ||
155 | .access = VehiclePropertyAccess::READ, | ||
156 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | ||
157 | }, | ||
158 | .initialValue = {.int32Values = {0}}}, | ||
159 | |||
160 | { | 153 | { |
161 | .config = | 154 | .config = |
162 | { | 155 | { |
@@ -255,7 +248,7 @@ const ConfigDeclaration kVehicleProperties[]{ | |||
255 | .access = VehiclePropertyAccess::READ_WRITE, | 248 | .access = VehiclePropertyAccess::READ_WRITE, |
256 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 249 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
257 | .areaConfigs = {VehicleAreaConfig{ | 250 | .areaConfigs = {VehicleAreaConfig{ |
258 | .areaId = (VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT)}}, | 251 | .areaId = (VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT)}}, |
259 | // TODO(bryaneyler): Ideally, this is generated dynamically from | 252 | // TODO(bryaneyler): Ideally, this is generated dynamically from |
260 | // kHvacPowerProperties. | 253 | // kHvacPowerProperties. |
261 | .configString = "0x12400500,0x12400501" // HVAC_FAN_SPEED,HVAC_FAN_DIRECTION | 254 | .configString = "0x12400500,0x12400501" // HVAC_FAN_SPEED,HVAC_FAN_DIRECTION |
@@ -276,28 +269,28 @@ const ConfigDeclaration kVehicleProperties[]{ | |||
276 | .access = VehiclePropertyAccess::READ_WRITE, | 269 | .access = VehiclePropertyAccess::READ_WRITE, |
277 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 270 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
278 | .areaConfigs = {VehicleAreaConfig{ | 271 | .areaConfigs = {VehicleAreaConfig{ |
279 | .areaId = (VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT)}}}, | 272 | .areaId = (VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT)}}}, |
280 | .initialValue = {.int32Values = {1}}}, | 273 | .initialValue = {.int32Values = {1}}}, |
281 | 274 | ||
282 | {.config = {.prop = toInt(VehicleProperty::HVAC_AC_ON), | 275 | {.config = {.prop = toInt(VehicleProperty::HVAC_AC_ON), |
283 | .access = VehiclePropertyAccess::READ_WRITE, | 276 | .access = VehiclePropertyAccess::READ_WRITE, |
284 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 277 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
285 | .areaConfigs = {VehicleAreaConfig{ | 278 | .areaConfigs = {VehicleAreaConfig{ |
286 | .areaId = (VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT)}}}, | 279 | .areaId = (VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT)}}}, |
287 | .initialValue = {.int32Values = {1}}}, | 280 | .initialValue = {.int32Values = {1}}}, |
288 | 281 | ||
289 | {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_ON), | 282 | {.config = {.prop = toInt(VehicleProperty::HVAC_AUTO_ON), |
290 | .access = VehiclePropertyAccess::READ_WRITE, | 283 | .access = VehiclePropertyAccess::READ_WRITE, |
291 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 284 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
292 | .areaConfigs = {VehicleAreaConfig{ | 285 | .areaConfigs = {VehicleAreaConfig{ |
293 | .areaId = (VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT)}}}, | 286 | .areaId = (VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT)}}}, |
294 | .initialValue = {.int32Values = {1}}}, | 287 | .initialValue = {.int32Values = {1}}}, |
295 | 288 | ||
296 | {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_SPEED), | 289 | {.config = {.prop = toInt(VehicleProperty::HVAC_FAN_SPEED), |
297 | .access = VehiclePropertyAccess::READ_WRITE, | 290 | .access = VehiclePropertyAccess::READ_WRITE, |
298 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 291 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
299 | .areaConfigs = {VehicleAreaConfig{ | 292 | .areaConfigs = {VehicleAreaConfig{ |
300 | .areaId = (VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT), | 293 | .areaId = (VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT), |
301 | .minInt32Value = 1, | 294 | .minInt32Value = 1, |
302 | .maxInt32Value = 7}}}, | 295 | .maxInt32Value = 7}}}, |
303 | .initialValue = {.int32Values = {3}}}, | 296 | .initialValue = {.int32Values = {3}}}, |
@@ -306,24 +299,24 @@ const ConfigDeclaration kVehicleProperties[]{ | |||
306 | .access = VehiclePropertyAccess::READ_WRITE, | 299 | .access = VehiclePropertyAccess::READ_WRITE, |
307 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 300 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
308 | .areaConfigs = {VehicleAreaConfig{ | 301 | .areaConfigs = {VehicleAreaConfig{ |
309 | .areaId = (VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT)}}}, | 302 | .areaId = (VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT)}}}, |
310 | .initialValue = {.int32Values = {toInt(VehicleHvacFanDirection::FACE)}}}, | 303 | .initialValue = {.int32Values = {toInt(VehicleHvacFanDirection::FACE)}}}, |
311 | 304 | ||
312 | {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET), | 305 | {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET), |
313 | .access = VehiclePropertyAccess::READ_WRITE, | 306 | .access = VehiclePropertyAccess::READ_WRITE, |
314 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 307 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
315 | .areaConfigs = {VehicleAreaConfig{ | 308 | .areaConfigs = {VehicleAreaConfig{ |
316 | .areaId = toInt(VehicleAreaZone::ROW_1_LEFT), | 309 | .areaId = toInt(VehicleAreaSeat::ROW_1_LEFT), |
317 | .minFloatValue = 16, | 310 | .minFloatValue = 16, |
318 | .maxFloatValue = 32, | 311 | .maxFloatValue = 32, |
319 | }, | 312 | }, |
320 | VehicleAreaConfig{ | 313 | VehicleAreaConfig{ |
321 | .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT), | 314 | .areaId = toInt(VehicleAreaSeat::ROW_1_RIGHT), |
322 | .minFloatValue = 16, | 315 | .minFloatValue = 16, |
323 | .maxFloatValue = 32, | 316 | .maxFloatValue = 32, |
324 | }}}, | 317 | }}}, |
325 | .initialAreaValues = {{toInt(VehicleAreaZone::ROW_1_LEFT), {.floatValues = {16}}}, | 318 | .initialAreaValues = {{toInt(VehicleAreaSeat::ROW_1_LEFT), {.floatValues = {16}}}, |
326 | {toInt(VehicleAreaZone::ROW_1_RIGHT), {.floatValues = {20}}}}}, | 319 | {toInt(VehicleAreaSeat::ROW_1_RIGHT), {.floatValues = {20}}}}}, |
327 | 320 | ||
328 | {.config = | 321 | {.config = |
329 | { | 322 | { |
@@ -424,11 +417,17 @@ const ConfigDeclaration kVehicleProperties[]{ | |||
424 | }, | 417 | }, |
425 | }, | 418 | }, |
426 | 419 | ||
427 | {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE), | 420 | {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), |
428 | .access = VehiclePropertyAccess::READ_WRITE, | 421 | .access = VehiclePropertyAccess::READ, |
422 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | ||
423 | .configArray = {3}}, | ||
424 | .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON_FULL), 0}}}, | ||
425 | |||
426 | {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), | ||
427 | .access = VehiclePropertyAccess::WRITE, | ||
429 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 428 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
430 | .configArray = {3}}, | 429 | .configArray = {3}}, |
431 | .initialValue = {.int32Values = {toInt(VehicleApPowerState::ON_FULL), 0}}}, | 430 | .initialValue = {.int32Values = {toInt(VehicleApPowerStateReport::BOOT_COMPLETE), 0}}}, |
432 | 431 | ||
433 | {.config = {.prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS), | 432 | {.config = {.prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS), |
434 | .access = VehiclePropertyAccess::READ_WRITE, | 433 | .access = VehiclePropertyAccess::READ_WRITE, |
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp index 3979ac21..2eb905dc 100644 --- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp +++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp | |||
@@ -138,7 +138,7 @@ StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) { | |||
138 | // TODO(75328113): this should be handled by property status | 138 | // TODO(75328113): this should be handled by property status |
139 | auto hvacPowerOn = mPropStore->readValueOrNull( | 139 | auto hvacPowerOn = mPropStore->readValueOrNull( |
140 | toInt(VehicleProperty::HVAC_POWER_ON), | 140 | toInt(VehicleProperty::HVAC_POWER_ON), |
141 | (VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT)); | 141 | (VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT)); |
142 | 142 | ||
143 | if (hvacPowerOn && hvacPowerOn->value.int32Values.size() == 1 | 143 | if (hvacPowerOn && hvacPowerOn->value.int32Values.size() == 1 |
144 | && hvacPowerOn->value.int32Values[0] == 0) { | 144 | && hvacPowerOn->value.int32Values[0] == 0) { |
@@ -153,7 +153,7 @@ StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) { | |||
153 | // Placeholder for future implementation of VMS property in the default hal. For | 153 | // Placeholder for future implementation of VMS property in the default hal. For |
154 | // now, just returns OK; otherwise, hal clients crash with property not supported. | 154 | // now, just returns OK; otherwise, hal clients crash with property not supported. |
155 | return StatusCode::OK; | 155 | return StatusCode::OK; |
156 | case AP_POWER_STATE: | 156 | case AP_POWER_STATE_REPORT: |
157 | // This property has different behavior between get/set. When it is set, the value | 157 | // This property has different behavior between get/set. When it is set, the value |
158 | // goes to the vehicle but is NOT updated in the property store back to Android. | 158 | // goes to the vehicle but is NOT updated in the property store back to Android. |
159 | // Commented out for now, because it may mess up automated testing that use the | 159 | // Commented out for now, because it may mess up automated testing that use the |
diff --git a/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp b/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp index 4865e9e8..ab2013d0 100644 --- a/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp +++ b/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp | |||
@@ -51,19 +51,16 @@ public: | |||
51 | } | 51 | } |
52 | 52 | ||
53 | hidl_vec<SubscribeOptions> subscrToProp1 = { | 53 | hidl_vec<SubscribeOptions> subscrToProp1 = { |
54 | SubscribeOptions{.propId = PROP1, .flags = SubscribeFlags::HAL_EVENT}, | 54 | SubscribeOptions{.propId = PROP1, .flags = SubscribeFlags::EVENTS_FROM_CAR}, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | hidl_vec<SubscribeOptions> subscrToProp2 = { | 57 | hidl_vec<SubscribeOptions> subscrToProp2 = { |
58 | SubscribeOptions { | 58 | SubscribeOptions{.propId = PROP2, .flags = SubscribeFlags::EVENTS_FROM_CAR}, |
59 | .propId = PROP2, | ||
60 | .flags = SubscribeFlags::HAL_EVENT | ||
61 | }, | ||
62 | }; | 59 | }; |
63 | 60 | ||
64 | hidl_vec<SubscribeOptions> subscrToProp1and2 = { | 61 | hidl_vec<SubscribeOptions> subscrToProp1and2 = { |
65 | SubscribeOptions{.propId = PROP1, .flags = SubscribeFlags::HAL_EVENT}, | 62 | SubscribeOptions{.propId = PROP1, .flags = SubscribeFlags::EVENTS_FROM_CAR}, |
66 | SubscribeOptions{.propId = PROP2, .flags = SubscribeFlags::HAL_EVENT}, | 63 | SubscribeOptions{.propId = PROP2, .flags = SubscribeFlags::EVENTS_FROM_CAR}, |
67 | }; | 64 | }; |
68 | 65 | ||
69 | static std::list<sp<IVehicleCallback>> extractCallbacks( | 66 | static std::list<sp<IVehicleCallback>> extractCallbacks( |
@@ -76,11 +73,11 @@ public: | |||
76 | } | 73 | } |
77 | 74 | ||
78 | std::list<sp<HalClient>> clientsToProp1() { | 75 | std::list<sp<HalClient>> clientsToProp1() { |
79 | return manager.getSubscribedClients(PROP1, SubscribeFlags::DEFAULT); | 76 | return manager.getSubscribedClients(PROP1, SubscribeFlags::EVENTS_FROM_CAR); |
80 | } | 77 | } |
81 | 78 | ||
82 | std::list<sp<HalClient>> clientsToProp2() { | 79 | std::list<sp<HalClient>> clientsToProp2() { |
83 | return manager.getSubscribedClients(PROP2, SubscribeFlags::DEFAULT); | 80 | return manager.getSubscribedClients(PROP2, SubscribeFlags::EVENTS_FROM_CAR); |
84 | } | 81 | } |
85 | 82 | ||
86 | void onPropertyUnsubscribed(int propertyId) { | 83 | void onPropertyUnsubscribed(int propertyId) { |
@@ -110,9 +107,7 @@ TEST_F(SubscriptionManagerTest, multipleClients) { | |||
110 | ASSERT_EQ(StatusCode::OK, | 107 | ASSERT_EQ(StatusCode::OK, |
111 | manager.addOrUpdateSubscription(2, cb2, subscrToProp1, &updatedOptions)); | 108 | manager.addOrUpdateSubscription(2, cb2, subscrToProp1, &updatedOptions)); |
112 | 109 | ||
113 | auto clients = manager.getSubscribedClients( | 110 | auto clients = manager.getSubscribedClients(PROP1, SubscribeFlags::EVENTS_FROM_CAR); |
114 | PROP1, | ||
115 | SubscribeFlags::HAL_EVENT); | ||
116 | 111 | ||
117 | ASSERT_ALL_EXISTS({cb1, cb2}, extractCallbacks(clients)); | 112 | ASSERT_ALL_EXISTS({cb1, cb2}, extractCallbacks(clients)); |
118 | } | 113 | } |
@@ -124,13 +119,11 @@ TEST_F(SubscriptionManagerTest, negativeCases) { | |||
124 | 119 | ||
125 | // Wrong prop | 120 | // Wrong prop |
126 | auto clients = manager.getSubscribedClients(toInt(VehicleProperty::AP_POWER_BOOTUP_REASON), | 121 | auto clients = manager.getSubscribedClients(toInt(VehicleProperty::AP_POWER_BOOTUP_REASON), |
127 | SubscribeFlags::HAL_EVENT); | 122 | SubscribeFlags::EVENTS_FROM_CAR); |
128 | ASSERT_TRUE(clients.empty()); | 123 | ASSERT_TRUE(clients.empty()); |
129 | 124 | ||
130 | // Wrong flag | 125 | // Wrong flag |
131 | clients = manager.getSubscribedClients( | 126 | clients = manager.getSubscribedClients(PROP1, SubscribeFlags::EVENTS_FROM_ANDROID); |
132 | PROP1, | ||
133 | SubscribeFlags::SET_CALL); | ||
134 | ASSERT_TRUE(clients.empty()); | 127 | ASSERT_TRUE(clients.empty()); |
135 | } | 128 | } |
136 | 129 | ||
@@ -139,27 +132,22 @@ TEST_F(SubscriptionManagerTest, mulipleSubscriptions) { | |||
139 | ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(1, cb1, subscrToProp1, | 132 | ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(1, cb1, subscrToProp1, |
140 | &updatedOptions)); | 133 | &updatedOptions)); |
141 | 134 | ||
142 | auto clients = manager.getSubscribedClients( | 135 | auto clients = manager.getSubscribedClients(PROP1, SubscribeFlags::EVENTS_FROM_CAR); |
143 | PROP1, | ||
144 | SubscribeFlags::DEFAULT); | ||
145 | ASSERT_EQ((size_t) 1, clients.size()); | 136 | ASSERT_EQ((size_t) 1, clients.size()); |
146 | ASSERT_EQ(cb1, clients.front()->getCallback()); | 137 | ASSERT_EQ(cb1, clients.front()->getCallback()); |
147 | 138 | ||
148 | // Same property, but different zone, to make sure we didn't unsubscribe | 139 | // Same property, but different zone, to make sure we didn't unsubscribe |
149 | // from previous zone. | 140 | // from previous zone. |
150 | ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(1, cb1, { | 141 | ASSERT_EQ( |
151 | SubscribeOptions { | 142 | StatusCode::OK, |
152 | .propId = PROP1, | 143 | manager.addOrUpdateSubscription( |
153 | .flags = SubscribeFlags::DEFAULT | 144 | 1, cb1, {SubscribeOptions{.propId = PROP1, .flags = SubscribeFlags::EVENTS_FROM_CAR}}, |
154 | } | 145 | &updatedOptions)); |
155 | }, &updatedOptions)); | 146 | |
156 | 147 | clients = manager.getSubscribedClients(PROP1, SubscribeFlags::EVENTS_FROM_CAR); | |
157 | clients = manager.getSubscribedClients(PROP1, | ||
158 | SubscribeFlags::DEFAULT); | ||
159 | ASSERT_ALL_EXISTS({cb1}, extractCallbacks(clients)); | 148 | ASSERT_ALL_EXISTS({cb1}, extractCallbacks(clients)); |
160 | 149 | ||
161 | clients = manager.getSubscribedClients(PROP1, | 150 | clients = manager.getSubscribedClients(PROP1, SubscribeFlags::EVENTS_FROM_CAR); |
162 | SubscribeFlags::DEFAULT); | ||
163 | ASSERT_ALL_EXISTS({cb1}, extractCallbacks(clients)); | 151 | ASSERT_ALL_EXISTS({cb1}, extractCallbacks(clients)); |
164 | } | 152 | } |
165 | 153 | ||
diff --git a/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp b/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp index 5b195db8..f64eab55 100644 --- a/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp +++ b/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp | |||
@@ -241,10 +241,7 @@ TEST_F(VehicleHalManagerTest, halErrorEvent) { | |||
241 | sp<MockedVehicleCallback> cb = new MockedVehicleCallback(); | 241 | sp<MockedVehicleCallback> cb = new MockedVehicleCallback(); |
242 | 242 | ||
243 | hidl_vec<SubscribeOptions> options = { | 243 | hidl_vec<SubscribeOptions> options = { |
244 | SubscribeOptions { | 244 | SubscribeOptions{.propId = PROP, .flags = SubscribeFlags::EVENTS_FROM_CAR}, |
245 | .propId = PROP, | ||
246 | .flags = SubscribeFlags::DEFAULT | ||
247 | }, | ||
248 | }; | 245 | }; |
249 | 246 | ||
250 | StatusCode res = manager->subscribe(cb, options); | 247 | StatusCode res = manager->subscribe(cb, options); |
@@ -259,11 +256,7 @@ TEST_F(VehicleHalManagerTest, subscribe) { | |||
259 | sp<MockedVehicleCallback> cb = new MockedVehicleCallback(); | 256 | sp<MockedVehicleCallback> cb = new MockedVehicleCallback(); |
260 | 257 | ||
261 | hidl_vec<SubscribeOptions> options = { | 258 | hidl_vec<SubscribeOptions> options = { |
262 | SubscribeOptions { | 259 | SubscribeOptions{.propId = PROP, .flags = SubscribeFlags::EVENTS_FROM_CAR}}; |
263 | .propId = PROP, | ||
264 | .flags = SubscribeFlags::DEFAULT | ||
265 | } | ||
266 | }; | ||
267 | 260 | ||
268 | StatusCode res = manager->subscribe(cb, options); | 261 | StatusCode res = manager->subscribe(cb, options); |
269 | ASSERT_EQ(StatusCode::OK, res); | 262 | ASSERT_EQ(StatusCode::OK, res); |
@@ -301,18 +294,14 @@ TEST_F(VehicleHalManagerTest, subscribe_WriteOnly) { | |||
301 | sp<MockedVehicleCallback> cb = new MockedVehicleCallback(); | 294 | sp<MockedVehicleCallback> cb = new MockedVehicleCallback(); |
302 | 295 | ||
303 | hidl_vec<SubscribeOptions> options = { | 296 | hidl_vec<SubscribeOptions> options = { |
304 | SubscribeOptions { | 297 | SubscribeOptions{.propId = PROP, .flags = SubscribeFlags::EVENTS_FROM_CAR}, |
305 | .propId = PROP, | ||
306 | .flags = SubscribeFlags::HAL_EVENT | ||
307 | }, | ||
308 | }; | 298 | }; |
309 | 299 | ||
310 | StatusCode res = manager->subscribe(cb, options); | 300 | StatusCode res = manager->subscribe(cb, options); |
311 | // Unable to subscribe on Hal Events for write-only properties. | 301 | // Unable to subscribe on Hal Events for write-only properties. |
312 | ASSERT_EQ(StatusCode::INVALID_ARG, res); | 302 | ASSERT_EQ(StatusCode::INVALID_ARG, res); |
313 | 303 | ||
314 | 304 | options[0].flags = SubscribeFlags::EVENTS_FROM_ANDROID; | |
315 | options[0].flags = SubscribeFlags::SET_CALL; | ||
316 | 305 | ||
317 | res = manager->subscribe(cb, options); | 306 | res = manager->subscribe(cb, options); |
318 | // OK to subscribe on SET method call for write-only properties. | 307 | // OK to subscribe on SET method call for write-only properties. |
@@ -396,8 +385,8 @@ TEST_F(VehicleHalManagerTest, set_DifferentAreas) { | |||
396 | const auto PROP = toInt(VehicleProperty::HVAC_FAN_SPEED); | 385 | const auto PROP = toInt(VehicleProperty::HVAC_FAN_SPEED); |
397 | const auto VAL1 = 1; | 386 | const auto VAL1 = 1; |
398 | const auto VAL2 = 2; | 387 | const auto VAL2 = 2; |
399 | const auto AREA1 = toInt(VehicleAreaZone::ROW_1_LEFT); | 388 | const auto AREA1 = toInt(VehicleAreaSeat::ROW_1_LEFT); |
400 | const auto AREA2 = toInt(VehicleAreaZone::ROW_1_RIGHT); | 389 | const auto AREA2 = toInt(VehicleAreaSeat::ROW_1_RIGHT); |
401 | 390 | ||
402 | { | 391 | { |
403 | auto expectedValue1 = hal->getValuePool()->obtainInt32(VAL1); | 392 | auto expectedValue1 = hal->getValuePool()->obtainInt32(VAL1); |
diff --git a/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h b/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h index 3cabcf29..108e32fe 100644 --- a/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h +++ b/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h | |||
@@ -40,64 +40,38 @@ const VehiclePropConfig kVehicleProperties[] = { | |||
40 | .configString = "Some=config,options=if,you=have_any", | 40 | .configString = "Some=config,options=if,you=have_any", |
41 | }, | 41 | }, |
42 | 42 | ||
43 | { | 43 | {.prop = toInt(VehicleProperty::HVAC_FAN_SPEED), |
44 | .prop = toInt(VehicleProperty::HVAC_FAN_SPEED), | 44 | .access = VehiclePropertyAccess::READ_WRITE, |
45 | .access = VehiclePropertyAccess::READ_WRITE, | 45 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
46 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 46 | .areaConfigs = |
47 | .areaConfigs = { | 47 | {VehicleAreaConfig{ |
48 | VehicleAreaConfig { | 48 | .areaId = toInt(VehicleAreaSeat::ROW_1_LEFT), .minInt32Value = 1, .maxInt32Value = 7}, |
49 | .areaId = toInt(VehicleAreaZone::ROW_1_LEFT), | 49 | VehicleAreaConfig{ |
50 | .minInt32Value = 1, | 50 | .areaId = toInt(VehicleAreaSeat::ROW_1_RIGHT), .minInt32Value = 1, .maxInt32Value = 5, |
51 | .maxInt32Value = 7}, | 51 | }}}, |
52 | VehicleAreaConfig { | ||
53 | .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT), | ||
54 | .minInt32Value = 1, | ||
55 | .maxInt32Value = 5, | ||
56 | } | ||
57 | } | ||
58 | }, | ||
59 | 52 | ||
60 | // Write-only property | 53 | // Write-only property |
61 | { | 54 | {.prop = toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE), |
62 | .prop = toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE), | 55 | .access = VehiclePropertyAccess::WRITE, |
63 | .access = VehiclePropertyAccess::WRITE, | 56 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
64 | .changeMode = VehiclePropertyChangeMode::ON_SET, | 57 | .areaConfigs = {VehicleAreaConfig{.areaId = toInt(VehicleAreaSeat::ROW_1_LEFT), |
65 | .areaConfigs = { | 58 | .minInt32Value = 64, |
66 | VehicleAreaConfig { | 59 | .maxInt32Value = 80}, |
67 | .areaId = toInt(VehicleAreaZone::ROW_1_LEFT), | 60 | VehicleAreaConfig{ |
68 | .minInt32Value = 64, | 61 | .areaId = toInt(VehicleAreaSeat::ROW_1_RIGHT), |
69 | .maxInt32Value = 80}, | 62 | .minInt32Value = 64, |
70 | VehicleAreaConfig { | 63 | .maxInt32Value = 80, |
71 | .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT), | 64 | }}}, |
72 | .minInt32Value = 64, | 65 | |
73 | .maxInt32Value = 80, | 66 | {.prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY), |
74 | } | 67 | .access = VehiclePropertyAccess::READ, |
75 | } | 68 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
76 | }, | 69 | .areaConfigs = {VehicleAreaConfig{.minFloatValue = 0, .maxFloatValue = 1.0}}}, |
77 | 70 | ||
78 | { | 71 | {.prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS), |
79 | .prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY), | 72 | .access = VehiclePropertyAccess::READ_WRITE, |
80 | .access = VehiclePropertyAccess::READ, | 73 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, |
81 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | 74 | .areaConfigs = {VehicleAreaConfig{.minInt32Value = 0, .maxInt32Value = 10}}}, |
82 | .areaConfigs = { | ||
83 | VehicleAreaConfig { | ||
84 | .minFloatValue = 0, | ||
85 | .maxFloatValue = 1.0 | ||
86 | } | ||
87 | } | ||
88 | }, | ||
89 | |||
90 | { | ||
91 | .prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS), | ||
92 | .access = VehiclePropertyAccess::READ_WRITE, | ||
93 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE, | ||
94 | .areaConfigs = { | ||
95 | VehicleAreaConfig { | ||
96 | .minInt32Value = 0, | ||
97 | .maxInt32Value = 10 | ||
98 | } | ||
99 | } | ||
100 | }, | ||
101 | 75 | ||
102 | { | 76 | { |
103 | .prop = toInt(VehicleProperty::MIRROR_FOLD), | 77 | .prop = toInt(VehicleProperty::MIRROR_FOLD), |
@@ -107,12 +81,9 @@ const VehiclePropConfig kVehicleProperties[] = { | |||
107 | }, | 81 | }, |
108 | 82 | ||
109 | // Complex data type. | 83 | // Complex data type. |
110 | { | 84 | {.prop = kCustomComplexProperty, |
111 | .prop = kCustomComplexProperty, | 85 | .access = VehiclePropertyAccess::READ_WRITE, |
112 | .access = VehiclePropertyAccess::READ_WRITE, | 86 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE}}; |
113 | .changeMode = VehiclePropertyChangeMode::ON_CHANGE | ||
114 | } | ||
115 | }; | ||
116 | 87 | ||
117 | constexpr auto kTimeout = std::chrono::milliseconds(500); | 88 | constexpr auto kTimeout = std::chrono::milliseconds(500); |
118 | 89 | ||
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal index 93a903f7..15ba4940 100644 --- a/automotive/vehicle/2.0/types.hal +++ b/automotive/vehicle/2.0/types.hal | |||
@@ -17,28 +17,28 @@ | |||
17 | package android.hardware.automotive.vehicle@2.0; | 17 | package android.hardware.automotive.vehicle@2.0; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * Enumerates supported data types for VehicleProperty. | 20 | * Enumerates supported data type for VehicleProperty. |
21 | * | 21 | * |
22 | * This is a bitwise flag that supposed to be used in VehicleProperty enum. | 22 | * Used to create property ID in VehicleProperty enum. |
23 | */ | 23 | */ |
24 | enum VehiclePropertyType : int32_t { | 24 | enum VehiclePropertyType : int32_t { |
25 | STRING = 0x00100000, | 25 | STRING = 0x00100000, |
26 | BOOLEAN = 0x00200000, | 26 | BOOLEAN = 0x00200000, |
27 | INT32 = 0x00400000, | 27 | INT32 = 0x00400000, |
28 | INT32_VEC = 0x00410000, | 28 | INT32_VEC = 0x00410000, |
29 | INT64 = 0x00500000, | 29 | INT64 = 0x00500000, |
30 | INT64_VEC = 0x00510000, | 30 | INT64_VEC = 0x00510000, |
31 | FLOAT = 0x00600000, | 31 | FLOAT = 0x00600000, |
32 | FLOAT_VEC = 0x00610000, | 32 | FLOAT_VEC = 0x00610000, |
33 | BYTES = 0x00700000, | 33 | BYTES = 0x00700000, |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Any combination of scalar or vector types. The exact format must be | 36 | * Any combination of scalar or vector types. The exact format must be |
37 | * provided in the description of the property. | 37 | * provided in the description of the property. |
38 | */ | 38 | */ |
39 | MIXED = 0x00e00000, | 39 | MIXED = 0x00e00000, |
40 | 40 | ||
41 | MASK = 0x00ff0000 | 41 | MASK = 0x00ff0000 |
42 | }; | 42 | }; |
43 | 43 | ||
44 | /** | 44 | /** |
@@ -50,51 +50,60 @@ enum VehiclePropertyType : int32_t { | |||
50 | * Other properties may not be associated with particular vehicle area, | 50 | * Other properties may not be associated with particular vehicle area, |
51 | * these kind of properties must have VehicleArea:GLOBAL flag. | 51 | * these kind of properties must have VehicleArea:GLOBAL flag. |
52 | * | 52 | * |
53 | * This is a bitwise flag that supposed to be used in VehicleProperty enum. | 53 | * Used to create property ID in VehicleProperty enum. |
54 | */ | 54 | */ |
55 | enum VehicleArea : int32_t { | 55 | enum VehicleArea : int32_t { |
56 | GLOBAL = 0x01000000, | 56 | GLOBAL = 0x01000000, |
57 | ZONE = 0x02000000, | 57 | /** WINDOW maps to enum VehicleAreaWindow */ |
58 | WINDOW = 0x03000000, | 58 | WINDOW = 0x03000000, |
59 | MIRROR = 0x04000000, | 59 | /** MIRROR maps to enum VehicleAreaMirror */ |
60 | SEAT = 0x05000000, | 60 | MIRROR = 0x04000000, |
61 | DOOR = 0x06000000, | 61 | /** SEAT maps to enum VehicleAreaSeat */ |
62 | 62 | SEAT = 0x05000000, | |
63 | MASK = 0x0f000000, | 63 | /** DOOR maps to enum VehicleAreaDoor */ |
64 | DOOR = 0x06000000, | ||
65 | /** WHEEL maps to enum Wheel */ | ||
66 | WHEEL = 0x07000000, | ||
67 | |||
68 | MASK = 0x0f000000, | ||
64 | }; | 69 | }; |
65 | 70 | ||
66 | /** | 71 | /** |
67 | * Enumerates property groups. | 72 | * Enumerates property groups. |
68 | * | 73 | * |
69 | * This is a bitwise flag that supposed to be used in VehicleProperty enum. | 74 | * Used to create property ID in VehicleProperty enum. |
70 | */ | 75 | */ |
71 | enum VehiclePropertyGroup : int32_t { | 76 | enum VehiclePropertyGroup : int32_t { |
72 | /** | 77 | /** |
73 | * Properties declared in AOSP must have this flag. | 78 | * Properties declared in AOSP must use this flag. |
74 | */ | 79 | */ |
75 | SYSTEM = 0x10000000, | 80 | SYSTEM = 0x10000000, |
76 | 81 | ||
77 | /** | 82 | /** |
78 | * Properties declared by vendors must have this flag. | 83 | * Properties declared by vendors must use this flag. |
79 | */ | 84 | */ |
80 | VENDOR = 0x20000000, | 85 | VENDOR = 0x20000000, |
81 | 86 | ||
82 | MASK = 0xf0000000, | 87 | MASK = 0xf0000000, |
83 | }; | 88 | }; |
84 | 89 | ||
85 | /** | 90 | /** |
86 | * Declares all vehicle properties. VehicleProperty has a bitwise structure. | 91 | * Declares all vehicle properties. VehicleProperty has a bitwise structure. |
87 | * Each property must have: | 92 | * Each property must have: |
88 | * - an unique id from range 0x0100 - 0xffff | 93 | * - a unique id from range 0x0100 - 0xffff |
89 | * - associated data type using VehiclePropertyType | 94 | * - associated data type using VehiclePropertyType |
90 | * - property group (VehiclePropertyGroup) | 95 | * - property group (VehiclePropertyGroup) |
91 | * - vehicle area (VehicleArea) | 96 | * - vehicle area (VehicleArea) |
92 | * | 97 | * |
93 | * Vendors are allowed to extend this enum with their own properties. In this | 98 | * Vendors are allowed to extend this enum with their own properties. In this |
94 | * case they must use VehiclePropertyGroup:VENDOR flag when property is | 99 | * case they must use VehiclePropertyGroup:VENDOR flag when property is |
95 | * declared. | 100 | * declared. |
101 | * | ||
102 | * When a property's status field is not set to AVAILABLE: | ||
103 | * - IVehicle#set may return StatusCode::NOT_AVAILABLE. | ||
104 | * - IVehicle#get is not guaranteed to work. | ||
96 | */ | 105 | */ |
97 | enum VehicleProperty: int32_t { | 106 | enum VehicleProperty : int32_t { |
98 | 107 | ||
99 | /** Undefined property. */ | 108 | /** Undefined property. */ |
100 | INVALID = 0x00000000, | 109 | INVALID = 0x00000000, |
@@ -105,14 +114,14 @@ enum VehicleProperty: int32_t { | |||
105 | * @change_mode VehiclePropertyChangeMode:STATIC | 114 | * @change_mode VehiclePropertyChangeMode:STATIC |
106 | * @access VehiclePropertyAccess:READ | 115 | * @access VehiclePropertyAccess:READ |
107 | */ | 116 | */ |
108 | INFO_VIN= ( | 117 | INFO_VIN = ( |
109 | 0x0100 | 118 | 0x0100 |
110 | | VehiclePropertyGroup:SYSTEM | 119 | | VehiclePropertyGroup:SYSTEM |
111 | | VehiclePropertyType:STRING | 120 | | VehiclePropertyType:STRING |
112 | | VehicleArea:GLOBAL), | 121 | | VehicleArea:GLOBAL), |
113 | 122 | ||
114 | /** | 123 | /** |
115 | * Maker name of vehicle | 124 | * Manufacturer of vehicle |
116 | * | 125 | * |
117 | * @change_mode VehiclePropertyChangeMode:STATIC | 126 | * @change_mode VehiclePropertyChangeMode:STATIC |
118 | * @access VehiclePropertyAccess:READ | 127 | * @access VehiclePropertyAccess:READ |
@@ -162,11 +171,11 @@ enum VehicleProperty: int32_t { | |||
162 | | VehicleArea:GLOBAL), | 171 | | VehicleArea:GLOBAL), |
163 | 172 | ||
164 | /** | 173 | /** |
165 | * List of fuels the vehicle may use. Uses enum FuelType | 174 | * List of fuels the vehicle may use |
166 | * | 175 | * |
167 | * @change_mode VehiclePropertyChangeMode:STATIC | 176 | * @change_mode VehiclePropertyChangeMode:STATIC |
168 | * @access VehiclePropertyAccess:READ | 177 | * @access VehiclePropertyAccess:READ |
169 | * @unit VehicleUnit:MILLILITERS | 178 | * @data_enum FuelType |
170 | */ | 179 | */ |
171 | INFO_FUEL_TYPE = ( | 180 | INFO_FUEL_TYPE = ( |
172 | 0x0105 | 181 | 0x0105 |
@@ -189,9 +198,10 @@ enum VehicleProperty: int32_t { | |||
189 | | VehicleArea:GLOBAL), | 198 | | VehicleArea:GLOBAL), |
190 | 199 | ||
191 | /** | 200 | /** |
192 | * List of connectors this EV may use. Uses enum EvConnectorType | 201 | * List of connectors this EV may use |
193 | * | 202 | * |
194 | * @change_mode VehiclePropertyChangeMode:STATIC | 203 | * @change_mode VehiclePropertyChangeMode:STATIC |
204 | * @data_enum EvConnectorType | ||
195 | * @access VehiclePropertyAccess:READ | 205 | * @access VehiclePropertyAccess:READ |
196 | */ | 206 | */ |
197 | INFO_EV_CONNECTOR_TYPE = ( | 207 | INFO_EV_CONNECTOR_TYPE = ( |
@@ -201,9 +211,49 @@ enum VehicleProperty: int32_t { | |||
201 | | VehicleArea:GLOBAL), | 211 | | VehicleArea:GLOBAL), |
202 | 212 | ||
203 | /** | 213 | /** |
214 | * Fuel door location | ||
215 | * | ||
216 | * @change_mode VehiclePropertyChangeMode:STATIC | ||
217 | * @data_enum FuelDoorLocationType | ||
218 | * @access VehiclePropertyAccess:READ | ||
219 | */ | ||
220 | INFO_FUEL_DOOR_LOCATION = ( | ||
221 | 0x0108 | ||
222 | | VehiclePropertyGroup:SYSTEM | ||
223 | | VehiclePropertyType:INT32 | ||
224 | | VehicleArea:GLOBAL), | ||
225 | |||
226 | /** | ||
227 | * EV port location | ||
228 | * | ||
229 | * @change_mode VehiclePropertyChangeMode:STATIC | ||
230 | * @access VehiclePropertyAccess:READ | ||
231 | * @data_enum PortLocationType | ||
232 | */ | ||
233 | INFO_EV_PORT_LOCATION = ( | ||
234 | 0x0109 | ||
235 | | VehiclePropertyGroup:SYSTEM | ||
236 | | VehiclePropertyType:INT32 | ||
237 | | VehicleArea:GLOBAL), | ||
238 | |||
239 | /** | ||
240 | * Driver's seat location | ||
241 | * | ||
242 | * @change_mode VehiclePropertyChangeMode:STATIC | ||
243 | * @data_enum VehicleAreaSeat | ||
244 | * @access VehiclePropertyAccess:READ | ||
245 | */ | ||
246 | INFO_DRIVER_SEAT = ( | ||
247 | 0x010A | ||
248 | | VehiclePropertyGroup:SYSTEM | ||
249 | | VehiclePropertyType:INT32 | ||
250 | | VehicleArea:SEAT), | ||
251 | |||
252 | |||
253 | /** | ||
204 | * Current odometer value of the vehicle | 254 | * Current odometer value of the vehicle |
205 | * | 255 | * |
206 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | VehiclePropertyChangeMode:CONTINUOUS | 256 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
207 | * @access VehiclePropertyAccess:READ | 257 | * @access VehiclePropertyAccess:READ |
208 | * @unit VehicleUnit:KILOMETER | 258 | * @unit VehicleUnit:KILOMETER |
209 | */ | 259 | */ |
@@ -216,7 +266,7 @@ enum VehicleProperty: int32_t { | |||
216 | /** | 266 | /** |
217 | * Speed of the vehicle | 267 | * Speed of the vehicle |
218 | * | 268 | * |
219 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS | 269 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
220 | * @access VehiclePropertyAccess:READ | 270 | * @access VehiclePropertyAccess:READ |
221 | * @unit VehicleUnit:METER_PER_SEC | 271 | * @unit VehicleUnit:METER_PER_SEC |
222 | */ | 272 | */ |
@@ -227,22 +277,9 @@ enum VehicleProperty: int32_t { | |||
227 | | VehicleArea:GLOBAL), | 277 | | VehicleArea:GLOBAL), |
228 | 278 | ||
229 | /** | 279 | /** |
230 | * Engine on | ||
231 | * | ||
232 | * @change_mode VehiclePropertyChangeMode:STATIC | ||
233 | * @access VehiclePropertyAccess:READ | ||
234 | */ | ||
235 | ENGINE_ON = ( | ||
236 | 0x0300 | ||
237 | | VehiclePropertyGroup:SYSTEM | ||
238 | | VehiclePropertyType:BOOLEAN | ||
239 | | VehicleArea:GLOBAL), | ||
240 | |||
241 | |||
242 | /** | ||
243 | * Temperature of engine coolant | 280 | * Temperature of engine coolant |
244 | * | 281 | * |
245 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS | 282 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
246 | * @access VehiclePropertyAccess:READ | 283 | * @access VehiclePropertyAccess:READ |
247 | * @unit VehicleUnit:CELSIUS | 284 | * @unit VehicleUnit:CELSIUS |
248 | */ | 285 | */ |
@@ -268,7 +305,7 @@ enum VehicleProperty: int32_t { | |||
268 | /** | 305 | /** |
269 | * Temperature of engine oil | 306 | * Temperature of engine oil |
270 | * | 307 | * |
271 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS | 308 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
272 | * @access VehiclePropertyAccess:READ | 309 | * @access VehiclePropertyAccess:READ |
273 | * @unit VehicleUnit:CELSIUS | 310 | * @unit VehicleUnit:CELSIUS |
274 | */ | 311 | */ |
@@ -281,7 +318,7 @@ enum VehicleProperty: int32_t { | |||
281 | /** | 318 | /** |
282 | * Engine rpm | 319 | * Engine rpm |
283 | * | 320 | * |
284 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS | 321 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
285 | * @access VehiclePropertyAccess:READ | 322 | * @access VehiclePropertyAccess:READ |
286 | * @unit VehicleUnit:RPM | 323 | * @unit VehicleUnit:RPM |
287 | */ | 324 | */ |
@@ -310,7 +347,7 @@ enum VehicleProperty: int32_t { | |||
310 | * int64Values[3] = rear right ticks | 347 | * int64Values[3] = rear right ticks |
311 | * int64Values[4] = rear left ticks | 348 | * int64Values[4] = rear left ticks |
312 | * | 349 | * |
313 | * configArray is used to indicate the micrometers-per-wheel-tick value as well as | 350 | * configArray is used to indicate the micrometers-per-wheel-tick value and |
314 | * which wheels are supported. configArray is set as follows: | 351 | * which wheels are supported. configArray is set as follows: |
315 | * | 352 | * |
316 | * configArray[0], bits [0:3] = supported wheels. Uses enum Wheel. | 353 | * configArray[0], bits [0:3] = supported wheels. Uses enum Wheel. |
@@ -327,10 +364,10 @@ enum VehicleProperty: int32_t { | |||
327 | * @access VehiclePropertyAccess:READ | 364 | * @access VehiclePropertyAccess:READ |
328 | */ | 365 | */ |
329 | WHEEL_TICK = ( | 366 | WHEEL_TICK = ( |
330 | 0x0306 | 367 | 0x0306 |
331 | | VehiclePropertyGroup:SYSTEM | 368 | | VehiclePropertyGroup:SYSTEM |
332 | | VehiclePropertyType:MIXED | 369 | | VehiclePropertyType:INT64_VEC |
333 | | VehicleArea:GLOBAL), | 370 | | VehicleArea:GLOBAL), |
334 | 371 | ||
335 | 372 | ||
336 | /** | 373 | /** |
@@ -338,7 +375,7 @@ enum VehicleProperty: int32_t { | |||
338 | * | 375 | * |
339 | * Value may not exceed INFO_FUEL_CAPACITY | 376 | * Value may not exceed INFO_FUEL_CAPACITY |
340 | * | 377 | * |
341 | * @change_mode VehiclePropertyChangeMode:STATIC | 378 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
342 | * @access VehiclePropertyAccess:READ | 379 | * @access VehiclePropertyAccess:READ |
343 | * @unit VehicleUnit:MILLILITER | 380 | * @unit VehicleUnit:MILLILITER |
344 | */ | 381 | */ |
@@ -351,8 +388,8 @@ enum VehicleProperty: int32_t { | |||
351 | /** | 388 | /** |
352 | * Fuel door open | 389 | * Fuel door open |
353 | * | 390 | * |
354 | * @change_mode VehiclePropertyChangeMode:STATIC | 391 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
355 | * @access VehiclePropertyAccess:READ | 392 | * @access VehiclePropertyAccess:READ_WRITE |
356 | */ | 393 | */ |
357 | FUEL_DOOR_OPEN = ( | 394 | FUEL_DOOR_OPEN = ( |
358 | 0x0308 | 395 | 0x0308 |
@@ -365,7 +402,7 @@ enum VehicleProperty: int32_t { | |||
365 | * | 402 | * |
366 | * Value may not exceed INFO_EV_BATTERY_CAPACITY | 403 | * Value may not exceed INFO_EV_BATTERY_CAPACITY |
367 | * | 404 | * |
368 | * @change_mode VehiclePropertyChangeMode:STATIC | 405 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
369 | * @access VehiclePropertyAccess:READ | 406 | * @access VehiclePropertyAccess:READ |
370 | * @unit VehicleUnit:WH | 407 | * @unit VehicleUnit:WH |
371 | */ | 408 | */ |
@@ -378,8 +415,8 @@ enum VehicleProperty: int32_t { | |||
378 | /** | 415 | /** |
379 | * EV charge port open | 416 | * EV charge port open |
380 | * | 417 | * |
381 | * @change_mode VehiclePropertyChangeMode:STATIC | 418 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
382 | * @access VehiclePropertyAccess:READ | 419 | * @access VehiclePropertyAccess:READ_WRITE |
383 | */ | 420 | */ |
384 | EV_CHARGE_PORT_OPEN = ( | 421 | EV_CHARGE_PORT_OPEN = ( |
385 | 0x030A | 422 | 0x030A |
@@ -390,7 +427,7 @@ enum VehicleProperty: int32_t { | |||
390 | /** | 427 | /** |
391 | * EV charge port connected | 428 | * EV charge port connected |
392 | * | 429 | * |
393 | * @change_mode VehiclePropertyChangeMode:STATIC | 430 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
394 | * @access VehiclePropertyAccess:READ | 431 | * @access VehiclePropertyAccess:READ |
395 | */ | 432 | */ |
396 | EV_CHARGE_PORT_CONNECTED = ( | 433 | EV_CHARGE_PORT_CONNECTED = ( |
@@ -405,7 +442,7 @@ enum VehicleProperty: int32_t { | |||
405 | * Positive value indicates battery is being charged. | 442 | * Positive value indicates battery is being charged. |
406 | * Negative value indicates battery being discharged. | 443 | * Negative value indicates battery being discharged. |
407 | * | 444 | * |
408 | * @change_mode VehiclePropertyChangeMode:STATIC | 445 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
409 | * @access VehiclePropertyAccess:READ | 446 | * @access VehiclePropertyAccess:READ |
410 | * @unit VehicleUnit:MW | 447 | * @unit VehicleUnit:MW |
411 | */ | 448 | */ |
@@ -416,8 +453,42 @@ enum VehicleProperty: int32_t { | |||
416 | | VehicleArea:GLOBAL), | 453 | | VehicleArea:GLOBAL), |
417 | 454 | ||
418 | /** | 455 | /** |
456 | * Range remaining | ||
457 | * | ||
458 | * Meters remaining of fuel and charge. Range remaining shall account for | ||
459 | * all energy sources in a vehicle. For example, a hybrid car's range will | ||
460 | * be the sum of the ranges based on fuel and battery. | ||
461 | * | ||
462 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS | ||
463 | * @access VehiclePropertyAccess:READ_WRITE | ||
464 | * @unit VehicleUnit:METER | ||
465 | */ | ||
466 | RANGE_REMAINING = ( | ||
467 | 0x0308 | ||
468 | | VehiclePropertyGroup:SYSTEM | ||
469 | | VehiclePropertyType:FLOAT | ||
470 | | VehicleArea:GLOBAL), | ||
471 | |||
472 | /** | ||
473 | * Tire pressure | ||
474 | * | ||
475 | * The min/max range is used to indicate the recommended tire pressure. | ||
476 | * | ||
477 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS | ||
478 | * @access VehiclePropertyAccess:READ | ||
479 | * @unit VehicleUnit:KILOPASCAL | ||
480 | */ | ||
481 | TIRE_PRESSURE = ( | ||
482 | 0x0309 | ||
483 | | VehiclePropertyGroup:SYSTEM | ||
484 | | VehiclePropertyType:MIXED | ||
485 | | VehicleArea:WHEEL), | ||
486 | |||
487 | /** | ||
419 | * Currently selected gear | 488 | * Currently selected gear |
420 | * | 489 | * |
490 | * This is the gear selected by the user. | ||
491 | * | ||
421 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 492 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
422 | * @access VehiclePropertyAccess:READ | 493 | * @access VehiclePropertyAccess:READ |
423 | * @data_enum VehicleGear | 494 | * @data_enum VehicleGear |
@@ -469,6 +540,10 @@ enum VehicleProperty: int32_t { | |||
469 | /** | 540 | /** |
470 | * Warning for fuel low level. | 541 | * Warning for fuel low level. |
471 | * | 542 | * |
543 | * This property corresponds to the low fuel warning on the dashboard. | ||
544 | * Once FUEL_LEVEL_LOW is set, it should not be cleared until more fuel is | ||
545 | * added to the vehicle. | ||
546 | * | ||
472 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 547 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
473 | * @access VehiclePropertyAccess:READ | 548 | * @access VehiclePropertyAccess:READ |
474 | */ | 549 | */ |
@@ -479,7 +554,9 @@ enum VehicleProperty: int32_t { | |||
479 | | VehicleArea:GLOBAL), | 554 | | VehicleArea:GLOBAL), |
480 | 555 | ||
481 | /** | 556 | /** |
482 | * Night mode or not. | 557 | * Night mode |
558 | * | ||
559 | * True indicates that night mode is currently enabled. | ||
483 | * | 560 | * |
484 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 561 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
485 | * @access VehiclePropertyAccess:READ | 562 | * @access VehiclePropertyAccess:READ |
@@ -493,8 +570,6 @@ enum VehicleProperty: int32_t { | |||
493 | /** | 570 | /** |
494 | * State of the vehicles turn signals | 571 | * State of the vehicles turn signals |
495 | * | 572 | * |
496 | * Values from VehicleTurnSignal | ||
497 | * | ||
498 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 573 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
499 | * @access VehiclePropertyAccess:READ | 574 | * @access VehiclePropertyAccess:READ |
500 | * @data_enum VehicleTurnSignal | 575 | * @data_enum VehicleTurnSignal |
@@ -514,12 +589,16 @@ enum VehicleProperty: int32_t { | |||
514 | */ | 589 | */ |
515 | IGNITION_STATE = ( | 590 | IGNITION_STATE = ( |
516 | 0x0409 | 591 | 0x0409 |
517 | | VehiclePropertyGroup:SYSTEM | 592 | | VehiclePropertyGroup:SYSTEM |
518 | | VehiclePropertyType:INT32 | 593 | | VehiclePropertyType:INT32 |
519 | | VehicleArea:GLOBAL), | 594 | | VehicleArea:GLOBAL), |
520 | 595 | ||
521 | /** | 596 | /** |
522 | * ABS is active. Set to true whenever ABS is activated. Reset to false when ABS is off. | 597 | * ABS is active |
598 | * | ||
599 | * Set to true when ABS is active. Reset to false when ABS is off. This | ||
600 | * property may be intermittently set (pulsing) based on the real-time | ||
601 | * state of the ABS system. | ||
523 | * | 602 | * |
524 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 603 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
525 | * @access VehiclePropertyAccess:READ | 604 | * @access VehiclePropertyAccess:READ |
@@ -531,7 +610,11 @@ enum VehicleProperty: int32_t { | |||
531 | | VehicleArea:GLOBAL), | 610 | | VehicleArea:GLOBAL), |
532 | 611 | ||
533 | /** | 612 | /** |
534 | * Traction Control is active. | 613 | * Traction Control is active |
614 | * | ||
615 | * Set to true when traction control (TC) is active. Reset to false when | ||
616 | * TC is off. This property may be intermittently set (pulsing) based on | ||
617 | * the real-time state of the TC system. | ||
535 | * | 618 | * |
536 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 619 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
537 | * @access VehiclePropertyAccess:READ | 620 | * @access VehiclePropertyAccess:READ |
@@ -545,10 +628,6 @@ enum VehicleProperty: int32_t { | |||
545 | /** | 628 | /** |
546 | * Fan speed setting | 629 | * Fan speed setting |
547 | * | 630 | * |
548 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
549 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
550 | * details. | ||
551 | * | ||
552 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 631 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
553 | * @access VehiclePropertyAccess:READ_WRITE | 632 | * @access VehiclePropertyAccess:READ_WRITE |
554 | */ | 633 | */ |
@@ -556,15 +635,11 @@ enum VehicleProperty: int32_t { | |||
556 | 0x0500 | 635 | 0x0500 |
557 | | VehiclePropertyGroup:SYSTEM | 636 | | VehiclePropertyGroup:SYSTEM |
558 | | VehiclePropertyType:INT32 | 637 | | VehiclePropertyType:INT32 |
559 | | VehicleArea:ZONE), | 638 | | VehicleArea:SEAT), |
560 | 639 | ||
561 | /** | 640 | /** |
562 | * Fan direction setting | 641 | * Fan direction setting |
563 | * | 642 | * |
564 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
565 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
566 | * details. | ||
567 | * | ||
568 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 643 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
569 | * @access VehiclePropertyAccess:READ_WRITE | 644 | * @access VehiclePropertyAccess:READ_WRITE |
570 | * @data_enum VehicleHvacFanDirection | 645 | * @data_enum VehicleHvacFanDirection |
@@ -573,15 +648,11 @@ enum VehicleProperty: int32_t { | |||
573 | 0x0501 | 648 | 0x0501 |
574 | | VehiclePropertyGroup:SYSTEM | 649 | | VehiclePropertyGroup:SYSTEM |
575 | | VehiclePropertyType:INT32 | 650 | | VehiclePropertyType:INT32 |
576 | | VehicleArea:ZONE), | 651 | | VehicleArea:SEAT), |
577 | 652 | ||
578 | /** | 653 | /** |
579 | * HVAC current temperature. | 654 | * HVAC current temperature. |
580 | * | 655 | * |
581 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
582 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
583 | * details. | ||
584 | * | ||
585 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 656 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
586 | * @access VehiclePropertyAccess:READ_WRITE | 657 | * @access VehiclePropertyAccess:READ_WRITE |
587 | */ | 658 | */ |
@@ -589,15 +660,11 @@ enum VehicleProperty: int32_t { | |||
589 | 0x0502 | 660 | 0x0502 |
590 | | VehiclePropertyGroup:SYSTEM | 661 | | VehiclePropertyGroup:SYSTEM |
591 | | VehiclePropertyType:FLOAT | 662 | | VehiclePropertyType:FLOAT |
592 | | VehicleArea:ZONE), | 663 | | VehicleArea:SEAT), |
593 | 664 | ||
594 | /** | 665 | /** |
595 | * HVAC, target temperature set. | 666 | * HVAC, target temperature set. |
596 | * | 667 | * |
597 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
598 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
599 | * details. | ||
600 | * | ||
601 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 668 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
602 | * @access VehiclePropertyAccess:READ_WRITE | 669 | * @access VehiclePropertyAccess:READ_WRITE |
603 | */ | 670 | */ |
@@ -605,14 +672,10 @@ enum VehicleProperty: int32_t { | |||
605 | 0x0503 | 672 | 0x0503 |
606 | | VehiclePropertyGroup:SYSTEM | 673 | | VehiclePropertyGroup:SYSTEM |
607 | | VehiclePropertyType:FLOAT | 674 | | VehiclePropertyType:FLOAT |
608 | | VehicleArea:ZONE), | 675 | | VehicleArea:SEAT), |
609 | 676 | ||
610 | /** | 677 | /** |
611 | * On/off defrost | 678 | * On/off defrost for designated window |
612 | * | ||
613 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
614 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
615 | * details. | ||
616 | * | 679 | * |
617 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 680 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
618 | * @access VehiclePropertyAccess:READ_WRITE | 681 | * @access VehiclePropertyAccess:READ_WRITE |
@@ -624,28 +687,25 @@ enum VehicleProperty: int32_t { | |||
624 | | VehicleArea:WINDOW), | 687 | | VehicleArea:WINDOW), |
625 | 688 | ||
626 | /** | 689 | /** |
627 | * On/off AC | 690 | * On/off AC for designated areaId |
628 | * | ||
629 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
630 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
631 | * details. | ||
632 | * | 691 | * |
633 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 692 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
634 | * @access VehiclePropertyAccess:READ_WRITE | 693 | * @access VehiclePropertyAccess:READ_WRITE |
635 | * @config_flags Supported zones | 694 | * @config_flags Supported areaIds |
636 | */ | 695 | */ |
637 | HVAC_AC_ON = ( | 696 | HVAC_AC_ON = ( |
638 | 0x0505 | 697 | 0x0505 |
639 | | VehiclePropertyGroup:SYSTEM | 698 | | VehiclePropertyGroup:SYSTEM |
640 | | VehiclePropertyType:BOOLEAN | 699 | | VehiclePropertyType:BOOLEAN |
641 | | VehicleArea:ZONE), | 700 | | VehicleArea:SEAT), |
642 | 701 | ||
643 | /** | 702 | /** |
644 | * On/off max AC | 703 | * On/off max AC |
645 | * | 704 | * |
646 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | 705 | * When MAX AC is on, the ECU may adjust the vent position, fan speed, |
647 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | 706 | * temperature, etc as necessary to cool the vehicle as quickly as possible. |
648 | * details. | 707 | * Any parameters modified as a side effect of turning on/off the MAX AC |
708 | * parameter shall generate onPropertyEvent() callbacks to the VHAL. | ||
649 | * | 709 | * |
650 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 710 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
651 | * @access VehiclePropertyAccess:READ_WRITE | 711 | * @access VehiclePropertyAccess:READ_WRITE |
@@ -654,14 +714,16 @@ enum VehicleProperty: int32_t { | |||
654 | 0x0506 | 714 | 0x0506 |
655 | | VehiclePropertyGroup:SYSTEM | 715 | | VehiclePropertyGroup:SYSTEM |
656 | | VehiclePropertyType:BOOLEAN | 716 | | VehiclePropertyType:BOOLEAN |
657 | | VehicleArea:ZONE), | 717 | | VehicleArea:SEAT), |
658 | 718 | ||
659 | /** | 719 | /** |
660 | * On/off max defrost | 720 | * On/off max defrost |
661 | * | 721 | * |
662 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | 722 | * When MAX DEFROST is on, the ECU may adjust the vent position, fan speed, |
663 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | 723 | * temperature, etc as necessary to defrost the windows as quickly as |
664 | * details. | 724 | * possible. Any parameters modified as a side effect of turning on/off |
725 | * the MAX DEFROST parameter shall generate onPropertyEvent() callbacks to | ||
726 | * the VHAL. | ||
665 | * | 727 | * |
666 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 728 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
667 | * @access VehiclePropertyAccess:READ_WRITE | 729 | * @access VehiclePropertyAccess:READ_WRITE |
@@ -670,14 +732,15 @@ enum VehicleProperty: int32_t { | |||
670 | 0x0507 | 732 | 0x0507 |
671 | | VehiclePropertyGroup:SYSTEM | 733 | | VehiclePropertyGroup:SYSTEM |
672 | | VehiclePropertyType:BOOLEAN | 734 | | VehiclePropertyType:BOOLEAN |
673 | | VehicleArea:ZONE), | 735 | | VehicleArea:SEAT), |
674 | 736 | ||
675 | /** | 737 | /** |
676 | * On/off re-circulation | 738 | * Recirculation on/off |
677 | * | 739 | * |
678 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | 740 | * Controls the supply of exterior air to the cabin. Recirc “on” means the |
679 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | 741 | * majority of the airflow into the cabin is originating in the cabin. |
680 | * details. | 742 | * Recirc “off” means the majority of the airflow into the cabin is coming |
743 | * from outside the car. | ||
681 | * | 744 | * |
682 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 745 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
683 | * @access VehiclePropertyAccess:READ_WRITE | 746 | * @access VehiclePropertyAccess:READ_WRITE |
@@ -686,14 +749,25 @@ enum VehicleProperty: int32_t { | |||
686 | 0x0508 | 749 | 0x0508 |
687 | | VehiclePropertyGroup:SYSTEM | 750 | | VehiclePropertyGroup:SYSTEM |
688 | | VehiclePropertyType:BOOLEAN | 751 | | VehiclePropertyType:BOOLEAN |
689 | | VehicleArea:ZONE), | 752 | | VehicleArea:SEAT), |
690 | 753 | ||
691 | /** | 754 | /** |
692 | * On/off dual. This must be defined per each row. | 755 | * Enable temperature coupling between zones. |
693 | * | 756 | * |
694 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | 757 | * The areaId for this property must include the zones that are coupled |
695 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | 758 | * together. Typically, the front two zones (ROW_1_LEFT and ROW_1_RIGHT) |
696 | * details. | 759 | * are coupled together when this property is enabled. Thus, the areaId |
760 | * shall be (ROW_1_LEFT | ROW_1_RIGHT). When the property is enabled, the | ||
761 | * ECU may synchronize the temperature for the affected zones. Any | ||
762 | * parameters modified as a side effect of turning on/off the DUAL_ON | ||
763 | * parameter shall generate onPropertyEvent() callbacks to the VHAL. In | ||
764 | * addition, if setting a temperature (i.e. driver's temp) changes another | ||
765 | * temperature (i.e. front passenger's temp), then the appropriate | ||
766 | * onPropertyEvent() callbacks must be generated. If a user changes a | ||
767 | * temperature that breaks the coupling (e.g. setting the passenger | ||
768 | * temperature independently) then the VHAL must send the appropriate | ||
769 | * onPropertyEvent() callbacks (i.e. HVAC_DUAL_ON = false, | ||
770 | * HVAC_TEMPERATURE_SET[zone] = xxx, etc). | ||
697 | * | 771 | * |
698 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 772 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
699 | * @access VehiclePropertyAccess:READ_WRITE | 773 | * @access VehiclePropertyAccess:READ_WRITE |
@@ -702,15 +776,11 @@ enum VehicleProperty: int32_t { | |||
702 | 0x0509 | 776 | 0x0509 |
703 | | VehiclePropertyGroup:SYSTEM | 777 | | VehiclePropertyGroup:SYSTEM |
704 | | VehiclePropertyType:BOOLEAN | 778 | | VehiclePropertyType:BOOLEAN |
705 | | VehicleArea:ZONE), | 779 | | VehicleArea:SEAT), |
706 | 780 | ||
707 | /** | 781 | /** |
708 | * On/off automatic mode | 782 | * On/off automatic mode |
709 | * | 783 | * |
710 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
711 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
712 | * details. | ||
713 | * | ||
714 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 784 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
715 | * @access VehiclePropertyAccess:READ_WRITE | 785 | * @access VehiclePropertyAccess:READ_WRITE |
716 | */ | 786 | */ |
@@ -718,7 +788,7 @@ enum VehicleProperty: int32_t { | |||
718 | 0x050A | 788 | 0x050A |
719 | | VehiclePropertyGroup:SYSTEM | 789 | | VehiclePropertyGroup:SYSTEM |
720 | | VehiclePropertyType:BOOLEAN | 790 | | VehiclePropertyType:BOOLEAN |
721 | | VehicleArea:ZONE), | 791 | | VehicleArea:SEAT), |
722 | 792 | ||
723 | /** | 793 | /** |
724 | * Seat temperature | 794 | * Seat temperature |
@@ -731,10 +801,6 @@ enum VehicleProperty: int32_t { | |||
731 | * min/max range defines the allowable range and number of steps in each | 801 | * min/max range defines the allowable range and number of steps in each |
732 | * direction. | 802 | * direction. |
733 | * | 803 | * |
734 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
735 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
736 | * details. | ||
737 | * | ||
738 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 804 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
739 | * @access VehiclePropertyAccess:READ_WRITE | 805 | * @access VehiclePropertyAccess:READ_WRITE |
740 | */ | 806 | */ |
@@ -747,12 +813,9 @@ enum VehicleProperty: int32_t { | |||
747 | /** | 813 | /** |
748 | * Side Mirror Heat | 814 | * Side Mirror Heat |
749 | * | 815 | * |
750 | * Increase values denote higher heating levels for side mirrors. | 816 | * Increasing values denote higher heating levels for side mirrors. |
751 | * 0 indicates heating is turned off. | 817 | * The Max value in the config data represents the highest heating level. |
752 | * | 818 | * The Min value in the config data MUST be zero and indicates no heating. |
753 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
754 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
755 | * details. | ||
756 | * | 819 | * |
757 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 820 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
758 | * @access VehiclePropertyAccess:READ_WRITE | 821 | * @access VehiclePropertyAccess:READ_WRITE |
@@ -764,51 +827,42 @@ enum VehicleProperty: int32_t { | |||
764 | | VehicleArea:MIRROR), | 827 | | VehicleArea:MIRROR), |
765 | 828 | ||
766 | /** | 829 | /** |
767 | * Steering Wheel Temperature | 830 | * Steering Wheel Heating/Cooling |
768 | * | 831 | * |
769 | * Sets the temperature for the steering wheel | 832 | * Sets the amount of heating/cooling for the steering wheel |
833 | * config data Min and Max MUST be set appropriately. | ||
770 | * Positive value indicates heating. | 834 | * Positive value indicates heating. |
771 | * Negative value indicates cooling. | 835 | * Negative value indicates cooling. |
772 | * 0 indicates temperature control is off. | 836 | * 0 indicates temperature control is off. |
773 | * | 837 | * |
774 | * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not | ||
775 | * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for | ||
776 | * details. | ||
777 | * | ||
778 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 838 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
779 | * @access VehiclePropertyAccess:READ_WRITE | 839 | * @access VehiclePropertyAccess:READ_WRITE |
780 | */ | 840 | */ |
781 | HVAC_STEERING_WHEEL_TEMP = ( | 841 | HVAC_STEERING_WHEEL_HEAT = ( |
782 | 0x050D | 842 | 0x050D |
783 | | VehiclePropertyGroup:SYSTEM | 843 | | VehiclePropertyGroup:SYSTEM |
784 | | VehiclePropertyType:INT32 | 844 | | VehiclePropertyType:INT32 |
785 | | VehicleArea:GLOBAL), | 845 | | VehicleArea:GLOBAL), |
786 | 846 | ||
787 | /** | 847 | /** |
788 | * Temperature units | 848 | * Temperature units for display |
789 | * | 849 | * |
790 | * Indicates whether the temperature is in Celsius, Fahrenheit, or a | 850 | * Indicates whether the temperature is in Celsius, Fahrenheit, or a |
791 | * different unit from VehicleUnit enum. | 851 | * different unit from VehicleUnit enum. This parameter MAY be used for |
792 | * This parameter affects all HVAC temperatures in the system. | 852 | * displaying any HVAC temperature in the system. |
793 | * | ||
794 | * IVehicle#get is not guaranteed to work if HVAC unit is off. See | ||
795 | * HVAC_POWER_ON property for details. | ||
796 | * | 853 | * |
797 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 854 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
798 | * @access VehiclePropertyAccess:READ | 855 | * @access VehiclePropertyAccess:READ_WRITE |
799 | */ | 856 | */ |
800 | HVAC_TEMPERATURE_UNITS = ( | 857 | HVAC_TEMPERATURE_DISPLAY_UNITS = ( |
801 | 0x050E | 858 | 0x050E |
802 | | VehiclePropertyGroup:SYSTEM | 859 | | VehiclePropertyGroup:SYSTEM |
803 | | VehiclePropertyType:INT32 | 860 | | VehiclePropertyType:INT32 |
804 | | VehicleArea:ZONE), | 861 | | VehicleArea:GLOBAL), |
805 | 862 | ||
806 | /** | 863 | /** |
807 | * Actual fan speed | 864 | * Actual fan speed |
808 | * | 865 | * |
809 | * IVehicle#get is not guaranteed to work if HVAC unit is off. See | ||
810 | * HVAC_POWER_ON property for details. | ||
811 | * | ||
812 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 866 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
813 | * @access VehiclePropertyAccess:READ | 867 | * @access VehiclePropertyAccess:READ |
814 | */ | 868 | */ |
@@ -816,37 +870,38 @@ enum VehicleProperty: int32_t { | |||
816 | 0x050F | 870 | 0x050F |
817 | | VehiclePropertyGroup:SYSTEM | 871 | | VehiclePropertyGroup:SYSTEM |
818 | | VehiclePropertyType:INT32 | 872 | | VehiclePropertyType:INT32 |
819 | | VehicleArea:ZONE), | 873 | | VehicleArea:SEAT), |
820 | 874 | ||
821 | /** | 875 | /** |
822 | * Represents power state for HVAC. Some HVAC properties must require | 876 | * Represents global power state for HVAC. Setting this property to false |
823 | * matching power to be turned on to get out of OFF state. For non-zoned | 877 | * MAY mark some properties that control individual HVAC features/subsystems |
824 | * HVAC properties, VEHICLE_ALL_ZONE corresponds to global power state. | 878 | * to UNAVAILABLE state. Setting this property to true MAY mark some |
879 | * properties that control individual HVAC features/subsystems to AVAILABLE | ||
880 | * state (unless any/all of them are UNAVAILABLE on their own individual | ||
881 | * merits). The list of properties affected by HVAC_POWER_ON must be set | ||
882 | * in the VehiclePropConfig.configArray. | ||
825 | * | 883 | * |
826 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 884 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
827 | * @access VehiclePropertyAccess:READ_WRITE | 885 | * @access VehiclePropertyAccess:READ_WRITE |
828 | * @config_string list of HVAC properties whose power is controlled by this | ||
829 | * property. Format is hexa-decimal number (0x...) separated | ||
830 | * by comma like "0x500,0x503". All zones defined in these | ||
831 | * affected properties must be available in the property. | ||
832 | */ | 886 | */ |
833 | HVAC_POWER_ON = ( | 887 | HVAC_POWER_ON = ( |
834 | 0x0510 | 888 | 0x0510 |
835 | | VehiclePropertyGroup:SYSTEM | 889 | | VehiclePropertyGroup:SYSTEM |
836 | | VehiclePropertyType:BOOLEAN | 890 | | VehiclePropertyType:BOOLEAN |
837 | | VehicleArea:ZONE), | 891 | | VehicleArea:SEAT), |
838 | 892 | ||
839 | /** | 893 | /** |
840 | * Fan Positions Available | 894 | * Fan Positions Available |
841 | * | 895 | * |
842 | * This is a bit mask of fan positions available for the zone. Each available fan direction is | 896 | * This is a bit mask of fan positions available for the zone. Each |
843 | * denoted by a separate entry in the vector. A fan direction may have multiple bits from | 897 | * available fan direction is denoted by a separate entry in the vector. A |
844 | * vehicle_hvac_fan_direction set. For instance, a typical car may have the following setting: | 898 | * fan direction may have multiple bits from vehicle_hvac_fan_direction set. |
845 | * - [0] = FAN_DIRECTION_FACE (0x1) | 899 | * For instance, a typical car may have the following fan positions: |
846 | * - [1] = FAN_DIRECTION_FLOOR (0x2) | 900 | * - FAN_DIRECTION_FACE (0x1) |
847 | * - [2] = FAN_DIRECTION_FACE | FAN_DIRECTION_FLOOR (0x3) | 901 | * - FAN_DIRECTION_FLOOR (0x2) |
848 | * - [3] = FAN_DIRECTION_DEFROST (0x4) | 902 | * - FAN_DIRECTION_FACE | FAN_DIRECTION_FLOOR (0x3) |
849 | * - [4] = FAN_DIRECTION_FLOOR | FAN_DIRECTION_DEFROST (0x6) | 903 | * - FAN_DIRECTION_DEFROST (0x4) |
904 | * - FAN_DIRECTION_FLOOR | FAN_DIRECTION_DEFROST (0x6) | ||
850 | * | 905 | * |
851 | * @change_mode VehiclePropertyChangeMode:STATIC | 906 | * @change_mode VehiclePropertyChangeMode:STATIC |
852 | * @access VehiclePropertyAccess:READ | 907 | * @access VehiclePropertyAccess:READ |
@@ -855,13 +910,14 @@ enum VehicleProperty: int32_t { | |||
855 | 0x0511 | 910 | 0x0511 |
856 | | VehiclePropertyGroup:SYSTEM | 911 | | VehiclePropertyGroup:SYSTEM |
857 | | VehiclePropertyType:INT32_VEC | 912 | | VehiclePropertyType:INT32_VEC |
858 | | VehicleArea:ZONE), | 913 | | VehicleArea:SEAT), |
859 | 914 | ||
860 | /** | 915 | /** |
861 | * Automatic re-circulation on/off | 916 | * Automatic recirculation on/off |
862 | * | 917 | * |
863 | * IVehicle#set and IVehicle#get must return StatusCode::NOT_AVAILABLE when HVAC unit is off. | 918 | * When automatic recirculation is ON, the HVAC system may automatically |
864 | * See HVAC_POWER_ON property for details. | 919 | * switch to recirculation mode if the vehicle detects poor incoming air |
920 | * quality. | ||
865 | * | 921 | * |
866 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 922 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
867 | * @access VehiclePropertyAccess:READ_WRITE | 923 | * @access VehiclePropertyAccess:READ_WRITE |
@@ -870,12 +926,32 @@ enum VehicleProperty: int32_t { | |||
870 | 0x0512 | 926 | 0x0512 |
871 | | VehiclePropertyGroup:SYSTEM | 927 | | VehiclePropertyGroup:SYSTEM |
872 | | VehiclePropertyType:BOOLEAN | 928 | | VehiclePropertyType:BOOLEAN |
873 | | VehicleArea:ZONE), | 929 | | VehicleArea:SEAT), |
930 | |||
931 | /** | ||
932 | * Seat ventilation | ||
933 | * | ||
934 | * 0 indicates off. | ||
935 | * Positive values indicates ventilation level. | ||
936 | * | ||
937 | * Used by HVAC apps and Assistant to enable, change, or read state of seat | ||
938 | * ventilation. This is different than seating cooling. It can be on at the | ||
939 | * same time as cooling, or not. | ||
940 | * | ||
941 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
942 | * @access VehiclePropertyAccess:READ_WRITE | ||
943 | */ | ||
944 | HVAC_SEAT_VENTILATION = ( | ||
945 | 0x0513 | ||
946 | | VehiclePropertyGroup:SYSTEM | ||
947 | | VehiclePropertyType:INT32 | ||
948 | | VehicleArea:SEAT), | ||
949 | |||
874 | 950 | ||
875 | /** | 951 | /** |
876 | * Outside temperature | 952 | * Outside temperature |
877 | * | 953 | * |
878 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS | 954 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
879 | * @access VehiclePropertyAccess:READ | 955 | * @access VehiclePropertyAccess:READ |
880 | * @unit VehicleUnit:CELSIUS | 956 | * @unit VehicleUnit:CELSIUS |
881 | */ | 957 | */ |
@@ -888,7 +964,7 @@ enum VehicleProperty: int32_t { | |||
888 | /** | 964 | /** |
889 | * Cabin temperature | 965 | * Cabin temperature |
890 | * | 966 | * |
891 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS | 967 | * @change_mode VehiclePropertyChangeMode:CONTINUOUS |
892 | * @access VehiclePropertyAccess:READ | 968 | * @access VehiclePropertyAccess:READ |
893 | * @unit VehicleUnit:CELSIUS | 969 | * @unit VehicleUnit:CELSIUS |
894 | */ | 970 | */ |
@@ -896,31 +972,7 @@ enum VehicleProperty: int32_t { | |||
896 | 0x0704 | 972 | 0x0704 |
897 | | VehiclePropertyGroup:SYSTEM | 973 | | VehiclePropertyGroup:SYSTEM |
898 | | VehiclePropertyType:FLOAT | 974 | | VehiclePropertyType:FLOAT |
899 | | VehicleArea:GLOBAL), | 975 | | VehicleArea:SEAT), |
900 | |||
901 | /** | ||
902 | * Radio presets stored on the Car radio module. The data type used is int32 | ||
903 | * array with the following fields: | ||
904 | * <ul> | ||
905 | * <li> int32Values[0]: Preset number </li> | ||
906 | * <li> int32Values[1]: Band type (see #RADIO_BAND_FM in | ||
907 | * system/core/include/system/radio.h). | ||
908 | * <li> int32Values[2]: Channel number </li> | ||
909 | * <li> int32Values[3]: Sub channel number </li> | ||
910 | * </ul> | ||
911 | * | ||
912 | * NOTE: When getting a current preset config ONLY set preset number (i.e. | ||
913 | * int32Values[0]). For setting a preset other fields are required. | ||
914 | * | ||
915 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
916 | * @access VehiclePropertyAccess:READ_WRITE | ||
917 | * @config_flags Number of presets supported | ||
918 | */ | ||
919 | RADIO_PRESET = ( | ||
920 | 0x0801 | ||
921 | | VehiclePropertyGroup:SYSTEM | ||
922 | | VehiclePropertyType:INT32_VEC | ||
923 | | VehicleArea:GLOBAL), | ||
924 | 976 | ||
925 | /** | 977 | /** |
926 | * Property to control power state of application processor | 978 | * Property to control power state of application processor |
@@ -931,40 +983,36 @@ enum VehicleProperty: int32_t { | |||
931 | * For configuration information, VehiclePropConfig.configFlags can | 983 | * For configuration information, VehiclePropConfig.configFlags can |
932 | * have bit flag combining values in VehicleApPowerStateConfigFlag. | 984 | * have bit flag combining values in VehicleApPowerStateConfigFlag. |
933 | * | 985 | * |
934 | * Value format for IVehicle#get / IVehicle#subscribe: | 986 | * int32Values[0] : VehicleApPowerStateReq enum value |
935 | * int32Values[0] : vehicle_ap_power_state_type | ||
936 | * int32Values[1] : additional parameter relevant for each state, | 987 | * int32Values[1] : additional parameter relevant for each state, |
937 | * 0 if not used. | 988 | * 0 if not used. |
938 | * Value format for IVehicle#set: | ||
939 | * int32Values[0] : vehicle_ap_power_state_set_type | ||
940 | * int32Values[1] : additional parameter relevant for each request. should be 0 if not used. | ||
941 | * | 989 | * |
942 | * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE | 990 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
943 | * @access VEHICLE_PROP_ACCESS_READ_WRITE | 991 | * @access VEHICLE_PROP_ACCESS_READ |
944 | */ | 992 | */ |
945 | AP_POWER_STATE = ( | 993 | AP_POWER_STATE_REQ = ( |
946 | 0x0A00 | 994 | 0x0A00 |
947 | | VehiclePropertyGroup:SYSTEM | 995 | | VehiclePropertyGroup:SYSTEM |
948 | | VehiclePropertyType:INT32_VEC | 996 | | VehiclePropertyType:INT32_VEC |
949 | | VehicleArea:GLOBAL), | 997 | | VehicleArea:GLOBAL), |
950 | 998 | ||
951 | /** | 999 | /** |
952 | * Property to represent brightness of the display. Some cars have single | 1000 | * Property to report power state of application processor |
953 | * control for the brightness of all displays and this property is to share | ||
954 | * change in that control. | ||
955 | * | 1001 | * |
956 | * If this is writable, android side can set this value when user changes | 1002 | * It is assumed that AP's power state is controller by separate power |
957 | * display brightness from Settings. If this is read only, user may still | 1003 | * controller. |
958 | * change display brightness from Settings, but that will not be reflected | 1004 | * |
959 | * to other displays. | 1005 | * int32Values[0] : VehicleApPowerStateReport enum value |
1006 | * int32Values[1] : Time in ms to wake up, if necessary. Otherwise 0. | ||
1007 | |||
960 | * | 1008 | * |
961 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 1009 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
962 | * @access VehiclePropertyAccess:READ_WRITE | 1010 | * @access VEHICLE_PROP_ACCESS_WRITE |
963 | */ | 1011 | */ |
964 | DISPLAY_BRIGHTNESS = ( | 1012 | AP_POWER_STATE_REPORT = ( |
965 | 0x0A01 | 1013 | 0x0A01 |
966 | | VehiclePropertyGroup:SYSTEM | 1014 | | VehiclePropertyGroup:SYSTEM |
967 | | VehiclePropertyType:INT32 | 1015 | | VehiclePropertyType:INT32_VEC |
968 | | VehicleArea:GLOBAL), | 1016 | | VehicleArea:GLOBAL), |
969 | 1017 | ||
970 | /** | 1018 | /** |
@@ -986,6 +1034,25 @@ enum VehicleProperty: int32_t { | |||
986 | | VehicleArea:GLOBAL), | 1034 | | VehicleArea:GLOBAL), |
987 | 1035 | ||
988 | /** | 1036 | /** |
1037 | * Property to represent brightness of the display. Some cars have single | ||
1038 | * control for the brightness of all displays and this property is to share | ||
1039 | * change in that control. | ||
1040 | * | ||
1041 | * If this is writable, android side can set this value when user changes | ||
1042 | * display brightness from Settings. If this is read only, user may still | ||
1043 | * change display brightness from Settings, but that must not be reflected | ||
1044 | * to other displays. | ||
1045 | * | ||
1046 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1047 | * @access VehiclePropertyAccess:READ_WRITE | ||
1048 | */ | ||
1049 | DISPLAY_BRIGHTNESS = ( | ||
1050 | 0x0A03 | ||
1051 | | VehiclePropertyGroup:SYSTEM | ||
1052 | | VehiclePropertyType:INT32 | ||
1053 | | VehicleArea:GLOBAL), | ||
1054 | |||
1055 | /** | ||
989 | * Property to feed H/W input events to android | 1056 | * Property to feed H/W input events to android |
990 | * | 1057 | * |
991 | * int32Values[0] : action defined by VehicleHwKeyInputAction | 1058 | * int32Values[0] : action defined by VehicleHwKeyInputAction |
@@ -993,6 +1060,7 @@ enum VehicleProperty: int32_t { | |||
993 | * int32Values[2] : target display defined in VehicleDisplay. Events not | 1060 | * int32Values[2] : target display defined in VehicleDisplay. Events not |
994 | * tied to specific display must be sent to | 1061 | * tied to specific display must be sent to |
995 | * VehicleDisplay#MAIN. | 1062 | * VehicleDisplay#MAIN. |
1063 | * | ||
996 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 1064 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
997 | * @access VehiclePropertyAccess:READ | 1065 | * @access VehiclePropertyAccess:READ |
998 | * @config_flags | 1066 | * @config_flags |
@@ -1003,36 +1071,23 @@ enum VehicleProperty: int32_t { | |||
1003 | | VehiclePropertyType:INT32_VEC | 1071 | | VehiclePropertyType:INT32_VEC |
1004 | | VehicleArea:GLOBAL), | 1072 | | VehicleArea:GLOBAL), |
1005 | 1073 | ||
1006 | /** | 1074 | /*************************************************************************** |
1007 | * Current date and time, encoded as Unix time. | 1075 | * Most Car Cabin properties have both a POSition and MOVE parameter. These |
1008 | * This value denotes the number of seconds that have elapsed since | 1076 | * are used to control the various movements for seats, doors, and windows |
1009 | * 1/1/1970. | 1077 | * in a vehicle. |
1010 | * | 1078 | * |
1011 | * @change_mode VehiclePropertyChangeMode:ON_SET | 1079 | * A POS parameter allows the user to set the absolution position. For |
1012 | * @access VehiclePropertyAccess:READ_WRITE | 1080 | * instance, for a door, 0 indicates fully closed and max value indicates |
1013 | * @unit VehicleUnit:SECS | 1081 | * fully open. Thus, a value halfway between min and max must indicate |
1014 | */ | 1082 | * the door is halfway open. |
1015 | UNIX_TIME = ( | ||
1016 | 0x0A30 | ||
1017 | | VehiclePropertyGroup:SYSTEM | ||
1018 | | VehiclePropertyType:INT64 | ||
1019 | | VehicleArea:GLOBAL), | ||
1020 | |||
1021 | /** | ||
1022 | * Current time only. | ||
1023 | * Some vehicles may not keep track of date. This property only affects | ||
1024 | * the current time, in seconds during the day. Thus, the max value for | ||
1025 | * this parameter is 86,400 (24 * 60 * 60) | ||
1026 | * | 1083 | * |
1027 | * @change_mode VehiclePropertyChangeMode:ON_SET | 1084 | * A MOVE parameter moves the device in a particular direction. The sign |
1028 | * @access VehiclePropertyAccess:READ_WRITE | 1085 | * indicates direction, and the magnitude indicates speed (if multiple |
1029 | * @unit VehicleUnit:SECS | 1086 | * speeds are available). For a door, a move of -1 will close the door, and |
1030 | */ | 1087 | * a move of +1 will open it. Once a door reaches the limit of open/close, |
1031 | CURRENT_TIME_IN_SECONDS = ( | 1088 | * the door should automatically stop moving. The user must NOT need to |
1032 | 0x0A31 | 1089 | * send a MOVE(0) command to stop the door at the end of its range. |
1033 | | VehiclePropertyGroup:SYSTEM | 1090 | **************************************************************************/ |
1034 | | VehiclePropertyType:INT32 | ||
1035 | | VehicleArea:GLOBAL), | ||
1036 | 1091 | ||
1037 | /** | 1092 | /** |
1038 | * Door position | 1093 | * Door position |
@@ -1187,7 +1242,7 @@ enum VehicleProperty: int32_t { | |||
1187 | * | 1242 | * |
1188 | * This setting allows the user to save the current seat position settings | 1243 | * This setting allows the user to save the current seat position settings |
1189 | * into the selected preset slot. The maxValue for each seat position | 1244 | * into the selected preset slot. The maxValue for each seat position |
1190 | * shall match the maxValue for SEAT_MEMORY_SELECT. | 1245 | * must match the maxValue for SEAT_MEMORY_SELECT. |
1191 | * | 1246 | * |
1192 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 1247 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
1193 | * @access VehiclePropertyAccess:WRITE | 1248 | * @access VehiclePropertyAccess:WRITE |
@@ -1577,6 +1632,14 @@ enum VehicleProperty: int32_t { | |||
1577 | * Max = window up / closed | 1632 | * Max = window up / closed |
1578 | * Min = window down / open | 1633 | * Min = window down / open |
1579 | * | 1634 | * |
1635 | * For a window that may open out of plane (i.e. vent mode of sunroof) this | ||
1636 | * parameter will work with negative values as follows: | ||
1637 | * Max = sunroof completely open | ||
1638 | * 0 = sunroof closed. | ||
1639 | * Min = sunroof vent completely open | ||
1640 | * | ||
1641 | * Note that in this mode, 0 indicates the window is closed. | ||
1642 | * | ||
1580 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 1643 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
1581 | * @access VehiclePropertyAccess:READ_WRITE | 1644 | * @access VehiclePropertyAccess:READ_WRITE |
1582 | */ | 1645 | */ |
@@ -1594,45 +1657,26 @@ enum VehicleProperty: int32_t { | |||
1594 | * Magnitude denotes relative speed. I.e. +2 is faster than +1 in raising | 1657 | * Magnitude denotes relative speed. I.e. +2 is faster than +1 in raising |
1595 | * the window. | 1658 | * the window. |
1596 | * | 1659 | * |
1597 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 1660 | * For a window that may open out of plane (i.e. vent mode of sunroof) this |
1598 | * @access VehiclePropertyAccess:READ_WRITE | 1661 | * parameter will work as follows: |
1599 | */ | ||
1600 | WINDOW_MOVE = ( | ||
1601 | 0x0BC1 | ||
1602 | | VehiclePropertyGroup:SYSTEM | ||
1603 | | VehiclePropertyType:INT32 | ||
1604 | | VehicleArea:WINDOW), | ||
1605 | |||
1606 | /** | ||
1607 | * Window Vent Position | ||
1608 | * | 1662 | * |
1609 | * This feature is used to control the vent feature on a sunroof. | 1663 | * If sunroof is open: |
1664 | * Max = open the sunroof further, automatically stop when fully open. | ||
1665 | * Min = close the sunroof, automatically stop when sunroof is closed. | ||
1610 | * | 1666 | * |
1611 | * Max = vent open | 1667 | * If vent is open: |
1612 | * Min = vent closed | 1668 | * Max = close the vent, automatically stop when vent is closed. |
1669 | * Min = open the vent further, automatically stop when vent is fully open. | ||
1613 | * | 1670 | * |
1614 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 1671 | * If window is in the closed position: |
1615 | * @access VehiclePropertyAccess:READ_WRITE | 1672 | * Max = open the sunroof, automatically stop when sunroof is fully open. |
1616 | */ | 1673 | * Min = open the vent, automatically stop when vent is fully open. |
1617 | WINDOW_VENT_POS = ( | ||
1618 | 0x0BC2 | ||
1619 | | VehiclePropertyGroup:SYSTEM | ||
1620 | | VehiclePropertyType:INT32 | ||
1621 | | VehicleArea:WINDOW), | ||
1622 | |||
1623 | /** | ||
1624 | * Window Vent Move | ||
1625 | * | ||
1626 | * This feature is used to control the vent feature on a sunroof. | ||
1627 | * | ||
1628 | * Max = vent open | ||
1629 | * Min = vent closed | ||
1630 | * | 1674 | * |
1631 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | 1675 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE |
1632 | * @access VehiclePropertyAccess:READ_WRITE | 1676 | * @access VehiclePropertyAccess:READ_WRITE |
1633 | */ | 1677 | */ |
1634 | WINDOW_VENT_MOVE = ( | 1678 | WINDOW_MOVE = ( |
1635 | 0x0BC3 | 1679 | 0x0BC1 |
1636 | | VehiclePropertyGroup:SYSTEM | 1680 | | VehiclePropertyGroup:SYSTEM |
1637 | | VehiclePropertyType:INT32 | 1681 | | VehiclePropertyType:INT32 |
1638 | | VehicleArea:WINDOW), | 1682 | | VehicleArea:WINDOW), |
@@ -1716,10 +1760,10 @@ enum VehicleProperty: int32_t { | |||
1716 | * @access VehiclePropertyAccess:READ | 1760 | * @access VehiclePropertyAccess:READ |
1717 | */ | 1761 | */ |
1718 | OBD2_LIVE_FRAME = ( | 1762 | OBD2_LIVE_FRAME = ( |
1719 | 0x0D00 | 1763 | 0x0D00 |
1720 | | VehiclePropertyGroup:SYSTEM | 1764 | | VehiclePropertyGroup:SYSTEM |
1721 | | VehiclePropertyType:MIXED | 1765 | | VehiclePropertyType:MIXED |
1722 | | VehicleArea:GLOBAL), | 1766 | | VehicleArea:GLOBAL), |
1723 | 1767 | ||
1724 | /** | 1768 | /** |
1725 | * OBD2 Freeze Frame Sensor Data | 1769 | * OBD2 Freeze Frame Sensor Data |
@@ -1746,10 +1790,10 @@ enum VehicleProperty: int32_t { | |||
1746 | * @access VehiclePropertyAccess:READ | 1790 | * @access VehiclePropertyAccess:READ |
1747 | */ | 1791 | */ |
1748 | OBD2_FREEZE_FRAME = ( | 1792 | OBD2_FREEZE_FRAME = ( |
1749 | 0x0D01 | 1793 | 0x0D01 |
1750 | | VehiclePropertyGroup:SYSTEM | 1794 | | VehiclePropertyGroup:SYSTEM |
1751 | | VehiclePropertyType:MIXED | 1795 | | VehiclePropertyType:MIXED |
1752 | | VehicleArea:GLOBAL), | 1796 | | VehicleArea:GLOBAL), |
1753 | 1797 | ||
1754 | /** | 1798 | /** |
1755 | * OBD2 Freeze Frame Information | 1799 | * OBD2 Freeze Frame Information |
@@ -1767,10 +1811,10 @@ enum VehicleProperty: int32_t { | |||
1767 | * @access VehiclePropertyAccess:READ | 1811 | * @access VehiclePropertyAccess:READ |
1768 | */ | 1812 | */ |
1769 | OBD2_FREEZE_FRAME_INFO = ( | 1813 | OBD2_FREEZE_FRAME_INFO = ( |
1770 | 0x0D02 | 1814 | 0x0D02 |
1771 | | VehiclePropertyGroup:SYSTEM | 1815 | | VehiclePropertyGroup:SYSTEM |
1772 | | VehiclePropertyType:MIXED | 1816 | | VehiclePropertyType:MIXED |
1773 | | VehicleArea:GLOBAL), | 1817 | | VehicleArea:GLOBAL), |
1774 | 1818 | ||
1775 | /** | 1819 | /** |
1776 | * OBD2 Freeze Frame Clear | 1820 | * OBD2 Freeze Frame Clear |
@@ -1793,10 +1837,164 @@ enum VehicleProperty: int32_t { | |||
1793 | * @access VehiclePropertyAccess:WRITE | 1837 | * @access VehiclePropertyAccess:WRITE |
1794 | */ | 1838 | */ |
1795 | OBD2_FREEZE_FRAME_CLEAR = ( | 1839 | OBD2_FREEZE_FRAME_CLEAR = ( |
1796 | 0x0D03 | 1840 | 0x0D03 |
1797 | | VehiclePropertyGroup:SYSTEM | 1841 | | VehiclePropertyGroup:SYSTEM |
1798 | | VehiclePropertyType:MIXED | 1842 | | VehiclePropertyType:MIXED |
1799 | | VehicleArea:GLOBAL), | 1843 | | VehicleArea:GLOBAL), |
1844 | |||
1845 | /** | ||
1846 | * Headlights State | ||
1847 | * | ||
1848 | * Return the current state of headlights. | ||
1849 | * | ||
1850 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1851 | * @access VehiclePropertyAccess:READ | ||
1852 | * @data_enum VehicleLightState | ||
1853 | */ | ||
1854 | HEADLIGHTS_STATE = ( | ||
1855 | 0x0E00 | ||
1856 | | VehiclePropertyGroup:SYSTEM | ||
1857 | | VehiclePropertyType:INT32 | ||
1858 | | VehicleArea:GLOBAL), | ||
1859 | |||
1860 | /** | ||
1861 | * High beam lights state | ||
1862 | * | ||
1863 | * Return the current state of high beam lights. | ||
1864 | * | ||
1865 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1866 | * @access VehiclePropertyAccess:READ | ||
1867 | * @data_enum VehicleLightState | ||
1868 | */ | ||
1869 | HIGH_BEAM_LIGHTS_STATE = ( | ||
1870 | 0x0E01 | ||
1871 | | VehiclePropertyGroup:SYSTEM | ||
1872 | | VehiclePropertyType:INT32 | ||
1873 | | VehicleArea:GLOBAL), | ||
1874 | |||
1875 | /** | ||
1876 | * Fog light state | ||
1877 | * | ||
1878 | * Return the current state of fog lights. | ||
1879 | * | ||
1880 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1881 | * @access VehiclePropertyAccess:READ | ||
1882 | * @data_enum VehicleLightState | ||
1883 | */ | ||
1884 | FOG_LIGHTS_STATE = ( | ||
1885 | 0x0E02 | ||
1886 | | VehiclePropertyGroup:SYSTEM | ||
1887 | | VehiclePropertyType:INT32 | ||
1888 | | VehicleArea:GLOBAL), | ||
1889 | |||
1890 | /** | ||
1891 | * Hazard light status | ||
1892 | * | ||
1893 | * Return the current status of hazard lights. | ||
1894 | * | ||
1895 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1896 | * @access VehiclePropertyAccess:READ | ||
1897 | * @data_enum VehicleLightState | ||
1898 | */ | ||
1899 | HAZARD_LIGHTS_STATE = ( | ||
1900 | 0x0E03 | ||
1901 | | VehiclePropertyGroup:SYSTEM | ||
1902 | | VehiclePropertyType:INT32 | ||
1903 | | VehicleArea:GLOBAL), | ||
1904 | |||
1905 | /** | ||
1906 | * Headlight switch | ||
1907 | * | ||
1908 | * The setting that the user wants. | ||
1909 | * | ||
1910 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1911 | * @access VehiclePropertyAccess:READ_WRITE | ||
1912 | * @data_enum VehicleLightSwitch | ||
1913 | */ | ||
1914 | HEADLIGHTS_SWITCH = ( | ||
1915 | 0x0E10 | ||
1916 | | VehiclePropertyGroup:SYSTEM | ||
1917 | | VehiclePropertyType:INT32 | ||
1918 | | VehicleArea:GLOBAL), | ||
1919 | |||
1920 | /** | ||
1921 | * High beam light switch | ||
1922 | * | ||
1923 | * The setting that the user wants. | ||
1924 | * | ||
1925 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1926 | * @access VehiclePropertyAccess:READ_WRITE | ||
1927 | * @data_enum VehicleLightSwitch | ||
1928 | */ | ||
1929 | HIGH_BEAM_LIGHTS_SWITCH = ( | ||
1930 | 0x0E11 | ||
1931 | | VehiclePropertyGroup:SYSTEM | ||
1932 | | VehiclePropertyType:INT32 | ||
1933 | | VehicleArea:GLOBAL), | ||
1934 | |||
1935 | /** | ||
1936 | * Fog light switch | ||
1937 | * | ||
1938 | * The setting that the user wants. | ||
1939 | * | ||
1940 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1941 | * @access VehiclePropertyAccess:READ_WRITE | ||
1942 | * @data_enum VehicleLightSwitch | ||
1943 | */ | ||
1944 | FOG_LIGHTS_SWITCH = ( | ||
1945 | 0x0E12 | ||
1946 | | VehiclePropertyGroup:SYSTEM | ||
1947 | | VehiclePropertyType:INT32 | ||
1948 | | VehicleArea:GLOBAL), | ||
1949 | |||
1950 | /** | ||
1951 | * Hazard light switch | ||
1952 | * | ||
1953 | * The setting that the user wants. | ||
1954 | * | ||
1955 | * @change_mode VehiclePropertyChangeMode:ON_CHANGE | ||
1956 | * @access VehiclePropertyAccess:READ_WRITE | ||
1957 | * @data_enum VehicleLightSwitch | ||
1958 | */ | ||
1959 | HAZARD_LIGHTS_SWITCH = ( | ||
1960 | 0x0E13 | ||
1961 | | VehiclePropertyGroup:SYSTEM | ||
1962 | | VehiclePropertyType:INT32 | ||
1963 | | VehicleArea:GLOBAL), | ||
1964 | }; | ||
1965 | |||
1966 | /** | ||
1967 | * Used by lights state properties to enumerate the current state of the lights. | ||
1968 | * | ||
1969 | * Most XXX_LIGHTS_STATE properties will only report ON and OFF states. Only | ||
1970 | * the HEADLIGHTS_STATE property will report DAYTIME_RUNNING. | ||
1971 | */ | ||
1972 | enum VehicleLightState : int32_t { | ||
1973 | |||
1974 | OFF = 0, | ||
1975 | ON = 1, | ||
1976 | DAYTIME_RUNNING = 2 | ||
1977 | }; | ||
1978 | |||
1979 | /** | ||
1980 | * Used by lights switch properties to enumerate user selected switch setting. | ||
1981 | * | ||
1982 | * XXX_LIGHTS_SWITCH properties report the switch settings that the user | ||
1983 | * selects. The switch setting may be decoupled from the state reported if the | ||
1984 | * user selects AUTOMATIC. | ||
1985 | */ | ||
1986 | enum VehicleLightSwitch : int32_t { | ||
1987 | OFF = 0, | ||
1988 | ON = 1, | ||
1989 | /** | ||
1990 | * Daytime running lights mode. Most cars automatically use DRL but some | ||
1991 | * cars allow the user to activate them manually. | ||
1992 | */ | ||
1993 | DAYTIME_RUNNING = 2, | ||
1994 | /** | ||
1995 | * Allows the vehicle ECU to set the lights automatically | ||
1996 | */ | ||
1997 | AUTOMATIC = 0x100, | ||
1800 | }; | 1998 | }; |
1801 | 1999 | ||
1802 | /** | 2000 | /** |
@@ -1828,6 +2026,24 @@ enum EvConnectorType : int32_t { | |||
1828 | }; | 2026 | }; |
1829 | 2027 | ||
1830 | /** | 2028 | /** |
2029 | * Used by INFO_FUEL_DOOR_LOCATION/INFO_CHARGE_PORT_LOCATION to enumerate fuel door or | ||
2030 | * ev port location. | ||
2031 | */ | ||
2032 | enum PortLocationType : int32_t { | ||
2033 | /** | ||
2034 | * Default type if the vehicle does not know or report the Fuel door | ||
2035 | * and ev port location. | ||
2036 | */ | ||
2037 | UNKNOWN = 0, | ||
2038 | FRONT_LEFT = 1, | ||
2039 | FRONT_RIGHT = 2, | ||
2040 | REAR_RIGHT = 3, | ||
2041 | REAR_LEFT = 4, | ||
2042 | FRONT = 5, | ||
2043 | REAR = 6, | ||
2044 | }; | ||
2045 | |||
2046 | /** | ||
1831 | * Used by INFO_FUEL_TYPE to enumerate the type of fuels this vehicle uses. | 2047 | * Used by INFO_FUEL_TYPE to enumerate the type of fuels this vehicle uses. |
1832 | * Consistent with projection protocol. | 2048 | * Consistent with projection protocol. |
1833 | */ | 2049 | */ |
@@ -1886,14 +2102,6 @@ enum VehicleOilLevel : int32_t { | |||
1886 | ERROR = 4, | 2102 | ERROR = 4, |
1887 | }; | 2103 | }; |
1888 | 2104 | ||
1889 | /** | ||
1890 | * Constants relevant to radio. | ||
1891 | */ | ||
1892 | enum VehicleRadioConstants : int32_t { | ||
1893 | /** Minimum value for the radio preset */ | ||
1894 | VEHICLE_RADIO_PRESET_MIN_VALUE = 1, | ||
1895 | }; | ||
1896 | |||
1897 | enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ { | 2105 | enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ { |
1898 | /** | 2106 | /** |
1899 | * AP can enter deep sleep state. If not set, AP will always shutdown from | 2107 | * AP can enter deep sleep state. If not set, AP will always shutdown from |
@@ -1908,7 +2116,7 @@ enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ { | |||
1908 | CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2, | 2116 | CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2, |
1909 | }; | 2117 | }; |
1910 | 2118 | ||
1911 | enum VehicleApPowerState : int32_t /* NOTE: type is guessed */ { | 2119 | enum VehicleApPowerStateReq : int32_t { |
1912 | /** vehicle HAL will never publish this state to AP */ | 2120 | /** vehicle HAL will never publish this state to AP */ |
1913 | OFF = 0, | 2121 | OFF = 0, |
1914 | 2122 | ||
@@ -1933,6 +2141,16 @@ enum VehicleApPowerState : int32_t /* NOTE: type is guessed */ { | |||
1933 | SHUTDOWN_PREPARE = 4, | 2141 | SHUTDOWN_PREPARE = 4, |
1934 | }; | 2142 | }; |
1935 | 2143 | ||
2144 | /** | ||
2145 | * Index in int32Values for VehicleProperty#AP_POWER_STATE_REQ property. | ||
2146 | */ | ||
2147 | enum VehicleApPowerStateReqIndex : int32_t { | ||
2148 | STATE = 0, | ||
2149 | ADDITIONAL = 1, | ||
2150 | }; | ||
2151 | |||
2152 | |||
2153 | |||
1936 | enum VehicleApPowerStateShutdownParam : int32_t { | 2154 | enum VehicleApPowerStateShutdownParam : int32_t { |
1937 | /** AP must shutdown immediately. Postponing is not allowed. */ | 2155 | /** AP must shutdown immediately. Postponing is not allowed. */ |
1938 | SHUTDOWN_IMMEDIATELY = 1, | 2156 | SHUTDOWN_IMMEDIATELY = 1, |
@@ -1944,7 +2162,7 @@ enum VehicleApPowerStateShutdownParam : int32_t { | |||
1944 | SHUTDOWN_ONLY = 3, | 2162 | SHUTDOWN_ONLY = 3, |
1945 | }; | 2163 | }; |
1946 | 2164 | ||
1947 | enum VehicleApPowerSetState : int32_t /* NOTE: type is guessed */ { | 2165 | enum VehicleApPowerStateReport : int32_t { |
1948 | /** | 2166 | /** |
1949 | * AP has finished boot up, and can start shutdown if requested by power | 2167 | * AP has finished boot up, and can start shutdown if requested by power |
1950 | * controller. | 2168 | * controller. |
@@ -2009,14 +2227,6 @@ enum VehicleApPowerSetState : int32_t /* NOTE: type is guessed */ { | |||
2009 | }; | 2227 | }; |
2010 | 2228 | ||
2011 | /** | 2229 | /** |
2012 | * Index in int32Values for VehicleProperty#AP_POWER_STATE property. | ||
2013 | */ | ||
2014 | enum VehicleApPowerStateIndex : int32_t { | ||
2015 | STATE = 0, | ||
2016 | ADDITIONAL = 1, | ||
2017 | }; | ||
2018 | |||
2019 | /** | ||
2020 | * Enum to represent bootup reason. | 2230 | * Enum to represent bootup reason. |
2021 | */ | 2231 | */ |
2022 | enum VehicleApPowerBootupReason : int32_t { | 2232 | enum VehicleApPowerBootupReason : int32_t { |
@@ -2050,7 +2260,7 @@ enum VehicleHwKeyInputAction : int32_t { | |||
2050 | }; | 2260 | }; |
2051 | 2261 | ||
2052 | enum VehicleDisplay : int32_t { | 2262 | enum VehicleDisplay : int32_t { |
2053 | /** center console */ | 2263 | /** The primary Android display (for example, center console) */ |
2054 | MAIN = 0, | 2264 | MAIN = 0, |
2055 | 2265 | ||
2056 | INSTRUMENT_CLUSTER = 1, | 2266 | INSTRUMENT_CLUSTER = 1, |
@@ -2076,6 +2286,7 @@ enum VehicleUnit : int32_t { | |||
2076 | NANO_SECS = 0x50, | 2286 | NANO_SECS = 0x50, |
2077 | SECS = 0x53, | 2287 | SECS = 0x53, |
2078 | YEAR = 0x59, | 2288 | YEAR = 0x59, |
2289 | KILOPASCAL = 0x70, | ||
2079 | 2290 | ||
2080 | // Electrical Units | 2291 | // Electrical Units |
2081 | WATT_HOUR = 0x60, | 2292 | WATT_HOUR = 0x60, |
@@ -2084,46 +2295,33 @@ enum VehicleUnit : int32_t { | |||
2084 | MILLIWATTS = 0x63, | 2295 | MILLIWATTS = 0x63, |
2085 | }; | 2296 | }; |
2086 | 2297 | ||
2087 | /** | 2298 | /** |
2088 | * This describes how value of property can change. | 2299 | * This describes how value of property can change. |
2089 | */ | 2300 | */ |
2090 | enum VehiclePropertyChangeMode : int32_t { | 2301 | enum VehiclePropertyChangeMode : int32_t { |
2091 | /** | 2302 | /** |
2092 | * Property of this type must never be changed. Subscription is not supported | 2303 | * Property of this type must never be changed. Subscription is not supported |
2093 | * for these properties. | 2304 | * for these properties. |
2094 | */ | 2305 | */ |
2095 | STATIC = 0x00, | 2306 | STATIC = 0x00, |
2096 | 2307 | ||
2097 | /** | 2308 | /** |
2098 | * Property of this type must be reported when there is a change. | 2309 | * Properties of this type must report when there is a change. |
2099 | * IVehicle#get call must return the current value. | 2310 | * IVehicle#get call must return the current value. |
2100 | * Set operation for this property is assumed to be asynchronous. When the | 2311 | * Set operation for this property is assumed to be asynchronous. When the |
2101 | * property is read (using IVehicle#get) after IVehicle#set, it may still | 2312 | * property is read (using IVehicle#get) after IVehicle#set, it may still |
2102 | * return old value until underlying H/W backing this property has actually | 2313 | * return old value until underlying H/W backing this property has actually |
2103 | * changed the state. Once state is changed, the property must dispatch | 2314 | * changed the state. Once state is changed, the property must dispatch |
2104 | * changed value as event. | 2315 | * changed value as event. |
2105 | */ | 2316 | */ |
2106 | ON_CHANGE = 0x01, | 2317 | ON_CHANGE = 0x01, |
2107 | 2318 | ||
2108 | /** | 2319 | /** |
2109 | * Property of this type change continuously and requires fixed rate of | 2320 | * Properties of this type change continuously and require a fixed rate of |
2110 | * sampling to retrieve the data. | 2321 | * sampling to retrieve the data. Implementers may choose to send extra |
2111 | */ | 2322 | * notifications on significant value changes. |
2112 | CONTINUOUS = 0x02, | 2323 | */ |
2113 | 2324 | CONTINUOUS = 0x02, | |
2114 | /** | ||
2115 | * Property of this type may be polled to get the current value. | ||
2116 | */ | ||
2117 | POLL = 0x03, | ||
2118 | |||
2119 | /** | ||
2120 | * This is for property where change event must be sent only when the | ||
2121 | * value is set from external component. Normal value change must not trigger | ||
2122 | * event. For example, clock property can send change event only when it is | ||
2123 | * set, outside android, for case like user setting time or time getting | ||
2124 | * update. There is no need to send it per every value change. | ||
2125 | */ | ||
2126 | ON_SET = 0x04, | ||
2127 | }; | 2325 | }; |
2128 | 2326 | ||
2129 | /** | 2327 | /** |
@@ -2147,8 +2345,15 @@ enum VehiclePropertyStatus : int32_t { | |||
2147 | /** Property is available and behaving normally */ | 2345 | /** Property is available and behaving normally */ |
2148 | AVAILABLE = 0x00, | 2346 | AVAILABLE = 0x00, |
2149 | /** | 2347 | /** |
2150 | * Property is not available, for read and/or write. This is a transient state, as the | 2348 | * A property in this state is not available for reading and writing. This |
2151 | * property is expected to be available at a later time. | 2349 | * is a transient state that depends on the availability of the underlying |
2350 | * implementation (e.g. hardware or driver). It MUST NOT be used to | ||
2351 | * represent features that this vehicle is always incapable of. A get() of | ||
2352 | * a property in this state MAY return an undefined value, but MUST | ||
2353 | * correctly describe its status as UNAVAILABLE A set() of a property in | ||
2354 | * this state MAY return NOT_AVAILABLE. The HAL implementation MUST ignore | ||
2355 | * the value of the status field when writing a property value coming from | ||
2356 | * Android. | ||
2152 | */ | 2357 | */ |
2153 | UNAVAILABLE = 0x01, | 2358 | UNAVAILABLE = 0x01, |
2154 | /** There is an error with this property. */ | 2359 | /** There is an error with this property. */ |
@@ -2158,12 +2363,11 @@ enum VehiclePropertyStatus : int32_t { | |||
2158 | /** | 2363 | /** |
2159 | * Various gears which can be selected by user and chosen in system. | 2364 | * Various gears which can be selected by user and chosen in system. |
2160 | */ | 2365 | */ |
2161 | enum VehicleGear: int32_t { | 2366 | enum VehicleGear : int32_t { |
2162 | GEAR_NEUTRAL = 0x0001, | 2367 | GEAR_NEUTRAL = 0x0001, |
2163 | GEAR_REVERSE = 0x0002, | 2368 | GEAR_REVERSE = 0x0002, |
2164 | GEAR_PARK = 0x0004, | 2369 | GEAR_PARK = 0x0004, |
2165 | GEAR_DRIVE = 0x0008, | 2370 | GEAR_DRIVE = 0x0008, |
2166 | GEAR_LOW = 0x0010, | ||
2167 | GEAR_1 = 0x0010, | 2371 | GEAR_1 = 0x0010, |
2168 | GEAR_2 = 0x0020, | 2372 | GEAR_2 = 0x0020, |
2169 | GEAR_3 = 0x0040, | 2373 | GEAR_3 = 0x0040, |
@@ -2176,27 +2380,6 @@ enum VehicleGear: int32_t { | |||
2176 | }; | 2380 | }; |
2177 | 2381 | ||
2178 | /** | 2382 | /** |
2179 | * Various zones in the car. | ||
2180 | * | ||
2181 | * Zones are used for Air Conditioning purposes and divide the car into physical | ||
2182 | * area zones. | ||
2183 | */ | ||
2184 | enum VehicleAreaZone : int32_t { | ||
2185 | ROW_1_LEFT = 0x00000001, | ||
2186 | ROW_1_CENTER = 0x00000002, | ||
2187 | ROW_1_RIGHT = 0x00000004, | ||
2188 | ROW_2_LEFT = 0x00000010, | ||
2189 | ROW_2_CENTER = 0x00000020, | ||
2190 | ROW_2_RIGHT = 0x00000040, | ||
2191 | ROW_3_LEFT = 0x00000100, | ||
2192 | ROW_3_CENTER = 0x00000200, | ||
2193 | ROW_3_RIGHT = 0x00000400, | ||
2194 | ROW_4_LEFT = 0x00001000, | ||
2195 | ROW_4_CENTER = 0x00002000, | ||
2196 | ROW_4_RIGHT = 0x00004000, | ||
2197 | }; | ||
2198 | |||
2199 | /** | ||
2200 | * Various Seats in the car. | 2383 | * Various Seats in the car. |
2201 | */ | 2384 | */ |
2202 | enum VehicleAreaSeat : int32_t { | 2385 | enum VehicleAreaSeat : int32_t { |
@@ -2215,15 +2398,18 @@ enum VehicleAreaSeat : int32_t { | |||
2215 | * Various windshields/windows in the car. | 2398 | * Various windshields/windows in the car. |
2216 | */ | 2399 | */ |
2217 | enum VehicleAreaWindow : int32_t { | 2400 | enum VehicleAreaWindow : int32_t { |
2218 | FRONT_WINDSHIELD = 0x0001, | 2401 | FRONT_WINDSHIELD = 0x00000001, |
2219 | REAR_WINDSHIELD = 0x0002, | 2402 | REAR_WINDSHIELD = 0x00000002, |
2220 | ROOF_TOP = 0x0004, | 2403 | ROW_1_LEFT = 0x00000010, |
2221 | ROW_1_LEFT = 0x0010, | 2404 | ROW_1_RIGHT = 0x00000040, |
2222 | ROW_1_RIGHT = 0x0020, | 2405 | ROW_2_LEFT = 0x00000100, |
2223 | ROW_2_LEFT = 0x0100, | 2406 | ROW_2_RIGHT = 0x00000400, |
2224 | ROW_2_RIGHT = 0x0200, | 2407 | ROW_3_LEFT = 0x00001000, |
2225 | ROW_3_LEFT = 0x1000, | 2408 | ROW_3_RIGHT = 0x00004000, |
2226 | ROW_3_RIGHT = 0x2000, | 2409 | |
2410 | ROOF_TOP_1 = 0x00010000, | ||
2411 | ROOF_TOP_2 = 0x00020000, | ||
2412 | |||
2227 | }; | 2413 | }; |
2228 | 2414 | ||
2229 | enum VehicleAreaDoor : int32_t { | 2415 | enum VehicleAreaDoor : int32_t { |
@@ -2247,7 +2433,6 @@ enum VehicleTurnSignal : int32_t { | |||
2247 | NONE = 0x00, | 2433 | NONE = 0x00, |
2248 | RIGHT = 0x01, | 2434 | RIGHT = 0x01, |
2249 | LEFT = 0x02, | 2435 | LEFT = 0x02, |
2250 | EMERGENCY = 0x04, | ||
2251 | }; | 2436 | }; |
2252 | 2437 | ||
2253 | struct VehicleAreaConfig { | 2438 | struct VehicleAreaConfig { |
@@ -2321,9 +2506,6 @@ struct VehiclePropConfig { | |||
2321 | * events. | 2506 | * events. |
2322 | */ | 2507 | */ |
2323 | struct VehiclePropValue { | 2508 | struct VehiclePropValue { |
2324 | /** Property identifier */ | ||
2325 | int32_t prop; | ||
2326 | |||
2327 | /** Time is elapsed nanoseconds since boot */ | 2509 | /** Time is elapsed nanoseconds since boot */ |
2328 | int64_t timestamp; | 2510 | int64_t timestamp; |
2329 | 2511 | ||
@@ -2333,6 +2515,9 @@ struct VehiclePropValue { | |||
2333 | */ | 2515 | */ |
2334 | int32_t areaId; | 2516 | int32_t areaId; |
2335 | 2517 | ||
2518 | /** Property identifier */ | ||
2519 | int32_t prop; | ||
2520 | |||
2336 | /** Status of the property */ | 2521 | /** Status of the property */ |
2337 | VehiclePropertyStatus status; | 2522 | VehiclePropertyStatus status; |
2338 | 2523 | ||
@@ -2372,11 +2557,11 @@ enum VehicleIgnitionState : int32_t { | |||
2372 | /** Steering wheel is locked */ | 2557 | /** Steering wheel is locked */ |
2373 | LOCK = 1, | 2558 | LOCK = 1, |
2374 | 2559 | ||
2375 | /** | 2560 | /** |
2376 | * Steering wheel is not locked, engine and all accessories are OFF. If | 2561 | * Steering wheel is not locked, engine and all accessories are OFF. If |
2377 | * car can be in LOCK and OFF state at the same time than HAL must report | 2562 | * car can be in LOCK and OFF state at the same time than HAL must report |
2378 | * LOCK state. | 2563 | * LOCK state. |
2379 | */ | 2564 | */ |
2380 | OFF, | 2565 | OFF, |
2381 | 2566 | ||
2382 | /** | 2567 | /** |
@@ -2395,33 +2580,6 @@ enum VehicleIgnitionState : int32_t { | |||
2395 | START | 2580 | START |
2396 | }; | 2581 | }; |
2397 | 2582 | ||
2398 | |||
2399 | /** | ||
2400 | * Represent the operation where the current error has happened. | ||
2401 | */ | ||
2402 | enum VehiclePropertyOperation : int32_t { | ||
2403 | /** | ||
2404 | * Generic error to this property which is not tied to any operation. | ||
2405 | */ | ||
2406 | GENERIC = 0, | ||
2407 | |||
2408 | /** | ||
2409 | * Error happened while handling property set. | ||
2410 | */ | ||
2411 | SET = 1, | ||
2412 | |||
2413 | /** | ||
2414 | * Error happened while handling property get. | ||
2415 | */ | ||
2416 | GET = 2, | ||
2417 | |||
2418 | /** | ||
2419 | * Error happened while handling property subscription. | ||
2420 | */ | ||
2421 | SUBSCRIBE = 3, | ||
2422 | }; | ||
2423 | |||
2424 | |||
2425 | enum SubscribeFlags : int32_t { | 2583 | enum SubscribeFlags : int32_t { |
2426 | UNDEFINED = 0x0, | 2584 | UNDEFINED = 0x0, |
2427 | 2585 | ||
@@ -2429,15 +2587,13 @@ enum SubscribeFlags : int32_t { | |||
2429 | * Subscribe to event that was originated in vehicle HAL | 2587 | * Subscribe to event that was originated in vehicle HAL |
2430 | * (most likely this event came from the vehicle itself). | 2588 | * (most likely this event came from the vehicle itself). |
2431 | */ | 2589 | */ |
2432 | HAL_EVENT = 0x1, | 2590 | EVENTS_FROM_CAR = 0x1, |
2433 | 2591 | ||
2434 | /** | 2592 | /** |
2435 | * Use this flag to subscribe on events when IVehicle#set(...) was called by | 2593 | * Use this flag to subscribe on events when IVehicle#set(...) was called by |
2436 | * vehicle HAL's client (e.g. Car Service). | 2594 | * vehicle HAL's client (e.g. Car Service). |
2437 | */ | 2595 | */ |
2438 | SET_CALL = 0x2, | 2596 | EVENTS_FROM_ANDROID = 0x2, |
2439 | |||
2440 | DEFAULT = HAL_EVENT, | ||
2441 | }; | 2597 | }; |
2442 | 2598 | ||
2443 | /** | 2599 | /** |
@@ -2458,7 +2614,7 @@ struct SubscribeOptions { | |||
2458 | */ | 2614 | */ |
2459 | float sampleRate; | 2615 | float sampleRate; |
2460 | 2616 | ||
2461 | /** Flags that indicate what kind of events listen to. */ | 2617 | /** Flags that indicate to which event sources to listen. */ |
2462 | SubscribeFlags flags; | 2618 | SubscribeFlags flags; |
2463 | }; | 2619 | }; |
2464 | 2620 | ||
@@ -2748,11 +2904,11 @@ enum DiagnosticFloatSensorIndex : int32_t { | |||
2748 | ACCELERATOR_PEDAL_POSITION_E = 54, /* PID 0x4A */ | 2904 | ACCELERATOR_PEDAL_POSITION_E = 54, /* PID 0x4A */ |
2749 | ACCELERATOR_PEDAL_POSITION_F = 55, /* PID 0x4B */ | 2905 | ACCELERATOR_PEDAL_POSITION_F = 55, /* PID 0x4B */ |
2750 | COMMANDED_THROTTLE_ACTUATOR = 56, /* PID 0x4C */ | 2906 | COMMANDED_THROTTLE_ACTUATOR = 56, /* PID 0x4C */ |
2751 | ETHANOL_FUEL_PERCENTAGE = 57,/* PID 0x52 */ | 2907 | ETHANOL_FUEL_PERCENTAGE = 57, /* PID 0x52 */ |
2752 | ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58, /* PID 0x53 */ | 2908 | ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58, /* PID 0x53 */ |
2753 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59, /* PID 0x55 */ | 2909 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59, /* PID 0x55 */ |
2754 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60, /* PID 0x57 */ | 2910 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60, /* PID 0x57 */ |
2755 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,/* PID 0x55 */ | 2911 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61, /* PID 0x55 */ |
2756 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62, /* PID 0x57 */ | 2912 | SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62, /* PID 0x57 */ |
2757 | LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63, /* PID 0x56 */ | 2913 | LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63, /* PID 0x56 */ |
2758 | LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64, /* PID 0x58 */ | 2914 | LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64, /* PID 0x58 */ |
@@ -2978,7 +3134,7 @@ enum VmsSubscriptionsStateIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex | |||
2978 | * - Layer version | 3134 | * - Layer version |
2979 | * - Number of publisher IDs (N) | 3135 | * - Number of publisher IDs (N) |
2980 | * - N x publisher ID | 3136 | * - N x publisher ID |
2981 | */ | 3137 | */ |
2982 | enum VmsAvailabilityStateIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex { | 3138 | enum VmsAvailabilityStateIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex { |
2983 | SEQUENCE_NUMBER = 1, | 3139 | SEQUENCE_NUMBER = 1, |
2984 | NUMBER_OF_ASSOCIATED_LAYERS = 2, | 3140 | NUMBER_OF_ASSOCIATED_LAYERS = 2, |
diff --git a/compatibility_matrices/Android.mk b/compatibility_matrices/Android.mk index 23be7de2..948b4fe1 100644 --- a/compatibility_matrices/Android.mk +++ b/compatibility_matrices/Android.mk | |||
@@ -54,8 +54,8 @@ include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) | |||
54 | # TODO(b/72409164): STOPSHIP: update kernel version requirements | 54 | # TODO(b/72409164): STOPSHIP: update kernel version requirements |
55 | 55 | ||
56 | include $(CLEAR_VARS) | 56 | include $(CLEAR_VARS) |
57 | LOCAL_MODULE := framework_compatibility_matrix.current.xml | 57 | LOCAL_MODULE := framework_compatibility_matrix.3.xml |
58 | LOCAL_MODULE_STEM := compatibility_matrix.current.xml | 58 | LOCAL_MODULE_STEM := compatibility_matrix.3.xml |
59 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) | 59 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
60 | LOCAL_KERNEL_VERSIONS := 4.4.0 4.9.0 | 60 | LOCAL_KERNEL_VERSIONS := 4.4.0 4.9.0 |
61 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) | 61 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
@@ -116,7 +116,7 @@ LOCAL_REQUIRED_MODULES := \ | |||
116 | framework_compatibility_matrix.legacy.xml \ | 116 | framework_compatibility_matrix.legacy.xml \ |
117 | framework_compatibility_matrix.1.xml \ | 117 | framework_compatibility_matrix.1.xml \ |
118 | framework_compatibility_matrix.2.xml \ | 118 | framework_compatibility_matrix.2.xml \ |
119 | framework_compatibility_matrix.current.xml \ | 119 | framework_compatibility_matrix.3.xml \ |
120 | framework_compatibility_matrix.device.xml | 120 | framework_compatibility_matrix.device.xml |
121 | LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES)) | 121 | LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES)) |
122 | 122 | ||
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.3.xml index 6aa5fc51..6aa5fc51 100644 --- a/compatibility_matrices/compatibility_matrix.current.xml +++ b/compatibility_matrices/compatibility_matrix.3.xml | |||
diff --git a/current.txt b/current.txt index 096b6557..5aa62591 100644 --- a/current.txt +++ b/current.txt | |||
@@ -296,8 +296,8 @@ f2904a4c108ad1b93eb2fa4e43b82bd01ce1ff26156316e49d1d9fc80dfecaad android.hardwar | |||
296 | 14ef8e993a4a7c899b19bb5e39b5b0cafd28312ea2b127e35b3be8f08e23fe8e android.hardware.automotive.evs@1.0::IEvsEnumerator | 296 | 14ef8e993a4a7c899b19bb5e39b5b0cafd28312ea2b127e35b3be8f08e23fe8e android.hardware.automotive.evs@1.0::IEvsEnumerator |
297 | 3b17c1fdfc389e0abe626c37054954b07201127d890c2bc05d47613ec1f4de4f android.hardware.automotive.evs@1.0::types | 297 | 3b17c1fdfc389e0abe626c37054954b07201127d890c2bc05d47613ec1f4de4f android.hardware.automotive.evs@1.0::types |
298 | b3caf524c46a47d67e6453a34419e1881942d059e146cda740502670e9a752c3 android.hardware.automotive.vehicle@2.0::IVehicle | 298 | b3caf524c46a47d67e6453a34419e1881942d059e146cda740502670e9a752c3 android.hardware.automotive.vehicle@2.0::IVehicle |
299 | 80fb4156fa91ce86e49bd2cabe215078f6b69591d416a09e914532eae6712052 android.hardware.automotive.vehicle@2.0::IVehicleCallback | 299 | 7ce8728b27600e840cacf0a832f6942819fe535f9d3797ae052d5eef5065921c android.hardware.automotive.vehicle@2.0::IVehicleCallback |
300 | a7ac51f419107020b9544efb25e030485e5dc4914c5138c2b8d83a1f52a76825 android.hardware.automotive.vehicle@2.0::types | 300 | 848fb32d5ca79dd527d966e67c0af5874b6d7b361246b491e315cf7dea7888ab android.hardware.automotive.vehicle@2.0::types |
301 | 32cc50cc2a7658ec613c0c2dd2accbf6a05113b749852879e818b8b7b438db19 android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioHost | 301 | 32cc50cc2a7658ec613c0c2dd2accbf6a05113b749852879e818b8b7b438db19 android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioHost |
302 | ff4be64d7992f8bec97dff37f35450e79b3430c61f85f54322ce45bef229dc3b android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioOffload | 302 | ff4be64d7992f8bec97dff37f35450e79b3430c61f85f54322ce45bef229dc3b android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioOffload |
303 | 27f22d2e873e6201f9620cf4d8e2facb25bd0dd30a2b911e441b4600d560fa62 android.hardware.bluetooth.a2dp@1.0::types | 303 | 27f22d2e873e6201f9620cf4d8e2facb25bd0dd30a2b911e441b4600d560fa62 android.hardware.bluetooth.a2dp@1.0::types |
@@ -340,7 +340,7 @@ b8c7ed58aa8740361e63d0ce9e7c94227572a629f356958840b34809d2393a7c android.hardwar | |||
340 | e808a6f61cd7b47887c599d8843e67a2dcbf4ec5aadd5d22fdce93020070ef1b android.hardware.neuralnetworks@1.1::types | 340 | e808a6f61cd7b47887c599d8843e67a2dcbf4ec5aadd5d22fdce93020070ef1b android.hardware.neuralnetworks@1.1::types |
341 | 8d3d86da0bfa4bf070970d8303c659f67f35d670c287d45a3f542e4fedadd578 android.hardware.nfc@1.1::INfc | 341 | 8d3d86da0bfa4bf070970d8303c659f67f35d670c287d45a3f542e4fedadd578 android.hardware.nfc@1.1::INfc |
342 | e85f566698d2a2c28100e264fcf2c691a066756ddf8dd341d009ff50cfe10614 android.hardware.nfc@1.1::INfcClientCallback | 342 | e85f566698d2a2c28100e264fcf2c691a066756ddf8dd341d009ff50cfe10614 android.hardware.nfc@1.1::INfcClientCallback |
343 | 2b8f6165b3d350485eb89eb6e931cf876688cde9155f7b31a8d8fe7abdfe5b95 android.hardware.nfc@1.1::types | 343 | 5e278fcaa3287d397d8eebe1c22aaa28150f5caae1cf9381cd6dc32cb37899c5 android.hardware.nfc@1.1::types |
344 | 163e115e833fc1d77cdd4a8cf0c833bb8b8d74fe35c880fe693101d17774926f android.hardware.power@1.2::IPower | 344 | 163e115e833fc1d77cdd4a8cf0c833bb8b8d74fe35c880fe693101d17774926f android.hardware.power@1.2::IPower |
345 | 7899b9305587b2d5cd74a3cc87e9090f58bf4ae74256ce3ee36e7ec011822840 android.hardware.power@1.2::types | 345 | 7899b9305587b2d5cd74a3cc87e9090f58bf4ae74256ce3ee36e7ec011822840 android.hardware.power@1.2::types |
346 | ab132c990a62f0aca35871c092c22fb9c85d478e22124ef6a4d0a2302da76a9f android.hardware.radio@1.2::IRadio | 346 | ab132c990a62f0aca35871c092c22fb9c85d478e22124ef6a4d0a2302da76a9f android.hardware.radio@1.2::IRadio |
diff --git a/nfc/1.1/types.hal b/nfc/1.1/types.hal index 469e878d..e9ffd161 100644 --- a/nfc/1.1/types.hal +++ b/nfc/1.1/types.hal | |||
@@ -77,6 +77,9 @@ struct NfcConfig { | |||
77 | /** Default system code route. 0x00 if there aren't any. Refer NCI spec */ | 77 | /** Default system code route. 0x00 if there aren't any. Refer NCI spec */ |
78 | uint8_t defaultSystemCodeRoute; | 78 | uint8_t defaultSystemCodeRoute; |
79 | 79 | ||
80 | /** Default power state for system code route. 0x00 if there aren't any. Refer NCI spec */ | ||
81 | uint8_t defaultSystemCodePowerState; | ||
82 | |||
80 | /** | 83 | /** |
81 | * Default route for all remaining protocols and technology which haven't | 84 | * Default route for all remaining protocols and technology which haven't |
82 | * been configured. | 85 | * been configured. |