[Aggregator] Add -h option
This commit is contained in:
parent
417452a7ad
commit
4117e8dc14
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* Arguments & program configuration */
|
/* Arguments & program configuration */
|
||||||
#define OPTIONS "a:c:f:i:k:l:o:p:" // getopt string
|
#define OPTIONS "a:c:f:hi:k:l:o:p:" // getopt string
|
||||||
#define DEFAULT_CONFIG_FILE "/usr/local/etc/owlps/owlps-aggregator.conf"
|
#define DEFAULT_CONFIG_FILE "/usr/local/etc/owlps/owlps-aggregator.conf"
|
||||||
#define DEFAULT_AGGREGATE_TIMEOUT 1500 // milliseconds
|
#define DEFAULT_AGGREGATE_TIMEOUT 1500 // milliseconds
|
||||||
#define DEFAULT_KEEP_TIMEOUT 3000 // milliseconds
|
#define DEFAULT_KEEP_TIMEOUT 3000 // milliseconds
|
||||||
|
|
|
@ -142,6 +142,9 @@ void parse_command_line(int argc, char **argv)
|
||||||
break ;
|
break ;
|
||||||
case 'f' : // Config file
|
case 'f' : // Config file
|
||||||
break ; // (already parsed)
|
break ; // (already parsed)
|
||||||
|
case 'h' :
|
||||||
|
print_usage() ;
|
||||||
|
exit(0) ;
|
||||||
case 'i' :
|
case 'i' :
|
||||||
cfg_setstr(cfg, "positioner_ip", optarg) ;
|
cfg_setstr(cfg, "positioner_ip", optarg) ;
|
||||||
break ;
|
break ;
|
||||||
|
@ -686,6 +689,7 @@ void print_usage()
|
||||||
" [-c check_interval] [-o output_file]\n"
|
" [-c check_interval] [-o output_file]\n"
|
||||||
|
|
||||||
"Main options:\n"
|
"Main options:\n"
|
||||||
|
"\t-h\t\tPrint this help.\n"
|
||||||
"\t-f config_file\tUse 'config_file' instead of the default"
|
"\t-f config_file\tUse 'config_file' instead of the default"
|
||||||
" configuration file.\n"
|
" configuration file.\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue