-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define the new port introspection service per #84
The new service is stateless and compliant with the interface design guidelines. The Statistics service is removed and not yet replaced because it had a design issue (did not distinguish between servers and clients) and because YAGNI. Later we may address this using the Register API. The GetInfo service is removed because for fixed ports the data type information is deducible from the port-ID, and non-fixed ports are addressed by #92
- Loading branch information
1 parent
a52b02d
commit 292fce2
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -404,3 +404,4 @@ sha256 | |
pitot | ||
CAS | ||
OOP | ||
alignee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# A list of ports that this node is using: | ||
# - Subjects published by this node (whether periodically or ad-hoc). | ||
# - Subjects that this node is subscribed to (a datalogger or a debugger would typically subscribe to all subjects). | ||
# - RPC services consumed by this node (i.e., service clients). | ||
# - RPC services provided by this node (i.e., service servers). | ||
# | ||
# All nodes should implement this capability to provide network introspection and diagnostic capabilities. | ||
# This message should be published using the fixed subject-ID as follows: | ||
# - At the OPTIONAL priority level at least every MAX_PUBLICATION_PERIOD seconds. | ||
# - At the OPTIONAL or SLOW priority level within MAX_PUBLICATION_PERIOD after the port configuration is changed. | ||
# | ||
# pragma: no-bit-length-limit | ||
|
||
uint8 MAX_PUBLICATION_PERIOD = 10 # [seconds] | ||
# If the port configuration is not updated in this amount of time, the node should publish this message anyway. | ||
|
||
SubjectIDList.0.1 publishers | ||
SubjectIDList.0.1 subscribers | ||
ServiceIDList.0.1 clients | ||
ServiceIDList.0.1 servers | ||
|
||
@sealed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# A list of service identifiers. | ||
# This is a trivial constant-size bitmask with some reserved space in case the range of service-ID is increased | ||
# in a future revision of the protocol. | ||
|
||
uint16 CAPACITY = ServiceID.1.0.MAX + 1 | ||
|
||
bool[CAPACITY] mask | ||
# The index represents the identifier value. True -- present/used. False -- absent/unused. | ||
|
||
@extent 1024 # Reserve space in case the range is extended in the future. | ||
|
||
@assert CAPACITY % 8 == 0 | ||
@assert _offset_ == {CAPACITY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# A list of subject identifiers. | ||
# The range of subject-ID is large, so using a fixed-size bitmask would make this type difficult to handle on | ||
# resource-constrained systems. To address that, we provide two extra options that can be used when the number | ||
# of reported identifiers is low: a simple variable-length list, and a special case that indicates that every | ||
# subject-ID is in use. | ||
# | ||
# pragma: no-bit-length-limit | ||
|
||
@union | ||
|
||
uint16 CAPACITY = SubjectID.1.0.MAX + 1 | ||
|
||
bool[CAPACITY] mask | ||
# The index represents the identifier value. True -- present/used. False -- absent/unused. | ||
|
||
SubjectID.1.0[<256] sparse_list | ||
# A list of identifiers that can be used instead of the mask if most of the identifiers are unused. | ||
|
||
uavcan.primitive.Empty.1.0 total | ||
# A special case indicating that all identifiers are in use. | ||
|
||
@extent 8 + 32768 # Reserve space in case the range is extended in the future. |