Commit 2cff4004 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Changed option seedlink with argument


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@144 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 21130c56
......@@ -319,7 +319,7 @@ int main (int argc, char **argv) {
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
/* Send data to SeedLink Server */
if(params.flag_writeseedlink) {
if(params.flag_slink) {
/* TODO Set values */
const int usec_correction = 0;
const int timing_quality = 100;
......@@ -476,7 +476,7 @@ int main (int argc, char **argv) {
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
/* Send data to SeedLink Server */
if(params.flag_writeseedlink) {
if(params.flag_slink) {
/* TODO Set values */
const int usec_correction = 0;
const int timing_quality = 100;
......
......@@ -22,6 +22,7 @@ const NMXPTOOL_PARAMS NMXPTOOL_PARAMS_DEFAULT =
NULL,
DEFAULT_STC,
DEFAULT_RATE,
NULL,
0,
0,
0,
......@@ -81,8 +82,9 @@ Other arguments:\n\
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
printf("\
-k, --seedlink Send received data to SeedLink.\n\
This tool become a SeedLink plug-in.\n");
-k, --slink=[plug_name] Send received data to SeedLink like as plug-in.\n\
plug_name is optional and SeisComP sets it.\n\
THIS OPTION MUST BE THE LAST!\n");
#endif
printf("\
-h, --help Print this help.\n\
......@@ -163,7 +165,7 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
#endif
{"writefile", no_argument, 0, 'w'},
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
{"seedlink", no_argument, 0, 'k'},
{"slink", optional_argument, 0, 'k'},
#endif
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
......@@ -277,6 +279,13 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
params->datas_password = optarg;
break;
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
case 'k':
params->flag_slink = 1;
params->plugin_slink = optarg;
break;
#endif
case 'v':
params->flag_verbose = 1;
break;
......@@ -303,12 +312,6 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
params->flag_writefile = 1;
break;
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
case 'k':
params->flag_writeseedlink = 1;
break;
#endif
case 'h':
nmxptool_usage(long_options);
exit (1);
......
......@@ -25,11 +25,12 @@ typedef struct {
char *datas_password;
int stc;
int rate;
char *plugin_slink;
int flag_writeseed;
int flag_verbose;
int flag_listchannels;
int flag_writefile;
int flag_writeseedlink;
int flag_slink;
int flag_buffered;
int flag_logdata;
} NMXPTOOL_PARAMS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment