Remove unnecessary 'bus' field from message format command.
[apps/low-level-can-service.git] / README.md
index feb40c4..2cde130 100644 (file)
--- a/README.md
+++ b/README.md
@@ -281,31 +281,75 @@ MAC address of an included Bluetooth module) into into the outgoing data stream.
 
 #### Passthrough CAN Mode
 
-The `passthrough` command controls the passthrough mode for each of the CAN
-buses. There are three passthrough modes:
-
-* `off` - Only the specified simple vehicle messages are processed and output
-  from the VI.
-* `filtered` - If the CAN acceptance filter is not otherwise disabled, only the
-  pre-defined CAN messages (i.e. those compiled with the firmware) will be
-  output in the low-level CAN format from VI.
-* `unfiltered` - All received CAN messages will be passed through from the bus
-  to the VI's output.
+The `passthrough` command controls whether low-level CAN messages are passed
+through from the CAN bus through the VI to the output stream. If the CAN
+acceptance filter is in bypass mode and passthrough is enabled, the output
+stream will include all received CAN messages. If the bypass filter is enabled,
+only those CAN messages that have been pre-defined in the firmware are
+forwarded.
 
 **Request**
 
-    { "command": "passthrough"
+    { "command": "passthrough",
       "bus": 1,
-      "mode":
+      "enabled": true
     }
 
 **Response**
 
-If the bus and mode in the request were recognized, the `status` field in the
-response will be `true`. If `false`, the passthrough mode was not changed.
+If the bus in the request was valid and the passthrough mode was changed, the
+`status` field in the response will be `true`. If `false`, the passthrough mode
+was not changed.
 
     { "command_response": "passthrough", "status": true}
 
+#### Acceptance Filter Bypass
+
+The `af_bypass` command controls whether the CAN message acceptance filter is
+bypassed for each CAN controller. By default, hardware acceptance filter (AF) is
+enabled in the VI - only previously defined CAN message IDs will be received.
+Send this command with `bypass: true` to force the filters to bypassed.
+
+If `passthrough` mode is also enabled, when the AF is bypassed, the output will
+include all CAN messages received.
+
+**Request**
+
+    { "command": "af_bypass",
+      "bus": 1,
+      "bypass": true
+    }
+
+**Response**
+
+If the bus in the request was valid and the AF mode was changed, the `status`
+field in the response will be `true`. If `false`, the passthrough mode was not
+changed.
+
+    { "command_response": "af_bypass", "status": true}
+
+#### Message Format Control
+
+The `message_format` command determines the format for output data from the VI
+and also the expected format of commands sent to the VI.
+
+Valid formats are `json` and `binary`.
+
+**Request**
+
+    { "command": "message_format",
+      "format": "json"
+    }
+
+**Response**
+
+If the format was changed successfully, the `status` in the response will be
+`true`. The response will be in the original message format, and all subsequent
+messages will be in the new format.
+
+    { "command_response": "message_format", "status": true}
+
+
 ### Trace File Format
 
 An OpenXC vehicle trace file is a plaintext file that contains JSON objects,