SatCat5
satcat5::ptp::ClockInfo Struct Reference

Detailed Description

Clock configuration metadata for the ANNOUNCE message.

Definition at line 117 of file ptp_header.h.

#include <ptp_header.h>

Public Member Functions

 ClockInfo (const ClockInfo &t)=default
 
ClockInfooperator= (const ClockInfo &t)=default
 
bool read_from (satcat5::io::Readable *rd)
 Read clock information from a given source.
 
void write_to (satcat5::io::Writeable *wr) const
 Write clock information to the given sink.
 

Public Attributes

u8 grandmasterPriority1
 Fields defined in Section 13.5.1, Table 43. More...
 
u8 grandmasterClass
 Fields defined in Section 13.5.1, Table 43. More...
 
u8 grandmasterAccuracy
 Fields defined in Section 13.5.1, Table 43. More...
 
u16 grandmasterVariance
 Fields defined in Section 13.5.1, Table 43. More...
 
u8 grandmasterPriority2
 Fields defined in Section 13.5.1, Table 43. More...
 
u64 grandmasterIdentity
 Fields defined in Section 13.5.1, Table 43. More...
 
u16 stepsRemoved
 Fields defined in Section 13.5.1, Table 43. More...
 
u8 timeSource
 Fields defined in Section 13.5.1, Table 43. More...
 

Static Public Attributes

static constexpr u8 PRIORITY_MIN = 255
 Priority index: Lower values take priority.
 
static constexpr u8 PRIORITY_MID = 128
 
static constexpr u8 PRIORITY_MAX = 0
 
static constexpr u8 CLASS_PRIMARY = 6
 ClockClass values from Section 7.6.2.5, Table 4. More...
 
static constexpr u8 CLASS_PRIMARY_HOLDOVER = 7
 
static constexpr u8 CLASS_APP_SPEC = 13
 
static constexpr u8 CLASS_APP_SPEC_HOLDOVER = 14
 
static constexpr u8 CLASS_PRIMARY_DEG_A = 52
 
static constexpr u8 CLASS_APP_SPEC_DEG_A = 58
 
static constexpr u8 CLASS_PRIMARY_DEG_B = 187
 
static constexpr u8 CLASS_APP_SPEC_DEG_B = 193
 
static constexpr u8 CLASS_DEFAULT = 248
 
static constexpr u8 CLASS_SLAVE = 255
 
static constexpr u8 ACCURACY_1PSEC = 0x17
 Accuracy enumeration from Section 7.6.2.6, Table 5.
 
static constexpr u8 ACCURACY_2PSEC = 0x18
 
static constexpr u8 ACCURACY_10PSEC = 0x19
 
static constexpr u8 ACCURACY_25PSEC = 0x1A
 
static constexpr u8 ACCURACY_100PSEC = 0x1B
 
static constexpr u8 ACCURACY_250PSEC = 0x1C
 
static constexpr u8 ACCURACY_1NSEC = 0x1D
 
static constexpr u8 ACCURACY_2NSEC = 0x1E
 
static constexpr u8 ACCURACY_10NSEC = 0x1F
 
static constexpr u8 ACCURACY_25NSEC = 0x20
 
static constexpr u8 ACCURACY_100NSEC = 0x21
 
static constexpr u8 ACCURACY_250NSEC = 0x22
 
static constexpr u8 ACCURACY_1USEC = 0x23
 
static constexpr u8 ACCURACY_2USEC = 0x24
 
static constexpr u8 ACCURACY_10USEC = 0x25
 
static constexpr u8 ACCURACY_25USEC = 0x26
 
static constexpr u8 ACCURACY_100USEC = 0x27
 
static constexpr u8 ACCURACY_250USEC = 0x28
 
static constexpr u8 ACCURACY_1MSEC = 0x29
 
static constexpr u8 ACCURACY_2MSEC = 0x2A
 
static constexpr u8 ACCURACY_10MSEC = 0x2B
 
static constexpr u8 ACCURACY_25MSEC = 0x2C
 
static constexpr u8 ACCURACY_100MSEC = 0x2D
 
static constexpr u8 ACCURACY_250MSEC = 0x2E
 
static constexpr u8 ACCURACY_1SEC = 0x2F
 
static constexpr u8 ACCURACY_10SEC = 0x30
 
static constexpr u8 ACCURACY_LOW = 0x31
 
static constexpr u8 ACCURACY_UNK = 0xFE
 
static constexpr u16 VARIANCE_1PSEC = 0x3046
 The "offsetScaledLogVariance" metric. More...
 
static constexpr u16 VARIANCE_10PSEC = 0x36EB
 
static constexpr u16 VARIANCE_100PSEC = 0x3D90
 
static constexpr u16 VARIANCE_1NSEC = 0x4435
 
static constexpr u16 VARIANCE_10NSEC = 0x4AD9
 
static constexpr u16 VARIANCE_100NSEC = 0x517E
 
static constexpr u16 VARIANCE_1USEC = 0x5823
 
static constexpr u16 VARIANCE_10USEC = 0x5EC8
 
static constexpr u16 VARIANCE_100USEC = 0x656D
 
static constexpr u16 VARIANCE_1MSEC = 0x6C12
 
static constexpr u16 VARIANCE_10MSEC = 0x72B6
 
static constexpr u16 VARIANCE_100MSEC = 0x795B
 
static constexpr u16 VARIANCE_1SEC = 0x8000
 
static constexpr u16 VARIANCE_MAX = 0xFFFF
 
static constexpr u8 SRC_ATOMIC = 0x10
 TimeSource values from Section 7.6.2.8, Table 6.
 
static constexpr u8 SRC_GNSS = 0x20
 
static constexpr u8 SRC_RADIO = 0x30
 
static constexpr u8 SRC_SERIAL = 0x39
 
static constexpr u8 SRC_PTP = 0x40
 
static constexpr u8 SRC_NTP = 0x50
 
static constexpr u8 SRC_MANUAL = 0x60
 
static constexpr u8 SRC_OTHER = 0x90
 
static constexpr u8 SRC_INTERNAL = 0xA0
 

Member Data Documentation

◆ CLASS_PRIMARY

constexpr u8 satcat5::ptp::ClockInfo::CLASS_PRIMARY = 6
staticconstexpr

ClockClass values from Section 7.6.2.5, Table 4.

(Indicates whether a clock is traceable to NIST or similar.)

Definition at line 140 of file ptp_header.h.

◆ grandmasterAccuracy

u8 satcat5::ptp::ClockInfo::grandmasterAccuracy

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 123 of file ptp_header.h.

◆ grandmasterClass

u8 satcat5::ptp::ClockInfo::grandmasterClass

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 122 of file ptp_header.h.

◆ grandmasterIdentity

u64 satcat5::ptp::ClockInfo::grandmasterIdentity

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 126 of file ptp_header.h.

◆ grandmasterPriority1

u8 satcat5::ptp::ClockInfo::grandmasterPriority1

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 121 of file ptp_header.h.

◆ grandmasterPriority2

u8 satcat5::ptp::ClockInfo::grandmasterPriority2

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 125 of file ptp_header.h.

◆ grandmasterVariance

u16 satcat5::ptp::ClockInfo::grandmasterVariance

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 124 of file ptp_header.h.

◆ stepsRemoved

u16 satcat5::ptp::ClockInfo::stepsRemoved

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 127 of file ptp_header.h.

◆ timeSource

u8 satcat5::ptp::ClockInfo::timeSource

Fields defined in Section 13.5.1, Table 43.

(ClockQuality subfields defined in Section 5.3.7)

Definition at line 128 of file ptp_header.h.

◆ VARIANCE_1PSEC

constexpr u16 satcat5::ptp::ClockInfo::VARIANCE_1PSEC = 0x3046
staticconstexpr

The "offsetScaledLogVariance" metric.

The stability heuristic defined in Section 7.6.3.3 is a fixed-point representation of the Allan deviation: round(512 * log2(adev_sec) + 32768) The constants defined below are precalculated examples for a series of given standard deviations.

Definition at line 189 of file ptp_header.h.


The documentation for this struct was generated from the following files: