statime/observability/
parent.rs1use crate::{
2 config::{ClockIdentity, ClockQuality},
3 datastructures::{common::PortIdentity, datasets::InternalParentDS},
4};
5
6#[derive(Copy, Clone, Debug, Eq, PartialEq)]
15#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
16pub struct ParentDS {
17 pub parent_port_identity: PortIdentity,
19 pub grandmaster_identity: ClockIdentity,
21 pub grandmaster_clock_quality: ClockQuality,
23 pub grandmaster_priority_1: u8,
25 pub grandmaster_priority_2: u8,
27}
28
29impl From<&InternalParentDS> for ParentDS {
30 fn from(v: &InternalParentDS) -> Self {
31 Self {
32 parent_port_identity: v.parent_port_identity,
33 grandmaster_identity: v.grandmaster_identity,
34 grandmaster_clock_quality: v.grandmaster_clock_quality,
35 grandmaster_priority_1: v.grandmaster_priority_1,
36 grandmaster_priority_2: v.grandmaster_priority_2,
37 }
38 }
39}