Skip to main content

RlcController

Struct RlcController 

Source
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

Source

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.

Source

pub fn with_holds( window: u16, step: u16, dt: u8, hold: u32, clean_hold: u32, ) -> Self

Like new but with an explicit clean_hold.

Source

pub fn set_rtt_ms(&mut self, rtt_ms: f32)

Set the measured round trip (ms), which scales the rate-law margin.

Source

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.

Source

pub fn current(&self) -> RlcDecision

The current coding configuration.

Source

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

Source§

fn clone(&self) -> RlcController

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RlcController

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.