Project

General

Profile

DocLogDataRec.txt

Kyle Hazelwood, 01/15/2015 11:59 AM

 
1
#ifdef TIT_LEN
2
#undef TIT_LEN
3
#endif
4
#define TIT_LEN 32
5
#define SF_DAT_LEN 128
6

    
7
typedef struct {
8
  char		title[TIT_LEN];
9
  int		id;
10
  int		date;
11
  int		length;
12
 }  __attribute__((packed)) /* Added by the PACKINATOR(tm) */ SF_HDR_REC_STRUCT;
13

    
14
typedef struct {
15
  int		id;
16
  int		date;
17
  int		rec_id;
18
  float		dat[SF_DAT_LEN];
19
 }  __attribute__((packed)) /* Added by the PACKINATOR(tm) */ SF_DAT_REC_STRUCT;
20

    
21
typedef struct {
22
  SF_HDR_REC_STRUCT 	hdr;
23
  float			*dat;
24
 }  __attribute__((packed)) /* Added by the PACKINATOR(tm) */ SF_STRUCT;
25

    
26

    
27
/* data rec max num of float data = 128(SF_DAT_LEN) 
28
 raw data rec ... */
29

    
30
#define LOG_DAQ_EVENT 0	/f0
31
#define LOG_DAQ_OFFSET (LOG_DAQ_EVENT+1) 	/f1
32
#define LOG_DAQ_SPECNUM (LOG_DAQ_OFFSET+1)	/f2
33
#define LOG_DAQ_AMPLPHAS (LOG_DAQ_SPECNUM+1)	/f3
34
#define LOG_DAQ_TBT_H (LOG_DAQ_AMPLPHAS+4)	/f7
35
#define LOG_DAQ_TBT_V (LOG_DAQ_TBT_H+MAX_NUM_TBT_TURNS)	/47
36
#define LOG_DAQ_AMPL_RMS (LOG_DAQ_TBT_V+MAX_NUM_TBT_TURNS) 	/f87
37
/* raw data rec (rec0,ie, first rec),
38
   LOG_DAQ_TBT_V+MAX_NUM_TBT_TURNS+2 = 90 floats used */
39

    
40

    
41
/* sent data rec ... */
42
#define LOG_SENT_PLANE 0	/f0
43
#define LOG_SENT_STEPCUT (LOG_SENT_PLANE+1) /f1
44
#define LOG_SENT_CED_DIS (LOG_SENT_STEPCUT+1) /f2
45
#define LOG_SENT_DAMPS (LOG_SENT_CED_DIS+4) /f6
46
#define LOG_SENT_AMPS_BEFORE (LOG_SENT_DAMPS+4) /f10
47
#define LOG_SENT_AMPS_AFTER (LOG_SENT_AMPS_BEFORE+4) /f14
48

    
49
//06182010 made stepcut separately for h/v, also added version number to 
50
//indicate log format change so display log can handle the difference.
51

    
52
#define LOG_SENT_STEPCUTh (LOG_SENT_AMPS_AFTER+5) /f19
53
#define LOG_SENT_STEPCUTv (LOG_SENT_STEPCUTh+1) /f20
54
#define LOG_VERSION_NUM (LOG_SENT_STEPCUTv+1) /f21
55
#define LOG_VERSION_2 2
56
/* sent data rec is now LOG_VERSION_NUM+1 long */