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
f2d3c6a0
Commit
f2d3c6a0
authored
Sep 07, 2018
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aded retry to calibrated state
parent
9b7d9c1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
state-wr-calibrated.c
proto-ext-whiterabbit/state-wr-calibrated.c
+15
-6
state-wr-calibration.c
proto-ext-whiterabbit/state-wr-calibration.c
+2
-1
No files found.
proto-ext-whiterabbit/state-wr-calibrated.c
View file @
f2d3c6a0
...
...
@@ -17,20 +17,29 @@ int wr_calibrated(struct pp_instance *ppi, void *buf, int len)
{
struct
wr_dsport
*
wrp
=
WR_DSPOR
(
ppi
);
MsgSignaling
wrsig_msg
;
int
e
=
0
,
enable
=
0
;
if
(
ppi
->
is_new_state
)
__pp_timeout_set
(
ppi
,
PP_TO_EXT_0
,
wrp
->
wrStateTimeout
)
;
if
(
pp_timeout
(
ppi
,
PP_TO_EXT_0
))
{
if
(
ppi
->
is_new_state
)
{
wrp
->
wrStateRetry
=
WR_STATE_RETRY
;
enable
=
1
;
}
else
if
(
pp_timeout
(
ppi
,
PP_TO_EXT_0
))
{
/*
* FIXME: We should implement a retry by re-sending
* the "calibrated" message, moving it here from the
* previous state (sub-state 8 of "state-wr-calibration"
*/
wr_handshake_fail
(
ppi
);
return
0
;
/* non-wr */
if
(
wr_handshake_retry
(
ppi
))
enable
=
1
;
else
return
0
;
/* non-wr already */
}
if
(
enable
)
{
__pp_timeout_set
(
ppi
,
PP_TO_EXT_0
,
wrp
->
wrStateTimeout
);
e
=
msg_issue_wrsig
(
ppi
,
CALIBRATED
);
}
if
(
ppi
->
received_ptp_header
.
messageType
==
PPM_SIGNALING
)
{
msg_unpack_wrsig
(
ppi
,
buf
,
&
wrsig_msg
,
&
(
wrp
->
msgTmpWrMessageID
));
...
...
proto-ext-whiterabbit/state-wr-calibration.c
View file @
f2d3c6a0
...
...
@@ -126,7 +126,8 @@ int wr_calibration(struct pp_instance *ppi, void *buf, int len)
break
;
case
WR_PORT_CALIBRATION_8
:
/* send deltas to the other port and go to the next state */
msg_issue_wrsig
(
ppi
,
CALIBRATED
);
// msg_issue_wrsig(ppi, CALIBRATED);
ppi
->
next_state
=
WRS_CALIBRATED
;
wrp
->
calibrated
=
TRUE
;
...
...
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