Expand description
RTPS wire base types (DDSI-RTPS 2.5 §8.3.5, §8.3.5.1).
These types are the atoms of the RTPS wire format: GUID components, sequence numbers, locators. They are all pure byte structures with a fixed layout (no XCDR alignment, no endianness tagging on the type — the endianness of a submessage stream slice comes from the submessage-header E flag).
§Convention
read_from_le/read_from_be: decoder with explicit endianness.write_to_le/write_to_be: encoder, symmetric.WIRE_SIZE: constant with the fixed byte count on the wire.
Structs§
- Entity
Id EntityId: 4-byte endpoint identifier within a participant. Layout: 3 bytesentity_key+ 1 byteentity_kind.- Fragment
Number FragmentNumber: 32-bit unsigned, 1-based (fragment #1 is the first fragment of a sample).UNKNOWN= 0 is used as a sentinel, but is not a valid fragment.- Guid
Guid: GuidPrefix + EntityId = 16 bytes. Globally unique identifier of an endpoint.- Guid
Prefix GuidPrefix: 12-byte prefix of a GUID. Identifies a participant; stays the same for all endpoints of the participant.- Locator
Locator: 24-byte address (kind + port + 16-byte address).- Protocol
Version ProtocolVersion: major + minor of the RTPS protocol. Currently 2.5.- Sequence
Number SequenceNumber: 64-bit signed, encoded as (high: i32, low: u32). Both fields are written with the active submessage endianness.- UExtension4
UExtension4_t— 4-byte vendor-specific extension slot. Spec §8.3.2: opaque 32-bit value, the vendor decides its meaning; the receiver propagates the value via theextensionsfield into the receiver state.- Vendor
Id VendorId: 2-byte vendor identifier. ZeroDDS uses0x01F0as an interim value from the OMG developer range, until an official VendorId is requested.- WExtension8
WExtension8_t— 8-byte vendor-specific extension slot. Spec §8.3.2: opaque 64-bit value (analogous to UExtension4_t for fields that need 8 bytes, e.g. for 64-bit counters).
Enums§
- Entity
Kind EntityKind: classification of an endpoint. Spec Table 9.1.- Locator
Kind LocatorKind: address family of a locator.
Constants§
- SPDP_
DEFAULT_ MULTICAST_ ADDRESS - SPDP default multicast address (Spec §9.6.1.4.1):
239.255.0.1. - SPDP_
DISCOVERY_ MULTICAST_ OFFSET - Multicast discovery port offset (Spec §9.6.1.4.1, d0).
- SPDP_
DOMAIN_ GAIN - Domain-specific port offset (Spec §9.6.1.4.1, DG).
- SPDP_
PORT_ BASE - SPDP discovery port base (Spec §9.6.1.4.1, PB).
Functions§
- spdp_
multicast_ port - Computes the SPDP multicast discovery port for a domain. Formula (Spec §9.6.1.4.1): port = PB + DG * domain_id + d0 = 7400 + 250 * domain + 0