pub enum CodePolicy {
Auto {
up_q8: u8,
down_q8: u8,
},
ForceRlc,
ForceRs,
}Expand description
How the unified transport selects its erasure code.
Variants§
Auto
Loss-driven with hysteresis. up_q8 / down_q8 are forward-loss
thresholds (quantized loss * 256, matching the FEEDBACK frame):
switch RLC -> RS when loss sustains above up_q8, RS -> RLC when it
sustains below down_q8. up_q8 > down_q8 is the hysteresis band.
ForceRlc
Force the sliding-window RLC code regardless of loss (operator override).
ForceRs
Force the block Reed-Solomon code regardless of loss (operator override).
Implementations§
Source§impl CodePolicy
impl CodePolicy
Sourcepub fn default_auto() -> Self
pub fn default_auto() -> Self
The default loss-driven policy, thresholds set from the measured crossover
with RS provisioned to cover the loss: switch UP to RS at ~15%
(q8 = CROSSOVER_LOSS_Q8 = 38, where RS overtakes RLC on both throughput
and bounded tail latency) and back DOWN to RLC at ~10% (q8 = 26). RLC
keeps the sub-crossover regime for its lower TTFD / median; the ~5-point
hysteresis band keeps a loss level hovering at the boundary from flapping
the code.
Sourcepub fn initial_code(&self) -> SensCode
pub fn initial_code(&self) -> SensCode
The code this policy starts a connection on. Auto and ForceRlc start on RLC (the low-latency primary); ForceRs starts on RS.
Trait Implementations§
Source§impl Clone for CodePolicy
impl Clone for CodePolicy
Source§fn clone(&self) -> CodePolicy
fn clone(&self) -> CodePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more