You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: serial_protocol.md
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,9 @@ In the following examples we use $ to represent variables. For example $Host rep
9
9
All responses will be prefixed with one of the following bytes signifying the response type.
10
10
```
11
11
+ 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.
13
13
: If response is ok and a number, this could be float or int.
14
14
? 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.
16
15
- If response is an error
17
16
```
18
17
##NETWORK
@@ -54,14 +53,13 @@ Fetches the value at $Path and returns it on the serial line. If $PATH points to
54
53
>>GET /user/aturing/first
55
54
<<+Alan
56
55
>>GET /user/aturing
57
-
<<&39
56
+
<<$39
58
57
<<{ "first" : "Alan", "last" : "Turing" }
59
58
60
59
##GET{+,*,#,.,?,$}
61
60
Same as GET but will either return the value in the format specified (by the format byte) or return an error.
62
61
###Usage
63
62
GET+ $PATH
64
-
GET* $PATH
65
63
GET: $PATH
66
64
GET? $PATH
67
65
GET$ $PATH
@@ -121,7 +119,7 @@ Adds a value to the list located at the path provided and returns the key at whi
121
119
<<+-K94eLnB0rAAvfkh_WC2
122
120
123
121
##PUSH$
124
-
Similar to PUSH but used to write multiline strings or raw binary data. Data format is similar to the batch string ($) return type, we specify the $DATA_BYTE_COUNT on the same line as SET$ then a newline and all data.
122
+
Similar to PUSH but used to write multiline strings or raw binary data. Data format is similar to the batch string ($) return type, we specify the $DATA_BYTE_COUNT on the same line as SET$ then a newline and all data. However you are not required to json escape all of your data, that will be handled for you.
125
123
126
124
Receiver will wait until a timeout for client to send $DATA_BYTE_COUNT worth of data before becoming responsive again.
127
125
###Usage
@@ -153,8 +151,7 @@ The event stream will continue until you send CANCEL_STREAM.
0 commit comments