telecom: Introduce the local priority attribute into the data set.
The Telecom Profiles G.8275.1 and G.8275.2 have invented a new per-port and per-clock attribute, not in 1588, called "localPriority". The use of this attribute is a distinguishing feature of the telecom data set comparison algorithm. This patch adds the attribute, hard coded to its default value. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
6f96ebb7b8
commit
a8d0eb92c6
1
clock.c
1
clock.c
|
@ -931,6 +931,7 @@ struct clock *clock_create(enum clock_type type, struct config *config,
|
|||
c->dds.flags & DDS_SLAVE_ONLY) {
|
||||
c->dds.clockQuality.clockClass = 255;
|
||||
}
|
||||
c->default_dataset.localPriority = 128;
|
||||
|
||||
/* Harmonize the twoStepFlag with the time_stamping option. */
|
||||
if (config_harmonize_onestep(config)) {
|
||||
|
|
1
ds.h
1
ds.h
|
@ -55,6 +55,7 @@ struct dataset {
|
|||
struct ClockIdentity identity;
|
||||
struct ClockQuality quality;
|
||||
UInteger8 priority2;
|
||||
UInteger8 localPriority; /* Telecom Profile only */
|
||||
UInteger16 stepsRemoved;
|
||||
struct PortIdentity sender;
|
||||
struct PortIdentity receiver;
|
||||
|
|
1
port.c
1
port.c
|
@ -77,6 +77,7 @@ static void announce_to_dataset(struct ptp_message *m, struct port *p,
|
|||
out->identity = a->grandmasterIdentity;
|
||||
out->quality = a->grandmasterClockQuality;
|
||||
out->priority2 = a->grandmasterPriority2;
|
||||
out->localPriority = 128;
|
||||
out->stepsRemoved = a->stepsRemoved;
|
||||
out->sender = m->header.sourcePortIdentity;
|
||||
out->receiver = p->portIdentity;
|
||||
|
|
Loading…
Reference in New Issue