diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 32 |
1 files changed, 7 insertions, 25 deletions
@@ -80,11 +80,10 @@ The format for a raw CAN message: #### Requests -A diagnostic request is created, update and deleted with a JSON object like this -example: +A diagnostic request is added or cancelled with a JSON object like this example: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -100,9 +99,8 @@ example: * The `command` must be `diagnostic_request.` * The `action` must be included, and must be one of: - * `create` - create a new one-off or recurring diagnostic request. - * `update` - update an existing request. - * `delete` - delete an existing request. + * `add` - create a new one-off or recurring diagnostic request. + * `cancel` - cancel an existing request. * The details of the request must be included in the `request` field, using the sub-fields defined below. @@ -112,7 +110,7 @@ referred to as the key of the diagnostic request. For example, to create a simple one-time diagnostic request: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -131,7 +129,7 @@ Requests with a `frequency` are added as *recurring* requests, e.g. to add the previous example as a recurring request at 1Hz: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -145,7 +143,7 @@ previous example as a recurring request at 1Hz: To cancel a recurring request, send a `cancel` action with the same key, e.g.: { "command": "diagnostic_request", - "action": "delete", + "action": "cancel", "request": { "bus": 1, "id": 1234, @@ -155,22 +153,6 @@ To cancel a recurring request, send a `cancel` action with the same key, e.g.: } } -To update one of the fields of a recurring request, send an `update` action with -the same key, plus the field to update. For example, to change the frequency of -the example request to 2Hz: - - { "command": "diagnostic_request", - "action": "update", - "request": { - "bus": 1, - "id": 1234, - "mode": 1, - "pid": 5, - "frequency": 2 - } - } - } - Simultaneous recurring requests for the same key at different rates (e.g. 1Hz *and* 2Hz) is not supported. However, non-recurring ("one-off") requests may exist in parallel with a recurring request for the same key. |