Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
cead1712
Commit
cead1712
authored
Nov 25, 2012
by
Aurelio Colosimo
Committed by
Alessandro Rubini
Dec 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/measure_t24p.c: support for ppsi implemented
Signed-off-by:
Aurelio Colosimo
<
aurelio@aureliocolosimo.it
>
parent
a911afaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
measure_t24p.c
tests/measure_t24p.c
+9
-5
No files found.
tests/measure_t24p.c
View file @
cead1712
...
...
@@ -24,8 +24,14 @@
#undef PACKED
#include <ptpd_netif.h>
#ifdef CONFIG_PTP_NOPOSIX
/* FIXME */
#ifdef CONFIG_PPSI
#include <ppsi/ppsi.h>
#define UNPACK_HEADER msg_unpack_header
#define UNPACK_FOLLOWUP msg_unpack_follow_up
#else
#include "ptpd.h"
#define UNPACK_HEADER msgUnpackHeader
#define UNPACK_FOLLOWUP msgUnpackFollowUp
#endif
#if 0 /* not used, currently */
...
...
@@ -55,7 +61,6 @@ static void purge_socket(wr_socket_t * sock)
static
int
meas_phase_range
(
wr_socket_t
*
sock
,
int
phase_min
,
int
phase_max
,
int
phase_step
,
struct
meas_entry
*
results
)
{
#ifdef CONFIG_PTP_NOPOSIX
/* FIXME */
char
buf
[
128
];
wr_timestamp_t
ts_rx
,
ts_sync
=
{
0
,};
wr_sockaddr_t
from
;
...
...
@@ -75,12 +80,12 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max,
int
n
=
ptpd_netif_recvfrom
(
sock
,
&
from
,
buf
,
128
,
&
ts_rx
);
if
(
n
>
0
)
{
msgUnpackHeader
(
buf
,
&
mhdr
);
UNPACK_HEADER
(
buf
,
&
mhdr
);
if
(
mhdr
.
messageType
==
0
)
ts_sync
=
ts_rx
;
else
if
(
mhdr
.
messageType
==
8
&&
ts_sync
.
correct
)
{
MsgFollowUp
fup
;
msgUnpackFollowUp
(
buf
,
&
fup
);
UNPACK_FOLLOWUP
(
buf
,
&
fup
);
mprintf
(
"Shift: %d/%dps [step %dps]
\r
"
,
setpoint
,
phase_max
,
phase_step
);
...
...
@@ -106,7 +111,6 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max,
}
mprintf
(
"
\n
"
);
return
i
;
#endif
}
static
int
find_transition
(
struct
meas_entry
*
results
,
int
n
,
int
positive
)
...
...
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