-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProtocol.pg
50 lines (46 loc) · 5.21 KB
/
Protocol.pg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
flags: 01010
blocks: <table class="user"><tr><th colspan="4"align="center">Bidirectional </th></tr><tr><th align="center">Byte </th><th align="center">ASCII </th><th align="center">Meaning </th><th align="center">Followed by </th></tr><tr><td align="center">112</td><td align="center">'p'</td><td>Ping</td><td>Nothing</td></tr><tr><td align="center">80</td><td align="center">'P'</td><td>Pong</td><td>Nothing</td></tr><tr><td align="center">69</td><td align="center">'E'</td><td>Enable/Disable command interpretation</td><td>'0' to disable / '1' to enable / '2' to toggle</td></tr><tr><td align="center">115</td><td align="center">'s'</td><td>Request settings.</td><td align="center">TODO </td></tr><tr><td align="center">83</td><td align="center">'S'</td><td>Send settings.</td><td align="center">TODO </td></tr><tr><th colspan="4"align="center">-</th></tr><tr><th colspan="4"align="center">From Arm </th></tr><tr><th align="center">Byte </th><th align="center">ASCII </th><th align="center">Meaning </th><th align="center">Followed by </th></tr><tr><td align="center">76</td><td align="center">'L'</td><td>Single letter</td><td>Byte representing one letter</td></tr><tr><td align="center">87</td><td align="center">'W'</td><td>Previous letters form a word</td><td>Nothing (Deprecated since [[Morse Code]] is not used as input system anymore)</td></tr><tr><td align="center">81</td><td align="center">'Q'</td><td>Previous data is wrong</td><td>Nothing (Deprecated since [[Morse Code]] is not used as input system anymore)</td></tr><tr><td align="center">84</td><td align="center">'T'</td><td>Sending plain text</td><td>Null-terminated string</td></tr><tr><td align="right"></td><td align="right"></td><td>Sending sensors data</td><td>One character indicating the sensor type and then null-terminated string</td></tr><tr><td align="center">100</td><td align="center">'d'</td><td>Request date. Client should answer with the current date and time</td><td>Nothing</td></tr><tr><th colspan="4"align="center">-</th></tr><tr><th colspan="4"align="center">To Arm </th></tr><tr><th align="center">Byte </th><th align="center">ASCII </th><th align="center">Meaning </th><th align="center">Followed by </th></tr><tr><td align="center">68</td><td align="center">'D'</td><td>Current date is X</td><td>Two bytes for YEAR, then MONTH,DAY,HOURS,MINUTES,SECONDS described by one byte each</td></tr><tr><td align="center">86</td><td align="center">'V'</td><td>Set vibration</td><td>Vibration level (one byte), 0 - no vibration</td></tr><tr><td align="center">114</td><td align="center">'r'</td><td>Reset device (like if reset button was pressed)</td><td align="right"></td></tr><tr><td align="center">108</td><td align="center">'l'</td><td>Fake action</td><td>Byte representing one letter</td></tr></table><h2>Things to remember</h2><ul><li>Lowercase symbols are usually requests.</li><li>Some of these are not supported yet.</li><li>This protocol is subject to change.</li><li>Typable ASCII characters are preferred for the ease of debugging.</li></ul><h2>Is it feasible?</h2><p>Maybe we should switch to some well-known format like JSON or similar?</p>
diff-minor: <p><strong>Changed:</strong></p>
<div class="old"><p>< | 81 | 'Q' |Previous data is wrong|Nothing<strong class="changes">|</strong></p></div><p><strong>to</strong></p>
<div class="new"><p>> | 81 | 'Q' |Previous data is wrong|Nothing <strong class="changes">(Deprecated since [[Morse Code]] is not used as input system anymore)|</strong></p></div>
ip: 89.235.239.240
ts: 1423753143
minor:
host: 193.40.244.196
username: AlexDaniel
revision: 16
diff-major: 1
summary: 'Q' is deprecated for a long time
languages:
text: ||||= Bidirectional |
|= Byte |= ASCII |= Meaning |= Followed by |
| 112 | 'p' |Ping|Nothing|
| 80 | 'P' |Pong|Nothing|
| 69 | 'E' |Enable/Disable command interpretation|'0' to disable / '1' to enable / '2' to toggle|
| 115 | 's' |Request settings.| TODO |
| 83 | 'S' |Send settings.| TODO |
||||= - |
||||= From Arm |
|= Byte |= ASCII |= Meaning |= Followed by |
| 76 | 'L' |Single letter|Byte representing one letter|
| 87 | 'W' |Previous letters form a word|Nothing (Deprecated since [[Morse Code]] is not used as input system anymore)|
| 81 | 'Q' |Previous data is wrong|Nothing (Deprecated since [[Morse Code]] is not used as input system anymore)|
| 84 | 'T' |Sending plain text|Null-terminated string|
| | |Sending sensors data|One character indicating the sensor type and then null-terminated string|
| 100 | 'd' |Request date. Client should answer with the current date and time|Nothing|
||||= - |
||||= To Arm |
|= Byte |= ASCII |= Meaning |= Followed by |
| 68 | 'D' |Current date is X|Two bytes for YEAR, then MONTH,DAY,HOURS,MINUTES,SECONDS described by one byte each|
| 86 | 'V' |Set vibration|Vibration level (one byte), 0 - no vibration|
| 114 | 'r' |Reset device (like if reset button was pressed)| |
| 108 | 'l' |Fake action|Byte representing one letter|
== Things to remember
* Lowercase symbols are usually requests.
* Some of these are not supported yet.
* This protocol is subject to change.
* Typable ASCII characters are preferred for the ease of debugging.
== Is it feasible?
Maybe we should switch to some well-known format like JSON or similar?
lastmajor: 16
keep-ts: 1423753143