Struct ntp_proto::StandardClockController
source · pub struct StandardClockController<C: NtpClock, PeerID: Hash + Eq + Copy + Debug> { /* private fields */ }Trait Implementations§
source§impl<C: Debug + NtpClock, PeerID: Debug + Hash + Eq + Copy + Debug> Debug for StandardClockController<C, PeerID>
impl<C: Debug + NtpClock, PeerID: Debug + Hash + Eq + Copy + Debug> Debug for StandardClockController<C, PeerID>
source§impl<C: NtpClock, PeerID: Hash + Eq + Copy + Debug> TimeSyncController<C, PeerID> for StandardClockController<C, PeerID>
impl<C: NtpClock, PeerID: Hash + Eq + Copy + Debug> TimeSyncController<C, PeerID> for StandardClockController<C, PeerID>
type AlgorithmConfig = AlgorithmConfig
source§fn new(clock: C, config: SystemConfig, algo_config: AlgorithmConfig) -> Self
fn new(clock: C, config: SystemConfig, algo_config: AlgorithmConfig) -> Self
Create a new clock controller controling the given clock
source§fn update_config(&mut self, config: SystemConfig, algo_config: AlgorithmConfig)
fn update_config(&mut self, config: SystemConfig, algo_config: AlgorithmConfig)
Update used system config
source§fn peer_remove(&mut self, id: PeerID)
fn peer_remove(&mut self, id: PeerID)
Notify the controller that a previous peer has gone
source§fn peer_update(&mut self, id: PeerID, usable: bool)
fn peer_update(&mut self, id: PeerID, usable: bool)
Notify the controller that the status of a peer (whether
or not it is usable for synchronization) has changed.
source§fn peer_measurement(
&mut self,
id: PeerID,
measurement: Measurement,
packet: NtpPacket<'static>
) -> StateUpdate<PeerID>
fn peer_measurement( &mut self, id: PeerID, measurement: Measurement, packet: NtpPacket<'static> ) -> StateUpdate<PeerID>
Notify the controller of a new measurement from a peer.
The list of peerIDs is used for loop detection, with the
first peerID given considered the primary peer used.
source§fn time_update(&mut self) -> StateUpdate<PeerID>
fn time_update(&mut self) -> StateUpdate<PeerID>
Non-measurement driven update (queued via next_update)
source§fn peer_snapshot(&self, id: PeerID) -> Option<ObservablePeerTimedata>
fn peer_snapshot(&self, id: PeerID) -> Option<ObservablePeerTimedata>
Get a snapshot of the timekeeping state of a peer.