Skip to main content

Module message_builder

Module message_builder 

Source
Expand description

MessageBuilder — submessage aggregation into a UDP datagram.

Analogous to Fast-DDS RTPSMessageGroup (research WP 1.4). The writer opens a builder per target locator set, appends several submessages, and finalizes into an OutboundDatagram. Aggregation saves the RTPS header + UDP overhead on SEDP announce-all rounds and small samples.

§Flush rules

  1. Size trigger: try_add_submessage rejects if the body no longer fits the MTU. The caller must finish() + open a new builder.
  2. DATA_FRAG goes alone: the caller should not bundle DATA_FRAG submessages with others (a fragment is typically near the MTU).
  3. Piggyback HEARTBEAT at the end: the caller appends the HB after all DATAs, before finish().
  4. No INFO_DST: phase 1 builds one datagram per proxy — the GuidPrefix is static. INFO_DST is added for multicast fan-out with mixed targets in phase 2.
  5. No INFO_TS: the writer has no source timestamps today.

§Target locators

A datagram goes to all targets. Typically: the unicast locators of the remote reader, or a multicast locator. The transport layer puts it on the wire once per locator.

Structs§

MessageBuilder
Submessage aggregator.
OutboundDatagram
A fully aggregated datagram with targets.

Enums§

AddError
Reason why MessageBuilder::try_add_submessage rejects.

Constants§

DEFAULT_MTU
Default MTU for aggregation (Ethernet 1500 − 20 IP − 8 UDP).