Add an option to dial the frequency estimation interval.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-08-21 17:14:15 +02:00
parent 1bb4ef4e34
commit 75cdd1fe15
5 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -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
View File

@ -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 {

View File

@ -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
# #

View File

@ -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 = {