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
Copy file name to clipboardExpand all lines: serial_protocol.md
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -278,13 +278,14 @@ time_to_live=500
278
278
<< +ERROR_INVALID_ARGUMENT // some_random_thing is not a valid argument.
279
279
280
280
##NOTIFICATION
281
-
Notification to display to the user, is made up of a title and a body. The title is specified on the first line and the first line ends with a count of bytes in the body. We will then read the next %Body_Byte_Count% bytes (after the line break) and interpret them as the body. If there is no body specify 0 for the byte count.
281
+
Notification to display to the user, is made up of a title and a body. The title is specified on the first line and the first line ends with a count of bytes in the body. We will then read the next %Body_Byte_Count% bytes (after the line break) and interpret them as the body. If there is no body specify 0 for the byte count. The count must be the last thing on the line, it cannot end in whitespace.
282
282
##Usage
283
283
NOTIFICATION %Title% %Body_Byte_Count%
284
284
%Body%
285
285
###Response
286
286
+OK - Ready to specify rest of message.
287
287
-ERROR_INCORRECT_FORMAT - The message format was incorrect.
288
+
-ERROR_NOT_ENOUGH_DATA_FOR_BODY - We did not receive the specified amount of data for the body.
288
289
###Examples
289
290
>> NOTIFICATION This is a test. 0
290
291
<< +OK
@@ -293,15 +294,20 @@ Notification to display to the user, is made up of a title and a body. The title
293
294
>> NOTIFICATION This is a test with a body. 12
294
295
>> Hello World!
295
296
<< +OK
297
+
>> NOTIFICATION This is a test with a body. 12
298
+
>> Hello Worl
299
+
<< -ERROR_NOT_ENOUGH_DATA_FOR_BODY
296
300
297
301
##ADD_DATA
298
-
Data to deliver to client application. This is comprised of Key->Value pairs. The Key is specified on the first line and the first line ends with a count of bytes in the value. We will then read the next %Value_Byte_Count% bytes (after the line break) and interpret them as the value. If there is no value specify 0 forthe byte count.
302
+
Data to deliver to client application. This is comprised of Key->Value pairs. The Key is specified on the first line and the first line ends with a count of bytes in the value. We will then read the next %Value_Byte_Count% bytes (after the line break) and interpret them as the value. If there is no value specify 0 forthe byte count. The count must be the last thing on the line, it cannot end in whitespace.
303
+
299
304
##Usage
300
305
ADD_DATA %KEY% %VALUE_BYTE_COUNT%
301
306
%VALUE%
302
307
###Response
303
308
+OK - Ready to specify rest of message.
304
309
-ERROR_INCORRECT_FORMAT - The message format was incorrect.
310
+
-ERROR_NOT_ENOUGH_DATA_FOR_BODY - We did not receive the specified amount of data for the body.
305
311
###Examples
306
312
>> ADD_DATA Temperature_Ready 0
307
313
<< +OK
@@ -310,6 +316,9 @@ Data to deliver to client application. This is comprised of Key->Value pairs. Th