Support setting min/max value for all properties.
Reference VHAL now supports setting min/max value for all
int32/int64/float properties that has specfied hasMinSupportedValue
or hasMaxSupportedValue to true. The default min/max value comes
from static config. User may use VHAL debug command
set-minmaxvalue to change the min/max value.
Flag: EXEMPT VHAL
Test: atest FakeVehicleHardwareTest
Bug: 394692817
Manual test on gcar.
Change-Id: Ic05bf9f45c51c700670e9c6085ee03960be9cec7
diff --git a/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
index 90c53bd..2915cc1 100644
--- a/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
@@ -166,22 +166,38 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -191,22 +207,38 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -246,27 +278,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -281,27 +333,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -316,27 +388,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -351,27 +443,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -386,27 +498,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -421,27 +553,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -456,27 +608,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -491,27 +663,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -526,27 +718,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -561,27 +773,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -596,27 +828,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -631,27 +883,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -666,27 +938,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -701,27 +993,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -736,27 +1048,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -771,27 +1103,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -806,27 +1158,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -841,27 +1213,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -876,27 +1268,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -911,27 +1323,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -946,27 +1378,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -981,27 +1433,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1016,27 +1488,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1051,27 +1543,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1183,27 +1695,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1218,27 +1750,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1253,27 +1805,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1288,27 +1860,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1323,12 +1915,20 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 5
+ "maxInt32Value": 5,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 5
+ "maxInt32Value": 5,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -1674,22 +2274,38 @@
{
"areaId": "Constants::WHEEL_FRONT_LEFT",
"minFloatValue": 193.0,
- "maxFloatValue": 300.0
+ "maxFloatValue": 300.0,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WHEEL_FRONT_RIGHT",
"minFloatValue": 193.0,
- "maxFloatValue": 300.0
+ "maxFloatValue": 300.0,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WHEEL_REAR_LEFT",
"minFloatValue": 193.0,
- "maxFloatValue": 300.0
+ "maxFloatValue": 300.0,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WHEEL_REAR_RIGHT",
"minFloatValue": 193.0,
- "maxFloatValue": 300.0
+ "maxFloatValue": 300.0,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"comment": "Units in kpa",
@@ -1809,7 +2425,11 @@
},
"areaId": "Constants::WHEEL_FRONT_LEFT",
"minInt32Value": -100,
- "maxInt32Value": 100
+ "maxInt32Value": 100,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"defaultValue": {
@@ -1819,7 +2439,11 @@
},
"areaId": "Constants::WHEEL_FRONT_RIGHT",
"minInt32Value": -100,
- "maxInt32Value": 100
+ "maxInt32Value": 100,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"defaultValue": {
@@ -1829,7 +2453,11 @@
},
"areaId": "Constants::WHEEL_REAR_RIGHT",
"minInt32Value": -100,
- "maxInt32Value": 100
+ "maxInt32Value": 100,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"defaultValue": {
@@ -1839,7 +2467,11 @@
},
"areaId": "Constants::WHEEL_REAR_LEFT",
"minInt32Value": -100,
- "maxInt32Value": 100
+ "maxInt32Value": 100,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"maxSampleRate": 10.0,
@@ -1903,7 +2535,11 @@
{
"areaId": 0,
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2326,27 +2962,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 1,
- "maxInt32Value": 7
+ "maxInt32Value": 7,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 1,
- "maxInt32Value": 7
+ "maxInt32Value": 7,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": 1,
- "maxInt32Value": 7
+ "maxInt32Value": 7,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": 1,
- "maxInt32Value": 7
+ "maxInt32Value": 7,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": 1,
- "maxInt32Value": 7
+ "maxInt32Value": 7,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2418,27 +3074,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": 0,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"comment": "0 is off and +ve values indicate ventilation level."
@@ -2454,7 +3130,11 @@
{
"areaId": 0,
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"comment": "+ve values for heating and -ve for cooling"
@@ -2470,27 +3150,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"comment": "+ve values for heating and -ve for cooling"
@@ -2506,7 +3206,11 @@
{
"areaId": "Constants::MIRROR_DRIVER_LEFT_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2546,27 +3250,47 @@
{
"areaId": "Constants::SEAT_1_LEFT",
"minFloatValue": 17.5,
- "maxFloatValue": 32.5
+ "maxFloatValue": 32.5,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minFloatValue": 17.5,
- "maxFloatValue": 32.5
+ "maxFloatValue": 32.5,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minFloatValue": 17.5,
- "maxFloatValue": 32.5
+ "maxFloatValue": 32.5,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minFloatValue": 17.5,
- "maxFloatValue": 32.5
+ "maxFloatValue": 32.5,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minFloatValue": 17.5,
- "maxFloatValue": 32.5
+ "maxFloatValue": 32.5,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"comment":
@@ -2802,27 +3526,47 @@
{
"areaId": "Constants::DOOR_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::DOOR_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::DOOR_2_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::DOOR_2_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::DOOR_REAR",
"minInt32Value": 0,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2837,22 +3581,38 @@
{
"areaId": "Constants::DOOR_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::DOOR_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::DOOR_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::DOOR_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2867,17 +3627,29 @@
{
"areaId": "VehicleAreaMirror::DRIVER_LEFT",
"minInt32Value": -3,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_RIGHT",
"minInt32Value": -3,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_CENTER",
"minInt32Value": -3,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2892,17 +3664,29 @@
{
"areaId": "VehicleAreaMirror::DRIVER_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2917,17 +3701,29 @@
{
"areaId": "VehicleAreaMirror::DRIVER_LEFT",
"minInt32Value": -3,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_RIGHT",
"minInt32Value": -3,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_CENTER",
"minInt32Value": -3,
- "maxInt32Value": 3
+ "maxInt32Value": 3,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -2942,17 +3738,29 @@
{
"areaId": "VehicleAreaMirror::DRIVER_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaMirror::DRIVER_CENTER",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3022,27 +3830,47 @@
{
"areaId": "Constants::WINDOW_1_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_2_LEFT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_2_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_ROOF_TOP_1",
"minInt32Value": -10,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3057,27 +3885,47 @@
{
"areaId": "Constants::WINDOW_1_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_1_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_2_LEFT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_2_RIGHT",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "Constants::WINDOW_ROOF_TOP_1",
"minInt32Value": -1,
- "maxInt32Value": 1
+ "maxInt32Value": 1,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3092,12 +3940,20 @@
{
"areaId": "VehicleAreaWindow::FRONT_WINDSHIELD",
"minInt32Value": 0,
- "maxInt32Value": 3000
+ "maxInt32Value": 3000,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"areaId": "VehicleAreaWindow::REAR_WINDSHIELD",
"minInt32Value": 0,
- "maxInt32Value": 3000
+ "maxInt32Value": 3000,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3178,7 +4034,11 @@
{
"areaId": 0,
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3193,7 +4053,11 @@
{
"areaId": 0,
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3208,7 +4072,11 @@
{
"areaId": 0,
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3223,7 +4091,11 @@
{
"areaId": 0,
"minInt32Value": -2,
- "maxInt32Value": 2
+ "maxInt32Value": 2,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -3262,7 +4134,11 @@
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
- "maxInt32Value": 10
+ "maxInt32Value": 10,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -4565,7 +5441,11 @@
{
"areaId": 0,
"minFloatValue": 20.0,
- "maxFloatValue": 35.0
+ "maxFloatValue": 35.0,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
]
},
@@ -4596,7 +5476,11 @@
{
"areaId": 0,
"minInt32Value": 0,
- "maxInt32Value": 200000
+ "maxInt32Value": 200000,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"maxSampleRate": 10.0,
diff --git a/automotive/vehicle/aidl/impl/current/default_config/config/TestProperties.json b/automotive/vehicle/aidl/impl/current/default_config/config/TestProperties.json
index 83debf7..5779050 100644
--- a/automotive/vehicle/aidl/impl/current/default_config/config/TestProperties.json
+++ b/automotive/vehicle/aidl/impl/current/default_config/config/TestProperties.json
@@ -77,7 +77,11 @@
},
"areaId": "Constants::HVAC_LEFT",
"minFloatValue": -10.0,
- "maxFloatValue": 10.0
+ "maxFloatValue": 10.0,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
},
{
"defaultValue": {
@@ -87,7 +91,11 @@
},
"areaId": "Constants::HVAC_RIGHT",
"minFloatValue": -10.0,
- "maxFloatValue": 10.0
+ "maxFloatValue": 10.0,
+ "hasSupportedValueInfo": {
+ "hasMinSupportedValue": true,
+ "hasMaxSupportedValue": true
+ }
}
],
"access": "VehiclePropertyAccess::READ_WRITE",
@@ -103,6 +111,8 @@
]
},
"areaId": "VehicleAreaWindow::FRONT_WINDSHIELD",
+ "minInt32Value": -100,
+ "maxInt32Value": 100,
"hasSupportedValueInfo": {
"hasMinSupportedValue": true,
"hasMaxSupportedValue": true,
diff --git a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/include/FakeVehicleHardware.h b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/include/FakeVehicleHardware.h
index e20befc..b9d315a 100644
--- a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/include/FakeVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/include/FakeVehicleHardware.h
@@ -193,6 +193,13 @@
int32_t mMaxSupportedValueForTestIntProp GUARDED_BY(mLock) = 10;
std::vector<int32_t> mSupportedValuesListForTestIntProp GUARDED_BY(mLock) = {0, 2, 4, 6, 8, 10};
+ std::unordered_map<PropIdAreaId, aidl::android::hardware::automotive::vehicle::RawPropValues,
+ PropIdAreaIdHash>
+ mMinSupportedValueByPropIdAreaId GUARDED_BY(mLock);
+ std::unordered_map<PropIdAreaId, aidl::android::hardware::automotive::vehicle::RawPropValues,
+ PropIdAreaIdHash>
+ mMaxSupportedValueByPropIdAreaId GUARDED_BY(mLock);
+
// PendingRequestHandler is thread-safe.
mutable PendingRequestHandler<GetValuesCallback,
aidl::android::hardware::automotive::vehicle::GetValueRequest>
@@ -323,6 +330,15 @@
void triggerSupportedValueChange(
const aidl::android::hardware::automotive::vehicle::VehiclePropConfig& config)
EXCLUDES(mLock);
+ void triggerSupportedValueChange(int32_t propId, int32_t areaId) EXCLUDES(mLock);
+ template <class T>
+ void setMinSupportedValueLocked(int32_t propId, int32_t areaId, T minValue) REQUIRES(mLock);
+ template <class T>
+ void setMaxSupportedValueLocked(int32_t propId, int32_t areaId, T maxValue) REQUIRES(mLock);
+ template <class T>
+ android::base::Result<void> parseAndSetMinMaxValue(int32_t propId, int32_t areaId,
+ const std::vector<std::string>& options,
+ size_t index) EXCLUDES(mLock);
static aidl::android::hardware::automotive::vehicle::VehiclePropValue createHwInputKeyProp(
aidl::android::hardware::automotive::vehicle::VehicleHwKeyInputAction action,
@@ -355,6 +371,9 @@
size_t index);
static android::base::Result<int32_t> parseAreaId(const std::vector<std::string>& options,
size_t index, int32_t propId);
+ template <class T>
+ static android::base::Result<std::vector<T>> parseValues(
+ const std::vector<std::string>& options, size_t index);
};
} // namespace fake
diff --git a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp
index 01e40fb..c174e92 100644
--- a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -398,26 +398,128 @@
return configsByPropId;
}
+template <>
+void FakeVehicleHardware::setMinSupportedValueLocked(int32_t propId, int32_t areaId,
+ int32_t minValue) {
+ mMinSupportedValueByPropIdAreaId[PropIdAreaId{.propId = propId, .areaId = areaId}] =
+ RawPropValues{.int32Values = {minValue}};
+}
+
+template <>
+void FakeVehicleHardware::setMaxSupportedValueLocked(int32_t propId, int32_t areaId,
+ int32_t maxValue) {
+ mMaxSupportedValueByPropIdAreaId[PropIdAreaId{.propId = propId, .areaId = areaId}] =
+ RawPropValues{.int32Values = {maxValue}};
+}
+
+template <>
+void FakeVehicleHardware::setMinSupportedValueLocked(int32_t propId, int32_t areaId,
+ int64_t minValue) {
+ mMinSupportedValueByPropIdAreaId[PropIdAreaId{.propId = propId, .areaId = areaId}] =
+ RawPropValues{.int64Values = {minValue}};
+}
+
+template <>
+void FakeVehicleHardware::setMaxSupportedValueLocked(int32_t propId, int32_t areaId,
+ int64_t maxValue) {
+ mMaxSupportedValueByPropIdAreaId[PropIdAreaId{.propId = propId, .areaId = areaId}] =
+ RawPropValues{.int64Values = {maxValue}};
+}
+
+template <>
+void FakeVehicleHardware::setMinSupportedValueLocked(int32_t propId, int32_t areaId,
+ float minValue) {
+ mMinSupportedValueByPropIdAreaId[PropIdAreaId{.propId = propId, .areaId = areaId}] =
+ RawPropValues{.floatValues = {minValue}};
+}
+
+template <>
+void FakeVehicleHardware::setMaxSupportedValueLocked(int32_t propId, int32_t areaId,
+ float maxValue) {
+ mMaxSupportedValueByPropIdAreaId[PropIdAreaId{.propId = propId, .areaId = areaId}] =
+ RawPropValues{.floatValues = {maxValue}};
+}
+
void FakeVehicleHardware::init(int32_t s2rS2dConfig) {
maybeGetGrpcServiceInfo(&mPowerControllerServiceAddress);
- for (auto& [_, configDeclaration] : loadConfigDeclarations()) {
- VehiclePropConfig cfg = configDeclaration.config;
- VehiclePropertyStore::TokenFunction tokenFunction = nullptr;
+ {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ for (auto& [_, configDeclaration] : loadConfigDeclarations()) {
+ VehiclePropConfig cfg = configDeclaration.config;
+ VehiclePropertyStore::TokenFunction tokenFunction = nullptr;
- if (cfg.prop == toInt(VehicleProperty::AP_POWER_STATE_REQ)) {
- cfg.configArray[0] = s2rS2dConfig;
- } else if (cfg.prop == OBD2_FREEZE_FRAME) {
- tokenFunction = [](const VehiclePropValue& propValue) { return propValue.timestamp; };
- }
+ if (cfg.prop == toInt(VehicleProperty::AP_POWER_STATE_REQ)) {
+ cfg.configArray[0] = s2rS2dConfig;
+ } else if (cfg.prop == OBD2_FREEZE_FRAME) {
+ tokenFunction = [](const VehiclePropValue& propValue) {
+ return propValue.timestamp;
+ };
+ }
- mServerSidePropStore->registerProperty(cfg, tokenFunction);
- if (obd2frame::FakeObd2Frame::isDiagnosticProperty(cfg)) {
- // Ignore storing default value for diagnostic property. They have special get/set
- // logic.
- continue;
+ mServerSidePropStore->registerProperty(cfg, tokenFunction);
+ if (obd2frame::FakeObd2Frame::isDiagnosticProperty(cfg)) {
+ // Ignore storing default value for diagnostic property. They have special get/set
+ // logic.
+ continue;
+ }
+ storePropInitialValue(configDeclaration);
+
+ int32_t propertyType = cfg.prop & toInt(VehiclePropertyType::MASK);
+ for (const auto& areaConfig : cfg.areaConfigs) {
+ if (!areaConfig.hasSupportedValueInfo.has_value()) {
+ continue;
+ }
+ if (!areaConfig.hasSupportedValueInfo->hasMinSupportedValue &&
+ !areaConfig.hasSupportedValueInfo->hasMaxSupportedValue) {
+ continue;
+ }
+ if (areaConfig.hasSupportedValueInfo->hasMinSupportedValue) {
+ RawPropValues rawPropValues = {};
+ switch (propertyType) {
+ case toInt(VehiclePropertyType::INT32):
+ setMinSupportedValueLocked(cfg.prop, areaConfig.areaId,
+ areaConfig.minInt32Value);
+ break;
+ case toInt(VehiclePropertyType::INT64):
+ setMinSupportedValueLocked(cfg.prop, areaConfig.areaId,
+ areaConfig.minInt64Value);
+ break;
+ case toInt(VehiclePropertyType::FLOAT):
+ setMinSupportedValueLocked(cfg.prop, areaConfig.areaId,
+ areaConfig.minFloatValue);
+ break;
+ default:
+ ALOGE("hasMinSupportedValue must only be true for INT32, INT64 or "
+ "FLOAT "
+ "type property");
+ continue;
+ }
+ }
+ if (areaConfig.hasSupportedValueInfo->hasMaxSupportedValue) {
+ RawPropValues rawPropValues = {};
+ switch (propertyType) {
+ case toInt(VehiclePropertyType::INT32):
+ setMaxSupportedValueLocked(cfg.prop, areaConfig.areaId,
+ areaConfig.maxInt32Value);
+ break;
+ case toInt(VehiclePropertyType::INT64):
+ setMaxSupportedValueLocked(cfg.prop, areaConfig.areaId,
+ areaConfig.maxInt64Value);
+ break;
+ case toInt(VehiclePropertyType::FLOAT):
+ setMaxSupportedValueLocked(cfg.prop, areaConfig.areaId,
+ areaConfig.maxFloatValue);
+ break;
+ default:
+ ALOGE("hasMaxSupportedValue must only be true for INT32, INT64 or "
+ "FLOAT "
+ "type property");
+ continue;
+ }
+ }
+ }
}
- storePropInitialValue(configDeclaration);
}
// OBD2_LIVE_FRAME and OBD2_FREEZE_FRAME must be configured in default configs.
@@ -1800,38 +1902,122 @@
}
std::string FakeVehicleHardware::dumpSetMinMaxValue(const std::vector<std::string>& options) {
- if (auto result = checkArgumentsSize(options, /*minSize=*/3); !result.ok()) {
- return getErrorMsg(result);
+ // Requires at least --set-minmaxvalue <PropId> <MinValue> <MaxValue>
+ if (auto result = checkArgumentsSize(options, /*minSize=*/4); !result.ok()) {
+ return StringPrintf("Not enough arguments\n");
}
- int testPropId = toInt(TestVendorProperty::VENDOR_EXTENSION_INT_PROPERTY);
- auto configResult = mServerSidePropStore->getPropConfig(testPropId);
+ size_t index = 1;
+ const std::string& propIdStr = options[index];
+ auto maybePropId = parsePropId(options, index);
+ index++;
+ if (!maybePropId.ok()) {
+ return StringPrintf("Failed to set min/max supported value: propId not valid: %s\n",
+ propIdStr.c_str());
+ }
+ int32_t propId = maybePropId.value();
+ auto configResult = mServerSidePropStore->getPropConfig(propId);
if (!configResult.ok()) {
- return "Failed to set min/max supported value: VENDOR_EXTENSION_INT_PROPERTY not supported";
+ return "Failed to set min/max supported value: property not supported\n";
}
- int32_t values[2];
- for (size_t i = 1; i < 3; i++) {
- auto int32Result = safelyParseInt<int32_t>(i, options[i]);
- if (!int32Result.ok()) {
- return StringPrintf(
- "Failed to set min/max supported value: Value: \"%s\" is not a valid int: %s\n",
- options[i].c_str(), getErrorMsg(int32Result).c_str());
+ std::string areaIdStr = "0";
+ int32_t areaId = 0;
+ if (EqualsIgnoreCase(options[index], "-a")) {
+ index++;
+ if (index >= options.size()) {
+ return StringPrintf("Not enough arguments\n");
}
- values[i - 1] = int32Result.value();
+ areaIdStr = options[index];
+ auto maybeAreaId = parseAreaId(options, index, propId);
+ if (!maybeAreaId.ok()) {
+ return StringPrintf("Failed to set min/max supported value: areaId not valid: %s\n",
+ areaIdStr.c_str());
+ }
+ areaId = maybeAreaId.value();
+ index++;
}
- int32_t minValue = values[0];
- int32_t maxValue = values[1];
+
+ if (index + 1 >= options.size()) {
+ return StringPrintf("Not enough arguments\n");
+ }
+ Result<void> parseAndSetValueResult = {};
+ switch (propId & toInt(VehiclePropertyType::MASK)) {
+ case toInt(VehiclePropertyType::INT32):
+ parseAndSetValueResult =
+ parseAndSetMinMaxValue<int32_t>(propId, areaId, options, index);
+ break;
+ case toInt(VehiclePropertyType::INT64):
+ parseAndSetValueResult =
+ parseAndSetMinMaxValue<int64_t>(propId, areaId, options, index);
+ break;
+ case toInt(VehiclePropertyType::FLOAT):
+ parseAndSetValueResult = parseAndSetMinMaxValue<float>(propId, areaId, options, index);
+ break;
+ default:
+ return StringPrintf(
+ "Failed to set min/max supported value: only int32/int64/float type"
+ " property is supported\n");
+ }
+ if (!parseAndSetValueResult.ok()) {
+ return parseAndSetValueResult.error().message();
+ }
+
+ triggerSupportedValueChange(propId, areaId);
+ return StringPrintf("Min/Max supported value for propId: %s, areaId: %s set", propIdStr.c_str(),
+ areaIdStr.c_str());
+}
+
+template <class T>
+Result<void> FakeVehicleHardware::parseAndSetMinMaxValue(int32_t propId, int32_t areaId,
+ const std::vector<std::string>& options,
+ size_t index) {
+ auto valuesResult = parseValues<T>(options, index);
+ if (!valuesResult.ok()) {
+ return Error() << "Failed to set min/max supported value: "
+ << valuesResult.error().message();
+ }
+ T minValue = (*valuesResult)[0];
+ T maxValue = (*valuesResult)[1];
if (minValue > maxValue) {
- return StringPrintf("Failed to set min/max supported value: MinValue: %" PRId32
- " must not > MaxValue: %" PRId32,
- minValue, maxValue);
+ return Error() << "Failed to set min/max supported value: MinValue: " << minValue
+ << " must not > MaxValue: " << maxValue;
}
{
std::scoped_lock<std::mutex> lockGuard(mLock);
- mMinSupportedValueForTestIntProp = minValue;
- mMaxSupportedValueForTestIntProp = maxValue;
+ setMinSupportedValueLocked(propId, areaId, minValue);
+ setMaxSupportedValueLocked(propId, areaId, maxValue);
}
- triggerSupportedValueChange(configResult.value());
- return "Min/Max supported value for VENDOR_EXTENSION_INT_PROPERTY set";
+ return {};
+}
+
+template <class T>
+Result<std::vector<T>> FakeVehicleHardware::parseValues(const std::vector<std::string>& options,
+ size_t index) {
+ std::vector<T> values;
+ for (size_t i = index; i < index + 2; i++) {
+ auto result = safelyParseInt<T>(i, options[i]);
+ if (!result.ok()) {
+ return Error() << StringPrintf("Value: \"%s\" is not a valid int: %s",
+ options[i].c_str(), getErrorMsg(result).c_str());
+ }
+ values.push_back(result.value());
+ }
+ return values;
+}
+
+// This is a special version of parseValues for float type.
+template <>
+Result<std::vector<float>> FakeVehicleHardware::parseValues(const std::vector<std::string>& options,
+ size_t index) {
+ std::vector<float> values;
+ for (size_t i = index; i < index + 2; i++) {
+ auto result = safelyParseFloat(i, options[i]);
+ if (!result.ok()) {
+ return Error() << StringPrintf("Value: \"%s\" is not a valid float: %s",
+ options[i].c_str(), getErrorMsg(result).c_str());
+ }
+ values.push_back(result.value());
+ }
+ return values;
}
std::string FakeVehicleHardware::dumpSetSupportedValues(const std::vector<std::string>& options) {
@@ -1862,6 +2048,18 @@
return "Supported values list for VENDOR_EXTENSION_INT_PROPERTY set";
}
+void FakeVehicleHardware::triggerSupportedValueChange(int32_t propId, int32_t areaId) {
+ if (mOnSupportedValueChangeCallback == nullptr) {
+ ALOGE("onSupportedValueChangeCallback is not registered, ignore event");
+ return;
+ }
+
+ (*mOnSupportedValueChangeCallback)({PropIdAreaId{
+ .propId = propId,
+ .areaId = areaId,
+ }});
+}
+
// Triggers supported value change for all areaIds that specify hasSupportedValueInfo.
void FakeVehicleHardware::triggerSupportedValueChange(const VehiclePropConfig& config) {
if (mOnSupportedValueChangeCallback == nullptr) {
@@ -1892,8 +2090,8 @@
"The value arguments constructs a VehiclePropValue used in the getValue request. \n"
"--set <PROP_ID> [ValueArguments]: sets the value of property PROP_ID, the value "
"arguments constructs a VehiclePropValue used in the setValue request. \n"
- "--set-minmaxvalue <MIN_VALUE(int)> <MAX_VALUE(int)>: sets the min max supported value "
- "for VENDOR_EXTENSION_INT_PROPERTY\n"
+ "--set-minmaxvalue <PROP_ID> [-a AREA_ID] <MIN_VALUE> <MAX_VALUE>: sets the min max "
+ "supported value e.g. --set-minmaxvalue HVAC_TEMPERATURE_SET -a ROW_1_LEFT -5.1 5.1\n"
"--set-supportedvalues <VALUE_1(int)> [VALUE_2(int) ...]: sets the supported values list"
"for VENDOR_EXTENSION_INT_PROPERTY\n"
"--save-prop <PROP_ID> [-a AREA_ID]: saves the current value for PROP_ID, integration "
@@ -2405,27 +2603,24 @@
const std::vector<PropIdAreaId>& propIdAreaIds) {
std::scoped_lock<std::mutex> lockGuard(mLock);
std::vector<MinMaxSupportedValueResult> results;
- // We only support VENDOR_EXTENSION_INT_PROPERTY
for (const auto& propIdAreaId : propIdAreaIds) {
- int propId = propIdAreaId.propId;
- int areaId = propIdAreaId.areaId;
- if (propId != toInt(TestVendorProperty::VENDOR_EXTENSION_INT_PROPERTY)) {
+ const auto minIt = mMinSupportedValueByPropIdAreaId.find(propIdAreaId);
+ const auto maxIt = mMaxSupportedValueByPropIdAreaId.find(propIdAreaId);
+ if (minIt == mMinSupportedValueByPropIdAreaId.end() &&
+ maxIt == mMaxSupportedValueByPropIdAreaId.end()) {
results.push_back(MinMaxSupportedValueResult{
.status = StatusCode::INVALID_ARG,
});
continue;
}
- results.push_back(MinMaxSupportedValueResult{
- .status = StatusCode::OK,
- .minSupportedValue =
- RawPropValues{
- .int32Values = {mMinSupportedValueForTestIntProp},
- },
- .maxSupportedValue =
- RawPropValues{
- .int32Values = {mMaxSupportedValueForTestIntProp},
- },
- });
+ auto result = MinMaxSupportedValueResult{.status = StatusCode::OK};
+ if (minIt != mMinSupportedValueByPropIdAreaId.end()) {
+ result.minSupportedValue = minIt->second;
+ }
+ if (maxIt != mMaxSupportedValueByPropIdAreaId.end()) {
+ result.maxSupportedValue = maxIt->second;
+ }
+ results.push_back(std::move(result));
}
return results;
}
diff --git a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
index df5c2a3..617d2d2 100644
--- a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -399,15 +399,15 @@
};
VehiclePropValue leftHvacTemp = {
+ .areaId = SEAT_1_LEFT,
.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_CURRENT),
.value = {.floatValues = {170.0}},
- .areaId = SEAT_1_LEFT,
};
VehiclePropValue rightHvacTemp = {
+ .areaId = SEAT_1_RIGHT,
.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_CURRENT),
.value = {.floatValues = {180.0}},
- .areaId = SEAT_1_RIGHT,
};
return {oilLevel, leftHvacTemp, rightHvacTemp};
@@ -534,8 +534,8 @@
for (auto areaConfig : config.config.areaConfigs) {
StatusCode status = StatusCode::OK;
VehiclePropValue propValue{
- .prop = propId,
.areaId = areaConfig.areaId,
+ .prop = propId,
};
if (config.initialAreaValues.empty()) {
if (config.initialValue == RawPropValues{}) {
@@ -790,12 +790,12 @@
// If we set the value, it should update despite the override.
ASSERT_EQ(setValue(VehiclePropValue{
+ .timestamp = elapsedRealtimeNano(),
.prop = gearProp,
.value =
{
.int32Values = {5},
},
- .timestamp = elapsedRealtimeNano(),
}),
StatusCode::OK)
<< "expect to set the overridden property ok";
@@ -821,8 +821,8 @@
int hvacProp = toInt(VehicleProperty::HVAC_TEMPERATURE_SET);
auto result = getValue(VehiclePropValue{
- .prop = hvacProp,
.areaId = HVAC_LEFT,
+ .prop = hvacProp,
});
ASSERT_TRUE(result.ok()) << "expect to get the overridden property ok: " << getStatus(result);
@@ -1247,16 +1247,16 @@
.value.int32Values = {0},
},
VehiclePropValue{
+ .areaId = toInt(VehicleAreaMirror::DRIVER_LEFT),
.prop = toInt(
VehicleProperty::BLIND_SPOT_WARNING_STATE),
- .areaId = toInt(VehicleAreaMirror::DRIVER_LEFT),
.value.int32Values = {toInt(
ErrorState::NOT_AVAILABLE_DISABLED)},
},
VehiclePropValue{
+ .areaId = toInt(VehicleAreaMirror::DRIVER_RIGHT),
.prop = toInt(
VehicleProperty::BLIND_SPOT_WARNING_STATE),
- .areaId = toInt(VehicleAreaMirror::DRIVER_RIGHT),
.value.int32Values = {toInt(
ErrorState::NOT_AVAILABLE_DISABLED)},
},
@@ -1280,15 +1280,15 @@
.value.int32Values = {1},
},
VehiclePropValue{
+ .areaId = toInt(VehicleAreaMirror::DRIVER_LEFT),
.prop = toInt(
VehicleProperty::BLIND_SPOT_WARNING_STATE),
- .areaId = toInt(VehicleAreaMirror::DRIVER_LEFT),
.value.int32Values = {1},
},
VehiclePropValue{
+ .areaId = toInt(VehicleAreaMirror::DRIVER_RIGHT),
.prop = toInt(
VehicleProperty::BLIND_SPOT_WARNING_STATE),
- .areaId = toInt(VehicleAreaMirror::DRIVER_RIGHT),
.value.int32Values = {1},
},
},
@@ -1757,7 +1757,7 @@
std::vector<VehiclePropValue> gotValues;
for (const auto& value : tc.expectedValuesToGet) {
- auto result = getValue(VehiclePropValue{.prop = value.prop, .areaId = value.areaId});
+ auto result = getValue(VehiclePropValue{.areaId = value.areaId, .prop = value.prop});
ASSERT_TRUE(result.ok()) << "failed to get property " << value.prop
<< " status:" << getStatus(result);
@@ -1880,8 +1880,8 @@
for (auto& hvacPowerOnAreaConfig : hvacPowerOnConfig->areaConfigs) {
int hvacPowerAreaId = hvacPowerOnAreaConfig.areaId;
// Turn off HVAC_POWER_ON for only 1 area ID
- StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = hvacPowerAreaId,
+ StatusCode status = setValue(VehiclePropValue{.areaId = hvacPowerAreaId,
+ .prop = toInt(VehicleProperty::HVAC_POWER_ON),
.value.int32Values = {0}});
EXPECT_EQ(status, StatusCode::OK);
@@ -1895,8 +1895,8 @@
for (auto& powerPropAreaConfig : powerPropConfig->areaConfigs) {
int powerDependentAreaId = powerPropAreaConfig.areaId;
auto getValueResult = getValue(VehiclePropValue{
- .prop = powerPropId,
.areaId = powerDependentAreaId,
+ .prop = powerPropId,
});
// If the current area ID is contained within the HVAC_POWER_ON area ID
@@ -1914,8 +1914,8 @@
// Resetting HVAC_POWER_ON at areaId back to ON state to ensure that there's no dependence
// on this value from any power dependent property values other than those with the same
// areaId.
- setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = hvacPowerAreaId,
+ setValue(VehiclePropValue{.areaId = hvacPowerAreaId,
+ .prop = toInt(VehicleProperty::HVAC_POWER_ON),
.value.int32Values = {1}});
}
}
@@ -1927,8 +1927,8 @@
for (auto& hvacPowerOnAreaConfig : hvacPowerOnConfig->areaConfigs) {
int hvacPowerAreaId = hvacPowerOnAreaConfig.areaId;
// Turn off HVAC_POWER_ON for only 1 area ID
- StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = hvacPowerAreaId,
+ StatusCode status = setValue(VehiclePropValue{.areaId = hvacPowerAreaId,
+ .prop = toInt(VehicleProperty::HVAC_POWER_ON),
.value.int32Values = {0}});
EXPECT_EQ(status, StatusCode::OK);
@@ -1942,7 +1942,7 @@
// Try setting a value at each area ID supported by the power dependent property
for (auto& powerPropAreaConfig : powerPropConfig->areaConfigs) {
int powerDependentAreaId = powerPropAreaConfig.areaId;
- auto val = VehiclePropValue{.prop = powerPropId, .areaId = powerDependentAreaId};
+ auto val = VehiclePropValue{.areaId = powerDependentAreaId, .prop = powerPropId};
if (propType == VehiclePropertyType::FLOAT) {
val.value.floatValues.emplace_back(20);
} else {
@@ -1964,8 +1964,8 @@
// Resetting HVAC_POWER_ON at areaId back to ON state to ensure that there's no dependence
// on this value from any power dependent property values other than those with the same
// areaId.
- setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = hvacPowerAreaId,
+ setValue(VehiclePropValue{.areaId = hvacPowerAreaId,
+ .prop = toInt(VehicleProperty::HVAC_POWER_ON),
.value.int32Values = {1}});
}
}
@@ -1976,8 +1976,8 @@
EXPECT_NE(hvacPowerOnConfig, nullptr);
for (auto& hvacPowerOnAreaConfig : hvacPowerOnConfig->areaConfigs) {
int hvacPowerAreaId = hvacPowerOnAreaConfig.areaId;
- StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = hvacPowerAreaId,
+ StatusCode status = setValue(VehiclePropValue{.areaId = hvacPowerAreaId,
+ .prop = toInt(VehicleProperty::HVAC_POWER_ON),
.value.int32Values = {0}});
EXPECT_EQ(status, StatusCode::OK);
auto events = getChangedProperties();
@@ -1992,8 +1992,8 @@
}
clearChangedProperties();
- status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = hvacPowerAreaId,
+ status = setValue(VehiclePropValue{.areaId = hvacPowerAreaId,
+ .prop = toInt(VehicleProperty::HVAC_POWER_ON),
.value.int32Values = {1}});
EXPECT_EQ(status, StatusCode::OK);
events = getChangedProperties();
@@ -2024,8 +2024,8 @@
for (auto& hvacDualOnConfig : hvacDualOnConfig->areaConfigs) {
int32_t hvacDualOnAreaId = hvacDualOnConfig.areaId;
subscribe(toInt(VehicleProperty::HVAC_DUAL_ON), hvacDualOnAreaId, /*sampleRateHz*/ 0);
- StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_DUAL_ON),
- .areaId = hvacDualOnAreaId,
+ StatusCode status = setValue(VehiclePropValue{.areaId = hvacDualOnAreaId,
+ .prop = toInt(VehicleProperty::HVAC_DUAL_ON),
.value.int32Values = {1}});
EXPECT_EQ(status, StatusCode::OK);
@@ -2056,8 +2056,8 @@
continue;
}
float expectedValue = 25;
- status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET),
- .areaId = hvacTemperatureSetAreaId,
+ status = setValue(VehiclePropValue{.areaId = hvacTemperatureSetAreaId,
+ .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET),
.value.floatValues = {expectedValue}});
EXPECT_EQ(status, StatusCode::OK);
events = getChangedProperties();
@@ -2069,8 +2069,8 @@
clearChangedProperties();
}
- status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_DUAL_ON),
- .areaId = hvacDualOnAreaId,
+ status = setValue(VehiclePropValue{.areaId = hvacDualOnAreaId,
+ .prop = toInt(VehicleProperty::HVAC_DUAL_ON),
.value.int32Values = {0}});
EXPECT_EQ(status, StatusCode::OK);
@@ -2090,8 +2090,8 @@
continue;
}
float expectedValue = 24;
- status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET),
- .areaId = hvacTemperatureSetAreaId,
+ status = setValue(VehiclePropValue{.areaId = hvacTemperatureSetAreaId,
+ .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_SET),
.value.floatValues = {expectedValue}});
EXPECT_EQ(status, StatusCode::OK);
events = getChangedProperties();
@@ -2354,8 +2354,8 @@
// This is the same example as used in User HAL Emulation doc.
VehiclePropValue valueToSet = {
- .prop = toInt(VehicleProperty::USER_IDENTIFICATION_ASSOCIATION),
.areaId = 1,
+ .prop = toInt(VehicleProperty::USER_IDENTIFICATION_ASSOCIATION),
.value.int32Values = {666, 1, 1, 2},
};
@@ -2390,8 +2390,8 @@
// This is the same example as used in User HAL Emulation doc.
VehiclePropValue valueToSet = {
- .prop = propSwitchUser,
.areaId = 1,
+ .prop = propSwitchUser,
.value.int32Values = {666, 3, 2},
};
@@ -2401,8 +2401,8 @@
// Simulate a request from Android side.
VehiclePropValue switchUserRequest = {
- .prop = propSwitchUser,
.areaId = 0,
+ .prop = propSwitchUser,
.value.int32Values = {666, 3},
};
// Clear existing events.
@@ -2455,8 +2455,8 @@
// This is the same example as used in User HAL Emulation doc.
VehiclePropValue valueToSet = {
- .prop = toInt(VehicleProperty::CREATE_USER),
.areaId = 1,
+ .prop = toInt(VehicleProperty::CREATE_USER),
.value.int32Values = {666, 2},
};
@@ -2466,8 +2466,8 @@
// Simulate a request from Android side.
VehiclePropValue createUserRequest = {
- .prop = propCreateUser,
.areaId = 0,
+ .prop = propCreateUser,
.value.int32Values = {666},
};
// Clear existing events.
@@ -2517,8 +2517,8 @@
// This is the same example as used in User HAL Emulation doc.
VehiclePropValue valueToSet = {
- .prop = propInitialUserInfo,
.areaId = 1,
+ .prop = propInitialUserInfo,
.value.int32Values = {666, 1, 11},
};
@@ -2528,8 +2528,8 @@
// Simulate a request from Android side.
VehiclePropValue initialUserInfoRequest = {
- .prop = propInitialUserInfo,
.areaId = 0,
+ .prop = propInitialUserInfo,
.value.int32Values = {3},
};
// Clear existing events.
@@ -2697,8 +2697,8 @@
ASSERT_THAT(result.buffer, ContainsRegex("saved"));
ASSERT_EQ(setValue(VehiclePropValue{
- .prop = prop,
.areaId = WHEEL_FRONT_LEFT,
+ .prop = prop,
.value =
{
.floatValues = {210.0},
@@ -2711,7 +2711,7 @@
ASSERT_FALSE(result.callerShouldDumpState);
ASSERT_THAT(result.buffer, ContainsRegex("restored"));
- auto getResult = getValue(VehiclePropValue{.prop = prop, .areaId = WHEEL_FRONT_LEFT});
+ auto getResult = getValue(VehiclePropValue{.areaId = WHEEL_FRONT_LEFT, .prop = prop});
ASSERT_TRUE(getResult.ok());
// The default value is 200.0.
@@ -2761,8 +2761,9 @@
"response\nNo SetUserIdentificationAssociation response\n"));
}
-TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue) {
- std::vector<std::string> options = {"--set-minmaxvalue", "1", "100"};
+TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue_Int) {
+ std::vector<std::string> options = {
+ "--set-minmaxvalue", "SEAT_MEMORY_SELECT", "-a", "ROW_1_LEFT", "1", "4"};
std::vector<PropIdAreaId> changedPropIdAreaIds;
getHardware()->registerSupportedValueChangeCallback(
@@ -2776,30 +2777,116 @@
ASSERT_THAT(result.buffer, ContainsRegex("Min/Max supported value .* set"));
ASSERT_EQ(changedPropIdAreaIds.size(), 1u);
+ EXPECT_EQ(changedPropIdAreaIds[0], (PropIdAreaId{
+ .propId = toInt(VehicleProperty::SEAT_MEMORY_SELECT),
+ .areaId = toInt(VehicleAreaSeat::ROW_1_LEFT),
+ }));
- auto results = getHardware()->getMinMaxSupportedValues({PropIdAreaId{
- .propId = toInt(TestVendorProperty::VENDOR_EXTENSION_INT_PROPERTY), .areaId = 0}});
+ auto results = getHardware()->getMinMaxSupportedValues({changedPropIdAreaIds[0]});
ASSERT_EQ(results.size(), 1u);
EXPECT_EQ(results[0].status, StatusCode::OK);
EXPECT_EQ(results[0].minSupportedValue.value(), RawPropValues{.int32Values = {1}});
- EXPECT_EQ(results[0].maxSupportedValue.value(), RawPropValues{.int32Values = {100}});
+ EXPECT_EQ(results[0].maxSupportedValue.value(), RawPropValues{.int32Values = {4}});
+}
+
+TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue_forGlobalProperty) {
+ // -a can be emitted for global property
+ std::vector<std::string> options = {"--set-minmaxvalue", "EV_BRAKE_REGENERATION_LEVEL", "1",
+ "4"};
+ std::vector<PropIdAreaId> changedPropIdAreaIds;
+
+ getHardware()->registerSupportedValueChangeCallback(
+ std::make_unique<IVehicleHardware::SupportedValueChangeCallback>(
+ [&changedPropIdAreaIds](std::vector<PropIdAreaId> propIdAreaIds) {
+ changedPropIdAreaIds = propIdAreaIds;
+ }));
+
+ DumpResult result = getHardware()->dump(options);
+ ASSERT_FALSE(result.callerShouldDumpState);
+ ASSERT_THAT(result.buffer, ContainsRegex("Min/Max supported value .* set"));
+
+ ASSERT_EQ(changedPropIdAreaIds.size(), 1u);
+ EXPECT_EQ(changedPropIdAreaIds[0],
+ (PropIdAreaId{
+ .propId = toInt(VehicleProperty::EV_BRAKE_REGENERATION_LEVEL),
+ .areaId = 0,
+ }));
+
+ auto results = getHardware()->getMinMaxSupportedValues({changedPropIdAreaIds[0]});
+
+ ASSERT_EQ(results.size(), 1u);
+ EXPECT_EQ(results[0].status, StatusCode::OK);
+ EXPECT_EQ(results[0].minSupportedValue.value(), RawPropValues{.int32Values = {1}});
+ EXPECT_EQ(results[0].maxSupportedValue.value(), RawPropValues{.int32Values = {4}});
+}
+
+TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue_Float) {
+ std::vector<std::string> options = {
+ "--set-minmaxvalue", "HVAC_TEMPERATURE_SET", "-a", "ROW_1_LEFT", "-5.1", "5.1"};
+ std::vector<PropIdAreaId> changedPropIdAreaIds;
+
+ getHardware()->registerSupportedValueChangeCallback(
+ std::make_unique<IVehicleHardware::SupportedValueChangeCallback>(
+ [&changedPropIdAreaIds](std::vector<PropIdAreaId> propIdAreaIds) {
+ changedPropIdAreaIds = propIdAreaIds;
+ }));
+
+ DumpResult result = getHardware()->dump(options);
+ ASSERT_FALSE(result.callerShouldDumpState);
+ ASSERT_THAT(result.buffer, ContainsRegex("Min/Max supported value .* set"));
+
+ ASSERT_EQ(changedPropIdAreaIds.size(), 1u);
+ EXPECT_EQ(changedPropIdAreaIds[0],
+ (PropIdAreaId{
+ .propId = toInt(VehicleProperty::HVAC_TEMPERATURE_SET),
+ .areaId = toInt(VehicleAreaSeat::ROW_1_LEFT),
+ }));
+
+ auto results = getHardware()->getMinMaxSupportedValues({changedPropIdAreaIds[0]});
+
+ ASSERT_EQ(results.size(), 1u);
+ EXPECT_EQ(results[0].status, StatusCode::OK);
+ EXPECT_EQ(results[0].minSupportedValue.value(), RawPropValues{.floatValues = {-5.1}});
+ EXPECT_EQ(results[0].maxSupportedValue.value(), RawPropValues{.floatValues = {5.1}});
+}
+
+TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue_notEnoughArguments) {
+ std::vector<std::string> options = {"--set-minmaxvalue", "SEAT_MEMORY_SELECT"};
+
+ DumpResult result = getHardware()->dump(options);
+ ASSERT_THAT(result.buffer, ContainsRegex("Not enough arguments"));
+
+ options = {"--set-minmaxvalue", "SEAT_MEMORY_SELECT", "2"};
+
+ result = getHardware()->dump(options);
+ ASSERT_THAT(result.buffer, ContainsRegex("Not enough arguments"));
+}
+
+TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue_notEnoughArguments_missingMax) {
+ std::vector<std::string> options = {"--set-minmaxvalue", "SEAT_MEMORY_SELECT", "-a",
+ "ROW_1_LEFT", "2"};
+
+ DumpResult result = getHardware()->dump(options);
+ ASSERT_THAT(result.buffer, ContainsRegex("Not enough arguments"));
}
TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue_invalidInt) {
- std::vector<std::string> options = {"--set-minmaxvalue", "abc", "100"};
+ std::vector<std::string> options = {
+ "--set-minmaxvalue", "HVAC_TEMPERATURE_SET", "-a", "ROW_1_LEFT", "abc", "100"};
DumpResult result = getHardware()->dump(options);
ASSERT_THAT(result.buffer, ContainsRegex("Failed"));
- options = {"--set-minmaxvalue", "1", "abc"};
+ options = {"--set-minmaxvalue", "HVAC_TEMPERATURE_SET", "-a", "ROW_1_LEFT", "100", "abc"};
result = getHardware()->dump(options);
ASSERT_THAT(result.buffer, ContainsRegex("Failed"));
}
TEST_F(FakeVehicleHardwareTest, testDumpSetMinMaxValue_minLargerThanMax) {
- std::vector<std::string> options = {"--set-minmaxvalue", "2", "1"};
+ std::vector<std::string> options = {
+ "--set-minmaxvalue", "SEAT_MEMORY_SELECT", "-a", "ROW_1_LEFT", "2", "1"};
DumpResult result = getHardware()->dump(options);
ASSERT_THAT(result.buffer, ContainsRegex("Failed"));
@@ -3569,15 +3656,15 @@
ASSERT_EQ(status, StatusCode::OK) << "failed to subscribe";
status = setValue({
- .prop = propSpeed,
.areaId = 0,
+ .prop = propSpeed,
.value.floatValues = {1.1f},
});
ASSERT_EQ(status, StatusCode::OK) << "failed to set speed";
status = setValue({
- .prop = propSpeed,
.areaId = 0,
+ .prop = propSpeed,
.value.floatValues = {1.2f},
});
ASSERT_EQ(status, StatusCode::OK) << "failed to set speed";
@@ -3604,8 +3691,8 @@
ASSERT_EQ(status, StatusCode::OK) << "failed to subscribe";
status = setValue({
- .prop = propHvac,
.areaId = areaId,
+ .prop = propHvac,
.value.floatValues = {20.0f},
});
ASSERT_EQ(status, StatusCode::OK) << "failed to set hvac value";
@@ -3615,8 +3702,8 @@
clearChangedProperties();
status = setValue({
- .prop = propHvac,
.areaId = areaId,
+ .prop = propHvac,
.value.floatValues = {21.0f},
});
ASSERT_EQ(status, StatusCode::OK) << "failed to set hvac value";
@@ -3629,8 +3716,8 @@
ASSERT_EQ(status, StatusCode::OK);
status = setValue({
- .prop = propHvac,
.areaId = areaId,
+ .prop = propHvac,
.value.floatValues = {22.0f},
});
ASSERT_EQ(status, StatusCode::OK) << "failed to set hvac value";
@@ -3655,31 +3742,31 @@
subscribe(propHvacTempValueSuggest, HVAC_ALL, /*sampleRateHz*/ 0);
VehiclePropValue floatArraySizeFour = {
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {0, CELSIUS, 0, 0},
};
StatusCode status = setValue(floatArraySizeFour);
EXPECT_EQ(status, StatusCode::OK);
VehiclePropValue floatArraySizeZero = {
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
};
status = setValue(floatArraySizeZero);
EXPECT_EQ(status, StatusCode::INVALID_ARG);
VehiclePropValue floatArraySizeFive = {
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {0, CELSIUS, 0, 0, 0},
};
status = setValue(floatArraySizeFive);
EXPECT_EQ(status, StatusCode::INVALID_ARG);
VehiclePropValue invalidUnit = {
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {0, 0, 0, 0},
};
status = setValue(invalidUnit);
@@ -3709,16 +3796,16 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInCelsius, CELSIUS, 0, 0},
},
},
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInCelsius, CELSIUS,
minTempInCelsius,
minTempInFahrenheit},
@@ -3730,8 +3817,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInFahrenheit, FAHRENHEIT,
0, 0},
},
@@ -3739,8 +3826,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInFahrenheit, FAHRENHEIT,
minTempInCelsius,
minTempInFahrenheit},
@@ -3752,16 +3839,16 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInCelsius, CELSIUS, 0, 0},
},
},
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInCelsius, CELSIUS,
maxTempInCelsius,
maxTempInFahrenheit},
@@ -3773,8 +3860,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInFahrenheit, FAHRENHEIT,
0, 0},
},
@@ -3782,8 +3869,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInFahrenheit, FAHRENHEIT,
maxTempInCelsius,
maxTempInFahrenheit},
@@ -3795,8 +3882,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInCelsius - 1, CELSIUS, 0,
0},
},
@@ -3804,8 +3891,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInCelsius - 1, CELSIUS,
minTempInCelsius,
minTempInFahrenheit},
@@ -3817,8 +3904,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInFahrenheit - 1,
FAHRENHEIT, 0, 0},
},
@@ -3826,8 +3913,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInFahrenheit - 1,
FAHRENHEIT, minTempInCelsius,
minTempInFahrenheit},
@@ -3839,8 +3926,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInCelsius + 1, CELSIUS, 0,
0},
},
@@ -3848,8 +3935,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInCelsius + 1, CELSIUS,
maxTempInCelsius,
maxTempInFahrenheit},
@@ -3861,8 +3948,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInFahrenheit + 1,
FAHRENHEIT, 0, 0},
},
@@ -3870,8 +3957,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {maxTempInFahrenheit + 1,
FAHRENHEIT, maxTempInCelsius,
maxTempInFahrenheit},
@@ -3883,8 +3970,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInCelsius +
incrementInCelsius * 2.5f,
CELSIUS, 0, 0},
@@ -3893,8 +3980,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues =
{minTempInCelsius + incrementInCelsius * 2.5f,
CELSIUS,
@@ -3909,8 +3996,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues = {minTempInFahrenheit +
incrementInFahrenheit *
2.5f,
@@ -3920,8 +4007,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = propHvacTempValueSuggest,
.areaId = HVAC_ALL,
+ .prop = propHvacTempValueSuggest,
.value.floatValues =
{minTempInFahrenheit +
incrementInFahrenheit * 2.5f,
@@ -3968,9 +4055,10 @@
TEST_F(FakeVehicleHardwareTest, testGetMinMaxSupportedValues) {
auto results = getHardware()->getMinMaxSupportedValues({
- PropIdAreaId{.propId = toInt(TestVendorProperty::VENDOR_EXTENSION_INT_PROPERTY),
- .areaId = 0},
- PropIdAreaId{.propId = toInt(VehicleProperty::HVAC_TEMPERATURE_SET), .areaId = 0},
+ PropIdAreaId{.propId = toInt(VehicleProperty::SEAT_MEMORY_SELECT),
+ .areaId = toInt(VehicleAreaSeat::ROW_1_LEFT)},
+ // This property does not specify min/max value
+ PropIdAreaId{.propId = toInt(VehicleProperty::EV_BATTERY_DISPLAY_UNITS), .areaId = 0},
});
ASSERT_EQ(results.size(), 2u);
@@ -3978,7 +4066,7 @@
EXPECT_NE(results[0].minSupportedValue, std::nullopt);
EXPECT_EQ(results[0].minSupportedValue.value(), RawPropValues{.int32Values = {0}});
EXPECT_NE(results[0].maxSupportedValue, std::nullopt);
- EXPECT_EQ(results[0].maxSupportedValue.value(), RawPropValues{.int32Values = {10}});
+ EXPECT_EQ(results[0].maxSupportedValue.value(), RawPropValues{.int32Values = {3}});
EXPECT_EQ(results[1].status, StatusCode::INVALID_ARG);
}
diff --git a/automotive/vehicle/aidl/impl/current/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp b/automotive/vehicle/aidl/impl/current/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp
index c40004a..7bdfd02 100644
--- a/automotive/vehicle/aidl/impl/current/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp
+++ b/automotive/vehicle/aidl/impl/current/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp
@@ -80,6 +80,17 @@
}
}
protoACfg->set_support_variable_update_rate(areaConfig.supportVariableUpdateRate);
+ if (areaConfig.hasSupportedValueInfo.has_value()) {
+ // Creates the has_supported_value_info field.
+ proto::HasSupportedValueInfo* hasSupportedValueInfoProto =
+ protoACfg->mutable_has_supported_value_info();
+ hasSupportedValueInfoProto->set_has_min_supported_value(
+ areaConfig.hasSupportedValueInfo->hasMinSupportedValue);
+ hasSupportedValueInfoProto->set_has_max_supported_value(
+ areaConfig.hasSupportedValueInfo->hasMaxSupportedValue);
+ hasSupportedValueInfoProto->set_has_supported_values_list(
+ areaConfig.hasSupportedValueInfo->hasSupportedValuesList);
+ }
}
}
@@ -96,13 +107,13 @@
auto cast_to_acfg = [](const proto::VehicleAreaConfig& protoAcfg) {
auto vehicleAreaConfig = aidl_vehicle::VehicleAreaConfig{
.areaId = protoAcfg.area_id(),
- .access = static_cast<aidl_vehicle::VehiclePropertyAccess>(protoAcfg.access()),
.minInt32Value = protoAcfg.min_int32_value(),
.maxInt32Value = protoAcfg.max_int32_value(),
.minInt64Value = protoAcfg.min_int64_value(),
.maxInt64Value = protoAcfg.max_int64_value(),
.minFloatValue = protoAcfg.min_float_value(),
.maxFloatValue = protoAcfg.max_float_value(),
+ .access = static_cast<aidl_vehicle::VehiclePropertyAccess>(protoAcfg.access()),
.supportVariableUpdateRate = protoAcfg.support_variable_update_rate(),
};
if (protoAcfg.supported_enum_values().size() != 0) {
@@ -110,6 +121,16 @@
COPY_PROTOBUF_VEC_TO_VHAL_TYPE(protoAcfg, supported_enum_values, (&vehicleAreaConfig),
supportedEnumValues.value());
}
+ if (protoAcfg.has_has_supported_value_info()) {
+ aidl_vehicle::HasSupportedValueInfo hasSupportedValueInfo = {};
+ hasSupportedValueInfo.hasMinSupportedValue =
+ protoAcfg.has_supported_value_info().has_min_supported_value();
+ hasSupportedValueInfo.hasMaxSupportedValue =
+ protoAcfg.has_supported_value_info().has_max_supported_value();
+ hasSupportedValueInfo.hasSupportedValuesList =
+ protoAcfg.has_supported_value_info().has_supported_values_list();
+ vehicleAreaConfig.hasSupportedValueInfo = hasSupportedValueInfo;
+ }
return vehicleAreaConfig;
};
diff --git a/automotive/vehicle/aidl/impl/current/proto/Android.bp b/automotive/vehicle/aidl/impl/current/proto/Android.bp
index 2b5cdf4..7c9f083 100644
--- a/automotive/vehicle/aidl/impl/current/proto/Android.bp
+++ b/automotive/vehicle/aidl/impl/current/proto/Android.bp
@@ -42,6 +42,7 @@
out: [
"android/hardware/automotive/vehicle/DumpOptions.pb.h",
"android/hardware/automotive/vehicle/DumpResult.pb.h",
+ "android/hardware/automotive/vehicle/HasSupportedValueInfo.pb.h",
"android/hardware/automotive/vehicle/StatusCode.pb.h",
"android/hardware/automotive/vehicle/VehicleAreaConfig.pb.h",
"android/hardware/automotive/vehicle/VehiclePropConfig.pb.h",
@@ -69,6 +70,7 @@
out: [
"android/hardware/automotive/vehicle/DumpOptions.pb.cc",
"android/hardware/automotive/vehicle/DumpResult.pb.cc",
+ "android/hardware/automotive/vehicle/HasSupportedValueInfo.pb.cc",
"android/hardware/automotive/vehicle/StatusCode.pb.cc",
"android/hardware/automotive/vehicle/VehicleAreaConfig.pb.cc",
"android/hardware/automotive/vehicle/VehiclePropConfig.pb.cc",
diff --git a/automotive/vehicle/aidl/impl/current/proto/android/hardware/automotive/vehicle/HasSupportedValueInfo.proto b/automotive/vehicle/aidl/impl/current/proto/android/hardware/automotive/vehicle/HasSupportedValueInfo.proto
new file mode 100644
index 0000000..c04deb4
--- /dev/null
+++ b/automotive/vehicle/aidl/impl/current/proto/android/hardware/automotive/vehicle/HasSupportedValueInfo.proto
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2025 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto3";
+
+package android.hardware.automotive.vehicle.proto;
+
+/* Must be in sync with HasSupportedValueInfo.aidl. */
+message HasSupportedValueInfo {
+ /**
+ * Whether [propId, areaId] has min supported value specified.
+ *
+ * If this is {@code true}, the hardware specifies a min supported value.
+ * If {@code MinMaxSupportedValueResult}'s {@code status} is
+ * {@code StatusCode.OK}, its {@code minSupportedValue} must not be
+ * {@code null}.
+ *
+ * If this is {@code false}, {@code minSupportedValue} must be {@code null}.
+ *
+ * Unless otherwise specified, this field is set to {@code false} for any
+ * properties whose type is not int32, int64 or float.
+ *
+ * For certain properties, e.g. {@code EV_BRAKE_REGENERATION_LEVEL}, this
+ * must always be {@code true}. Check {@code VehicleProperty}
+ * documentation.
+ */
+ bool has_min_supported_value = 1;
+
+ /**
+ * Whether [propId, areaId] has max supported value specified.
+ *
+ * If this is {@code true}, the hardware specifies a max supported value.
+ * If {@code MinMaxSupportedValueResult}'s {@code status} is
+ * {@code StatusCode.OK}, its {@code maxSupportedValue} must not be
+ * {@code null}.
+ *
+ * If this is {@code false}, {@code maxSupportedValue} must be {@code null}.
+ *
+ * Unless otherwise specified, this field is set to {@code false} for any
+ * properties whose type is not int32, int64 or float.
+ *
+ * For certain properties, e.g. {@code EV_BRAKE_REGENERATION_LEVEL}, this
+ * must always be {@code true}. Check {@code VehicleProperty}
+ * documentation.
+ */
+ bool has_max_supported_value = 2;
+
+ /**
+ * Whether [propId, areaId] has supported values list specified.
+ *
+ * If this is {@code true}, it means the hardware specifies supported
+ * values for this property.
+ * If {@code SupportedValueListResult}'s {@code status} is
+ * {@code StatusCode.OK}, its {@code supportedValuesList} must not be
+ * {@code null}.
+ *
+ * If this is {@code false}, {@code supportedValuesList} must always be
+ * {@code null}.
+ *
+ * The supported value is the superset for both the input value for writable
+ * property and the output value for readable property.
+ *
+ * For certain properties, e.g. {@code GEAR_SELECTION}, this must always be
+ * {@code true}. Check {@code VehicleProperty} documentation.
+ */
+ bool has_supported_values_list = 3;
+};
diff --git a/automotive/vehicle/aidl/impl/current/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto b/automotive/vehicle/aidl/impl/current/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto
index 7ea8540..695af31 100644
--- a/automotive/vehicle/aidl/impl/current/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto
+++ b/automotive/vehicle/aidl/impl/current/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto
@@ -19,6 +19,7 @@
package android.hardware.automotive.vehicle.proto;
import "android/hardware/automotive/vehicle/VehiclePropertyAccess.proto";
+import "android/hardware/automotive/vehicle/HasSupportedValueInfo.proto";
/* Must be in sync with VehicleAreaConfig.aidl. */
message VehicleAreaConfig {
@@ -47,4 +48,30 @@
repeated int64 supported_enum_values = 8;
VehiclePropertyAccess access = 9;
bool support_variable_update_rate = 10;
+ /**
+ * This specifies whether this property may have min/max supported value or supported values
+ * list for [propId, areaId] that supports new supported values APIs.
+ *
+ * If this is not {@code null}. The client may use {@code getMinMaxSupportedValue},
+ * {@code getSupportedValuesLists}, {@code subscribeSupportedValueChange},
+ * {@code unsubscribeSupportedValueChange}.
+ *
+ * If this is not {@code null}. The VHAL implementation must implement
+ * {@code getMinMaxSupportedValue}, {@code getSupportedValuesLists},
+ * {@code subscribeSupportedValueChange} for the [propId, areaId].
+ *
+ * This should be non-null if the VHAL implementation wants to expose
+ * min/max supported value or supported values list that may change dynamically. For example,
+ * if the max HVAC fan speed may change due to HVAC power settings.
+ *
+ * This should not be non-null if the VHAL implementation wants to expose supported
+ * values list for property ID that is not an enum type (hence do not support
+ * {@code VehicleAreaConfig#supportedEnumValues}).
+ *
+ * If this is {@code null}, the APIs mentioned before are not supported.
+ * Client must fallback to use static supported value information in {@code VehicleAreaConfig}.
+ *
+ * For VHAL implementation < V4, this is always {@code null}.
+ */
+ HasSupportedValueInfo has_supported_value_info = 11;
};