Add an option to dial the frequency estimation interval.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
1bb4ef4e34
commit
75cdd1fe15
5
config.c
5
config.c
|
@ -193,6 +193,11 @@ static void scan_global_line(const char *s, struct config *cfg)
|
||||||
|
|
||||||
dds->free_running = val ? 1 : 0;
|
dds->free_running = val ? 1 : 0;
|
||||||
|
|
||||||
|
} else if (1 == sscanf(s, " freq_est_interval %d", &val)) {
|
||||||
|
|
||||||
|
if (val >= 0)
|
||||||
|
dds->freq_est_interval = val;
|
||||||
|
|
||||||
} else if (1 == sscanf(s, " assume_two_step %u", &val)) {
|
} else if (1 == sscanf(s, " assume_two_step %u", &val)) {
|
||||||
|
|
||||||
*cfg->assume_two_step = val ? 1 : 0;
|
*cfg->assume_two_step = val ? 1 : 0;
|
||||||
|
|
|
@ -11,6 +11,7 @@ clockClass 248
|
||||||
clockAccuracy 0xFE
|
clockAccuracy 0xFE
|
||||||
offsetScaledLogVariance 0xFFFF
|
offsetScaledLogVariance 0xFFFF
|
||||||
free_running 0
|
free_running 0
|
||||||
|
freq_est_interval 1
|
||||||
#
|
#
|
||||||
# Port Data Set
|
# Port Data Set
|
||||||
#
|
#
|
||||||
|
|
1
ds.h
1
ds.h
|
@ -34,6 +34,7 @@ struct defaultDS {
|
||||||
struct ClockIdentity clockIdentity;
|
struct ClockIdentity clockIdentity;
|
||||||
UInteger8 domainNumber;
|
UInteger8 domainNumber;
|
||||||
int free_running;
|
int free_running;
|
||||||
|
int freq_est_interval; /*log seconds*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dataset {
|
struct dataset {
|
||||||
|
|
1
gPTP.cfg
1
gPTP.cfg
|
@ -11,6 +11,7 @@ clockClass 248
|
||||||
clockAccuracy 0xFE
|
clockAccuracy 0xFE
|
||||||
offsetScaledLogVariance 0xFFFF
|
offsetScaledLogVariance 0xFFFF
|
||||||
free_running 0
|
free_running 0
|
||||||
|
freq_est_interval 1
|
||||||
#
|
#
|
||||||
# Port Data Set
|
# Port Data Set
|
||||||
#
|
#
|
||||||
|
|
1
ptp4l.c
1
ptp4l.c
|
@ -44,6 +44,7 @@ static struct config cfg_settings = {
|
||||||
.clockQuality.clockAccuracy = 0xfe,
|
.clockQuality.clockAccuracy = 0xfe,
|
||||||
.clockQuality.offsetScaledLogVariance = 0xffff,
|
.clockQuality.offsetScaledLogVariance = 0xffff,
|
||||||
.priority2 = 128,
|
.priority2 = 128,
|
||||||
|
.freq_est_interval = 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
.pod = {
|
.pod = {
|
||||||
|
|
Loading…
Reference in New Issue