Skip to content

Commit 935973b

Browse files
Stabilize uavcan.node.port.List (#138)
Stabilize uavcan.node.port.List
1 parent 16b4f31 commit 935973b

File tree

6 files changed

+57
-0
lines changed

6 files changed

+57
-0
lines changed

uavcan/node/port/7510.List.0.1.dsdl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# - At the OPTIONAL priority level at least every MAX_PUBLICATION_PERIOD seconds.
1010
# - At the OPTIONAL or SLOW priority level within MAX_PUBLICATION_PERIOD after the port configuration is changed.
1111

12+
@deprecated # Replaced with v1.
13+
1214
uint8 MAX_PUBLICATION_PERIOD = 10 # [seconds]
1315
# If the port configuration is not updated in this amount of time, the node should publish this message anyway.
1416

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# A list of ports that this node is using:
2+
# - Subjects published by this node (whether periodically or ad-hoc).
3+
# - Subjects that this node is subscribed to (a datalogger or a debugger would typically subscribe to all subjects).
4+
# - RPC services consumed by this node (i.e., service clients).
5+
# - RPC services provided by this node (i.e., service servers).
6+
#
7+
# All nodes should implement this capability to provide network introspection and diagnostic capabilities.
8+
# This message should be published using the fixed subject-ID as follows:
9+
# - At the OPTIONAL priority level at least every MAX_PUBLICATION_PERIOD seconds.
10+
# - At the OPTIONAL or SLOW priority level within MAX_PUBLICATION_PERIOD after the port configuration is changed.
11+
12+
uint8 MAX_PUBLICATION_PERIOD = 10 # [seconds]
13+
# If the port configuration is not updated in this amount of time, the node should publish this message anyway.
14+
15+
SubjectIDList.1.0 publishers
16+
SubjectIDList.1.0 subscribers
17+
ServiceIDList.1.0 clients
18+
ServiceIDList.1.0 servers
19+
20+
@sealed

uavcan/node/port/ServiceIDList.0.1.dsdl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# This is a trivial constant-size bitmask with some reserved space in case the range of service-ID is increased
33
# in a future revision of the protocol.
44

5+
@deprecated # Replaced with v1.
6+
57
uint16 CAPACITY = ServiceID.1.0.MAX + 1
68

79
bool[CAPACITY] mask
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# A list of service identifiers.
2+
# This is a trivial constant-size bitmask with some reserved space in case the range of service-ID is increased
3+
# in a future revision of the protocol.
4+
5+
uint16 CAPACITY = ServiceID.1.0.MAX + 1
6+
7+
bool[CAPACITY] mask
8+
# The index represents the identifier value. True -- present/used. False -- absent/unused.
9+
10+
@extent 1024 # Reserve space in case the range is extended in the future.
11+
12+
@assert CAPACITY % 8 == 0
13+
@assert _offset_ == {CAPACITY}

uavcan/node/port/SubjectIDList.0.1.dsdl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# resource-constrained systems. To address that, we provide two extra options: a simple variable-length list,
44
# and a special case that indicates that every subject-ID is in use.
55

6+
@deprecated # Replaced with v1.
67
@union
78

89
uint16 CAPACITY = SubjectID.1.0.MAX + 1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# A list of subject identifiers.
2+
# The range of subject-ID is large, so using a fixed-size bitmask would make this type difficult to handle on
3+
# resource-constrained systems. To address that, we provide two extra options: a simple variable-length list,
4+
# and a special case that indicates that every subject-ID is in use.
5+
6+
@union
7+
8+
uint16 CAPACITY = SubjectID.1.0.MAX + 1
9+
10+
bool[CAPACITY] mask
11+
# The index represents the identifier value. True -- present/used. False -- absent/unused.
12+
13+
SubjectID.1.0[<256] sparse_list
14+
# A list of identifiers that can be used instead of the mask if most of the identifiers are unused.
15+
16+
uavcan.primitive.Empty.1.0 total
17+
# A special case indicating that all identifiers are in use.
18+
19+
@extent 8 + 2 ** 15 # Reserve space in case the range is extended in the future.

0 commit comments

Comments
 (0)