diff --git a/TODO.t2t b/TODO.t2t index 33914d0..92137fd 100644 --- a/TODO.t2t +++ b/TODO.t2t @@ -75,9 +75,6 @@ Work to do in OwlPS = Aggregator = -- Rename ap_check_interval to something more meaningful - (something like autocalibration_order_interval). - - Test for the maximum verbose level. - Outputs should include all the timestamps diff --git a/owlps-aggregator/owlps-aggregator.h b/owlps-aggregator/owlps-aggregator.h index 9ca4f13..f18e16b 100644 --- a/owlps-aggregator/owlps-aggregator.h +++ b/owlps-aggregator/owlps-aggregator.h @@ -33,7 +33,7 @@ #define DEFAULT_KEEP_TIMEOUT 3000 // milliseconds #define DEFAULT_CHECK_INTERVAL 300 // milliseconds #define DEFAULT_AP_KEEP_TIMEOUT 35 // seconds -#define DEFAULT_AP_CHECK_INTERVAL 1000 // milliseconds +#define DEFAULT_AC_ORDER_INTERVAL 1000 // milliseconds #define POSITIONER_DEFAULT_IP "127.0.0.1" diff --git a/owlps-aggregator/owlps-aggregatord.c b/owlps-aggregator/owlps-aggregatord.c index 821858b..fc77c6c 100644 --- a/owlps-aggregator/owlps-aggregatord.c +++ b/owlps-aggregator/owlps-aggregatord.c @@ -276,8 +276,8 @@ int parse_config_file(int argc, char **argv) OWL_DEFAULT_AUTOCALIBRATION_HELLO_PORT, CFGF_NONE), // Time we keep APs in the list (in seconds): CFG_INT("ap_keep_timeout", DEFAULT_AP_KEEP_TIMEOUT, CFGF_NONE), - // Time between two checks of the AP list (in milliseconds): - CFG_INT("ap_check_interval", DEFAULT_AP_CHECK_INTERVAL, CFGF_NONE), + // Time between two checks of the CP list (in milliseconds): + CFG_INT("ac_order_interval", DEFAULT_AC_ORDER_INTERVAL, CFGF_NONE), CFG_END() } ; @@ -366,7 +366,7 @@ int parse_command_line(int argc, char **argv) cfg_setint(cfg, "check_interval", strtol(optarg, NULL, 0)) ; break ; case 'C' : - cfg_setint(cfg, "ap_check_interval", strtol(optarg, NULL, 0)) ; + cfg_setint(cfg, "ac_order_interval", strtol(optarg, NULL, 0)) ; break ; case 'D' : cfg_setbool(cfg, "daemon", cfg_true) ; @@ -508,13 +508,13 @@ int check_configuration() cfg_setint(cfg, "ap_keep_timeout", DEFAULT_AP_KEEP_TIMEOUT) ; } - // ap_check_interval // - if (cfg_getint(cfg, "ap_check_interval") < 0) + // ac_order_interval // + if (cfg_getint(cfg, "ac_order_interval") < 0) { if (VERBOSE_WARNING) - fprintf(stderr, "Warning! ap_check_interval cannot be negative:" + fprintf(stderr, "Warning! ac_order_interval cannot be negative:" " failing back to the default value.\n") ; - cfg_setint(cfg, "ap_check_interval", DEFAULT_AP_CHECK_INTERVAL) ; + cfg_setint(cfg, "ac_order_interval", DEFAULT_AC_ORDER_INTERVAL) ; } return 0 ; @@ -1369,7 +1369,7 @@ void* monitor_aps(void *NULL_value) } sem_post(&lock_aps) ; - owl_msleep(cfg_getint(cfg, "ap_check_interval")) ; + owl_msleep(cfg_getint(cfg, "ac_order_interval")) ; } pthread_exit(NULL_value) ; @@ -1529,7 +1529,7 @@ void print_usage() " [-a autocalibration_port]" "\n\t" " [-K ap_keep_timeout]" - " [-C ap_check_interval]" + " [-C ac_order_interval]" "\n" "\t%s -h\n" "\t%s -V\n" @@ -1581,8 +1581,9 @@ void print_usage() " received\n\t\t\t\tfrom the listeners (default: %d).\n" "\t-K ap_keep_timeout\tInactive APs are kept during" " 'ap_keep_timeout'\n\t\t\t\tseconds (default: %d s).\n" - "\t-C ap_check_interval\tTime (in milliseconds) between two" - " checks of the\n\t\t\t\tstored APs (default: %d ms).\n" + "\t-C ac_order_interval\tTime (in milliseconds) between two" + " transmissions\n\t\t\t\tof autocalibration orders to the" + " stored CPs\n\t\t\t\t(default: %d ms).\n" , program_name, program_name, @@ -1597,7 +1598,7 @@ void print_usage() OWL_DEFAULT_AUTOCALIBRATION_ORDER_PORT, OWL_DEFAULT_AUTOCALIBRATION_HELLO_PORT, DEFAULT_AP_KEEP_TIMEOUT, - DEFAULT_AP_CHECK_INTERVAL + DEFAULT_AC_ORDER_INTERVAL ) ; }