statime/port/
measurement.rs

1use crate::time::{Duration, Time};
2
3/// A single measurement as produced by a PTP port.
4/// Depending on what trigerred the measurements, not
5/// all fields will be populated
6#[derive(Default, Clone, Copy, Debug, Eq, PartialEq)]
7pub struct Measurement {
8    /// Time this measurement was made.
9    pub event_time: Time,
10    /// Offset to the remote PTP node.
11    pub offset: Option<Duration>,
12    /// Delay to the remote PTP node.
13    pub delay: Option<Duration>,
14    /// Peer delay on the port,
15    pub peer_delay: Option<Duration>,
16    /// Raw offset calculated from a sync message
17    pub raw_sync_offset: Option<Duration>,
18    /// Raw offset calculated from a delay message
19    pub raw_delay_offset: Option<Duration>,
20}