File: getdata_struct.h

package info (click to toggle)
kst 2.0.3-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 22,084 kB
  • ctags: 13,472
  • sloc: cpp: 83,792; ansic: 12,144; sh: 501; yacc: 184; lex: 143; perl: 30; makefile: 23
file content (88 lines) | stat: -rw-r--r-- 2,530 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*                           (C) 2003 C. Barth Netterfield */
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
/***************************************************************/
/*                                                             */
/*    Structures for describing dirfile formats                */
/*                                                             */
/***************************************************************/
#ifndef GETDATA_STRUCT_H
#define GETDATA_STRUCT_H

#define FIELD_LENGTH 50
#define MAX_FILENAME_LENGTH 250
#define MAX_LINE_LENGTH 250
#define MAX_LINCOM 3
#define MAX_IN_COLS 15

struct RawEntryType {
  char field[FIELD_LENGTH+1];
  char file[MAX_FILENAME_LENGTH + FIELD_LENGTH + 2];
  int fp;
  char type;
  int size;
  int samples_per_frame;
};

struct LincomEntryType {
  char field[FIELD_LENGTH+1];
  int n_infields;
  char in_fields[MAX_LINCOM][FIELD_LENGTH+1];
  double m[MAX_LINCOM];
  double b[MAX_LINCOM];
};

struct LinterpEntryType {
  char field[FIELD_LENGTH+1];
  char raw_field[FIELD_LENGTH+1];
  char linterp_file[MAX_FILENAME_LENGTH];
  int n_interp;
  double *x;
  double *y;
};

struct MultiplyEntryType {
  char field[FIELD_LENGTH+1];
  char in_fields[2][FIELD_LENGTH+1];
};

struct MplexEntryType {
  char field[FIELD_LENGTH+1];
  char cnt_field[FIELD_LENGTH+1];
  char data_field[FIELD_LENGTH+1];
  int i;
  int max_i;
};

struct BitEntryType {
  char field[FIELD_LENGTH+1];
  char raw_field[FIELD_LENGTH+1];
  int bitnum;
  int numbits;
};

struct FormatType {
  char FileDirName[MAX_FILENAME_LENGTH];
  int frame_offset;
  struct RawEntryType first_field;
  struct RawEntryType *rawEntries;
  int n_raw;
  struct LincomEntryType *lincomEntries;
  int n_lincom;
  struct LinterpEntryType *linterpEntries;
  int n_linterp;
  struct MultiplyEntryType *multiplyEntries;
  int n_multiply;
  struct MplexEntryType *mplexEntries;
  int n_mplex;
  struct BitEntryType *bitEntries;
  int n_bit;
};

#endif