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
68d0f8e0
Commit
68d0f8e0
authored
Aug 26, 2022
by
Omar Gabella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KM3NET BROADCAST BASE : WR (signaling) messages for specific CLBs was targeted a.k.a targetIdentity
parent
26b16851
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
0 deletions
+56
-0
ieee1588_types.h
include/ppsi/ieee1588_types.h
+4
-0
state-wr-calibrated.c
proto-ext-whiterabbit/state-wr-calibrated.c
+11
-0
state-wr-locked.c
proto-ext-whiterabbit/state-wr-locked.c
+11
-0
state-wr-present.c
proto-ext-whiterabbit/state-wr-present.c
+11
-0
state-wr-resp-calib-req.c
proto-ext-whiterabbit/state-wr-resp-calib-req.c
+11
-0
msg.c
proto-standard/msg.c
+8
-0
No files found.
include/ppsi/ieee1588_types.h
View file @
68d0f8e0
...
...
@@ -107,6 +107,10 @@ struct FaultRecord { /* page 14 (34) -- never used */
/* Common Message header (table 18, page 124) */
typedef
struct
MsgHeader
{
#ifdef BROADCAST_BASE
// KM3NeT: We need the targetIdentity of the packet for base modules
PortIdentity
targetIdentity
;
#endif
Nibble
transportSpecific
;
Enumeration4
messageType
;
UInteger4
versionPTP
;
...
...
proto-ext-whiterabbit/state-wr-calibrated.c
View file @
68d0f8e0
...
...
@@ -43,7 +43,18 @@ int wr_calibrated(struct pp_instance *ppi, unsigned char *pkt, int plen)
ppi
->
next_state
=
WRS_RESP_CALIB_REQ
;
else
if
((
wrp
->
msgTmpWrMessageID
==
WR_MODE_ON
)
&&
(
wrp
->
wrMode
==
WR_SLAVE
))
{
#ifdef BROADCAST_BASE
if
(
memcmp
(
ppi
->
received_ptp_header
.
targetIdentity
.
clockIdentity
.
id
,
DSPOR
(
ppi
)
->
portIdentity
.
clockIdentity
.
id
,
P_CLOCK_IDENTITY_LENGTH
)
!=
0
)
{
ppi
->
next_state
=
WRS_WR_LINK_ON
;
}
#else
ppi
->
next_state
=
WRS_WR_LINK_ON
;
#endif // BROADCAST_BASE
}
}
#endif // BROADCAST_NODE
...
...
proto-ext-whiterabbit/state-wr-locked.c
View file @
68d0f8e0
...
...
@@ -44,7 +44,18 @@ int wr_locked(struct pp_instance *ppi, unsigned char *pkt, int plen)
&
(
wrp
->
msgTmpWrMessageID
));
if
(
wrp
->
msgTmpWrMessageID
==
CALIBRATE
)
{
#ifdef BROADCAST_BASE
if
(
memcmp
(
ppi
->
received_ptp_header
.
targetIdentity
.
clockIdentity
.
id
,
DSPOR
(
ppi
)
->
portIdentity
.
clockIdentity
.
id
,
PP_CLOCK_IDENTITY_LENGTH
)
!=
0
)
{
ppi
->
next_state
=
WRS_RESP_CALIB_REQ
;
}
#else
ppi
->
next_state
=
WRS_RESP_CALIB_REQ
;
#endif // BROADCAST_BASE
}
}
#endif // BROADCAST_NODE
...
...
proto-ext-whiterabbit/state-wr-present.c
View file @
68d0f8e0
...
...
@@ -48,7 +48,18 @@ int wr_present(struct pp_instance *ppi, unsigned char *pkt, int plen)
&
(
wrp
->
msgTmpWrMessageID
));
if
(
wrp
->
msgTmpWrMessageID
==
LOCK
)
{
#ifdef BROADCAST_BASE
if
(
memcmp
(
ppi
->
received_ptp_header
.
targetIdentity
.
clockIdentity
.
id
,
DSPOR
(
ppi
)
->
portIdentity
.
clockIdentity
.
id
,
PP_CLOCK_IDENTITY_LENGTH
)
!=
0
)
{
ppi
->
next_state
=
WRS_S_LOCK
;
}
#else
ppi
->
next_state
=
WRS_S_LOCK
;
#endif // BROADCAST_BASE
}
}
#endif // BROADCAST_NODE
...
...
proto-ext-whiterabbit/state-wr-resp-calib-req.c
View file @
68d0f8e0
...
...
@@ -45,12 +45,23 @@ int wr_resp_calib_req(struct pp_instance *ppi, unsigned char *pkt, int plen)
&
(
wrp
->
msgTmpWrMessageID
));
if
(
wrp
->
msgTmpWrMessageID
==
CALIBRATED
)
{
#ifdef BROADCAST_BASE
if
(
memcmp
(
ppi
->
received_ptp_header
.
targetIdentity
.
clockIdentity
.
id
,
DSPOR
(
ppi
)
->
portIdentity
.
clockIdentity
.
id
,
PP_CLOCK_IDENTITY_LENGTH
)
!=
0
)
{
if
(
send_pattern
)
wrp
->
ops
->
calib_pattern_disable
(
ppi
);
ppi
->
next_state
=
WRS_CALIBRATION
;
}
#else
if
(
send_pattern
)
wrp
->
ops
->
calib_pattern_disable
(
ppi
);
if
(
wrp
->
wrMode
==
WR_MASTER
)
ppi
->
next_state
=
WRS_WR_LINK_ON
;
else
ppi
->
next_state
=
WRS_CALIBRATION
;
#endif // BROADCAST_BASE
}
}
#endif // BROADCAST_NODE
...
...
proto-standard/msg.c
View file @
68d0f8e0
...
...
@@ -35,6 +35,14 @@ int msg_unpack_header(struct pp_instance *ppi, void *buf, int plen)
hdr
->
sequenceId
=
htons
(
*
(
UInteger16
*
)
(
buf
+
30
));
hdr
->
logMessageInterval
=
(
*
(
Integer8
*
)
(
buf
+
33
));
#ifdef BROADCAST_BASE
// KM3NeT: If the message is a Signaling, I associate the targetIdentity with the header.
if
(
hdr
->
messageType
==
PPM_SIGNALING
)
{
memcpy
(
hdr
->
targetIdentity
.
clockIdentity
.
id
,(
buf
+
34
),
PP_CLOCK_IDENTITY_LENGTH
);
hdr
->
targetIdentity
.
portNumber
=
(
*
(
UInteger16
*
)
(
buf
+
42
));
}
#endif
/*
* This FLAG_FROM_CURRENT_PARENT must be killed. Meanwhile, say it's
...
...
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