pt1588-SH7216 1
IEEE1588v2 Implementation for Renesas SH7216 Demo
|
Define the configurable constants that are required for the correct operation of PTP. More...
Go to the source code of this file.
Defines | |
#define | LOGANNOUNCEINTERVAL 1 |
Value for the PortDS.logAnnounceInterval member of PTPState.portDS. | |
#define | LOGSYNCINTERVAL 0 |
Value for the PortDS.logSyncInterval member of PTPState.portDS. | |
#define | LOGMINDELAYREQINTERVAL 0 |
Value for the PortDS.logMinDelayReqInterval member of PTPState.portDS. | |
#define | DELAYREQDIV 4 |
2^DELAYREQDIV is the number of possible values (granularity) in the range of 2^(LOGMINDELAYREQINTERVAL+1) that can be set as the transmission interval for a Delay_Req message (9.5.11.2). | |
#define | ANNOUNCERECEIPTTIMEOUT 3 |
Value for the PortDS.announceReceiptTimeout member of PTPState.portDS. | |
#define | TWOSTEPFLAG FALSE |
Value for the DefaultDS.twoStepFlag member of PTPState.defaultDS. | |
#define | DOMAINNUMBER 0 |
Value for the DefaultDS.domainNumber member of PTPState.defaultDS. | |
#define | CLOCKIDENTITY {0x5C, 0xFF, 0x35, 0xFF, 0xFE, 0x0D, 0x01, 0x4F} |
The value for the DefaultDS.clockIdentity member of PTPState.defaultDS. | |
#define | NUMBERPORTS 1 |
Value for the DefaultDS.numberPorts member of PTPState.defaultDS. | |
#define | CLOCKCLASS 248 |
Value for the ClockQuality.clockClass member of the DefaultDS.clockQuality member of PTPState.defaultDS. | |
#define | CLOCKACCURACY 0xFE |
Value for the ClockQuality.clockAccuracy member of the DefaultDS.clockQuality member of PTPState.defaultDS. | |
#define | OFFSETSCALEDLOGVARIANCE 0xFFFF |
Value for the ClockQuality.offsetScaledLogVareiance member of the DefaultDS.clockQuality member of PTPState.defaultDS. | |
#define | PRIORITY1 136 |
Value for the DefaultDS.priority1 member of PTPState.defaultDS. | |
#define | PRIORITY2 128 |
Value for the DefaultDS.priority2 member of PTPState.defaultDS. | |
#define | SLAVEONLY FALSE |
Value for the DefaultDS.slaveOnly member of PTPState.defaultDS. | |
#define | CURRENTUTCOFFSET 34 |
Value for the TimePropertiesDS.currentUtcOffset member of PTPState.timePropertiesDS. | |
#define | CURRENTUTCOFFSETVALID TRUE |
Value for the TimePropertiesDS.currentUtcOffsetValid member of PTPState.timePropertiesDS. | |
#define | LEAP59 FALSE |
Value for the TimePropertiesDS.leap59 member of PTPState.timePropertiesDS. | |
#define | LEAP61 FALSE |
Value for the TimePropertiesDS.leap61 member of PTPState.timePropertiesDS. | |
#define | TIMETRACEABLE FALSE |
Value for the TimePropertiesDS.timeTraceable member of PTPState.timePropertiesDS. | |
#define | FREQUENCYTRACEABLE FALSE |
Value for the TimePropertiesDS.frequencyTraceable member of PTPState.timePropertiesDS. | |
#define | PTPTIMESCALE TRUE |
Value for the TimePropertiesDS.ptpTimescale member of PTPState.timePropertiesDS. | |
#define | TIMESOURCE 0xA0 |
Value for the TimePropertiesDS.timeSource member of PTPState.timePropertiesDS. | |
#define | FOREIGNMASTERDSSIZE 5 |
Array size of PTPState.foreignMasterDS (9.3.2.4.5). | |
#define | DELAY_ASYMMETRY 0 |
Asymmetry in communication path in units of nanoseconds multiplied by 2^16 (7.4.2). | |
#define | MEANPATHDELAY 0x27100000 |
Initialization value of mean path delay, in units of nanoseconds multiplied by 2^16. | |
#define | CUTOFF 100000 |
Cutoff for deciding whether to step the clock or adjust the frequency, in units of ns. | |
#define | OFFSET_P(x) 0.2*(x) |
Proportional term of the PI controller which operates on the error in clock freqency between master and slave clocks. | |
#define | OFFSET_I(x) 0*(x) |
Integral term of the PI controller which operates on the error in clock freqency between master and slave clocks. | |
#define | FREQ_P(x) 0.2*(x) |
Proportional term of the PI controller which operates on the error in clock offset between master and slave clocks. | |
#define | FREQ_I(x) 0*(x) |
Integral term of the PI controller which operates on the error in clock offset between master and slave clocks. | |
#define | PTP_EVENT_PORT 319 |
PTP event port (Annex D). | |
#define | PTP_GENERAL_PORT 320 |
PTP general port (Annex D). | |
#define | DEST_IP {0xE000, 0x0181} |
Destination IP address (Annex D). | |
#define | TRANSPORTSPECIFIC 0 |
Value of Header.transportSpecific (Annex D). | |
#define | ADDRESSLENGTH |
Address length (Annex D). |
Define the configurable constants that are required for the correct operation of PTP.
Definition in file ptp-config.h.
#define ADDRESSLENGTH |
Address length (Annex D).
Definition at line 157 of file ptp-config.h.
#define ANNOUNCERECEIPTTIMEOUT 3 |
Value for the PortDS.announceReceiptTimeout member of PTPState.portDS.
Definition at line 45 of file ptp-config.h.
#define CLOCKACCURACY 0xFE |
Value for the ClockQuality.clockAccuracy member of the DefaultDS.clockQuality member of PTPState.defaultDS.
The default is 0xFE (unknown).
Definition at line 67 of file ptp-config.h.
#define CLOCKCLASS 248 |
Value for the ClockQuality.clockClass member of the DefaultDS.clockQuality member of PTPState.defaultDS.
The default is 248.
Definition at line 63 of file ptp-config.h.
#define CLOCKIDENTITY {0x5C, 0xFF, 0x35, 0xFF, 0xFE, 0x0D, 0x01, 0x4F} |
The value for the DefaultDS.clockIdentity member of PTPState.defaultDS.
For using a EUI-48 based MAC address, the clock identity is defined as {first 3 bytes of MAC, 0xFF, 0xFE, last 3 bytes of MAC}.
Definition at line 55 of file ptp-config.h.
#define CURRENTUTCOFFSET 34 |
Value for the TimePropertiesDS.currentUtcOffset member of PTPState.timePropertiesDS.
Definition at line 87 of file ptp-config.h.
#define CURRENTUTCOFFSETVALID TRUE |
Value for the TimePropertiesDS.currentUtcOffsetValid member of PTPState.timePropertiesDS.
Definition at line 90 of file ptp-config.h.
#define CUTOFF 100000 |
Cutoff for deciding whether to step the clock or adjust the frequency, in units of ns.
The value used is implementation specific since it depends on the importance of not stepping the clock, the maximal rate adjustment allowed, and constraints on the time to lock. For the DP83640, rate adjustment can achieve ~1950ns/sec, so a cutoff of 100,000ns could have a time to lock of ~51 seconds.
Definition at line 125 of file ptp-config.h.
#define DELAY_ASYMMETRY 0 |
Asymmetry in communication path in units of nanoseconds multiplied by 2^16 (7.4.2).
Definition at line 116 of file ptp-config.h.
#define DELAYREQDIV 4 |
2^DELAYREQDIV is the number of possible values (granularity) in the range of 2^(LOGMINDELAYREQINTERVAL+1) that can be set as the transmission interval for a Delay_Req message (9.5.11.2).
To ensure adequate granularity, DELAYREQDIV >= LOGMINDELAYREQINTERVAL+4.
Definition at line 40 of file ptp-config.h.
#define DEST_IP {0xE000, 0x0181} |
Destination IP address (Annex D).
Definition at line 153 of file ptp-config.h.
#define DOMAINNUMBER 0 |
Value for the DefaultDS.domainNumber member of PTPState.defaultDS.
The default is 0.
Definition at line 52 of file ptp-config.h.
#define FOREIGNMASTERDSSIZE 5 |
Array size of PTPState.foreignMasterDS (9.3.2.4.5).
The minimum value is 5.
Definition at line 112 of file ptp-config.h.
#define FREQ_I | ( | x | ) | 0*(x) |
Integral term of the PI controller which operates on the error in clock offset between master and slave clocks.
Definition at line 145 of file ptp-config.h.
#define FREQ_P | ( | x | ) | 0.2*(x) |
Proportional term of the PI controller which operates on the error in clock offset between master and slave clocks.
Definition at line 141 of file ptp-config.h.
#define FREQUENCYTRACEABLE FALSE |
Value for the TimePropertiesDS.frequencyTraceable member of PTPState.timePropertiesDS.
Definition at line 102 of file ptp-config.h.
#define LEAP59 FALSE |
Value for the TimePropertiesDS.leap59 member of PTPState.timePropertiesDS.
Definition at line 93 of file ptp-config.h.
#define LEAP61 FALSE |
Value for the TimePropertiesDS.leap61 member of PTPState.timePropertiesDS.
Definition at line 96 of file ptp-config.h.
#define LOGANNOUNCEINTERVAL 1 |
Value for the PortDS.logAnnounceInterval member of PTPState.portDS.
Definition at line 31 of file ptp-config.h.
#define LOGMINDELAYREQINTERVAL 0 |
Value for the PortDS.logMinDelayReqInterval member of PTPState.portDS.
Definition at line 37 of file ptp-config.h.
#define LOGSYNCINTERVAL 0 |
Value for the PortDS.logSyncInterval member of PTPState.portDS.
Definition at line 34 of file ptp-config.h.
#define MEANPATHDELAY 0x27100000 |
Initialization value of mean path delay, in units of nanoseconds multiplied by 2^16.
Either use 0 or best estimate of mean path delay.
Definition at line 120 of file ptp-config.h.
#define NUMBERPORTS 1 |
Value for the DefaultDS.numberPorts member of PTPState.defaultDS.
The value is 1 for an ordinary clock.
Definition at line 60 of file ptp-config.h.
#define OFFSET_I | ( | x | ) | 0*(x) |
Integral term of the PI controller which operates on the error in clock freqency between master and slave clocks.
Definition at line 137 of file ptp-config.h.
#define OFFSET_P | ( | x | ) | 0.2*(x) |
Proportional term of the PI controller which operates on the error in clock freqency between master and slave clocks.
Definition at line 133 of file ptp-config.h.
#define OFFSETSCALEDLOGVARIANCE 0xFFFF |
Value for the ClockQuality.offsetScaledLogVareiance member of the DefaultDS.clockQuality member of PTPState.defaultDS.
If unknown, the value is 0xFFFF. TODO: Need to measure (7.6.3.2).
Definition at line 71 of file ptp-config.h.
#define PRIORITY1 136 |
Value for the DefaultDS.priority1 member of PTPState.defaultDS.
Definition at line 76 of file ptp-config.h.
#define PRIORITY2 128 |
Value for the DefaultDS.priority2 member of PTPState.defaultDS.
Definition at line 79 of file ptp-config.h.
#define PTP_EVENT_PORT 319 |
PTP event port (Annex D).
Definition at line 151 of file ptp-config.h.
#define PTP_GENERAL_PORT 320 |
PTP general port (Annex D).
Definition at line 152 of file ptp-config.h.
#define PTPTIMESCALE TRUE |
Value for the TimePropertiesDS.ptpTimescale member of PTPState.timePropertiesDS.
Definition at line 105 of file ptp-config.h.
#define SLAVEONLY FALSE |
Value for the DefaultDS.slaveOnly member of PTPState.defaultDS.
Definition at line 82 of file ptp-config.h.
#define TIMESOURCE 0xA0 |
Value for the TimePropertiesDS.timeSource member of PTPState.timePropertiesDS.
An internal oscillator is 0xA0.
Definition at line 108 of file ptp-config.h.
#define TIMETRACEABLE FALSE |
Value for the TimePropertiesDS.timeTraceable member of PTPState.timePropertiesDS.
Definition at line 99 of file ptp-config.h.
#define TRANSPORTSPECIFIC 0 |
Value of Header.transportSpecific (Annex D).
Definition at line 154 of file ptp-config.h.
#define TWOSTEPFLAG FALSE |
Value for the DefaultDS.twoStepFlag member of PTPState.defaultDS.
Definition at line 49 of file ptp-config.h.