- Home Page
- ScanDoc Development
- JSON commands
(ecu.func) Work with functions
Functions are tests of actuators, or functions of adaptations, coding, or others. This command starts functions or continues to work with them.
Options
- func (int) - Function number.
- answ (int) - Possible answer. No function is required for the first request. Needed for subsequent requests.
Return Values
- typ (int) - Type of message.
- 1Announcement.
- 2Request for confirmation.
- 3The error message.
- msg Array. Message text.
- typ (int) - Type of message.
- 1 Headline.
- 2 Plain text.
- 3 List. It is usually used to list conditions.
- 4 A warning.
- param Array of parameters. Often, for convenience, the scanner shows the current values of certain parameters before and during the test. It is not necessary that it will be (depending on the function).
- name (string) - The text name of the parameter.
- id (int) - Parameter Index
- typ (int) -Parameter Type
- 1 Numeric type
- 2 List
- 3 Line
- value (string) - Parameter value
- units (string) - Unit of measurement. Used only for type 1
- req Array. Request host action from function
- index (int) - At the next request for this function, the host should specify the response option to the request. This option is set by this number.
- txt (string) - The text of the request.
Returned error codes
Decoding Error Codes
Example
Request
{
"cmd" : "ecu.func",
"id": 56,
"answ": 3
}
Answer
{
"typ": 2,
"msg": [
{
"typ": 1,
"txt": "Deleting DPF Information"
},
{
"typ": 2,
"txt": "Restores initial DPF settings"
},
{
"typ": 4,
"txt": "Produced only after replacing DPF"
},
{
"typ": 1,
"txt": "Conditions:"
},
{
"typ": 3,
"txt": "Ignition on"
},
{
"typ": 3,
"txt": "Engine is stopped"
}
],
"param": [
{
"name": "Engine speed",
"id": 566,
"typ": 1,
"value": "0",
"units": "rpm"
},
{
"name": "Ignintion status",
"id": 7676,
"typ": 2,
"value": "Off",
"units": ""
}
],
"req": [
{
"id": 0,
"txt": "Proceed"
},
{
"id": 1,
"txt": "Cancel"
}
]
}
Negative answer
{
"res": -448
}