pub struct RlcController { /* private fields */ }Expand description
Immediate-up / conservative-down controller for the RLC parameters. It
raises protection (coding on, smaller step, larger window, denser
coefficients) the instant the sensors call for it - cheap insurance against
loss - but only lowers it after hold consecutive ticks that all want less,
so a brief quiet spell does not strip protection. Turning coding OFF
entirely (disable-on-clean) is the riskiest de-escalation, so it needs the
longer clean_hold sustained-clean window, exactly as the block-RS policy
guards the drop to Passthrough.
Implementations§
Source§impl RlcController
impl RlcController
Sourcepub fn new(window: u16, step: u16, dt: u8, hold: u32) -> Self
pub fn new(window: u16, step: u16, dt: u8, hold: u32) -> Self
A controller starting from active coding at the given parameters, with
hold lower-demand ticks required before relaxing a knob and
4 * hold sustained-clean ticks before disabling coding entirely.
Sourcepub fn with_holds(
window: u16,
step: u16,
dt: u8,
hold: u32,
clean_hold: u32,
) -> Self
pub fn with_holds( window: u16, step: u16, dt: u8, hold: u32, clean_hold: u32, ) -> Self
Like new but with an explicit clean_hold.
Sourcepub fn set_rtt_ms(&mut self, rtt_ms: f32)
pub fn set_rtt_ms(&mut self, rtt_ms: f32)
Set the measured round trip (ms), which scales the rate-law margin.
Sourcepub fn set_latency_floor(&mut self)
pub fn set_latency_floor(&mut self)
Enable the latency-priority floor at the current baseline step: the controller never relaxes FEC lighter than this (nor disables coding), so an isolated loss always has an in-window repair and never falls to an ARQ round trip that stalls in-order delivery. The controller may still escalate HEAVIER under high loss. Call once at construction, before any feedback.
Sourcepub fn current(&self) -> RlcDecision
pub fn current(&self) -> RlcDecision
The current coding configuration.
Sourcepub fn decide(&mut self, s: &SensorSnapshot) -> RlcDecision
pub fn decide(&mut self, s: &SensorSnapshot) -> RlcDecision
Fold one channel assessment and return the configuration to apply.
Trait Implementations§
Source§impl Clone for RlcController
impl Clone for RlcController
Source§fn clone(&self) -> RlcController
fn clone(&self) -> RlcController
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more