Skip to content

Commit 23e7cb5

Browse files
authored
[skip-changelog] Some documentation improvement for pluggable discovery/montior (#1636)
* Fixed wrong "event" fields in pluggable monitor specs * Better specify discoveryDependencies and monitorDependencies fields in package_index.json
1 parent 5f8cb4b commit 23e7cb5

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

docs/package_index_json-specification.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,16 @@ Each PLATFORM describes a core for a specific architecture. The fields needed ar
246246
- `toolsDependencies`: the tools needed by this platform. They will be installed by Boards Manager along with the
247247
platform. Each tool is referenced by the triple (`packager`, `name`, `version`) as previously said. Note that you can
248248
reference tools available in other packages as well, even if no platform of that package is installed.
249-
- `discoveryDependencies`: the Pluggable Discoveries needed by this platform. Each discovery is referenced by the pair
250-
(`packager`, `name`), the `version` is not specified because the latest installed discovery tool will always be used.
251-
Like `toolsDependencies` they will be installed by Boards Manager along with the platform and can reference tools
252-
available in other packages as well, even if no platform of that package is installed.
253-
- `monitorDependencies`: the Pluggable Monitors needed by this platform. Each monitor is referenced by the pair
254-
(`packager`, `name`), the `version` is not specified because the latest installed monitor tool will always be used.
255-
Like `toolsDependencies` they will be installed by Boards Manager along with the platform and can reference tools
256-
available in other packages as well, even if no platform of that package is installed.
249+
- `discoveryDependencies`: the Pluggable Discoveries needed by this platform. These are [tools](#tools-definitions),
250+
defined exactly like the ones referenced in `toolsDependencies`. Unlike `toolsDependencies`, discoveries are
251+
referenced by the pair (`packager`, `name`). The `version` is not specified because the latest installed discovery
252+
tool will always be used. Like `toolsDependencies` they will be installed by Boards Manager along with the platform
253+
and can reference tools available in other packages as well, even if no platform of that package is installed.
254+
- `monitorDependencies`: the Pluggable Monitors needed by this platform. These are [tools](#tools-definitions), defined
255+
exactly like the ones referenced in `toolsDependencies`. Unlike `toolsDependencies`, monitors are referenced by the
256+
pair (`packager`, `name`). The `version` is not specified because the latest installed monitor tool will always be
257+
used. Like `toolsDependencies` they will be installed by Boards Manager along with the platform and can reference
258+
tools available in other packages as well, even if no platform of that package is installed.
257259

258260
The `version` field is validated by both Arduino IDE and [JSemVer](https://github.com/zafarkhaja/jsemver). Here are the
259261
rules Arduino IDE follows for parsing versions

docs/pluggable-monitor-specification.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ port configuration, and which parameters are available to the user.
6262

6363
```JSON
6464
{
65-
"event": "describe",
65+
"eventType": "describe",
6666
"message": "ok",
6767
"port_description": {
6868
"protocol": "serial",
@@ -127,7 +127,7 @@ The response to the command is:
127127

128128
```JSON
129129
{
130-
"event": "configure",
130+
"eventType": "configure",
131131
"message": "ok"
132132
}
133133
```
@@ -136,7 +136,7 @@ or if there is an error:
136136

137137
```JSON
138138
{
139-
"event": "configure",
139+
"eventType": "configure",
140140
"error": true,
141141
"message": "invalid value for parameter baudrate: 123456"
142142
}
@@ -167,7 +167,7 @@ The answer to the `OPEN` command is:
167167

168168
```JSON
169169
{
170-
"event": "open",
170+
"eventType": "open",
171171
"message": "ok"
172172
}
173173
```
@@ -177,7 +177,7 @@ other error condition happens:
177177

178178
```JSON
179179
{
180-
"event": "open",
180+
"eventType": "open",
181181
"error": true,
182182
"message": "unknown port /dev/ttyACM23"
183183
}
@@ -191,7 +191,7 @@ tool:
191191

192192
```JSON
193193
{
194-
"event": "port_closed",
194+
"eventType": "port_closed",
195195
"message": "serial port disappeared!"
196196
}
197197
```
@@ -200,7 +200,7 @@ or
200200

201201
```JSON
202202
{
203-
"event": "port_closed",
203+
"eventType": "port_closed",
204204
"message": "lost TCP/IP connection with the client!"
205205
}
206206
```
@@ -212,7 +212,7 @@ Client/IDE. The answer to the command is:
212212

213213
```JSON
214214
{
215-
"event": "close",
215+
"eventType": "close",
216216
"message": "ok"
217217
}
218218
```
@@ -221,7 +221,7 @@ or in case of error
221221

222222
```JSON
223223
{
224-
"event": "close",
224+
"eventType": "close",
225225
"error": true,
226226
"message": "port already closed"
227227
}

0 commit comments

Comments
 (0)