update_calc_flags
To update calculation parameters for counters, use the unit/update_calc_flags command.
svc=unit/update_calc_flags¶ms={
"itemId": <long>,
"newValue": <uint>
}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
itemId | Unit ID. |
newValue | New counter calculation flags (see below). |
Calculation flags
Flag | Description |
---|---|
0x000 | Mileage counter: GPS. |
0x001 | Mileage counter: Mileage sensor. |
0x002 | Mileage counter: Relative odometer. |
0x003 | Mileage counter: GPS + engine ignition sensor. |
0x010 | Engine hours counter: Engine ignition sensor. |
0x020 | Engine hours counter: Absolute engine hours sensor. |
0x040 | Engine hours counter: Relative engine hours sensor. |
0x100 | Automatic calculation of mileage based on new messages. |
0x200 | Automatic calculation of engine hours based on new messages |
0x400 | Automatic calculation of GPRS traffic. |
Response
If the request is completed successfully, a response of the following format is returned:
{
/* flags applied */
}
Otherwise, an error code is returned.
Error codes
Error code | Description |
---|---|
6 | Error updating the flags. |
7 | The user doesn’t have the required access rights to the unit (ADF_ACL_AVL_UNIT_EDIT_COUNTERS). |