From a52b02dbb18fd62c4672c2d810de74de96ce11b7 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sun, 25 Oct 2020 23:18:50 +0200 Subject: [PATCH] Remove the old port introspection services The reviewed design will address the same demands using a stateless subject and the register interface: - https://github.com/UAVCAN/public_regulated_data_types/issues/84 - https://github.com/UAVCAN/public_regulated_data_types/issues/89 The objective is to comply with the design guidelines and to reduce the implementation effort. --- uavcan/node/port/431.List.0.1.uavcan | 43 ------------------ uavcan/node/port/432.GetInfo.0.1.uavcan | 44 ------------------- uavcan/node/port/433.GetStatistics.0.1.uavcan | 30 ------------- 3 files changed, 117 deletions(-) delete mode 100644 uavcan/node/port/431.List.0.1.uavcan delete mode 100644 uavcan/node/port/432.GetInfo.0.1.uavcan delete mode 100644 uavcan/node/port/433.GetStatistics.0.1.uavcan diff --git a/uavcan/node/port/431.List.0.1.uavcan b/uavcan/node/port/431.List.0.1.uavcan deleted file mode 100644 index 32f5428d..00000000 --- a/uavcan/node/port/431.List.0.1.uavcan +++ /dev/null @@ -1,43 +0,0 @@ -# Returns a subset of all ports of the specified kind (subject or service) on the remote node. -# As the number of ports may exceed the capacity of the output array, the server will return only those which are -# not less than the number specified in the request. The caller should sweep the lower boundary upwards until -# the size of the returned array is strictly less than its capacity. For example: -# 1. port_id_lower_boundary = 0; port_ids = [42, 567, ... 920] (=128 elements, continue) -# 2. port_id_lower_boundary = 920; port_ids = [1052, ... 5049] (=128 elements, continue) -# 3. port_id_lower_boundary = 5049; port_ids = [6973, ..., 24593] (<128 elements, stop) -# -# The server will return as many IDs as possible which are numerically not less than port_id_lower_boundary, -# and which are of the same kind as specified in the request (i.e., if the lower boundary is a service-ID, only -# service-IDs will be returned). -# -# If the number of matching (i.e., not less than port_id_lower_boundary) IDs exceeds the capacity of the output array, -# the caller will need to repeat the call with this boundary set to the value one greater than the maximum found -# in the returned array. The calls should be repeated while advancing the boundary as described until -# the returned array is not full (e.g. the number of elements is less than its capacity, possibly zero). -# -# The server is NOT required to ensure any ordering in the output array, meaning that the caller will have to -# search through the array in order to find the greatest value in it. -# -# The server is REQUIRED to ensure that every element in the returned array is unique. -# -# The server is REQUIRED to ensure that by performing the above actions the client will end up with a full set of -# port-IDs, assuming that the set is not modified between invocations. This implicitly requires that there shall be -# no port-ID that is lower than the greatest value in the returned array that is not listed in the array, because -# in that case the client will never be able to obtain that value. -# -# For subjects, both subscription (input) and publication (output) ports shall be returned. -# If necessary, the caller will be able to differentiate between those by using the sibling service type GetInfo. -# -# For services, server ports shall be returned. Whether client ports are returned is implementation-defined. -# As in the case of subjects, further differentiation is possible via GetInfo. - -ID.1.0 port_id_lower_boundary - -@assert _offset_ == {24} -@sealed - ---- - -uint16[<=128] port_ids # See above for the full description of the logic. - -@extent 300 * 8 diff --git a/uavcan/node/port/432.GetInfo.0.1.uavcan b/uavcan/node/port/432.GetInfo.0.1.uavcan deleted file mode 100644 index f6881aa1..00000000 --- a/uavcan/node/port/432.GetInfo.0.1.uavcan +++ /dev/null @@ -1,44 +0,0 @@ -# This service is used to obtain information about a port (either subject or service). -# It can be used for advanced network inspections, e.g., for building computational graph maps. -# -# If this service is implemented, it shall report information for all subject ports (both publishers and subscribers) -# and service server ports. Support for service client ports is optional (implementation-defined); -# if not supported, client ports may be reported as non-existent. -# -# The reason client ports are treated differently is due to their inherent volatility: services are often -# invoked ad-hoc, and the network stack on the client node may choose to reclaim the resources allocated for -# a client port that is no longer in use for other needs. - -ID.1.0 port_id # The port of interest; can be either a service or a subject. - -@assert _offset_ == {24} -@sealed - ---- - -bool is_input # Subscriber or server -bool is_output # Publisher or client -# For subject ports, "input" means subscriber and "output" means publisher. -# A subject port may be both subscriber and publisher at the same time. -# -# For service ports, "input" means server and "output" means client (based on the direction of request transfers). -# A service port may be both server and client at the same time. -# -# For non-existent ports both flags should be cleared. -# -# Kind | Input | Output -# --------------+---------------+---------------- -# Subject | Subscriber | Publisher -# Service | Server | Client -void6 - -uint8[<=50] data_type_full_name -# If such port exists, this field shall contain the full name of its data type. -# If the requested port does not exist, this field shall be empty. -# If this field is empty, the caller should ignore all other fields. - -uavcan.node.Version.1.0 data_type_version -# The version numbers of the data type used at this port. -# Zeros if the port does not exist. - -@extent 192 * 8 diff --git a/uavcan/node/port/433.GetStatistics.0.1.uavcan b/uavcan/node/port/433.GetStatistics.0.1.uavcan deleted file mode 100644 index 420fb5ee..00000000 --- a/uavcan/node/port/433.GetStatistics.0.1.uavcan +++ /dev/null @@ -1,30 +0,0 @@ -# This service is used to obtain statistical metrics of a port (either message or service). -# It can be used for advanced network inspections, e.g. for building real-time traffic maps. - -ID.1.0 port_id # The port of interest; can be either a service or a message. - -@assert _offset_ == {24} -@sealed - ---- - -uavcan.node.IOStatistics.0.1 statistics -# For messages, "emitted" applies to publications, and "received" applies to subscribers. -# -# For services, "emitted" applies to responses, and "received" applies to requests. Normally, they -# should be equal; however, under certain circumstances the number of responses ("emitted") can be -# lower, e.g. if the server could not or chose not to send a response. -# -# The "emitted" and "received" counters reflect the number of successful transactions only. -# Failed transcations should not affect their values; instead, they should be reflected in the error counter. -# -# The error counter represents how many transfers could not be successfully received or emitted due to -# an error of any kind anywhere in the network stack, excluding application-level errors. -# For example, if the message could not be decoded because of a data type compatibility problem, -# such incident should be reported here via this field. On the other hand, if the message or service -# call was processed properly, but the application could not act upon that data, it should not be -# reported here because that problem should be attributed to a different level of abstraction. -# The exact definition of an error and the methods of their counting are implementation-defined. - -@assert _offset_ == {15 * 8} # 15 bytes max; this service is optimized for high-frequency polling -@extent 48 * 8