pub enum Arq {
None,
Bounded {
attempts: u32,
},
Unbounded,
}Expand description
Whether a medium retransmits an SDU it failed to deliver.
This models the modem’s own link-layer ARQ, which many packet radios and
every store-and-forward satellite service provide. Invariant I2 and
architecture §9 draw the line here: using the modem’s ARQ is exactly right,
and inventing one above the modem is what the architecture forbids. A
backend declares what is in front of it (§4.13), and the simulator models
the same three cases, which is why the type is the seam’s and not the
simulator’s: Capabilities::arq and a simulated profile’s arq are one
fact.
It is not free. Every attempt occupies the channel for another airtime, so a link with ARQ and 5% loss carries measurably more than one without — which is the whole reason to model it rather than assume it.
Deliberately not #[non_exhaustive], for Duplex’s reason: a fourth
kind of ARQ changes what every reliability claim means, and should break
every match that reasons about it.
Variants§
None
No retransmission. What a bare packet radio does.
Bounded
Retry a fixed number of times, then give up.
Residual loss is loss^(attempts+1) — small, but not zero, which is why
this may not claim reliable delivery.
Unbounded
Retry until delivered.
Delivery is guaranteed and latency is not. This is the only ARQ setting
that may back a lane declaring rel=1.
Implementations§
Source§impl Arq
impl Arq
Sourcepub fn residual_loss(self, loss: f64) -> f64
pub fn residual_loss(self, loss: f64) -> f64
The probability an SDU is still lost after this ARQ has finished trying.
Stated rather than implied, so a profile’s honesty is checkable and a write-up can quote a number.
Sourcepub fn guarantees_delivery(self) -> bool
pub fn guarantees_delivery(self) -> bool
Whether a medium using this ARQ can honestly claim reliable delivery.