/**************************************************************************************** * DasInit.h * * WRITTEN BY DANIEL GOTTAS OF THE METEOROLOGICAL APPLICATIONS * * AND ASSESSMENT DIVISION OF NOAA'S ENVIRONMENTAL TECHNOLOGY LAB * * (released on 7/03/97) * ****************************************************************************************/ #ifndef _DASINIT_H #include #include #include #include #include #include #include "array4d.h" #ifndef TRUE #define TRUE 1 /* define TRUE if not defined */ #endif #ifndef FALSE /* define FALSE if not defined */ #define FALSE 0 #endif #define MAX_PORTS 9 /* defines the maximum number of ports read from *.ini */ #define MAX_TOKENS 100 /* defines the maximum number of tokens in each ascii string */ #define MAX_STRING_LEN 500 /* defines the maximum string length for character string data */ #define MAX_PORT_DEFINITIONS 14 /* defines the maximum number com port definitions */ #define MAX_DASWIN32_DEFINITIONS 3 /* defines the maximum number system definitions */ /* define functions and ID values for StartupInitializationFunction and AcquisitionInitializationFunction options... */ #define NO_FUNCTION 0 /* for "none" function specification */ #define OPHIR_SETUP 1 /* for "OphirSetup" function specification */ #define GET_OPHIR_CONSTANTS 2 /* for "GetOphirConstants" function specification */ #define LOWRANCE_GPS_SETUP 3 /* for "LowranceGpsSetup" function specification */ /* the following structure is filled by ReadDasInitializationFile... */ struct DasComPortInfo { int WatchDogTimerAddressInHex; /* watchdog timer address in hexadecimal (default=0x370) */ int DiskWriteAndStatsFrequencyInMinutes;/* disk write and stats calculation period in minutes (default=60) */ int NumPorts; /* number of com ports specified */ int *NumTokenIndices; /* number of token indices specified in TokenIndicesForStatistics */ char **InstrumentType; /* ascii representation of instrument type */ int *PortNumber; /* port number of COM? ascii com port definition */ int *Baud; /* baud rate for COM? */ char *Parity; /* parity ('N','O','E') for COM? */ int *DataBits; /* number of data bits for COM? */ int *StopBits; /* number of stop bits for COM? */ int *DoStats; /* boolean switch for statistic calculations ("yes" or "no"; default="no") */ char **AsciiInputStringFormat; /* C format specification for parsing instrument data string */ char *StringTerminationCharacter; /* C termination character for each instrument data string */ int *LeadingTokenCharactersToStrip; /* specifies the number of leading characters in each token to strip */ int *StartupInitializationFunction; /* name of start-up initialization function (executeed at startup)*/ int *AcquisitionInitializationFunction; /* name of acquisition initialization function (executed every DiskWriteAndStatsFrequencyInMinutes) */ int **TokenIndicesForStatistics; /* specifies the indices w.r.t. NumTokenIndices of the data tokens used in statistical calculations */ int **ErrorCheckingTokenIndices; /* specifies the indices w.r.t. NumTokenIndices of the data tokens to perform error checking on */ double **ErrorValuesPerTokenIndex; /* specifies the error values to exclude from statistical calculations for each ErrorCheckingTokenIndices */ char ***TokenLabelsForStatistics; /* specifies the data description labels for each TokenIndicesForStatistics */ char *OutputDriveAndPath; /* specifies the output drive and path for output data */ int ErrorCode; /* contains the function error status code */ char *ErrorString; /* contains ascii descriptions for each ReadDasInitializationFile error code */ }; #define _DASINIT_H #endif