flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
ptp_types.h
Go to the documentation of this file.
1
10#ifndef FLEXPTP_PTP_TYPES_H_
11#define FLEXPTP_PTP_TYPES_H_
12
13#include <stdbool.h>
14#include <stdint.h>
15
16#include "event.h"
17#include "ptp_defs.h"
18#include "timeutils.h"
19
20#include "ptp_sync_cycle_data.h"
21
22#include <flexptp_options.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifdef FLEXPTP_FREERTOS
29typedef TimerHandle_t TimerType;
30#elif defined(FLEXPTP_CMSIS_OS2)
31typedef osTimerId_t TimerType;
32#endif
33
37typedef enum PTPMessageType {
45 PTP_MT_Announce = 11
47
51typedef enum PTPControl {
56 PTP_CON_Other = 5
58
62typedef struct {
73 bool PTP_LI_59;
74 bool PTP_LI_61;
75} PtpFlags;
76
80typedef struct
81{
82 // 0.
83 uint8_t messageType;
85
86 // 1.
87 uint8_t versionPTP;
89
90 // 2-3.
91 uint16_t messageLength;
92
93 // 4.
94 uint8_t domainNumber;
95
96 // 5.
97 uint8_t _r2;
98
99 // 6-7.
101
102 // 8-15.
103 uint64_t correction_ns;
105
106 // 16-19.
107 uint32_t _r3;
108
109 // 20-27.
110 uint64_t clockIdentity;
111
112 // 28-29
113 uint16_t sourcePortID;
114
115 // 30-31.
116 uint16_t sequenceID;
117
118 // 32.
119 uint8_t control;
120
121 // 33.
122 int8_t logMessagePeriod; // Logarithmic Message Period
123} PtpHeader;
124
128typedef struct {
132
136typedef enum {
138 PTP_TP_802_3 = 1
140
144typedef enum {
146 PTP_DM_P2P = 1
148
152typedef enum {
156
160typedef enum {
162 PTP_MC_GENERAL = 1
164
165#define MAX_PTP_MSG_SIZE (128)
166
170struct RawPtpMessage_;
171
175typedef void(TxCb)(const struct RawPtpMessage_ *pMsg);
176
180typedef enum {
185
186typedef struct RawPtpMessage_ {
188 uint32_t size;
189
190 // --- transmit related ---
191 uint32_t tag;
192 uint32_t ttl;
197
198 // --- data ---
199 uint8_t data[MAX_PTP_MSG_SIZE];
201
205typedef enum {
215 PTP_CC_SLAVE_ONLY = 255
217
221typedef enum {
222 PTP_CA_25NS = 0x20,
242
246typedef enum {
256
257#define PTP_VARIANCE_HAS_NOT_BEEN_COMPUTED (0xFFFF)
258
262typedef struct {
264 uint8_t priority1;
268 uint8_t priority2;
271 uint8_t timeSource;
273
275
279typedef enum PtpM2SState {
283
287typedef enum {
292
296typedef enum {
300
304typedef enum {
309
310typedef enum {
321
325typedef struct {
329 uint16_t masterTOCntr;
330 uint32_t stateDuration;
333
337typedef struct _PtpProfileAdditionalData {
338 const void *data;
339 uint16_t size;
341 struct _PtpProfileAdditionalData *next;
343
347typedef enum {
351 PTP_PF_N
353
357typedef struct {
364 uint8_t domainNumber;
365 uint8_t flags;
367 uint8_t primary_p2p_8023_destination[6];
368 uint8_t pdelay_p2p_8023_destination[6];
369} PtpProfile;
370
374typedef enum {
375 /* Standard TLVs */
379
380 /* Optional unicast message negotitation TLVs */
385
386 /* Optional path trace mechanism TLV */
388
389 /* Optional alternate timescale TLV */
391
392 /* Security TLVs */
396
397 /* Cumulative frequency scale factor offset */
400
401#define PTP_TLV_HEADER \
402 uint16_t type; \
403 uint16_t length;
408typedef struct {
411
415typedef struct {
416 uint16_t sequenceID, delay_reqSequenceID;
420 uint16_t syncPeriodMs;
422
426typedef struct {
427 uint16_t syncSequenceID;
430
434typedef enum {
439
443typedef struct {
445 uint64_t identity;
446 uint16_t reportCount;
447 uint16_t dropoutCntr;
449
453typedef struct {
454#ifdef PTP_ADDEND_INTERFACE
455 uint32_t addend;
456#elif defined(PTP_HLT_INTERFACE)
457 float tuning_ppb;
458#endif
460
464typedef struct {
467
471typedef struct {
472 double filtTimeErr;
473 bool locked;
474 struct {
475 uint32_t rx;
476 uint32_t tx;
477 uint32_t txts;
478 } drop_cntrs;
479} PtpStats;
480
484typedef void (*PtpSyncCallback)(int64_t time_error, const PtpSyncCycleData *pSCD,
485#ifdef PTP_ADDEND_INTERFACE
486 uint32_t freqCodeWord
487#elif defined(PTP_HLT_INTERFACE)
488 float tuning_ppb
489#endif
490);
491
496
500typedef enum { PTP_FC_IDLE = 0,
505
509typedef struct {
512
514
515 struct {
517 uint64_t clockIdentity;
518 } hwoptions;
519
522
523 uint32_t ticks;
524
525 // Logging
526 struct {
527 bool def;
528 bool corr;
530 bool info;
531 bool locked;
532 bool bmca;
534 bool logid;
535 } logging;
536
539
540 /* ---- SLAVE ----- */
541
542 struct {
543 bool enabled;
544
549 uint8_t fastCompCntr;
553 uint64_t coarseLimit;
554
556 uint32_t delReqTmr;
557
559 } slave;
560
561 /* ---- MASTER ----- */
562
563 struct {
564 bool enabled;
565
568 PtpSyncCycleData scd;
569 bool expectPDelRespFollowUp;
570
572
573 uint32_t syncTickPeriod;
574 uint32_t syncTmr;
576 uint32_t announceTmr;
578 uint32_t pdelayReqTmr;
579 } master;
581
582#ifdef __cplusplus
583}
584#endif
585
586#endif /* FLEXPTP_PTP_TYPES_H_ */
In this module are the core and user events defined.
PtpUserEventCode
Definition: event.h:46
In here reside a multitude of fundamental PTP-related constants and definitions.
#define PTP_MAX_TLV_PRESET_NAME_LENGTH
Maximum TLV preset name length.
Definition: ptp_defs.h:66
This module defines the context object of a full synchronization cycle. In SLAVE mode four timestamps...
BmcaCandidateState
BMCA candidate states.
Definition: ptp_types.h:296
@ BMCA_CANDIDATE_COLLECTION
Collecting candidates, we are in the candidate collection time window.
Definition: ptp_types.h:298
@ BMCA_NO_CANDIDATE
No candidate on the network.
Definition: ptp_types.h:297
PtpControl
PTP header control field values.
Definition: ptp_types.h:51
@ PTP_CON_Other
Other.
Definition: ptp_types.h:56
@ PTP_CON_Delay_Req
Delay Request.
Definition: ptp_types.h:53
@ PTP_CON_Follow_Up
Follow Up.
Definition: ptp_types.h:54
@ PTP_CON_Delay_Resp
Delay Response.
Definition: ptp_types.h:55
@ PTP_CON_Sync
Sync.
Definition: ptp_types.h:52
PtpTransportType
PTP transport type enumeration.
Definition: ptp_types.h:136
@ PTP_TP_IPv4
IPv4 Transport Type.
Definition: ptp_types.h:137
@ PTP_TP_802_3
Ethernet Transport Type.
Definition: ptp_types.h:138
PtpLogMsgPeriods
Enumeration for logarithmic message period boundaries.
Definition: ptp_types.h:304
@ PTP_LOGPER_MAX
Maximal logarithmic messaging period.
Definition: ptp_types.h:306
@ PTP_LOGPER_MIN
Minimal logarithmic messaging period.
Definition: ptp_types.h:305
@ PTP_LOGPER_SYNCMATCHED
Messaging occurs whenever a Sync arrives.
Definition: ptp_types.h:307
void(* PtpUserEventCallback)(PtpUserEventCode uev)
Definition: ptp_types.h:495
void(* PtpSyncCallback)(int64_t time_error, const PtpSyncCycleData *pSCD, uint32_t freqCodeWord)
Definition: ptp_types.h:484
PtpBmcaFsmState
Definition: ptp_types.h:310
@ PTP_BMCA_FAULTY
Definition: ptp_types.h:318
@ PTP_BMCA_UNCALIBRATED
Definition: ptp_types.h:317
@ PTP_BMCA_MASTER
Definition: ptp_types.h:314
@ PTP_BMCA_PASSIVE
Definition: ptp_types.h:316
@ PTP_BMCA_LISTENING
Definition: ptp_types.h:312
@ PTP_BMCA_SLAVE
Definition: ptp_types.h:315
@ PTP_BMCA_INITIALIZING
Definition: ptp_types.h:311
@ PTP_BMCA_DISABLED
Definition: ptp_types.h:319
@ PTP_BMCA_PRE_MASTER
Definition: ptp_types.h:313
TimerHandle_t TimerType
Definition: ptp_types.h:29
PtpClockClass
Standard PTP clock classes.
Definition: ptp_types.h:205
@ PTP_CC_PRIMARY_REFERENCE_DEGRAD_B
A Primary reference operating off the holdover specification, can be a slave.
Definition: ptp_types.h:212
@ PTP_CC_APPLICATION_SPECIFIC_DEGRAD_A
An Application specific class clock operating off the holdover specification.
Definition: ptp_types.h:211
@ PTP_CC_DEFAULT
Default clock class.
Definition: ptp_types.h:214
@ PTP_CC_APPLICATION_SPECIFIC_DEGRAD_B
An Application specific class clock operating off the holdover specification, can be a slave.
Definition: ptp_types.h:213
@ PTP_CC_PRIMARY_REFERENCE_HOLDOVER
Normally a Primary reference clock, but now working in holdover mode.
Definition: ptp_types.h:207
@ PTP_CC_PRIMARY_REFERENCE
Primary reference clock, cannot be a slave.
Definition: ptp_types.h:206
@ PTP_CC_APPLICATION_SPECIFIC
Application specific reference clock, ARB timescale, cannot be a slave.
Definition: ptp_types.h:208
@ PTP_CC_SLAVE_ONLY
The clock is slave ony.
Definition: ptp_types.h:215
@ PTP_CC_APPLICAION_SPECIFIC_HOLDOVER
An Application specific class clock that operates in holdover.
Definition: ptp_types.h:209
@ PTP_CC_PRIMARY_REFERENCE_DEGRAD_A
A Primary reference operating off the holdover specification.
Definition: ptp_types.h:210
PtpTlvType
PTP TLV types.
Definition: ptp_types.h:374
@ PTP_TLV_ALTERNATE_TIME_OFFSET_INDICATOR
Definition: ptp_types.h:390
@ PTP_TLV_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION
Definition: ptp_types.h:384
@ PTP_TLV_CUM_FREQ_SCALE_FACTOR_OFFSET
Definition: ptp_types.h:398
@ PTP_TLV_AUTHENTICATION_CHALLENGE
Definition: ptp_types.h:394
@ PTP_TLV_PATH_TRACE
Definition: ptp_types.h:387
@ PTP_TLV_MANAGEMENT_ERROR_STATUS
Management error status.
Definition: ptp_types.h:377
@ PTP_TLV_MANAGEMENT
Management extension.
Definition: ptp_types.h:376
@ PTP_TLV_GRANT_UNICAST_TRANSMISSION
Definition: ptp_types.h:382
@ PTP_TLV_ORGANIZATION_EXTENSION
Organization extension.
Definition: ptp_types.h:378
@ PTP_TLV_SECURITY_ASSOCIATION_UPDATE
Definition: ptp_types.h:395
@ PTP_TLV_CANCEL_UNICAST_TRANSMISSION
Definition: ptp_types.h:383
@ PTP_TLV_AUTHENTICATION
Definition: ptp_types.h:393
@ PTP_TLV_REQUEST_UNICAST_TRANSMISSION
Definition: ptp_types.h:381
#define PTP_TLV_HEADER
Definition: ptp_types.h:401
void() TxCb(const struct RawPtpMessage_ *pMsg)
Transmit callback function prototype.
Definition: ptp_types.h:175
PtpAnnounceBody PtpMasterProperties
Definition: ptp_types.h:274
PtpMessageClass
Enumeration for different PTP message classes.
Definition: ptp_types.h:160
@ PTP_MC_EVENT
Event Message Class.
Definition: ptp_types.h:161
@ PTP_MC_GENERAL
General Message Class.
Definition: ptp_types.h:162
PtpFastCompState
Definition: ptp_types.h:500
@ PTP_FC_TIME_CORRECTION_PROPAGATION
Waiting for the effects of time correction to propagate.
Definition: ptp_types.h:503
@ PTP_FC_SKEW_CORRECTION
Skew correction is running.
Definition: ptp_types.h:501
@ PTP_FC_TIME_CORRECTION
Time correction is running.
Definition: ptp_types.h:502
@ PTP_FC_IDLE
Fast correction algorithm is IDLE.
Definition: ptp_types.h:500
PtpClockAccuracy
Standard clock accuracy definitions.
Definition: ptp_types.h:221
@ PTP_CA_2_5US
Accurate to within 2.5us.
Definition: ptp_types.h:226
@ PTP_CA_250MS
Accurate to within 250ms.
Definition: ptp_types.h:236
@ PTP_CA_GT10S
Accurate to > 10s.
Definition: ptp_types.h:239
@ PTP_CA_100US
Accurate to within 100us.
Definition: ptp_types.h:229
@ PTP_CA_250NS
Accurate to within 250ns.
Definition: ptp_types.h:224
@ PTP_CA_10S
Accurate to within 10s.
Definition: ptp_types.h:238
@ PTP_CA_1MS
Accurate to within 1ms.
Definition: ptp_types.h:231
@ PTP_CA_UNKNOWN
Accuracy is unknown.
Definition: ptp_types.h:240
@ PTP_CA_100MS
Accurate to within 100ms.
Definition: ptp_types.h:235
@ PTP_CA_250US
Accurate to within 250us.
Definition: ptp_types.h:230
@ PTP_CA_25NS
Accurate to within 25ns.
Definition: ptp_types.h:222
@ PTP_CA_1US
Accurate to within 1us.
Definition: ptp_types.h:225
@ PTP_CA_25US
Accurate to within 25us.
Definition: ptp_types.h:228
@ PTP_CA_10US
Accurate to within 10us.
Definition: ptp_types.h:227
@ PTP_CA_100NS
Accurate to within 100ns.
Definition: ptp_types.h:223
@ PTP_CA_25MS
Accurate to within 25ms.
Definition: ptp_types.h:234
@ PTP_CA_1S
Accurate to within 1s.
Definition: ptp_types.h:237
@ PTP_CA_2_5MS
Accurate to within 2.5ms.
Definition: ptp_types.h:232
@ PTP_CA_10MS
Accurate to within 10ms.
Definition: ptp_types.h:233
PtpM2SState
Core state machine states.
Definition: ptp_types.h:279
@ SWaitFollowUp
Waiting for a Follow_Up message.
Definition: ptp_types.h:281
@ SIdle
Idle.
Definition: ptp_types.h:280
PtpMessageType
PTP packet type enumeration.
Definition: ptp_types.h:37
@ PTP_MT_Delay_Resp
Delay Response.
Definition: ptp_types.h:43
@ PTP_MT_PDelay_Resp
Peer Delay Response.
Definition: ptp_types.h:41
@ PTP_MT_Sync
Sync.
Definition: ptp_types.h:38
@ PTP_MT_PDelay_Req
Peer Delay Request.
Definition: ptp_types.h:40
@ PTP_MT_Announce
Announce.
Definition: ptp_types.h:45
@ PTP_MT_Delay_Req
Delay Request.
Definition: ptp_types.h:39
@ PTP_MT_PDelay_Resp_Follow_Up
Peer Delay Response Follow Up.
Definition: ptp_types.h:44
@ PTP_MT_Follow_Up
Follow Up.
Definition: ptp_types.h:42
PtpDelayMechanism
PTP Delay mechanism enumeration.
Definition: ptp_types.h:144
@ PTP_DM_E2E
End-to-End Delay Mechanism.
Definition: ptp_types.h:145
@ PTP_DM_P2P
Peer-to-Peer Delay Mechanism.
Definition: ptp_types.h:146
RawPtpMsgTag
Definition: ptp_types.h:180
@ RPMT_RANDOM
Create a random, unique tag.
Definition: ptp_types.h:181
@ RPMT_SYNC
Sync tag.
Definition: ptp_types.h:182
@ RPMT_DELAY_REQ
(P)Delay_Req tag
Definition: ptp_types.h:183
#define MAX_PTP_MSG_SIZE
Maximum PTP message size.
Definition: ptp_types.h:165
BmcaMasterState
BMCA master states.
Definition: ptp_types.h:287
@ BMCA_MASTER_ME
I am the best master, yeey!
Definition: ptp_types.h:290
@ BMCA_NO_MASTER
No master.
Definition: ptp_types.h:288
@ BMCA_MASTER_REMOTE
A remote master is found to be the best.
Definition: ptp_types.h:289
PtpP2PSlaveState
PTP P2P slave state viewed from the MASTER.
Definition: ptp_types.h:434
@ PTP_P2PSS_ESTABLISHED
The slave is considered stable and ready.
Definition: ptp_types.h:437
@ PTP_P2PSS_NONE
No slave is detected.
Definition: ptp_types.h:435
@ PTP_P2PSS_CANDIDATE
A slave has reported in at least once, now being checked on.
Definition: ptp_types.h:436
PtpTransportSpecific
PTP transport specific enumeration.
Definition: ptp_types.h:152
@ PTP_TSPEC_GPTP_8021AS
802.1AS Transport Specific Flag
Definition: ptp_types.h:154
@ PTP_TSPEC_UNKNOWN_DEF
Unkown Transport Specific Flag (default)
Definition: ptp_types.h:153
PtpProfileFlags
PTP profile flags.
Definition: ptp_types.h:347
@ PTP_PF_N
Number of available PTP profile flags.
Definition: ptp_types.h:351
@ PTP_PF_SLAVE_ONLY
Operating only in SLAVE mode.
Definition: ptp_types.h:350
@ PTP_PF_ISSUE_SYNC_FOR_COMPLIANT_SLAVE_ONLY_IN_P2P
Send Sync messages only for a compliant peer in P2P mode.
Definition: ptp_types.h:349
@ PTP_PF_NO_FLAGS
Empty profile flags.
Definition: ptp_types.h:348
PtpTimeSource
Standard PTP time source definitions.
Definition: ptp_types.h:246
@ PTP_TSRC_ATOMIC_CLOCK
The clock is directly connected to such a device and using the PTP timescale.
Definition: ptp_types.h:247
@ PTP_TSRC_PTP
The clock is synchronized to a different PTP domain.
Definition: ptp_types.h:250
@ PTP_TSRC_NTP
The clock is synchronized via NTP or SNTP.
Definition: ptp_types.h:251
@ PTP_TSRC_INTERNAL_OSCILLATOR
Undisciplined, free running oscillator.
Definition: ptp_types.h:254
@ PTP_TSRC_GPS
The clock is synchronized to a satellite system that distribtues time and frequency tied to internati...
Definition: ptp_types.h:248
@ PTP_TSRC_OTHER
Any of source not covered by other values.
Definition: ptp_types.h:253
@ PTP_TSRC_TERRESTRIAL_RADIO
The clock is synchronized via any type of radio distribution system that is tied to international sta...
Definition: ptp_types.h:249
@ PTP_TSRC_HAND_SET
The clock has been set by means of a human interface based on observation of an international standar...
Definition: ptp_types.h:252
Contents of a PTP Announce message without the common PTP header.
Definition: ptp_types.h:262
uint16_t currentUTCOffset
Current UTC Offset.
Definition: ptp_types.h:263
uint64_t grandmasterClockIdentity
Grandmaster Clock Identity.
Definition: ptp_types.h:269
uint8_t grandmasterClockClass
Grandmaster Clock Class.
Definition: ptp_types.h:265
uint8_t grandmasterClockAccuracy
Grandmaster Clock Accuracy.
Definition: ptp_types.h:266
uint16_t localStepsRemoved
Local Steps Removed.
Definition: ptp_types.h:270
uint16_t grandmasterClockVariance
Grandmaster Clock Variance.
Definition: ptp_types.h:267
uint8_t priority2
Priority 2.
Definition: ptp_types.h:268
uint8_t timeSource
Time Source.
Definition: ptp_types.h:271
uint8_t priority1
Priority 1.
Definition: ptp_types.h:264
BMCA state.
Definition: ptp_types.h:325
uint32_t stateDuration
Heartbeat cycles since last state transition.
Definition: ptp_types.h:330
PtpMasterProperties masterProps
Master clock properties.
Definition: ptp_types.h:327
uint16_t masterTOCntr
Current master announce dropout counter.
Definition: ptp_types.h:329
PtpBmcaFsmState state
BMCA state.
Definition: ptp_types.h:326
bool preventMasterSwitchOver
Set if master switchover is prohibited.
Definition: ptp_types.h:331
uint16_t masterAnnPer_ms
Message period of current master.
Definition: ptp_types.h:328
Giant PTP core state object.
Definition: ptp_types.h:509
TimestampI offset
PPS signal offset.
Definition: ptp_types.h:516
bool bmca
BMCA state change.
Definition: ptp_types.h:532
PtpBmcaState bmca
BMCA state.
Definition: ptp_types.h:520
PtpSyncCycleData scd
Sync cycle data.
Definition: ptp_types.h:546
bool locked
clock lock state change
Definition: ptp_types.h:531
uint32_t syncTmr
Counter for scheduling Sync transmission.
Definition: ptp_types.h:574
PtpUserEventCallback userEventCb
User event callback pointer.
Definition: ptp_types.h:538
uint32_t delReqTmr
Timer counting ticks for Delay_Req transmissions.
Definition: ptp_types.h:556
bool transmission
Transmission logging.
Definition: ptp_types.h:533
PtpP2PSlaveInfo p2pSlave
Information on the connected P2P slave (only used in P2P modes)
Definition: ptp_types.h:566
PtpHWClockState hwclock
Hardware clock state.
Definition: ptp_types.h:513
uint32_t pdelay_reqSequenceID
Sequence number of the last PDelay_Request sent.
Definition: ptp_types.h:567
PtpFastCompState fastCompState
State of fast compensation.
Definition: ptp_types.h:548
PtpSyncCallback syncCb
Sync callback invoked in every synchronization cycle.
Definition: ptp_types.h:558
bool logid
Print logging ID in front of each logline.
Definition: ptp_types.h:534
uint64_t clockIdentity
clockIdentity calculated from MAC address
Definition: ptp_types.h:517
TimestampI prevSyncMa
T1 from the previous cycle.
Definition: ptp_types.h:550
bool def
default
Definition: ptp_types.h:527
PtpProfile profile
PTP profile.
Definition: ptp_types.h:510
PtpMasterMessagingState messaging
Messaging state.
Definition: ptp_types.h:571
uint32_t syncTickPeriod
Sync transmission period in ticks.
Definition: ptp_types.h:573
PtpMasterProperties capabilities
The capabilities of this device.
Definition: ptp_types.h:511
PtpSlaveMessagingState messaging
Messaging state.
Definition: ptp_types.h:545
uint32_t announceTmr
Counter to schedule Announce transmission.
Definition: ptp_types.h:576
TimestampI prevTimeError
Time error in the previous cycle.
Definition: ptp_types.h:552
bool enabled
Slave module is enabled.
Definition: ptp_types.h:543
bool corr
correction fields
Definition: ptp_types.h:528
PtpStats stats
Statistics.
Definition: ptp_types.h:537
TimestampI prevSyncSl
T2 from the previous cycle.
Definition: ptp_types.h:551
bool expectPDelRespFollowUp
Expect a PDelay_Resp_Follow_Up message.
Definition: ptp_types.h:547
bool timestamps
timestamps
Definition: ptp_types.h:529
uint32_t ticks
ticks counting form the initialization
Definition: ptp_types.h:523
bool info
informative messages
Definition: ptp_types.h:530
uint32_t pdelayReqTickPeriod
PDelayReq transmission period in ticks.
Definition: ptp_types.h:577
uint32_t pdelayReqTmr
Counter for PDelayReq transmission scheduling.
Definition: ptp_types.h:578
PtpNetworkState network
Network state.
Definition: ptp_types.h:521
uint32_t announceTickPeriod
Announce transmission in ticks.
Definition: ptp_types.h:575
uint64_t coarseLimit
time error limit above coarse correction is engaged
Definition: ptp_types.h:553
uint32_t delReqTickPeriod
ticks between Delay_Req transmissions
Definition: ptp_types.h:555
uint8_t fastCompCntr
Cycle counter for fast compensation.
Definition: ptp_types.h:549
Identification carrying Delay_Resp message.
Definition: ptp_types.h:128
uint64_t requestingSourceClockIdentity
Requesting Source Clock Identity.
Definition: ptp_types.h:129
uint16_t requestingSourcePortIdentity
Requesting Source Port Identity.
Definition: ptp_types.h:130
PTP flags structure.
Definition: ptp_types.h:62
bool TIME_TRACEABLE
Time Traceable.
Definition: ptp_types.h:70
bool PTP_LI_59
Leap Second (59)
Definition: ptp_types.h:73
bool PTP_ProfileSpecific_2
Profile Specific 2.
Definition: ptp_types.h:64
bool PTP_UTC_REASONABLE
UTC Reasonable.
Definition: ptp_types.h:72
bool PTP_UNICAST
Unicast.
Definition: ptp_types.h:66
bool PTP_LI_61
Leap Second (61)
Definition: ptp_types.h:74
bool FREQUENCY_TRACEABLE
Frequency Traceable.
Definition: ptp_types.h:69
bool PTP_TIMESCALE
Timescale.
Definition: ptp_types.h:71
bool PTP_SECURITY
Security.
Definition: ptp_types.h:63
bool PTP_ProfileSpecific_1
Profile Specific 1.
Definition: ptp_types.h:65
bool PTP_TWO_STEP
Two Step.
Definition: ptp_types.h:67
bool PTP_ALTERNATE_MASTER
Alternate Master.
Definition: ptp_types.h:68
Hardware clock state.
Definition: ptp_types.h:453
uint32_t addend
hardware clock addend value
Definition: ptp_types.h:455
PTP message header structure.
Definition: ptp_types.h:81
int8_t logMessagePeriod
Definition: ptp_types.h:122
uint8_t _r2
Definition: ptp_types.h:97
uint8_t versionPTP
PTP version.
Definition: ptp_types.h:87
uint8_t messageType
ID.
Definition: ptp_types.h:83
uint64_t clockIdentity
Clock Identity.
Definition: ptp_types.h:110
uint16_t sequenceID
Sequence ID.
Definition: ptp_types.h:116
uint16_t messageLength
Length.
Definition: ptp_types.h:91
uint16_t sourcePortID
Source Port ID.
Definition: ptp_types.h:113
PtpFlags flags
Flags.
Definition: ptp_types.h:100
uint8_t minorVersionPTP
Definition: ptp_types.h:88
uint32_t _r3
Definition: ptp_types.h:107
uint8_t control
Control.
Definition: ptp_types.h:119
uint64_t correction_ns
Correction nanoseconds.
Definition: ptp_types.h:103
uint8_t domainNumber
Domain.
Definition: ptp_types.h:94
uint32_t correction_subns
Correction subnanoseconds.
Definition: ptp_types.h:104
uint8_t transportSpecific
Transport Specific.
Definition: ptp_types.h:84
PTP master messaging state structure.
Definition: ptp_types.h:426
uint16_t announceSequenceID
Sequence ID of the next Announce message.
Definition: ptp_types.h:428
uint16_t syncSequenceID
Sequence ID of the coming Sync.
Definition: ptp_types.h:427
Network state.
Definition: ptp_types.h:464
TimestampI meanPathDelay
mean path delay
Definition: ptp_types.h:465
PTP P2P slave info structure;.
Definition: ptp_types.h:443
uint16_t reportCount
Number of times the slave had reported in.
Definition: ptp_types.h:446
uint16_t dropoutCntr
Dropout watchdog counter for resetting the state machine if the slave went silent.
Definition: ptp_types.h:447
uint64_t identity
The clock identity of the connected, operating P2P slave.
Definition: ptp_types.h:445
PtpP2PSlaveState state
Indicates that a slave is responding to our PDELAY_REQ messages.
Definition: ptp_types.h:444
PTP profile structure.
Definition: ptp_types.h:357
PtpDelayMechanism delayMechanism
delay mechanism
Definition: ptp_types.h:360
PtpTransportSpecific transportSpecific
majorSdoId ('transportSpecific')
Definition: ptp_types.h:359
int8_t logSyncPeriod
logarithm of the Sync transmission period (MASTER only)
Definition: ptp_types.h:362
int8_t logAnnouncePeriod
logarithm of the Announce period (MASTER only)
Definition: ptp_types.h:363
uint8_t flags
Flags associated with this profile.
Definition: ptp_types.h:365
int8_t logDelayReqPeriod
logarithm of (P)DelayReq period (SLAVE and MASTER)
Definition: ptp_types.h:361
PtpTransportType transportType
transport layer
Definition: ptp_types.h:358
uint8_t domainNumber
PTP domain number.
Definition: ptp_types.h:364
PTP profile additional data list element.
Definition: ptp_types.h:337
PtpMessageType msgType
Message type into which this extension should be inserted.
Definition: ptp_types.h:340
const void * data
Pointer to the data block.
Definition: ptp_types.h:338
struct _PtpProfileAdditionalData * next
Pointer to the next element of the list.
Definition: ptp_types.h:341
uint16_t size
Size of the data block.
Definition: ptp_types.h:339
PTP slave messaging state structure.
Definition: ptp_types.h:415
uint16_t syncPeriodMs
Sync interval in milliseconds.
Definition: ptp_types.h:420
uint16_t delay_reqSequenceID
last sequence IDs
Definition: ptp_types.h:416
int8_t logSyncPeriod
logarithm of Sync interval
Definition: ptp_types.h:419
PtpM2SState m2sState
Sync-FollowUp state.
Definition: ptp_types.h:418
uint16_t lastRespondedDelReqId
ID of the last (P)Delay_Req got responded.
Definition: ptp_types.h:417
Structure for statistics.
Definition: ptp_types.h:471
uint32_t txts
number of transmit timestamps dropped
Definition: ptp_types.h:477
bool locked
is the PTP locked to defined limit?
Definition: ptp_types.h:473
uint32_t rx
number of incoming messages dropped
Definition: ptp_types.h:475
uint32_t tx
number of outgoing messages dropped
Definition: ptp_types.h:476
double filtTimeErr
0.1Hz lowpass-filtered time error
Definition: ptp_types.h:472
PTP synchronization cycle data.
PTP TLV.
Definition: ptp_types.h:408
TimestampI ts
Timestamp.
Definition: ptp_types.h:187
uint32_t tag
unique transmit tag
Definition: ptp_types.h:191
PtpDelayMechanism tx_dm
transmit transport type
Definition: ptp_types.h:194
uint32_t ttl
transmit Time-to-Live in ticks
Definition: ptp_types.h:192
PtpMessageClass tx_mc
transmit message class
Definition: ptp_types.h:195
PtpMessageType tx_mt
transmit message type
Definition: ptp_types.h:196
uint32_t size
Packet size.
Definition: ptp_types.h:188
TxCb * pTxCb
transmit callback function
Definition: ptp_types.h:193
Timestamp (signed)
Definition: timeutils.h:33
This module defines storage classes for timestamps and operations on time values.