update_drive_rank_settings
To update eco driving criteria, use the update_drive_rank_settings method.
svc=unit/update_drive_rank_settings¶ms={
"itemId": <long>,
"driveRank": {
"acceleration": [
{
"flags": <uint>,
"min_value": <double>,
"max_value": <double>,
"min_speed": <uint>,
"max_speed": <uint>,
"min_duration": <uint>,
"max_duration": <uint>,
"validator_id": <long>,
"name": <text>,
"penalties": <uint>
},
...
],
"brake": [
{
"flags": <uint>,
"min_value": <double>,
"max_value": <double>,
"min_speed": <uint>,
"max_speed": <uint>,
"min_duration": <uint>,
"max_duration": <uint>,
"validator_id": <long>,
"name": <text>,
"penalties": <uint>
},
...
],
"turn": [
{
"flags": <uint>,
"min_value": <double>,
"max_value": <double>,
"min_speed": <uint>,
"max_speed": <uint>,
"min_duration": <uint>,
"max_duration": <uint>,
"validator_id": <long>,
"name": <text>,
"penalties": <uint>
},
...
],
"sensor": [
{
"flags": <uint>,
"min_value": <double>,
"max_value": <double>,
"min_speed": <uint>,
"max_speed": <uint>,
"min_duration": <uint>,
"max_duration": <uint>,
"validator_id": <long>,
"sensor_id": <long>,
"name": <text>,
"penalties": <uint>
},
...
],
"speeding": [
{
"flags": <uint>,
"min_value": <double>,
"max_value": <double>,
"min_speed": <uint>,
"max_speed": <uint>,
"min_duration": <uint>,
"max_duration": <uint>,
"validator_id": <long>,
"name": <text>,
"penalties": <uint>
},
...
],
"harsh": [
{
"flags": <uint>,
"min_value": <double>,
"max_value": <double>,
"min_speed": <uint>,
"max_speed": <uint>,
"min_duration": <uint>,
"max_duration": <uint>,
"validator_id": <long>,
"name": <text>,
"penalties": <uint>
},
...
],
"global": {
"accel_mode": <uint>
}
}
}
Parameters
The request must contain the parameters:
| Parameter | Description |
|---|---|
| accel_mode | Penalty calculation method:
|
| itemId | Unit ID. |
| driveRank | Object with parameters of eco driving criteria (see below). This object can be empty. |
Eco driving criteria
| Parameter | Description |
|---|---|
| acceleration | Acceleration. |
| brake | Braking. |
| turn | Turn. |
| sensor | Custom criterion based on sensor readings. |
| speeding | Speeding. |
| harsh | Reckless driving. |
| idling | Idling. |
| global | Acceleration calculation method. |
Criterion settings
| Parameter | Description |
|---|---|
| flags | Flags:
|
| min_value | Minimum value. |
| max_value | Maximum value (excluded). |
| min_speed | Minimum speed. |
| max_speed | Maximum speed (excluded). |
| min_duration | Minimum duration. |
| max_duration | Maximum duration (excluded). |
| validator_id | Validator sensor ID. |
| sensor_id | Sensor ID (used only for the sensor criterion) |
| name | Criterion name. |
| penalties | Penalty points. |
| accel_mode | Calculate acceleration by:
|
Response
If the request is completed successfully, an empty object is returned:
{
/* Settings saved. */
}
Otherwise, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input in the driveRank parameter. |
| 6 | Failed to update eco driving criteria. |
| 7 | No ADF_ACL_AVL_UNIT_EDIT_REPORT_SETTINGS access right to the unit. |