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
4bf77d71
Commit
4bf77d71
authored
Dec 28, 2011
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: header renamed to hdr and whitespaces fix
parent
c773d09b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
bmc.c
proto-standard/bmc.c
+13
-13
No files found.
proto-standard/bmc.c
View file @
4bf77d71
...
...
@@ -40,20 +40,20 @@ void m1(struct pp_instance *ppi)
/* Local clock is synchronized to Ebest Table 16 (9.3.5) of the spec. */
void
s1
(
MsgHeader
*
h
eade
r
,
MsgAnnounce
*
ann
,
struct
pp_instance
*
ppi
)
void
s1
(
MsgHeader
*
h
d
r
,
MsgAnnounce
*
ann
,
struct
pp_instance
*
ppi
)
{
/* Current DS */
DSCUR
(
ppi
)
->
stepsRemoved
=
ann
->
stepsRemoved
+
1
;
/* Parent DS */
pp_memcpy
(
DSPAR
(
ppi
)
->
parentPortIdentity
.
clockIdentity
,
heade
r
->
sourcePortIdentity
.
clockIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
hd
r
->
sourcePortIdentity
.
clockIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
DSPAR
(
ppi
)
->
parentPortIdentity
.
portNumber
=
h
eade
r
->
sourcePortIdentity
.
portNumber
;
h
d
r
->
sourcePortIdentity
.
portNumber
;
pp_memcpy
(
DSPAR
(
ppi
)
->
grandmasterIdentity
,
ann
->
grandmasterIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
ann
->
grandmasterIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
DSPAR
(
ppi
)
->
grandmasterClockQuality
.
clockAccuracy
=
ann
->
grandmasterClockQuality
.
clockAccuracy
;
...
...
@@ -67,21 +67,21 @@ void s1(MsgHeader *header, MsgAnnounce *ann, struct pp_instance *ppi)
/* Timeproperties DS */
DSPRO
(
ppi
)
->
currentUtcOffset
=
ann
->
currentUtcOffset
;
/* "Valid" is bit 2 in second octet of flagfield */
DSPRO
(
ppi
)
->
currentUtcOffsetValid
=
((
h
eade
r
->
flagField
[
1
]
&
0x04
)
==
DSPRO
(
ppi
)
->
currentUtcOffsetValid
=
((
h
d
r
->
flagField
[
1
]
&
0x04
)
==
0x04
);
DSPRO
(
ppi
)
->
leap59
=
((
h
eade
r
->
flagField
[
1
]
&
0x02
)
==
0x02
);
DSPRO
(
ppi
)
->
leap61
=
((
h
eade
r
->
flagField
[
1
]
&
0x01
)
==
0x01
);
DSPRO
(
ppi
)
->
timeTraceable
=
((
h
eade
r
->
flagField
[
1
]
&
0x10
)
==
0x10
);
DSPRO
(
ppi
)
->
frequencyTraceable
=
((
h
eade
r
->
flagField
[
1
]
&
0x20
)
DSPRO
(
ppi
)
->
leap59
=
((
h
d
r
->
flagField
[
1
]
&
0x02
)
==
0x02
);
DSPRO
(
ppi
)
->
leap61
=
((
h
d
r
->
flagField
[
1
]
&
0x01
)
==
0x01
);
DSPRO
(
ppi
)
->
timeTraceable
=
((
h
d
r
->
flagField
[
1
]
&
0x10
)
==
0x10
);
DSPRO
(
ppi
)
->
frequencyTraceable
=
((
h
d
r
->
flagField
[
1
]
&
0x20
)
==
0x20
);
DSPRO
(
ppi
)
->
ptpTimescale
=
((
h
eade
r
->
flagField
[
1
]
&
0x08
)
==
0x08
);
DSPRO
(
ppi
)
->
ptpTimescale
=
((
h
d
r
->
flagField
[
1
]
&
0x08
)
==
0x08
);
DSPRO
(
ppi
)
->
timeSource
=
ann
->
timeSource
;
}
/* Copy local data set into header and ann message. 9.3.4 table 12. */
void
copy_d0
(
MsgHeader
*
h
eade
r
,
MsgAnnounce
*
ann
,
struct
pp_instance
*
ppi
)
void
copy_d0
(
MsgHeader
*
h
d
r
,
MsgAnnounce
*
ann
,
struct
pp_instance
*
ppi
)
{
ann
->
grandmasterPriority1
=
DSDEF
(
ppi
)
->
priority1
;
pp_memcpy
(
ann
->
grandmasterIdentity
,
DSDEF
(
ppi
)
->
clockIdentity
,
...
...
@@ -94,7 +94,7 @@ void copy_d0(MsgHeader *header, MsgAnnounce *ann, struct pp_instance *ppi)
DSDEF
(
ppi
)
->
clockQuality
.
offsetScaledLogVariance
;
ann
->
grandmasterPriority2
=
DSDEF
(
ppi
)
->
priority2
;
ann
->
stepsRemoved
=
0
;
pp_memcpy
(
h
eade
r
->
sourcePortIdentity
.
clockIdentity
,
pp_memcpy
(
h
d
r
->
sourcePortIdentity
.
clockIdentity
,
DSDEF
(
ppi
)
->
clockIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
}
...
...
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