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: dummy-monitor/README.md
+46-47Lines changed: 46 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -32,8 +32,8 @@ The response to the command is:
32
32
```json
33
33
{
34
34
"eventType": "hello",
35
-
"protocolVersion": 1,
36
-
"message": "OK"
35
+
"message": "OK",
36
+
"protocolVersion": 1
37
37
}
38
38
```
39
39
@@ -43,40 +43,34 @@ The response to the command is:
43
43
44
44
The `DESCRIBE` command returns a description of the communication port. The description will have metadata about the port configuration, and which parameters are available:
@@ -87,7 +81,7 @@ Each parameter has a unique name (`baudrate`, `parity`, etc...), a `type` (in th
87
81
88
82
The parameter name can not contain spaces, and the allowed characters in the name are alphanumerics, underscore `_`, dot `.`, and dash `-`.
89
83
90
-
The `enum` types must have a list of possible `values`.
84
+
The `enum` types must have a list of possible `value`.
91
85
92
86
The client/IDE may expose these configuration values to the user via a config file or a GUI, in this case the `label` field may be used for a user readable description of the parameter.
93
87
@@ -101,18 +95,18 @@ The response to the command is:
101
95
102
96
```JSON
103
97
{
104
-
"event": "configure",
105
-
"message": "ok",
98
+
"eventType": "configure",
99
+
"message": "OK"
106
100
}
107
101
```
108
102
109
103
or if there is an error:
110
104
111
105
```JSON
112
106
{
113
-
"event": "configure",
114
-
"error": true,
115
-
"message": "invalid value for parameter baudrate: 123456"
107
+
"eventType": "configure",
108
+
"message": "invalid value for parameter speed: 123456",
109
+
"error": true
116
110
}
117
111
```
118
112
@@ -137,16 +131,16 @@ The answer to the `OPEN` command is:
137
131
138
132
```JSON
139
133
{
140
-
"event": "open",
141
-
"message": "ok"
134
+
"eventType": "open",
135
+
"message": "OK"
142
136
}
143
137
```
144
138
145
139
If the monitor tool cannot communicate with the board, or if the tool can not connect back to the TCP port, or if any other error condition happens:
146
140
147
141
```JSON
148
142
{
149
-
"event": "open",
143
+
"eventType": "open",
150
144
"error": true,
151
145
"message": "unknown port /dev/ttyACM23"
152
146
}
@@ -158,7 +152,7 @@ Once the port is opened, it may be unexpectedly closed at any time due to hardwa
158
152
159
153
```JSON
160
154
{
161
-
"event": "port_closed",
155
+
"eventType": "port_closed",
162
156
"message": "serial port disappeared!"
163
157
}
164
158
```
@@ -167,8 +161,9 @@ or
167
161
168
162
```JSON
169
163
{
170
-
"event": "port_closed",
171
-
"message": "lost TCP/IP connection with the client!"
164
+
"eventType": "port_closed",
165
+
"message": "lost TCP/IP connection with the client!",
166
+
"error": true
172
167
}
173
168
```
174
169
@@ -178,7 +173,7 @@ The `CLOSE` command will close the currently opened port and close the TCP/IP co
178
173
179
174
```JSON
180
175
{
181
-
"event": "close",
176
+
"eventType": "close",
182
177
"message": "ok"
183
178
}
184
179
```
@@ -187,9 +182,9 @@ or in case of error
187
182
188
183
```JSON
189
184
{
190
-
"event": "close",
191
-
"error": true,
192
-
"message": "port already closed"
185
+
"eventType": "close",
186
+
"message": "port already closed",
187
+
"error": true
193
188
}
194
189
```
195
190
@@ -213,11 +208,11 @@ If the client sends an invalid or malformed command, the monitor should answer w
0 commit comments