Expand description
Inline-QoS helpers for DDS-RPC and SEDP (DDS-RPC 1.0 §7.8.2).
Inline QoS is a crate::parameter_list::ParameterList in the body
of a DATA/DATA_FRAG submessage (Q flag, Spec §9.4.5.3). Phase 2 already uses
it for PID_KEY_HASH, PID_STATUS_INFO etc. — this module
adds helpers for the RPC-specific inline-QoS PIDs:
PID_RELATED_SAMPLE_IDENTITY = 0x0083(DDS-RPC 1.0 §7.8.2): is set by the reply writer in the inline QoS of every reply DATA; the value is therequest_id(SampleIdentity= 16 byte writer_guid + 8 byte sequence_number) of the correlated request. Encoding: XCDR2-Final, alignment cap=4, i.e. 24 bytes without padding.
We encapsulate encode/decode here so that zerodds-rpc can work without a
hard dependency on RTPS internals like the Parameter layout.
Modules§
- status_
info - Spec §9.6.3.9 —
PID_STATUS_INFObits.
Structs§
- Sample
Identity Bytes - Wire representation of a
SampleIdentity(DDS-RPC 1.0 §7.5.1.1.1).
Constants§
- SAMPLE_
IDENTITY_ WIRE_ SIZE - Spec constant: 16 byte writer GUID + 8 byte sequence number.
Functions§
- directed_
write_ matches_ reader - Spec §8.7.7 — receiver-side filter: returns
trueif the sample is addressed to the reader withown_reader_guid(or no directed write is set).falseif a PID_DIRECTED_WRITE is present and the value does NOT match own_guid — the caller MUST then discard the sample. - directed_
write_ param - Spec §8.7.7 / §9.6.2.2.5 —
PID_DIRECTED_WRITEas inline QoS. Marks a sample as a point-to-point send to a single target reader (16 byte GUID). Other readers that receive the sample (e.g. via multicast) MUST discard it. - find_
directed_ write - Reads
PID_DIRECTED_WRITEfrom an inline-QoS list. - find_
key_ hash - Reads
PID_KEY_HASHfrom an inline-QoS list (Spec §9.6.4.8 + XTypes 1.3 §7.6.8). Returns the 16-byte identity of the instance, orNoneif the PID is missing / the value has an invalid length. - find_
original_ writer_ info - Reads
PID_ORIGINAL_WRITER_INFOfrom an inline-QoS list. - find_
related_ sample_ identity - Reads
PID_RELATED_SAMPLE_IDENTITYfrom an inline-QoS list. - find_
status_ info - Reads
PID_STATUS_INFOfrom an inline-QoS list. Returns the 4-byte status word, orNoneif the PID is missing / the value is not 4 bytes. - lifecycle_
inline_ qos - Builds an inline-QoS
ParameterListfor a lifecycle marker —PID_KEY_HASH(16 byte) +PID_STATUS_INFO(4 byte). Sent by the writer ondispose/unregister_instance. - original_
writer_ info_ param - Spec §8.7.9 —
PID_ORIGINAL_WRITER_INFOas inline QoS. 24-byte value: 16 byte original GUID + 8 byte SequenceNumber (signed i64). Set by the persistence service when it forwards a historical sample on behalf of another writer. - related_
sample_ identity_ param - Builds a
ParameterwithPID_RELATED_SAMPLE_IDENTITY(0x0083) and the 24-byte XCDR2 encoding of theSampleIdentityas the value. - reply_
inline_ qos - Builds an inline-QoS
ParameterListthat carries only thePID_RELATED_SAMPLE_IDENTITY— good enough for the reply DATA of a simple RPC operation. Callers can add further parameters (PID_KEY_HASHetc.) viapush. - status_
info_ param - Builds a
ParameterwithPID_STATUS_INFO(0x0071). The value is a 4-byte status word (bits perstatus_info). The spec requires big-endian encoding independent of the RTPS header endianness (DDSI-RTPS 2.5 §9.6.3.9).