aboutsummaryrefslogtreecommitdiffstats
path: root/JSON.mkd
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-10-06 23:14:03 -0400
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-10-06 23:18:41 -0400
commite47f58b38d86e6aefd1b8f2fba2fc9dba3eae702 (patch)
treecb08368edbe3811e7e1a645ec333181cdad59158 /JSON.mkd
parent9e84f7713ab25ddb69e6f46cf34285a09ee9e28b (diff)
Mention 'status' field in all command response JSON examples.
Fixed #13.
Diffstat (limited to 'JSON.mkd')
-rw-r--r--JSON.mkd26
1 files changed, 23 insertions, 3 deletions
diff --git a/JSON.mkd b/JSON.mkd
index 7bf0ce5a..71546bc9 100644
--- a/JSON.mkd
+++ b/JSON.mkd
@@ -179,7 +179,16 @@ manually override the OBD-II decoding feature for a known PID.
### Responses
-The response to a successful request:
+Requests to add or cancel a diagnostic request are first acknowledged by the VI,
+before any responses to the request are returned. The response uses the standard
+command response format:
+
+ { "command_response": "diagnostic_request", "status": true}
+
+**status** - true if the request was successfully created or cancelled.
+
+When a node on the network response to the request and the result is published
+by the VI, the result looks like:
{"bus": 1,
"id": 1234,
@@ -233,6 +242,17 @@ The response to a simple PID request would look like this:
In addition to the `diagnostic_request` command described earlier, there are
other possible values for the `command` field.
+All commands immediately return a `command_response`, e.g.:
+
+ { "command_response": "version", "message": "v6.0-dev (default)", "status": true}
+
+**command_response** - an echo of the command this is a ACKing.
+
+**status** - true if the command was understood and performed succesfully.
+
+**message** - (optional) a string message from the VI, e.g. to return a version
+ descriptor or error message.
+
### Version Query
The `version` command triggers the VI to inject a firmware version identifier
@@ -244,7 +264,7 @@ response into the outgoing data stream.
**Response**
- { "command_response": "version", "message": "v6.0-dev (default)"}
+ { "command_response": "version", "message": "v6.0-dev (default)", "status": true}
### Device ID Query
@@ -257,7 +277,7 @@ MAC address of an included Bluetooth module) into into the outgoing data stream.
**Response**
- { "command_response": "device_id", "message": "0012345678"}
+ { "command_response": "device_id", "message": "0012345678", "status": true}
### Passthrough CAN Mode