config: convert 'timeSource' to the new scheme.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2015-08-15 14:41:01 +02:00
parent 5277396b3a
commit 76f8d5eb48
4 changed files with 2 additions and 9 deletions

View File

@ -830,7 +830,7 @@ struct clock *clock_create(struct config *config, int phc_index,
c->grand_master_capable = config_get_int(config, NULL, "gmCapable");
c->kernel_leap = config_get_int(config, NULL, "kernel_leap");
c->utc_offset = CURRENT_UTC_OFFSET;
c->time_source = dds->time_source;
c->time_source = config_get_int(config, NULL, "timeSource");
c->desc = dds->clock_desc;
if (c->free_running) {

View File

@ -127,6 +127,7 @@ struct config_item config_tab[] = {
GLOB_ITEM_DBL("step_threshold", 0.0, 0.0, DBL_MAX),
GLOB_ITEM_INT("summary_interval", 0, INT_MIN, INT_MAX),
PORT_ITEM_INT("syncReceiptTimeout", 0, 0, UINT8_MAX),
GLOB_ITEM_INT("timeSource", INTERNAL_OSCILLATOR, 0x10, 0xfe),
PORT_ITEM_INT("transportSpecific", 0, 0, 0x0F),
GLOB_ITEM_INT("tx_timestamp_timeout", 1, 1, INT_MAX),
PORT_ITEM_INT("udp_ttl", 1, 1, 255),
@ -549,12 +550,6 @@ static enum parser_result parse_global_setting(const char *option,
for (i = 0; i < OUI_LEN; i++)
cfg->dds.clock_desc.manufacturerIdentity[i] = oui[i];
} else if (!strcmp(option, "timeSource")) {
r = get_ranged_int(value, &val, 0x10, 0xfe);
if (r != PARSED_OK)
return r;
cfg->dds.time_source = val;
} else if (!strcmp(option, "tsproc_mode")) {
if (!strcasecmp("filter", value))
cfg->dds.tsproc_mode = TSPROC_FILTER;

1
ds.h
View File

@ -52,7 +52,6 @@ struct clock_description {
struct default_ds {
struct defaultDS dds;
int time_source;
struct clock_description clock_desc;
enum tsproc_mode tsproc_mode;
enum filter_type delay_filter;

View File

@ -52,7 +52,6 @@ static struct config cfg_settings = {
.priority2 = 128,
.domainNumber = 0,
},
.time_source = INTERNAL_OSCILLATOR,
.clock_desc = {
.productDescription = {
.max_symbols = 64,