Skip to content

Commit c6cdecc

Browse files
committed
Moved paragraph and cleared arduino-cli usage scenario
1 parent bc3963d commit c6cdecc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

RFCs/0002-pluggable-discovery.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,6 @@ After this message the discoery will send `add` and `remove` event asyncronoushl
242242

243243
The `error` field must be set to `true` and the `message` field should contain a description of the error.
244244

245-
If the CLI is used in command-line mode (for example the `arduino-cli board list` command) then we need a one-shot output and we can run the discoveries with the `LIST` command instead of using `START_SYNC`. Note that some discoveries may not be able to `LIST` ports immediately after the launch (in particular network protocols like MDNS, Bluetooth, etc. requires some seconds to receive the broadcasts from all available clients).
246-
247-
If the CLI is running in daemon mode, ideally, all the installed discoveries should be started simultaneously in “event mode” (with `START_SYNC`) and the list of available ports should be cached inside the CLI daemon.
248-
249245
The `add` event looks like the following:
250246

251247
```JSON
@@ -296,6 +292,14 @@ If the client sends an invalid or malformed command, the discovery should answer
296292
}
297293
```
298294

295+
#### arduino-cli usage scenario
296+
297+
If `arduino-cli` is used in command-line mode (for example the `arduino-cli board list` command) then we need a one-shot output and we can run the discoveries with the `LIST` command instead of using `START_SYNC`.
298+
299+
Note that some discoveries may not be able to `LIST` ports immediately after the launch (in particular network protocols like MDNS, Bluetooth, etc. requires some seconds, even minutes, to receive the broadcasts from all available clients). This is intrinsic in how the `LIST` command is defined and it's a duty of the client (CLI/IDE) to take it into consideration.
300+
301+
If `arduino-cli` is running in daemon mode, ideally, it should start all the installed discoveries simultaneously in “event mode” (with `START_SYNC`) and the list of available ports should be cached and updated in realtime inside the `arduino-cli` daemon.
302+
299303
#### Reference implementations
300304

301305
A demo tool is available here:

0 commit comments

Comments
 (0)