Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 6be74cd

Browse files
committed
Update serial_protocol.md
1 parent c485ef7 commit 6be74cd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

serial_protocol.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ In the following examples we use $ to represent variables. For example $Host rep
99
All responses will be prefixed with one of the following bytes signifying the response type.
1010
```
1111
+ If response is ok and a raw string value.
12-
* If response is ok and a raw string value prefixed by count of bytes in response then new line.
12+
$ If response is ok, raw string value will be json formatted and prefixed by the byte count and a new line.
1313
: If response is ok and a number, this could be float or int.
1414
? If response is ok and a boolean value.
15-
$ If response is ok and json formatted and prefixed by count of bytes in response then new line.
1615
- If response is an error
1716
```
1817
##NETWORK
@@ -54,14 +53,13 @@ Fetches the value at $Path and returns it on the serial line. If $PATH points to
5453
>>GET /user/aturing/first
5554
<<+Alan
5655
>>GET /user/aturing
57-
<<&39
56+
<<$39
5857
<<{ "first" : "Alan", "last" : "Turing" }
5958

6059
##GET{+,*,#,.,?,$}
6160
Same as GET but will either return the value in the format specified (by the format byte) or return an error.
6261
###Usage
6362
GET+ $PATH
64-
GET* $PATH
6563
GET: $PATH
6664
GET? $PATH
6765
GET$ $PATH
@@ -153,8 +151,7 @@ The event stream will continue until you send CANCEL_STREAM.
153151
<<+PUT /last_login
154152
<<:1455052043
155153
<<+PUT /address
156-
<<*24
157-
<<78 High Street,
158-
<<Hampton
154+
<<$24
155+
<<"78 High Street,\r\nHampton"
159156
>>CANCEL_STREAM
160157
<<+OK

0 commit comments

Comments
 (0)