Commit 574e179d authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

moved parameters n_channel and n_usec to params


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@929 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 730d2bb9
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxptool.c,v 1.151 2008-03-18 15:19:37 mtheo Exp $ * $Id: nmxptool.c,v 1.152 2008-03-18 19:05:25 mtheo Exp $
* *
*/ */
...@@ -143,10 +143,6 @@ int main (int argc, char **argv) { ...@@ -143,10 +143,6 @@ int main (int argc, char **argv) {
double default_start_time = 0.0; double default_start_time = 0.0;
char start_time_str[30], end_time_str[30], default_start_time_str[30]; char start_time_str[30], end_time_str[30], default_start_time_str[30];
/* Empiric constant values TODO */
const int n_channel = 9;
const int n_usec = 250000; /* 1/4 second */
NMXP_DATA_PROCESS *pd; NMXP_DATA_PROCESS *pd;
#ifndef HAVE_WINDOWS_H #ifndef HAVE_WINDOWS_H
...@@ -748,7 +744,7 @@ int main (int argc, char **argv) { ...@@ -748,7 +744,7 @@ int main (int argc, char **argv) {
/* PDS Step 5: Send AddChannels */ /* PDS Step 5: Send AddChannels */
/* Request Data */ /* Request Data */
nmxp_sendAddTimeSeriesChannel(naqssock, channelList_subset, params.stc, params.rate, (params.flag_buffered)? NMXP_BUFFER_YES : NMXP_BUFFER_NO, n_channel, n_usec); nmxp_sendAddTimeSeriesChannel(naqssock, channelList_subset, params.stc, params.rate, (params.flag_buffered)? NMXP_BUFFER_YES : NMXP_BUFFER_NO, params.n_channel, params.n_usec);
/* PDS Step 6: Repeat until finished: receive and handle packets */ /* PDS Step 6: Repeat until finished: receive and handle packets */
...@@ -954,7 +950,7 @@ int main (int argc, char **argv) { ...@@ -954,7 +950,7 @@ int main (int argc, char **argv) {
} }
#endif #endif
nmxp_sendAddTimeSeriesChannel(naqssock, channelList_subset, params.stc, params.rate, (params.flag_buffered)? NMXP_BUFFER_YES : NMXP_BUFFER_NO, n_channel, n_usec); nmxp_sendAddTimeSeriesChannel(naqssock, channelList_subset, params.stc, params.rate, (params.flag_buffered)? NMXP_BUFFER_YES : NMXP_BUFFER_NO, params.n_channel, params.n_usec);
} /* End main PDS loop */ } /* End main PDS loop */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxptool_getoptlong.c,v 1.82 2008-03-11 13:36:26 mtheo Exp $ * $Id: nmxptool_getoptlong.c,v 1.83 2008-03-18 19:05:25 mtheo Exp $
* *
*/ */
...@@ -44,6 +44,8 @@ const NMXPTOOL_PARAMS NMXPTOOL_PARAMS_DEFAULT = ...@@ -44,6 +44,8 @@ const NMXPTOOL_PARAMS NMXPTOOL_PARAMS_DEFAULT =
NULL, NULL,
NULL, NULL,
DEFAULT_BUFFERED_TIME, DEFAULT_BUFFERED_TIME,
DEFAULT_N_CHANNEL,
DEFAULT_N_USEC,
DEFAULT_MAX_TIME_TO_RETRIEVE, DEFAULT_MAX_TIME_TO_RETRIEVE,
0, 0,
0, 0,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxptool_getoptlong.h,v 1.92 2008-03-11 13:36:26 mtheo Exp $ * $Id: nmxptool_getoptlong.h,v 1.93 2008-03-18 19:05:25 mtheo Exp $
* *
*/ */
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
#define DEFAULT_MAX_TIME_TO_RETRIEVE_MAXIMUM 86400 #define DEFAULT_MAX_TIME_TO_RETRIEVE_MAXIMUM 86400
#define DEFAULT_MAX_TIME_TO_RETRIEVE 0 #define DEFAULT_MAX_TIME_TO_RETRIEVE 0
/* Empiric constant values TODO */
#define DEFAULT_N_CHANNEL 9
#define DEFAULT_N_USEC 250000
/*! \brief Struct that stores information about parameter of the program */ /*! \brief Struct that stores information about parameter of the program */
typedef struct { typedef struct {
char *hostname; char *hostname;
...@@ -80,6 +84,8 @@ typedef struct { ...@@ -80,6 +84,8 @@ typedef struct {
char *ew_configuration_file; char *ew_configuration_file;
char *statefile; char *statefile;
double buffered_time; double buffered_time;
int n_channel;
int n_usec;
int32_t max_data_to_retrieve; int32_t max_data_to_retrieve;
int flag_writeseed; int flag_writeseed;
int flag_listchannels; int flag_listchannels;
......
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