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
d5170669
Commit
d5170669
authored
Dec 12, 2011
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
var announce shortened to ann
parent
74da3f32
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
bmc.c
proto-standard/bmc.c
+19
-19
No files found.
proto-standard/bmc.c
View file @
d5170669
...
@@ -40,10 +40,10 @@ void m1(struct pp_instance *ppi)
...
@@ -40,10 +40,10 @@ void m1(struct pp_instance *ppi)
/* Local clock is synchronized to Ebest Table 16 (9.3.5) of the spec. */
/* Local clock is synchronized to Ebest Table 16 (9.3.5) of the spec. */
void
s1
(
MsgHeader
*
header
,
MsgAnnounce
*
ann
ounce
,
struct
pp_instance
*
ppi
)
void
s1
(
MsgHeader
*
header
,
MsgAnnounce
*
ann
,
struct
pp_instance
*
ppi
)
{
{
/* Current DS */
/* Current DS */
DSCUR
(
ppi
)
->
stepsRemoved
=
ann
ounce
->
stepsRemoved
+
1
;
DSCUR
(
ppi
)
->
stepsRemoved
=
ann
->
stepsRemoved
+
1
;
/* Parent DS */
/* Parent DS */
pp_memcpy
(
DSPAR
(
ppi
)
->
parentPortIdentity
.
clockIdentity
,
pp_memcpy
(
DSPAR
(
ppi
)
->
parentPortIdentity
.
clockIdentity
,
...
@@ -53,19 +53,19 @@ void s1(MsgHeader *header, MsgAnnounce *announce, struct pp_instance *ppi)
...
@@ -53,19 +53,19 @@ void s1(MsgHeader *header, MsgAnnounce *announce, struct pp_instance *ppi)
header
->
sourcePortIdentity
.
portNumber
;
header
->
sourcePortIdentity
.
portNumber
;
pp_memcpy
(
DSPAR
(
ppi
)
->
grandmasterIdentity
,
pp_memcpy
(
DSPAR
(
ppi
)
->
grandmasterIdentity
,
ann
ounce
->
grandmasterIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
ann
->
grandmasterIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
DSPAR
(
ppi
)
->
grandmasterClockQuality
.
clockAccuracy
=
DSPAR
(
ppi
)
->
grandmasterClockQuality
.
clockAccuracy
=
ann
ounce
->
grandmasterClockQuality
.
clockAccuracy
;
ann
->
grandmasterClockQuality
.
clockAccuracy
;
DSPAR
(
ppi
)
->
grandmasterClockQuality
.
clockClass
=
DSPAR
(
ppi
)
->
grandmasterClockQuality
.
clockClass
=
ann
ounce
->
grandmasterClockQuality
.
clockClass
;
ann
->
grandmasterClockQuality
.
clockClass
;
DSPAR
(
ppi
)
->
grandmasterClockQuality
.
offsetScaledLogVariance
=
DSPAR
(
ppi
)
->
grandmasterClockQuality
.
offsetScaledLogVariance
=
ann
ounce
->
grandmasterClockQuality
.
offsetScaledLogVariance
;
ann
->
grandmasterClockQuality
.
offsetScaledLogVariance
;
DSPAR
(
ppi
)
->
grandmasterPriority1
=
ann
ounce
->
grandmasterPriority1
;
DSPAR
(
ppi
)
->
grandmasterPriority1
=
ann
->
grandmasterPriority1
;
DSPAR
(
ppi
)
->
grandmasterPriority2
=
ann
ounce
->
grandmasterPriority2
;
DSPAR
(
ppi
)
->
grandmasterPriority2
=
ann
->
grandmasterPriority2
;
/* Timeproperties DS */
/* Timeproperties DS */
DSPRO
(
ppi
)
->
currentUtcOffset
=
ann
ounce
->
currentUtcOffset
;
DSPRO
(
ppi
)
->
currentUtcOffset
=
ann
->
currentUtcOffset
;
/* "Valid" is bit 2 in second octet of flagfield */
/* "Valid" is bit 2 in second octet of flagfield */
DSPRO
(
ppi
)
->
currentUtcOffsetValid
=
((
header
->
flagField
[
1
]
&
0x04
)
==
DSPRO
(
ppi
)
->
currentUtcOffsetValid
=
((
header
->
flagField
[
1
]
&
0x04
)
==
0x04
);
0x04
);
...
@@ -76,24 +76,24 @@ void s1(MsgHeader *header, MsgAnnounce *announce, struct pp_instance *ppi)
...
@@ -76,24 +76,24 @@ void s1(MsgHeader *header, MsgAnnounce *announce, struct pp_instance *ppi)
DSPRO
(
ppi
)
->
frequencyTraceable
=
((
header
->
flagField
[
1
]
&
0x20
)
DSPRO
(
ppi
)
->
frequencyTraceable
=
((
header
->
flagField
[
1
]
&
0x20
)
==
0x20
);
==
0x20
);
DSPRO
(
ppi
)
->
ptpTimescale
=
((
header
->
flagField
[
1
]
&
0x08
)
==
0x08
);
DSPRO
(
ppi
)
->
ptpTimescale
=
((
header
->
flagField
[
1
]
&
0x08
)
==
0x08
);
DSPRO
(
ppi
)
->
timeSource
=
ann
ounce
->
timeSource
;
DSPRO
(
ppi
)
->
timeSource
=
ann
->
timeSource
;
}
}
/* Copy local data set into header and ann
ounce
message. 9.3.4 table 12. */
/* Copy local data set into header and ann message. 9.3.4 table 12. */
void
copy_d0
(
MsgHeader
*
header
,
MsgAnnounce
*
ann
ounce
,
struct
pp_instance
*
ppi
)
void
copy_d0
(
MsgHeader
*
header
,
MsgAnnounce
*
ann
,
struct
pp_instance
*
ppi
)
{
{
ann
ounce
->
grandmasterPriority1
=
DSDEF
(
ppi
)
->
priority1
;
ann
->
grandmasterPriority1
=
DSDEF
(
ppi
)
->
priority1
;
pp_memcpy
(
ann
ounce
->
grandmasterIdentity
,
DSDEF
(
ppi
)
->
clockIdentity
,
pp_memcpy
(
ann
->
grandmasterIdentity
,
DSDEF
(
ppi
)
->
clockIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
PP_CLOCK_IDENTITY_LENGTH
);
ann
ounce
->
grandmasterClockQuality
.
clockClass
=
ann
->
grandmasterClockQuality
.
clockClass
=
DSDEF
(
ppi
)
->
clockQuality
.
clockClass
;
DSDEF
(
ppi
)
->
clockQuality
.
clockClass
;
ann
ounce
->
grandmasterClockQuality
.
clockAccuracy
=
ann
->
grandmasterClockQuality
.
clockAccuracy
=
DSDEF
(
ppi
)
->
clockQuality
.
clockAccuracy
;
DSDEF
(
ppi
)
->
clockQuality
.
clockAccuracy
;
ann
ounce
->
grandmasterClockQuality
.
offsetScaledLogVariance
=
ann
->
grandmasterClockQuality
.
offsetScaledLogVariance
=
DSDEF
(
ppi
)
->
clockQuality
.
offsetScaledLogVariance
;
DSDEF
(
ppi
)
->
clockQuality
.
offsetScaledLogVariance
;
ann
ounce
->
grandmasterPriority2
=
DSDEF
(
ppi
)
->
priority2
;
ann
->
grandmasterPriority2
=
DSDEF
(
ppi
)
->
priority2
;
ann
ounce
->
stepsRemoved
=
0
;
ann
->
stepsRemoved
=
0
;
pp_memcpy
(
header
->
sourcePortIdentity
.
clockIdentity
,
pp_memcpy
(
header
->
sourcePortIdentity
.
clockIdentity
,
DSDEF
(
ppi
)
->
clockIdentity
,
PP_CLOCK_IDENTITY_LENGTH
);
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