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
f08c8449
Commit
f08c8449
authored
Apr 20, 2015
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ML-bmc-fixes'
parents
c8fd61ad
0cd4f99a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
bmc.c
proto-standard/bmc.c
+3
-1
common-fun.c
proto-standard/common-fun.c
+0
-1
msg.c
proto-standard/msg.c
+3
-3
state-initializing.c
proto-standard/state-initializing.c
+0
-2
No files found.
proto-standard/bmc.c
View file @
f08c8449
...
...
@@ -246,7 +246,9 @@ passive:
return
PPS_PASSIVE
;
master:
m1
(
ppi
);
//TODO: consider whether a smarter solution is needed for non-simple cases
if
(
cmpres
<
0
)
// it is M1 and M2, see IEEE1588-2008, page 87, in short switch is a GM
m1
(
ppi
);
//GM
pp_diag
(
ppi
,
bmc
,
1
,
"%s: master
\n
"
,
__func__
);
return
PPS_MASTER
;
...
...
proto-standard/common-fun.c
View file @
f08c8449
...
...
@@ -56,7 +56,6 @@ int st_com_execute_slave(struct pp_instance *ppi)
ppi
->
frgn_rec_num
=
0
;
if
(
DSDEF
(
ppi
)
->
clockQuality
.
clockClass
!=
PP_CLASS_SLAVE_ONLY
&&
(
ppi
->
role
!=
PPSI_ROLE_SLAVE
))
{
m1
(
ppi
);
ppi
->
next_state
=
PPS_MASTER
;
}
else
{
ppi
->
next_state
=
PPS_LISTENING
;
...
...
proto-standard/msg.c
View file @
f08c8449
...
...
@@ -144,10 +144,10 @@ static int msg_pack_announce(struct pp_instance *ppi)
memset
((
buf
+
34
),
0
,
10
);
*
(
Integer16
*
)
(
buf
+
44
)
=
htons
(
DSPRO
(
ppi
)
->
currentUtcOffset
);
*
(
UInteger8
*
)
(
buf
+
47
)
=
DSPAR
(
ppi
)
->
grandmasterPriority1
;
*
(
UInteger8
*
)
(
buf
+
48
)
=
DS
DEF
(
ppi
)
->
c
lockQuality
.
clockClass
;
*
(
Enumeration8
*
)
(
buf
+
49
)
=
DS
DEF
(
ppi
)
->
c
lockQuality
.
clockAccuracy
;
*
(
UInteger8
*
)
(
buf
+
48
)
=
DS
PAR
(
ppi
)
->
grandmasterC
lockQuality
.
clockClass
;
*
(
Enumeration8
*
)
(
buf
+
49
)
=
DS
PAR
(
ppi
)
->
grandmasterC
lockQuality
.
clockAccuracy
;
*
(
UInteger16
*
)
(
buf
+
50
)
=
htons
(
DS
DEF
(
ppi
)
->
c
lockQuality
.
offsetScaledLogVariance
);
htons
(
DS
PAR
(
ppi
)
->
grandmasterC
lockQuality
.
offsetScaledLogVariance
);
*
(
UInteger8
*
)
(
buf
+
52
)
=
DSPAR
(
ppi
)
->
grandmasterPriority2
;
memcpy
((
buf
+
53
),
&
DSPAR
(
ppi
)
->
grandmasterIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
...
...
proto-standard/state-initializing.c
View file @
f08c8449
...
...
@@ -64,8 +64,6 @@ int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
pp_diag
(
ppi
,
bmc
,
1
,
"clock accuracy = %d
\n
"
,
DSDEF
(
ppi
)
->
clockQuality
.
clockAccuracy
);
m1
(
ppi
);
msg_pack_header
(
ppi
,
ppi
->
tx_ptp
);
/* This is used for all tx */
if
(
ppi
->
role
!=
PPSI_ROLE_MASTER
)
...
...
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