00001
00002
00003
00004
00005
00006
00007 #include "jsoc_main.h"
00008 #include "cmdparams.h"
00009 #include "astro.h"
00010
00011
00012 ModuleArgs_t module_args[] =
00013 {
00014 {ARG_FLAG, "h", "0", "help - print usage info"},
00015 {ARG_STRING, "series", "NOT SPECIFIED", "series name"},
00016 {ARG_STRING, "dateRange", "NOT SPECIFIED", "date ranges separated by commas"},
00017 {ARG_END}
00018 };
00019
00020 char *module_name = "convertFDS";
00021 int nice_intro ()
00022 {
00023 int usage = cmdparams_get_int(&cmdparams, "h", NULL);
00024 if (usage)
00025 {
00026 printf ("Usage:\n\tconvertFDS [-h] "
00027 "[series=<seriesname>] [dateRange=<daterange>]\n"
00028 " details are:\n"
00029 " -h: help - show this message then exit\n"
00030 " <seriesname> - fully qualified series name.\n"
00031 " <daterange> - record set filter.\n"
00032 " The series name defaults to sdo.fdsStateVectors.\n"
00033 " The date range defulats to all records.\n"
00034 " example - convertFDS series=su_arta.testseries dateRange=2006.11.20_22:38:00-2006.11.20_22:45:00,2006.11.20_22:52:00.\n");
00035 return(1);
00036 }
00037 return (0);
00038 }
00039
00040 int DoIt(void)
00041 {
00042 char *series = cmdparams_get_str(&cmdparams, "series", NULL);
00043 char *dataRange = cmdparams_get_str(&cmdparams, "dateRange", NULL);
00044
00045 if (nice_intro())
00046 {
00047 return(0);
00048 }
00049
00050 if (strcmp(series, "NOT SPECIFIED") == 0)
00051 {
00052 series = NULL;
00053 }
00054
00055 if (strcmp(dataRange, "NOT SPECIFIED") == 0)
00056 {
00057 dataRange = NULL;
00058 }
00059
00060 return ConvAndInterpFDS(drms_env, series, dataRange);
00061 }