Skip to main content

ControllerStep

Struct ControllerStep 

Source
pub struct ControllerStep {
    pub plan: Plan,
    pub applied_ppm: f64,
    pub estimate_offset_s: f64,
    pub estimate_freq_ppm: Option<f64>,
    pub estimate_sd_s: f64,
    pub samples_used: usize,
    pub verdict: ChangeVerdict,
}
Expand description

What the controller decided, plus what the caller must do about it.

Fields§

§plan: Plan§applied_ppm: f64

Total frequency the driver should command: the permanent correction plus the drain currently running.

§estimate_offset_s: f64

The estimate that produced the plan, for reporting.

§estimate_freq_ppm: Option<f64>§estimate_sd_s: f64

Dispersion of the estimate itself, seconds.

Selection compares intervals of offset ± root_distance, and a root distance built only from path delay describes how well the NETWORK is known while saying nothing about how well this source’s own offset is known. During acquisition those differ by orders of magnitude: the path is a hundred microseconds and the estimate is milliseconds.

Omitting it makes every interval far too narrow to overlap, so a set of perfectly healthy servers forms no majority and selection returns nothing at all — measured on the three-server rig, 74 polls out of 89.

§samples_used: usize§verdict: ChangeVerdict

What the maximum-change guard made of this correction. Mirrored out of the plan so a caller can act on it without matching on the command.

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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.