Commit f139cd0d authored by Matteo Quintiliani's avatar Matteo Quintiliani

Starting source structuring for earthworm support


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@364 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent ecc7ef2d
...@@ -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.72 2007-09-28 13:24:52 mtheo Exp $ * $Id: nmxptool.c,v 1.73 2007-09-28 13:30:37 mtheo Exp $
* *
*/ */
...@@ -123,7 +123,6 @@ int main (int argc, char **argv) { ...@@ -123,7 +123,6 @@ int main (int argc, char **argv) {
sigaction(SIGPIPE, &sa, NULL); sigaction(SIGPIPE, &sa, NULL);
#endif #endif
/* Default is normal output */ /* Default is normal output */
nmxp_log(-1, 0); nmxp_log(-1, 0);
...@@ -133,6 +132,7 @@ int main (int argc, char **argv) { ...@@ -133,6 +132,7 @@ int main (int argc, char **argv) {
} }
if(params.ew_configuration_file) { if(params.ew_configuration_file) {
/* TODO set structure "params" from file */
nmxp_log(NMXP_LOG_NORM_NO, 0, "\n"); nmxp_log(NMXP_LOG_NORM_NO, 0, "\n");
nmxp_log(NMXP_LOG_WARN, 0, "Earthworm support is still under development!\n"); nmxp_log(NMXP_LOG_WARN, 0, "Earthworm support is still under development!\n");
nmxp_log(NMXP_LOG_NORM_NO, 0, "\n"); nmxp_log(NMXP_LOG_NORM_NO, 0, "\n");
...@@ -142,31 +142,32 @@ int main (int argc, char **argv) { ...@@ -142,31 +142,32 @@ int main (int argc, char **argv) {
if(nmxptool_check_params(&params) != 0) { if(nmxptool_check_params(&params) != 0) {
return 1; return 1;
} }
}
#ifdef HAVE_EARTHWORMOBJS
/* Attach to Output transport ring */
tport_attach (&regionOut, ringKey);
logit ("t", "nmxp2ew version %s\n", VERSION);
#endif
if(params.flag_verbose) {
nmxp_log(-1, 2);
}
if(params.flag_verbose) { /* List available channels on server */
nmxp_log(-1, 2); if(params.flag_listchannels) {
}
/* List available channels on server */ // TOREMOVE
if(params.flag_listchannels) { // channelList = nmxp_getAvailableChannelList(params.hostname, params.portnumberpds, NMXP_DATA_TIMESERIES);
// TOREMOVE
// nmxp_chan_print_channelList(channelList);
// TOREMOVE nmxp_getMetaChannelList(params.hostname, params.portnumberdap, NMXP_DATA_TIMESERIES, params.flag_request_channelinfo);
// channelList = nmxp_getAvailableChannelList(params.hostname, params.portnumberpds, NMXP_DATA_TIMESERIES);
// TOREMOVE
// nmxp_chan_print_channelList(channelList);
nmxp_getMetaChannelList(params.hostname, params.portnumberdap, NMXP_DATA_TIMESERIES, params.flag_request_channelinfo); return 1;
}
}
return 1; #ifdef HAVE_EARTHWORMOBJS
if(params.ew_configuration_file) {
/* Attach to Output transport ring */
tport_attach (&regionOut, ringKey);
logit ("t", "nmxp2ew version %s\n", VERSION);
} }
#endif
/* Get list of available channels and get a subset list of params.channels */ /* Get list of available channels and get a subset list of params.channels */
channelList = nmxp_getAvailableChannelList(params.hostname, params.portnumberpds, NMXP_DATA_TIMESERIES); channelList = nmxp_getAvailableChannelList(params.hostname, params.portnumberpds, NMXP_DATA_TIMESERIES);
...@@ -648,11 +649,12 @@ int main (int argc, char **argv) { ...@@ -648,11 +649,12 @@ int main (int argc, char **argv) {
} }
#ifdef HAVE_EARTHWORMOBJS #ifdef HAVE_EARTHWORMOBJS
tport_detach(&regionOut); if(params.ew_configuration_file) {
logit("t","%s terminated\n", argv[0]); tport_detach(&regionOut);
logit("t","%s terminated\n", argv[0]);
}
#endif #endif
return 0; return 0;
} /* End MAIN */ } /* End MAIN */
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
extern SHM_INFO regionOut; /* Shared memory region */ extern SHM_INFO regionOut; /* Shared memory region */
extern long ringKey; /* Key to output shared memory region */
int nmxptool_nxm2ew(NMXP_DATA_PROCESS *pd); int nmxptool_nxm2ew(NMXP_DATA_PROCESS *pd);
#endif #endif
......
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