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 "FreeRTOS.h"
17#include "event.h"
18#include "ptp_defs.h"
19#include "timers.h"
20#include "timeutils.h"
21
22#include "ptp_sync_cycle_data.h"
23
24#include <flexptp_options.h>
25
29typedef enum PTPMessageType {
37 PTP_MT_Announce = 11
39
43typedef enum PTPControl {
48 PTP_CON_Other = 5
50
54typedef struct {
65 bool PTP_LI_59;
66 bool PTP_LI_61;
67} PtpFlags;
68
72typedef struct
73{
74 // 0.
75 uint8_t messageType;
77
78 // 1.
79 uint8_t versionPTP;
81
82 // 2-3.
83 uint16_t messageLength;
84
85 // 4.
86 uint8_t domainNumber;
87
88 // 5.
89 uint8_t _r2;
90
91 // 6-7.
93
94 // 8-15.
95 uint64_t correction_ns;
97
98 // 16-19.
99 uint32_t _r3;
100
101 // 20-27.
102 uint64_t clockIdentity;
103
104 // 28-29
105 uint16_t sourcePortID;
106
107 // 30-31.
108 uint16_t sequenceID;
109
110 // 32.
111 uint8_t control;
112
113 // 33.
114 int8_t logMessagePeriod; // Logarithmic Message Period
115} PtpHeader;
116
120typedef struct {
124
128typedef enum {
130 PTP_TP_802_3 = 1
132
136typedef enum {
138 PTP_DM_P2P = 1
140
144typedef enum {
148
152typedef enum {
154 PTP_MC_GENERAL = 1
156
157#define MAX_PTP_MSG_SIZE (128)
158
162typedef struct RawPtpMessage_ {
164 uint32_t size;
165
166 // --- transmit related ---
168 void (*pTxCb)(const struct RawPtpMessage_ *pMsg);
171
172 // --- data ---
173 uint8_t data[MAX_PTP_MSG_SIZE];
175
179typedef enum {
189 PTP_CC_SLAVE_ONLY = 255
191
195typedef enum {
196 PTP_CA_25NS = 0x20,
216
220typedef enum {
230
231#define PTP_VARIANCE_HAS_NOT_BEEN_COMPUTED (0xFFFF)
232
236typedef struct {
238 uint8_t priority1;
242 uint8_t priority2;
245 uint8_t timeSource;
247
249
253typedef enum PtpM2SState {
257
261typedef enum {
266
270typedef enum {
274
278typedef enum {
283
284typedef enum {
295
299typedef struct {
303 uint16_t masterTOCntr;
304 uint32_t stateDuration;
307
311typedef struct _PtpProfileAdditionalData {
312 const void *data;
313 uint16_t size;
315 struct _PtpProfileAdditionalData *next;
317
321typedef enum {
322 PTP_PF_NONE = 0x00,
325 PTP_PF_N
327
331typedef struct {
338 uint8_t domainNumber;
339 uint8_t flags;
341} PtpProfile;
342
346typedef enum {
347 /* Standard TLVs */
351
352 /* Optional unicast message negotitation TLVs */
357
358 /* Optional path trace mechanism TLV */
360
361 /* Optional alternate timescale TLV */
363
364 /* Security TLVs */
368
369 /* Cumulative frequency scale factor offset */
372
373#define PTP_TLV_HEADER \
374 uint16_t type; \
375 uint16_t length;
380typedef struct {
383
387typedef struct {
388 uint16_t sequenceID, delay_reqSequenceID;
392 uint16_t syncPeriodMs;
394
398typedef struct {
399 uint16_t syncSequenceID;
402
406typedef enum {
411
415typedef struct {
417 uint64_t identity;
418 uint16_t reportCount;
419 uint16_t dropoutCntr;
421
425typedef struct {
426 uint32_t addend;
428
432typedef struct {
435
439typedef struct {
440 double filtTimeErr;
441 bool locked;
442} PtpStats;
443
447typedef void (*PtpSyncCallback)(int64_t time_error, const PtpSyncCycleData *pSCD, uint32_t freqCodeWord);
448
453
457typedef struct {
460
462
463 struct {
465 uint64_t clockIdentity;
466 } hwoptions;
467
470
471 // Logging
472 struct {
473 bool def;
474 bool corr;
476 bool info;
477 bool locked;
478 bool bmca;
479 } logging;
480
483
484 struct {
485 TimerHandle_t heartbeat;
486 } timers;
487
488 /* ---- SLAVE ----- */
489
490 struct {
491 bool enabled;
492
496 uint64_t coarseLimit;
497
499 uint32_t delReqTmr;
500
502 } slave;
503
504 /* ---- MASTER ----- */
505
506 struct {
507 bool enabled;
508
511 PtpSyncCycleData scd;
512
514
515 uint32_t syncTickPeriod;
516 uint32_t syncTmr;
518 uint32_t announceTmr;
520 uint32_t pdelayReqTmr;
521 } master;
523
524#endif /* FLEXPTP_PTP_TYPES_H_ */
In this module are the core and user events defined.
PtpUserEventCode
Definition: event.h:40
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:58
This module defines the context object of a full synchronization cycle. In SLAVE mode four timestamps...
BmcaCandidateState
BMCA candidate states.
Definition: ptp_types.h:270
@ BMCA_CANDIDATE_COLLECTION
Collecting candidates, we are in the candidate collection time window.
Definition: ptp_types.h:272
@ BMCA_NO_CANDIDATE
No candidate on the network.
Definition: ptp_types.h:271
PtpControl
PTP header control field values.
Definition: ptp_types.h:43
@ PTP_CON_Other
Other.
Definition: ptp_types.h:48
@ PTP_CON_Delay_Req
Delay Request.
Definition: ptp_types.h:45
@ PTP_CON_Follow_Up
Follow Up.
Definition: ptp_types.h:46
@ PTP_CON_Delay_Resp
Delay Response.
Definition: ptp_types.h:47
@ PTP_CON_Sync
Sync.
Definition: ptp_types.h:44
PtpTransportType
PTP transport type enumeration.
Definition: ptp_types.h:128
@ PTP_TP_IPv4
IPv4 Transport Type.
Definition: ptp_types.h:129
@ PTP_TP_802_3
Ethernet Transport Type.
Definition: ptp_types.h:130
PtpLogMsgPeriods
Enumeration for logarithmic message period boundaries.
Definition: ptp_types.h:278
@ PTP_LOGPER_MAX
Maximal logarithmic messaging period.
Definition: ptp_types.h:280
@ PTP_LOGPER_MIN
Minimal logarithmic messaging period.
Definition: ptp_types.h:279
@ PTP_LOGPER_SYNCMATCHED
Messaging occurs whenever a Sync arrives.
Definition: ptp_types.h:281
void(* PtpUserEventCallback)(PtpUserEventCode uev)
Definition: ptp_types.h:452
void(* PtpSyncCallback)(int64_t time_error, const PtpSyncCycleData *pSCD, uint32_t freqCodeWord)
Definition: ptp_types.h:447
PtpBmcaFsmState
Definition: ptp_types.h:284
@ PTP_BMCA_FAULTY
Definition: ptp_types.h:292
@ PTP_BMCA_UNCALIBRATED
Definition: ptp_types.h:291
@ PTP_BMCA_MASTER
Definition: ptp_types.h:288
@ PTP_BMCA_PASSIVE
Definition: ptp_types.h:290
@ PTP_BMCA_LISTENING
Definition: ptp_types.h:286
@ PTP_BMCA_SLAVE
Definition: ptp_types.h:289
@ PTP_BMCA_INITIALIZING
Definition: ptp_types.h:285
@ PTP_BMCA_DISABLED
Definition: ptp_types.h:293
@ PTP_BMCA_PRE_MASTER
Definition: ptp_types.h:287
PtpClockClass
Standard PTP clock classes.
Definition: ptp_types.h:179
@ PTP_CC_PRIMARY_REFERENCE_DEGRAD_B
A Primary reference operating off the holdover specification, can be a slave.
Definition: ptp_types.h:186
@ PTP_CC_APPLICATION_SPECIFIC_DEGRAD_A
An Application specific class clock operating off the holdover specification.
Definition: ptp_types.h:185
@ PTP_CC_DEFAULT
Default clock class.
Definition: ptp_types.h:188
@ PTP_CC_APPLICATION_SPECIFIC_DEGRAD_B
An Application specific class clock operating off the holdover specification, can be a slave.
Definition: ptp_types.h:187
@ PTP_CC_PRIMARY_REFERENCE_HOLDOVER
Normally a Primary reference clock, but now working in holdover mode.
Definition: ptp_types.h:181
@ PTP_CC_PRIMARY_REFERENCE
Primary reference clock, cannot be a slave.
Definition: ptp_types.h:180
@ PTP_CC_APPLICATION_SPECIFIC
Application specific reference clock, ARB timescale, cannot be a slave.
Definition: ptp_types.h:182
@ PTP_CC_SLAVE_ONLY
The clock is slave ony.
Definition: ptp_types.h:189
@ PTP_CC_APPLICAION_SPECIFIC_HOLDOVER
An Application specific class clock that operates in holdover.
Definition: ptp_types.h:183
@ PTP_CC_PRIMARY_REFERENCE_DEGRAD_A
A Primary reference operating off the holdover specification.
Definition: ptp_types.h:184
PtpTlvType
PTP TLV types.
Definition: ptp_types.h:346
@ PTP_TLV_ALTERNATE_TIME_OFFSET_INDICATOR
Definition: ptp_types.h:362
@ PTP_TLV_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION
Definition: ptp_types.h:356
@ PTP_TLV_CUM_FREQ_SCALE_FACTOR_OFFSET
Definition: ptp_types.h:370
@ PTP_TLV_AUTHENTICATION_CHALLENGE
Definition: ptp_types.h:366
@ PTP_TLV_PATH_TRACE
Definition: ptp_types.h:359
@ PTP_TLV_MANAGEMENT_ERROR_STATUS
Management error status.
Definition: ptp_types.h:349
@ PTP_TLV_MANAGEMENT
Management extension.
Definition: ptp_types.h:348
@ PTP_TLV_GRANT_UNICAST_TRANSMISSION
Definition: ptp_types.h:354
@ PTP_TLV_ORGANIZATION_EXTENSION
Organization extension.
Definition: ptp_types.h:350
@ PTP_TLV_SECURITY_ASSOCIATION_UPDATE
Definition: ptp_types.h:367
@ PTP_TLV_CANCEL_UNICAST_TRANSMISSION
Definition: ptp_types.h:355
@ PTP_TLV_AUTHENTICATION
Definition: ptp_types.h:365
@ PTP_TLV_REQUEST_UNICAST_TRANSMISSION
Definition: ptp_types.h:353
#define PTP_TLV_HEADER
Definition: ptp_types.h:373
PtpAnnounceBody PtpMasterProperties
Definition: ptp_types.h:248
PtpMessageClass
Enumeration for different PTP message classes.
Definition: ptp_types.h:152
@ PTP_MC_EVENT
Event Message Class.
Definition: ptp_types.h:153
@ PTP_MC_GENERAL
General Message Class.
Definition: ptp_types.h:154
PtpClockAccuracy
Standard clock accuray definitions.
Definition: ptp_types.h:195
@ PTP_CA_2_5US
Accurate to within 2.5us.
Definition: ptp_types.h:200
@ PTP_CA_250MS
Accurate to within 250ms.
Definition: ptp_types.h:210
@ PTP_CA_GT10S
Accurate to > 10s.
Definition: ptp_types.h:213
@ PTP_CA_100US
Accurate to within 100us.
Definition: ptp_types.h:203
@ PTP_CA_250NS
Accurate to within 250ns.
Definition: ptp_types.h:198
@ PTP_CA_10S
Accurate to within 10s.
Definition: ptp_types.h:212
@ PTP_CA_1MS
Accurate to within 1ms.
Definition: ptp_types.h:205
@ PTP_CA_UNKNOWN
Accuracy is unknown.
Definition: ptp_types.h:214
@ PTP_CA_100MS
Accurate to within 100ms.
Definition: ptp_types.h:209
@ PTP_CA_250US
Accurate to within 250us.
Definition: ptp_types.h:204
@ PTP_CA_25NS
Accurate to within 25ns.
Definition: ptp_types.h:196
@ PTP_CA_1US
Accurate to within 1us.
Definition: ptp_types.h:199
@ PTP_CA_25US
Accurate to within 25us.
Definition: ptp_types.h:202
@ PTP_CA_10US
Accurate to within 10us.
Definition: ptp_types.h:201
@ PTP_CA_100NS
Accurate to within 100ns.
Definition: ptp_types.h:197
@ PTP_CA_25MS
Accurate to within 25ms.
Definition: ptp_types.h:208
@ PTP_CA_1S
Accurate to within 1s.
Definition: ptp_types.h:211
@ PTP_CA_2_5MS
Accurate to within 2.5ms.
Definition: ptp_types.h:206
@ PTP_CA_10MS
Accurate to within 10ms.
Definition: ptp_types.h:207
PtpM2SState
Core state machine states.
Definition: ptp_types.h:253
@ SWaitFollowUp
Waiting for a Follow Up message.
Definition: ptp_types.h:255
@ SIdle
Idle.
Definition: ptp_types.h:254
PtpMessageType
PTP packet type enumeration.
Definition: ptp_types.h:29
@ PTP_MT_Delay_Resp
Delay Response.
Definition: ptp_types.h:35
@ PTP_MT_PDelay_Resp
Peer Delay Response.
Definition: ptp_types.h:33
@ PTP_MT_Sync
Sync.
Definition: ptp_types.h:30
@ PTP_MT_PDelay_Req
Peer Delay Request.
Definition: ptp_types.h:32
@ PTP_MT_Announce
Announce.
Definition: ptp_types.h:37
@ PTP_MT_Delay_Req
Delay Request.
Definition: ptp_types.h:31
@ PTP_MT_PDelay_Resp_Follow_Up
Peer Delay Response Follow Up.
Definition: ptp_types.h:36
@ PTP_MT_Follow_Up
Follow Up.
Definition: ptp_types.h:34
PtpDelayMechanism
PTP Delay mechanism enumeration.
Definition: ptp_types.h:136
@ PTP_DM_E2E
End-to-End Delay Mechanism.
Definition: ptp_types.h:137
@ PTP_DM_P2P
Peer-to-Peer Delay Mechanism.
Definition: ptp_types.h:138
#define MAX_PTP_MSG_SIZE
Maximum PTP message size.
Definition: ptp_types.h:157
BmcaMasterState
BMCA master states.
Definition: ptp_types.h:261
@ BMCA_MASTER_ME
I am the best master, yeey!
Definition: ptp_types.h:264
@ BMCA_NO_MASTER
No master.
Definition: ptp_types.h:262
@ BMCA_MASTER_REMOTE
A remote master is found to be the best.
Definition: ptp_types.h:263
PtpP2PSlaveState
PTP P2P slave state viewed from the MASTER.
Definition: ptp_types.h:406
@ PTP_P2PSS_ESTABLISHED
The slave is considered stable and ready.
Definition: ptp_types.h:409
@ PTP_P2PSS_NONE
No slave is detected.
Definition: ptp_types.h:407
@ PTP_P2PSS_CANDIDATE
A slave has reported in at least once, now being checked on.
Definition: ptp_types.h:408
PtpTransportSpecific
PTP transport specific enumeration.
Definition: ptp_types.h:144
@ PTP_TSPEC_GPTP_8021AS
802.1AS Transport Specific Flag
Definition: ptp_types.h:146
@ PTP_TSPEC_UNKNOWN_DEF
Unkown Transport Specific Flag (default)
Definition: ptp_types.h:145
PtpProfileFlags
PTP profile flags.
Definition: ptp_types.h:321
@ PTP_PF_N
Number of available PTP profile flags.
Definition: ptp_types.h:325
@ PTP_PF_SLAVE_ONLY
Operating only in SLAVE mode.
Definition: ptp_types.h:324
@ PTP_PF_NONE
Empty profile flags.
Definition: ptp_types.h:322
@ 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:323
PtpTimeSource
Standard PTP time source definitions.
Definition: ptp_types.h:220
@ PTP_TSRC_ATOMIC_CLOCK
The clock is directly connected to such a device and using the PTP timescale.
Definition: ptp_types.h:221
@ PTP_TSRC_PTP
The clock is synchronized to a different PTP domain.
Definition: ptp_types.h:224
@ PTP_TSRC_NTP
The clock is synchronized via NTP or SNTP.
Definition: ptp_types.h:225
@ PTP_TSRC_INTERNAL_OSCILLATOR
Undisciplined, free running oscillator.
Definition: ptp_types.h:228
@ PTP_TSRC_GPS
The clock is synchronized to a satellite system that distribtues time and frequency tied to internati...
Definition: ptp_types.h:222
@ PTP_TSRC_OTHER
Any of source not covered by other values.
Definition: ptp_types.h:227
@ 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:223
@ 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:226
Contents of a PTP Announce message without the common PTP header.
Definition: ptp_types.h:236
uint16_t currentUTCOffset
Current UTC Offset.
Definition: ptp_types.h:237
uint64_t grandmasterClockIdentity
Grandmaster Clock Identity.
Definition: ptp_types.h:243
uint8_t grandmasterClockClass
Grandmaster Clock Class.
Definition: ptp_types.h:239
uint8_t grandmasterClockAccuracy
Grandmaster Clock Accuracy.
Definition: ptp_types.h:240
uint16_t localStepsRemoved
Local Steps Removed.
Definition: ptp_types.h:244
uint16_t grandmasterClockVariance
Grandmaster Clock Variance.
Definition: ptp_types.h:241
uint8_t priority2
Priority 2.
Definition: ptp_types.h:242
uint8_t timeSource
Time Source.
Definition: ptp_types.h:245
uint8_t priority1
Priority 1.
Definition: ptp_types.h:238
BMCA state.
Definition: ptp_types.h:299
uint32_t stateDuration
Heartbeat cycles since last state transition.
Definition: ptp_types.h:304
PtpMasterProperties masterProps
Master clock properties.
Definition: ptp_types.h:301
uint16_t masterTOCntr
Current master announce dropout counter.
Definition: ptp_types.h:303
PtpBmcaFsmState state
BMCA state.
Definition: ptp_types.h:300
bool preventMasterSwitchOver
Set if master switchover is prohibited.
Definition: ptp_types.h:305
uint16_t masterAnnPer_ms
Message period of current master.
Definition: ptp_types.h:302
Giant PTP core state object.
Definition: ptp_types.h:457
TimestampI offset
PPS signal offset.
Definition: ptp_types.h:464
bool bmca
BMCA state change.
Definition: ptp_types.h:478
PtpBmcaState bmca
BMCA state.
Definition: ptp_types.h:468
PtpSyncCycleData scd
Sync cycle data.
Definition: ptp_types.h:494
bool locked
clock lock state change
Definition: ptp_types.h:477
uint32_t syncTmr
Counter for scheduling Sync transmission.
Definition: ptp_types.h:516
PtpUserEventCallback userEventCb
User event callback pointer.
Definition: ptp_types.h:482
uint32_t delReqTmr
Timer counting ticks for Delay_Req transmissions.
Definition: ptp_types.h:499
PtpP2PSlaveInfo p2pSlave
Information on the connected P2P slave (only used in P2P modes)
Definition: ptp_types.h:509
PtpHWClockState hwclock
Hardware clock state.
Definition: ptp_types.h:461
uint32_t pdelay_reqSequenceID
Sequence number of the last PDelay_Request sent.
Definition: ptp_types.h:510
PtpSyncCallback syncCb
Sync callback invoked in every synchronization cycle.
Definition: ptp_types.h:501
uint64_t clockIdentity
clockIdentity calculated from MAC address
Definition: ptp_types.h:465
TimestampI prevSyncMa
T1 from the previous cycle.
Definition: ptp_types.h:495
bool def
default
Definition: ptp_types.h:473
PtpProfile profile
PTP profile.
Definition: ptp_types.h:458
PtpMasterMessagingState messaging
Messaging state.
Definition: ptp_types.h:513
uint32_t syncTickPeriod
Sync transmission period in ticks.
Definition: ptp_types.h:515
PtpMasterProperties capabilities
The capabilities of this device.
Definition: ptp_types.h:459
PtpSlaveMessagingState messaging
Messaging state.
Definition: ptp_types.h:493
uint32_t announceTmr
Counter to schedule Announce transmission.
Definition: ptp_types.h:518
bool enabled
Slave module is enabled.
Definition: ptp_types.h:491
bool corr
correction fields
Definition: ptp_types.h:474
PtpStats stats
Statistics.
Definition: ptp_types.h:481
bool timestamps
timestamps
Definition: ptp_types.h:475
bool info
informative messages
Definition: ptp_types.h:476
uint32_t pdelayReqTickPeriod
PDelayReq transmission period in ticks.
Definition: ptp_types.h:519
uint32_t pdelayReqTmr
Counter for PDelayReq transmission scheduling.
Definition: ptp_types.h:520
PtpNetworkState network
Network state.
Definition: ptp_types.h:469
uint32_t announceTickPeriod
Announce transmission in ticks.
Definition: ptp_types.h:517
uint64_t coarseLimit
time error limit above coarse correction is engaged
Definition: ptp_types.h:496
uint32_t delReqTickPeriod
ticks between Delay_Req transmissions
Definition: ptp_types.h:498
TimerHandle_t heartbeat
timer for managing SBMC operations
Definition: ptp_types.h:485
Identification carrying Delay_Resp message.
Definition: ptp_types.h:120
uint64_t requestingSourceClockIdentity
Requesting Source Clock Identity.
Definition: ptp_types.h:121
uint16_t requestingSourcePortIdentity
Requesting Source Port Identity.
Definition: ptp_types.h:122
PTP flags structure.
Definition: ptp_types.h:54
bool TIME_TRACEABLE
Time Traceable.
Definition: ptp_types.h:62
bool PTP_LI_59
Leap Second (59)
Definition: ptp_types.h:65
bool PTP_ProfileSpecific_2
Profile Specific 2.
Definition: ptp_types.h:56
bool PTP_UTC_REASONABLE
UTC Reasonable.
Definition: ptp_types.h:64
bool PTP_UNICAST
Unicast.
Definition: ptp_types.h:58
bool PTP_LI_61
Leap Second (61)
Definition: ptp_types.h:66
bool FREQUENCY_TRACEABLE
Frequency Traceable.
Definition: ptp_types.h:61
bool PTP_TIMESCALE
Timescale.
Definition: ptp_types.h:63
bool PTP_SECURITY
Security.
Definition: ptp_types.h:55
bool PTP_ProfileSpecific_1
Profile Specific 1.
Definition: ptp_types.h:57
bool PTP_TWO_STEP
Two Step.
Definition: ptp_types.h:59
bool PTP_ALTERNATE_MASTER
Alternate Master.
Definition: ptp_types.h:60
Hardware clock state.
Definition: ptp_types.h:425
uint32_t addend
hardware clock addend value
Definition: ptp_types.h:426
PTP message header structure.
Definition: ptp_types.h:73
int8_t logMessagePeriod
Definition: ptp_types.h:114
uint8_t _r2
Definition: ptp_types.h:89
uint8_t versionPTP
PTP version.
Definition: ptp_types.h:79
uint8_t messageType
ID.
Definition: ptp_types.h:75
uint64_t clockIdentity
Clock Identity.
Definition: ptp_types.h:102
uint16_t sequenceID
Sequence ID.
Definition: ptp_types.h:108
uint16_t messageLength
Length.
Definition: ptp_types.h:83
uint16_t sourcePortID
Source Port ID.
Definition: ptp_types.h:105
PtpFlags flags
Flags.
Definition: ptp_types.h:92
uint8_t minorVersionPTP
Definition: ptp_types.h:80
uint32_t _r3
Definition: ptp_types.h:99
uint8_t control
Control.
Definition: ptp_types.h:111
uint64_t correction_ns
Correction nanoseconds.
Definition: ptp_types.h:95
uint8_t domainNumber
Domain.
Definition: ptp_types.h:86
uint32_t correction_subns
Correction subnanoseconds.
Definition: ptp_types.h:96
uint8_t transportSpecific
Transport Specific.
Definition: ptp_types.h:76
PTP master messaging state structure.
Definition: ptp_types.h:398
uint16_t announceSequenceID
Sequence ID of the next Announce message.
Definition: ptp_types.h:400
uint16_t syncSequenceID
Sequence ID of the coming Sync.
Definition: ptp_types.h:399
Network state.
Definition: ptp_types.h:432
TimestampI meanPathDelay
mean path delay
Definition: ptp_types.h:433
PTP P2P slave info structure;.
Definition: ptp_types.h:415
uint16_t reportCount
Number of times the slave had reported in.
Definition: ptp_types.h:418
uint16_t dropoutCntr
Dropout watchdog counter for resetting the state machine if the slave went silent.
Definition: ptp_types.h:419
uint64_t identity
The clock identity of the connected, operating P2P slave.
Definition: ptp_types.h:417
PtpP2PSlaveState state
Indicates that a slave is responding to our PDELAY_REQ messages.
Definition: ptp_types.h:416
PTP profile structure.
Definition: ptp_types.h:331
PtpDelayMechanism delayMechanism
delay mechanism
Definition: ptp_types.h:334
PtpTransportSpecific transportSpecific
majorSdoId ('transportSpecific')
Definition: ptp_types.h:333
int8_t logSyncPeriod
logarithm of the Sync transmission period (MASTER only)
Definition: ptp_types.h:336
int8_t logAnnouncePeriod
logarithm of the Announce period (MASTER only)
Definition: ptp_types.h:337
uint8_t flags
Flags associated with this profile.
Definition: ptp_types.h:339
int8_t logDelayReqPeriod
logarithm of (P)DelayReq period (SLAVE and MASTER)
Definition: ptp_types.h:335
PtpTransportType transportType
transport layer
Definition: ptp_types.h:332
uint8_t domainNumber
PTP domain number.
Definition: ptp_types.h:338
PTP profile additional data list element.
Definition: ptp_types.h:311
PtpMessageType msgType
Message type into which this extension should be inserted.
Definition: ptp_types.h:314
const void * data
Pointer to the data block.
Definition: ptp_types.h:312
struct _PtpProfileAdditionalData * next
Pointer to the next element of the list.
Definition: ptp_types.h:315
uint16_t size
Size of the data block.
Definition: ptp_types.h:313
PTP slave messaging state structure.
Definition: ptp_types.h:387
uint16_t syncPeriodMs
Sync interval in milliseconds.
Definition: ptp_types.h:392
uint16_t delay_reqSequenceID
last sequence IDs
Definition: ptp_types.h:388
int8_t logSyncPeriod
logarithm of Sync interval
Definition: ptp_types.h:391
PtpM2SState m2sState
Sync-FollowUp state.
Definition: ptp_types.h:390
uint16_t lastRespondedDelReqId
ID of the last (P)Delay_Req got responded.
Definition: ptp_types.h:389
Structure for statistics.
Definition: ptp_types.h:439
bool locked
is the PTP locked to defined limit?
Definition: ptp_types.h:441
double filtTimeErr
0.1Hz lowpass-filtered time error
Definition: ptp_types.h:440
PTP synchronization cycle data.
PTP TLV.
Definition: ptp_types.h:380
Raw PTP message structure.
Definition: ptp_types.h:162
TimestampI ts
Timestamp.
Definition: ptp_types.h:163
PtpDelayMechanism tx_dm
transmit transport type
Definition: ptp_types.h:169
PtpMessageClass tx_mc
transmit message class
Definition: ptp_types.h:170
uint32_t size
Packet size.
Definition: ptp_types.h:164
TimestampI * pTs
pointer to timestamp
Definition: ptp_types.h:167
Timestamp (signed)
Definition: timeutils.h:29
This module defines storage classes for timestamps and operations on time values.