Expand description
Reliable RTPS reader (1:N writer proxies) — DDSI-RTPS 2.5 §8.4.10.
Corresponds to the StatefulReader role with 1..N matched writers.
Fragmentation (§8.4.14) is supported. Multi-writer since WP 1.4
T4.5: a separate WriterProxyState per remote writer with its own
received_cache, delivered_up_to and FragmentAssembler.
§Why per-proxy state?
SequenceNumbers are writer-local (Spec §8.3.5.4). Two writers with overlapping SN spaces would collide in a global cache — hence separate buffers per proxy.
§API-Form
let mut r = ReliableReader::new(...);
r.add_writer_proxy(proxy_for_remote_A);
loop {
match transport.recv_submessage() {
Data(d) => for s in r.handle_data(&d) { deliver(s) },
DataFrag(df) => for s in r.handle_data_frag(&df, uptime()) { deliver(s) },
Heartbeat(h) => r.handle_heartbeat(&h, uptime()),
Gap(g) => for s in r.handle_gap(&g) { deliver(s) },
}
for dg in r.tick(uptime())? { transport.send(dg) }
}Structs§
- Delivered
Sample - A sample delivered to the application.
- Reliable
Reader - A reliable reader with 0..N writer proxies.
- Reliable
Reader Config - Configuration at creation.
- Writer
Proxy State - Per-writer state: the proxy + separate receive state.
Constants§
- DEFAULT_
HEARTBEAT_ RESPONSE_ DELAY - Default heartbeat response delay.