Skip to content

Commit b10d52d

Browse files
committed
Added HELLO command
1 parent 44e8d99 commit b10d52d

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

RFCs/0002-pluggable-discovery.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pluggable Discovery
1+
# Pluggable Discovery protocol (Version 1.0.0)
22

33
## Overview
44

@@ -46,7 +46,33 @@ These tools must be in the form of executables that can be launched as a subproc
4646

4747
All the commands listed in this specification must be implemented in the discovery.
4848

49-
After startup, the tool will just stay idle waiting for commands. The available commands are: `START`, `STOP`, `QUIT`, `LIST` and `START_SYNC`.
49+
After startup, the tool will just stay idle waiting for commands. The available commands are: `HELLO`, `START`, `STOP`, `QUIT`, `LIST` and `START_SYNC`.
50+
51+
#### HELLO command
52+
53+
`HELLO` is the **first command that must be sent** to the discovery to tell the name of the client and the version of the pluggable discovery protocol that the client supports.
54+
The syntax of the command is:
55+
56+
`HELLO <PROTOCOL_VERSION> "<USER_AGENT>"`
57+
58+
- `<PROTOCOL_VERSION>` is the protocol version (currently `1.0.0`)
59+
60+
- `<USER_AGENT>` is the name and version of the client (double-quotes `"` are not allowed)
61+
62+
some examples:
63+
64+
- `HELLO 1.0.0 "Arduino IDE 1.8.13"`
65+
66+
- `HELLO 1.0.0 "arduino-cli 1.2.3"`
67+
68+
the response to the command is:
69+
70+
```JSON
71+
{
72+
"eventType": "hello",
73+
"message": "OK"
74+
}
75+
```
5076

5177
#### START command
5278

0 commit comments

Comments
 (0)