Skip to main content

Module reliable

Module reliable 

Source
Expand description

Reliable writers and readers (DDSI-RTPS 2.5, 8.4.2, 8.4.9.2 and 8.4.12.2), without I/O.

ReliableWriter keeps a history of changes and, for each matched reader, what was sent, acknowledged and asked for again. It pushes new changes, answers ACKNACKs with DATA or GAP, and sends HEARTBEATs while changes are not acknowledged. ReliableReader keeps, for each matched writer, which sequence numbers it has; it delivers changes in order and answers HEARTBEATs with ACKNACKs.

Both follow the stateful reference implementation in what they send, but are written against the requirements of 8.4.2 only. They are used by SEDP (rustorb-dds#6) and by the user endpoints of rustorb-dds (rustorb-dds#16).

A ReliableWriter can also serve best-effort readers (8.4.4: a RELIABLE writer matches BEST_EFFORT readers too): they are sent each change once, and no HEARTBEAT, GAP or repair.

Changes too large for a datagram go as DATA_FRAG (8.4.14.1, see crate::frag): the writer resends the fragments a NACK_FRAG asks for, and the reader asks with NACK_FRAG for the fragments it misses of a change it has part of.

The caller passes in received submessages and the time, calls poll to get the datagrams to send, and waits until next_deadline.

Structs§

Change
A change in a writer’s history: what a DATA submessage carries.
MatchedReader
How a matched reader is served by a ReliableWriter.
Outgoing
A datagram to send to some locators.
ReaderConfig
Timing of a ReliableReader (8.4.10.1).
ReliableReader
A reliable reader: the writer proxies of a stateful reader (8.4.10, 8.4.12.2). Changes are delivered once each and, for each writer, in sequence number order.
ReliableWriter
A reliable writer: the history and the reader proxies of a stateful writer (8.4.7, 8.4.9.2).
WriterConfig
Timing of a ReliableWriter (8.4.7.1). All of them can be tuned, as 8.4.2.1 requires.