pub struct TimePropertiesDS {
pub current_utc_offset: Option<i16>,
pub leap_indicator: LeapIndicator,
pub time_traceable: bool,
pub frequency_traceable: bool,
pub ptp_timescale: bool,
pub time_source: TimeSource,
}
Expand description
A concrete implementation of the PTP Time Properties dataset
This dataset describes the timescale currently in use, as well as any upcoming leap seconds on that timescale.
For more details see IEEE1588-2019 section 8.2.4.
Fields§
§current_utc_offset: Option<i16>
The offset off UTC time compared to TAI time in seconds.
leap_indicator: LeapIndicator
Describes upcoming leap seconds.
time_traceable: bool
Wheter the timescale is tracable to a primary reference
frequency_traceable: bool
Wheter the frequence determining the timescale is tracable to a primary reference. True when the timescale is PTP, false when the timescale is ARB.
ptp_timescale: bool
Wheter the timescale of the Grandmaster PTP Instance is PTP.
time_source: TimeSource
The time source used by the Grandmaster PTP instance.
Implementations§
Source§impl TimePropertiesDS
impl TimePropertiesDS
Sourcepub fn new_ptp_time(
current_utc_offset: Option<i16>,
leap_indicator: LeapIndicator,
time_traceable: bool,
frequency_traceable: bool,
time_source: TimeSource,
) -> Self
pub fn new_ptp_time( current_utc_offset: Option<i16>, leap_indicator: LeapIndicator, time_traceable: bool, frequency_traceable: bool, time_source: TimeSource, ) -> Self
Create a Time Properties data set for the PTP timescale.
This creates a dataset for the default PTP timescale, which is UTC seconds since the PTP epoch excluding leap seconds. The traceability properties indicate whether the current clock time and frequency can be traced back to an internationally recognized standard in the metrology sense of the word. When in doubt, just set these to false.
Sourcepub fn new_arbitrary_time(
time_traceable: bool,
frequency_traceable: bool,
time_source: TimeSource,
) -> Self
pub fn new_arbitrary_time( time_traceable: bool, frequency_traceable: bool, time_source: TimeSource, ) -> Self
Create a Time Properties data set for an Arbitrary timescale
The arbitrary timescale can be used when wanting to synchronize multiple computers using PTP to a timescale that is unrelated to UTC. The traceability properties indicate whether the current clock time and frequency can be traced back to an internationally recognized standard in the metrology sense of the word. When in doubt, just set these to false.
Sourcepub fn leap_indicator(&self) -> LeapIndicator
pub fn leap_indicator(&self) -> LeapIndicator
Information on upcoming leap seconds
Sourcepub fn utc_offset(&self) -> Option<i16>
pub fn utc_offset(&self) -> Option<i16>
Current offset to UTC caused by leap seconds
Returns None
if this time scale is not referenced to UTC
Trait Implementations§
Source§impl Clone for TimePropertiesDS
impl Clone for TimePropertiesDS
Source§fn clone(&self) -> TimePropertiesDS
fn clone(&self) -> TimePropertiesDS
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more