68 TYPE_PDELAY_REQ = 0x2,
69 TYPE_PDELAY_RESP = 0x3,
71 TYPE_DELAY_RESP = 0x9,
72 TYPE_PDELAY_RFU = 0xA,
75 TYPE_MANAGEMENT = 0xD;
80 FLAG_LEAP59 = (1u << 1),
81 FLAG_UTC_VALID = (1u << 2),
82 FLAG_PTP_TIMESCALE = (1u << 3),
83 FLAG_TIME_TRACEABLE = (1u << 4),
84 FLAG_FREQ_TRACEABLE = (1u << 5),
85 FLAG_UNCERTAIN = (1u << 6),
86 FLAG_ALT_MASTER = (1u << 8),
87 FLAG_TWO_STEP = (1u << 9),
88 FLAG_UNICAST = (1u << 10),
89 FLAG_PROFILE1 = (1u << 13),
90 FLAG_PROFILE2 = (1u << 14);
103 static constexpr
unsigned MAX_MSGLEN = 30;
114 {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, 0, 0, 0};
141 CLASS_PRIMARY_HOLDOVER = 7,
143 CLASS_APP_SPEC_HOLDOVER = 14,
144 CLASS_PRIMARY_DEG_A = 52,
145 CLASS_APP_SPEC_DEG_A = 58,
146 CLASS_PRIMARY_DEG_B = 187,
147 CLASS_APP_SPEC_DEG_B = 193,
154 ACCURACY_2PSEC = 0x18,
155 ACCURACY_10PSEC = 0x19,
156 ACCURACY_25PSEC = 0x1A,
157 ACCURACY_100PSEC = 0x1B,
158 ACCURACY_250PSEC = 0x1C,
159 ACCURACY_1NSEC = 0x1D,
160 ACCURACY_2NSEC = 0x1E,
161 ACCURACY_10NSEC = 0x1F,
162 ACCURACY_25NSEC = 0x20,
163 ACCURACY_100NSEC = 0x21,
164 ACCURACY_250NSEC = 0x22,
165 ACCURACY_1USEC = 0x23,
166 ACCURACY_2USEC = 0x24,
167 ACCURACY_10USEC = 0x25,
168 ACCURACY_25USEC = 0x26,
169 ACCURACY_100USEC = 0x27,
170 ACCURACY_250USEC = 0x28,
171 ACCURACY_1MSEC = 0x29,
172 ACCURACY_2MSEC = 0x2A,
173 ACCURACY_10MSEC = 0x2B,
174 ACCURACY_25MSEC = 0x2C,
175 ACCURACY_100MSEC = 0x2D,
176 ACCURACY_250MSEC = 0x2E,
177 ACCURACY_1SEC = 0x2F,
178 ACCURACY_10SEC = 0x30,
190 VARIANCE_10PSEC = 0x36EB,
191 VARIANCE_100PSEC = 0x3D90,
192 VARIANCE_1NSEC = 0x4435,
193 VARIANCE_10NSEC = 0x4AD9,
194 VARIANCE_100NSEC = 0x517E,
195 VARIANCE_1USEC = 0x5823,
196 VARIANCE_10USEC = 0x5EC8,
197 VARIANCE_100USEC = 0x656D,
198 VARIANCE_1MSEC = 0x6C12,
199 VARIANCE_10MSEC = 0x72B6,
200 VARIANCE_100MSEC = 0x795B,
201 VARIANCE_1SEC = 0x8000,
202 VARIANCE_MAX = 0xFFFF;
229 u16 calc_log_variance(u64 variance_ps);
235 ClockInfo::CLASS_DEFAULT,
236 ClockInfo::ACCURACY_UNK,
237 ClockInfo::VARIANCE_MAX,
241 ClockInfo::SRC_INTERNAL,
246 ClockInfo::PRIORITY_MID,
248 ClockInfo::ACCURACY_25NSEC,
249 ClockInfo::VARIANCE_10NSEC,
250 ClockInfo::PRIORITY_MID,
253 ClockInfo::SRC_INTERNAL,
Abstract API for reading byte-streams and packets.
Abstract API for writing byte-streams and packets.
Internal buffer used by the Log class.
"Readable" I/O interface core definitions
"Writeable" I/O interface core definitions
Clock configuration metadata for the ANNOUNCE message.
static constexpr u8 PRIORITY_MIN
Priority index: Lower values take priority.
u16 stepsRemoved
Fields defined in Section 13.5.1, Table 43.
u8 grandmasterPriority1
Fields defined in Section 13.5.1, Table 43.
static constexpr u16 VARIANCE_1PSEC
The "offsetScaledLogVariance" metric.
u64 grandmasterIdentity
Fields defined in Section 13.5.1, Table 43.
u8 timeSource
Fields defined in Section 13.5.1, Table 43.
static constexpr u8 ACCURACY_1PSEC
Accuracy enumeration from Section 7.6.2.6, Table 5.
bool read_from(satcat5::io::Readable *rd)
Read clock information from a given source.
static constexpr u8 CLASS_PRIMARY
ClockClass values from Section 7.6.2.5, Table 4.
u8 grandmasterClass
Fields defined in Section 13.5.1, Table 43.
u8 grandmasterAccuracy
Fields defined in Section 13.5.1, Table 43.
u16 grandmasterVariance
Fields defined in Section 13.5.1, Table 43.
static constexpr u8 SRC_ATOMIC
TimeSource values from Section 7.6.2.8, Table 6.
void write_to(satcat5::io::Writeable *wr) const
Write clock information to the given sink.
u8 grandmasterPriority2
Fields defined in Section 13.5.1, Table 43.
Struct used for sourcePortIdentity and requestingPortIdentity.
bool operator==(const PortId &other) const
Equality check.
bool read_from(satcat5::io::Readable *rd)
Read port-identifier from a given source.
u64 clock_id
Clock identifier.
void write_to(satcat5::io::Writeable *wr) const
Write port-identifier to the given sink.
void log_to(satcat5::log::LogBuffer &wr) const
Log human-readable information about this port-identity.