Skip to main content

Module parameter_list

Module parameter_list 

Source
Expand description

ParameterList (DDSI-RTPS 2.5 §9.4.2.11).

Tag-length-value format for SPDP/SEDP builtin topic data. Each parameter:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         parameter_id          |            length             |
 +---------------+---------------+---------------+---------------+
 |                          value (length bytes)                 |
 +---------------+---------------+---------------+---------------+

Terminator: parameter_id = PID_SENTINEL (0x0001), length = 0, no value.

Encoding is always with the submessage endianness; this module works on raw bytes with an explicit little_endian parameter.

Modules§

pid
Standard parameter IDs (spec §9.6.4 + table 9.13).

Structs§

Parameter
A single parameter (tag + bytes value).
ParameterList
ParameterList = a sequence of parameters + a sentinel terminator.

Constants§

MAX_PARAMETERS
DoS cap for the parameter count in a ParameterList (SEDP/SPDP amplification protection). 4 096 fits all payloads (realistically <100 per message); malicious peers can announce u16::MAX=65_535 times {pid=XXXX, length=0} and, without a cap, trigger hours-long iteration.
MUST_UNDERSTAND_BIT
Spec §9.4.2.11.2 — the must-understand bit of the parameter id. If it is set and the receiver does not know the PID, the whole message MUST be discarded.
VENDOR_SPECIFIC_BIT
Spec §9.4.2.11.2 — Vendor-spezifische PIDs ab 0x8000.

Functions§

is_standard_pid
true if masked_pid (without the must-understand and vendor bits) is a PID known in the DDSI-RTPS 2.5 + DDS-Security 1.2 spec set. Used by ParameterList::validate_must_understand_in_data_pipeline to implement the must-understand reject logic (spec §9.4.2.11.2).