pub enum ReferenceClock {
Ntp(Ntp),
Ptp(Ptp),
Gps,
Gal,
Glonass,
Local,
Private(PrivateSource),
Ext(ClockSourceExt),
}Expand description
Reference clock.
This maps to the ts-refclk attribute.
Variants§
Implementations§
Source§impl ReferenceClock
impl ReferenceClock
Sourcepub fn from_ntp_hostname(hostname: impl ToString) -> Self
pub fn from_ntp_hostname(hostname: impl ToString) -> Self
Constructs an NTP ReferenceClock from the specified hostname.
Sourcepub fn from_ntp_hostname_with_port(hostname: impl ToString, port: u16) -> Self
pub fn from_ntp_hostname_with_port(hostname: impl ToString, port: u16) -> Self
Constructs an NTP ReferenceClock from the specified hostname and port.
Sourcepub fn new_ntp_traceable() -> Self
pub fn new_ntp_traceable() -> Self
Constructs a traceable NTP ReferenceClock.
Sourcepub fn from_ptp_gmid(version: PtpVersion, gmid: impl Into<Eui64>) -> Self
pub fn from_ptp_gmid(version: PtpVersion, gmid: impl Into<Eui64>) -> Self
Constructs a PTP ReferenceClock from the specified PtpVersion and GMID.
Sourcepub fn from_ptp_gmid_with_domain(
gmid: impl Into<Eui64>,
domain: PtpDomain,
) -> Self
pub fn from_ptp_gmid_with_domain( gmid: impl Into<Eui64>, domain: PtpDomain, ) -> Self
Constructs a PTP ReferenceClock from the specified GMID and PtpDomain.
Sourcepub fn from_ptp_gmid_with_domain_name(
gmid: impl Into<Eui64>,
name: impl ToString,
) -> Self
pub fn from_ptp_gmid_with_domain_name( gmid: impl Into<Eui64>, name: impl ToString, ) -> Self
Constructs a PTP ReferenceClock from the specified GMID and domain name.
This will assign version IEEE 1588-2002.
Sourcepub fn try_from_ptp_gmid_with_domain_number(
gmid: impl Into<Eui64>,
number: u8,
) -> Result<Self, AttributeError>
pub fn try_from_ptp_gmid_with_domain_number( gmid: impl Into<Eui64>, number: u8, ) -> Result<Self, AttributeError>
Tries to construct a PTP ReferenceClock from the specified GMID and domain number.
This will assign version IEEE 1588-2008.
Returns an Error if number is not in range (0-127) (inclusive)
Sourcepub fn new_ptp_traceable(version: PtpVersion) -> Self
pub fn new_ptp_traceable(version: PtpVersion) -> Self
Constructs a traceable PTP ReferenceClock.
Sourcepub fn new_private_source_standard() -> Self
pub fn new_private_source_standard() -> Self
Constructs a standard private source ReferenceClock.
Sourcepub fn new_private_source_traceable() -> Self
pub fn new_private_source_traceable() -> Self
Constructs a traceable private source ReferenceClock.
Sourcepub fn from_clock_source_ext_name(name: impl ToString) -> Self
pub fn from_clock_source_ext_name(name: impl ToString) -> Self
Constructs an extended clock source ReferenceClock from the specified name.
Sourcepub fn from_clock_source_ext_name_with_value(
name: impl ToString,
value: impl ToString,
) -> Self
pub fn from_clock_source_ext_name_with_value( name: impl ToString, value: impl ToString, ) -> Self
Constructs an extended clock source ReferenceClock from the specified name and value.
Trait Implementations§
Source§impl Clone for ReferenceClock
impl Clone for ReferenceClock
Source§fn clone(&self) -> ReferenceClock
fn clone(&self) -> ReferenceClock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more