File indexing completed on 2025-01-05 04:11:58
0001 /* (C) 2003 C. Barth Netterfield */ 0002 /*************************************************************************** 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 * * 0009 ***************************************************************************/ 0010 /***************************************************************/ 0011 /* */ 0012 /* Structures for describing dirfile formats */ 0013 /* */ 0014 /***************************************************************/ 0015 #ifndef GETDATA_STRUCT_H 0016 #define GETDATA_STRUCT_H 0017 0018 #define FIELD_LENGTH 50 0019 #define MAX_FILENAME_LENGTH 250 0020 #define MAX_LINE_LENGTH 250 0021 #define MAX_LINCOM 3 0022 #define MAX_IN_COLS 15 0023 0024 struct RawEntryType { 0025 char field[FIELD_LENGTH+1]; 0026 char file[MAX_FILENAME_LENGTH + FIELD_LENGTH + 2]; 0027 int fp; 0028 char type; 0029 int size; 0030 int samples_per_frame; 0031 }; 0032 0033 struct LincomEntryType { 0034 char field[FIELD_LENGTH+1]; 0035 int n_infields; 0036 char in_fields[MAX_LINCOM][FIELD_LENGTH+1]; 0037 double m[MAX_LINCOM]; 0038 double b[MAX_LINCOM]; 0039 }; 0040 0041 struct LinterpEntryType { 0042 char field[FIELD_LENGTH+1]; 0043 char raw_field[FIELD_LENGTH+1]; 0044 char linterp_file[MAX_FILENAME_LENGTH]; 0045 int n_interp; 0046 double *x; 0047 double *y; 0048 }; 0049 0050 struct MultiplyEntryType { 0051 char field[FIELD_LENGTH+1]; 0052 char in_fields[2][FIELD_LENGTH+1]; 0053 }; 0054 0055 struct MplexEntryType { 0056 char field[FIELD_LENGTH+1]; 0057 char cnt_field[FIELD_LENGTH+1]; 0058 char data_field[FIELD_LENGTH+1]; 0059 int i; 0060 int max_i; 0061 }; 0062 0063 struct BitEntryType { 0064 char field[FIELD_LENGTH+1]; 0065 char raw_field[FIELD_LENGTH+1]; 0066 int bitnum; 0067 int numbits; 0068 }; 0069 0070 struct FormatType { 0071 char FileDirName[MAX_FILENAME_LENGTH]; 0072 int frame_offset; 0073 struct RawEntryType first_field; 0074 struct RawEntryType *rawEntries; 0075 int n_raw; 0076 struct LincomEntryType *lincomEntries; 0077 int n_lincom; 0078 struct LinterpEntryType *linterpEntries; 0079 int n_linterp; 0080 struct MultiplyEntryType *multiplyEntries; 0081 int n_multiply; 0082 struct MplexEntryType *mplexEntries; 0083 int n_mplex; 0084 struct BitEntryType *bitEntries; 0085 int n_bit; 0086 }; 0087 0088 #endif