Skip to content

Commit afac1cc

Browse files
committed
fix: Address and Protocol must be unique
1 parent 16a2687 commit afac1cc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

RFCs/0002-pluggable-discovery.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The pluggable discovery aims to provide a solution to these problems.
3434

3535
- Each port may provide metadata to identify a specific instance of the board (**serial number / MAC address**)
3636

37-
- Each port must have an **unique address**
37+
- Each port must have an **unique address and protocol pair**
3838

3939
- A single device may expose multiple ports
4040

@@ -195,14 +195,15 @@ The `remove` event looks like the following:
195195
{
196196
"eventType": "remove",
197197
"port": {
198-
"address": "/dev/ttyACM0"
198+
"address": "/dev/ttyACM0",
199+
"protocol": "serial"
199200
}
200201
}
201202
```
202203

203-
the content is straightforward, in this case only the `address` field is reported.
204+
the content is straightforward, in this case only the `address` and `protocol` fields are reported.
204205

205-
If the information about a port needs to be updated the discovery may send a new `add` message for the same port address without sending a `remove` first: this means that all the previous information about the port must be discarded and replaced with the new one.
206+
If the information about a port needs to be updated the discovery may send a new `add` message for the same port address and protocol without sending a `remove` first: this means that all the previous information about the port must be discarded and replaced with the new one.
206207

207208
A demo tool is available here:
208209
[https://github.com/arduino/serial-discovery](https://github.com/arduino/serial-discovery#example-of-usage)

0 commit comments

Comments
 (0)