Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
b7e60af6
Commit
b7e60af6
authored
Jul 11, 2012
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add WR extensions to msgs and datasets
parent
8fd51f2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
ieee1588_types.h
include/ppsi/ieee1588_types.h
+40
-0
state-initializing.c
proto-ext-whiterabbit/state-initializing.c
+6
-0
No files found.
include/ppsi/ieee1588_types.h
View file @
b7e60af6
...
...
@@ -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 */
...
...
proto-ext-whiterabbit/state-initializing.c
View file @
b7e60af6
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment