Commit b7e60af6 authored by Aurelio Colosimo's avatar Aurelio Colosimo

add WR extensions to msgs and datasets

parent 8fd51f2b
......@@ -41,10 +41,20 @@ typedef struct {
int32_t msb;
} Integer64;
typedef struct {
uint32_t lsb;
uint32_t msb;
} UInteger64;
typedef struct {
Integer64 scaledNanoseconds;
} TimeInterval;
/* White Rabbit extension */
typedef struct {
UInteger64 scaledPicoseconds;
} FixedDelta;
typedef struct {
UInteger48 secondsField;
UInteger32 nanosecondsField;
......@@ -120,6 +130,10 @@ typedef struct {
ClockIdentity grandmasterIdentity;
UInteger16 stepsRemoved;
Enumeration8 timeSource;
/* White Rabbit extension begin */
UInteger8 wrFlags;
/* White Rabbit extension end */
} MsgAnnounce;
/* Sync Message (table 26, page 129) */
......@@ -230,6 +244,32 @@ typedef struct {
Enumeration8 delayMechanism;
Integer8 logMinPdelayReqInterval;
UInteger4 versionNumber;
/* White Rabbit extension begin (see wrspec.v2-06-07-2011, page 17) */
Enumeration8 wrConfig;
Enumeration8 wrMode;
Boolean wrModeOn;
Enumeration8 wrPortState;
/* FIXME check doc: knownDeltaTx, knownDeltaRx, deltasKnown?) */
Boolean calibrated;
FixedDelta deltaTx;
FixedDelta deltaRx;
UInteger32 wrStateTimeout;
UInteger8 wrStateRetry;
UInteger32 calPeriod;
UInteger8 calRetry;
Enumeration8 parentWrConfig;
/* FIXME check doc: (parentWrMode?) */
Boolean parentWrModeON;
Boolean parentCalibrated;
/* FIXME: are they in the doc? */
UInteger16 otherNodeCalSendPattern;
UInteger32 otherNodeCalPeriod;
UInteger8 otherNodeCalRetry;
FixedDelta otherNodeDeltaTx;
FixedDelta otherNodeDeltaRx;
/* White Rabbit extension end */
} DSPort;
/* Time Properties Data Set */
......
......@@ -5,6 +5,7 @@
#include <ppsi/ppsi.h>
#include <ppsi/diag.h>
#include "wr_constants.h"
/*
* Initializes network and other stuff
......@@ -62,6 +63,11 @@ int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
DSPOR(ppi)->logMinPdelayReqInterval = PP_DEFAULT_PDELAYREQ_INTERVAL;
DSPOR(ppi)->versionNumber = PP_VERSION_PTP;
DSPOR(ppi)->wrConfig = WR_MODE_AUTO;
DSPOR(ppi)->wrStateTimeout = WR_DEFAULT_STATE_TIMEOUT_MS;
DSPOR(ppi)->wrStateRetry = WR_DEFAULT_STATE_REPEAT;
DSPOR(ppi)->calPeriod = WR_DEFAULT_CAL_PERIOD;
if (pp_timer_init(ppi))
goto failure;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment