HOPS
HOPS class reference
tapeDB.h
Go to the documentation of this file.
1 
2 /* tapeDB.h
3  * For a tape-head offset database
4  * Revised: 2000 November 2, JAB */
5 
6 #ifndef TAPEDB_VERSION
7 #define TAPEDB_VERSION 2
8 
9 #define TAPEINFO "/correlator/tapelib/tapeinfo/"
10 #define MAX_PASS 61 /* From mk4_ccfile.h */
11 
12 #ifndef MAX_NAMESIZE
13 #define MAX_NAMESIZE 32
14 #endif
15 
16 #ifndef MAX_INDEX
17 #define MAX_TAPE_LENGTH 19000 /* Feet */
18 #define POSITION_TOLERENCE 500 /* Feet */
19 #define MAX_INDEX (MAX_TAPE_LENGTH / POSITION_TOLERENCE) /* 38 */
20 #endif
21 
22 #ifndef ABS
23 #define ABS(a) (((a) < 0) ? -(a) : (a))
24 #endif
25 
26 #ifndef TRUE
27 #define TRUE 1
28 #define FALSE 0
29 #endif
30 
31 struct head_pos { /* See also $SUMAN/su_db.h */
32  int head_pos_offset[2]; /* Deci-microns */
33  /* [0] = reverse pass, [1] = forward (from SU_db) */
34  }; /* tape_footage[] */
35 
36 struct tapeDB { /* Overall tape data, one per tape */
37  char record_id[3]; /* To be "TDB" */
38  char version_no[2]; /* From TAPEDB_VERSION above */
39  char vsn[MAX_NAMESIZE]; /* VSN from sut */
40  char station; /* From sut, same as mk4_site_id */
41  short exper_num; /* From ovex */
42  char exper_name[32]; /* From ovex */
43  struct date start_time; /* From ovex (ignore HHMMSS) */
44  char site_id[3]; /* From ovex st[] */
45  /* (tape_id in ovex is usually null) */
46  unsigned char sus[5]; /* Recently used SUs */
47  int head[MAX_PASS]; /* Head number, 1 or 2, for this pass */
48  int headpos[MAX_PASS]; /* Reference position for pass, deci-microns */
49  /* [pass number], pass number is arbitrary */
50  struct head_pos pass[MAX_PASS][MAX_INDEX]; /* Each pass pair */
51  /* [pass number][footage/500] */
52  }; /* *tapeinfo */
53 
54 int tapehead(int thisSU, short Ondx, struct head_pos * * ptape_footage,
55  struct head_pos * * pphintsFootage); /* In tapehead.c */
56 
57 #endif
58 
Definition: mk4_typedefs.h:15
struct date start_time
Definition: tapeDB.h:43
unsigned char sus[5]
Definition: tapeDB.h:46
char site_id[3]
Definition: tapeDB.h:44
short exper_num
Definition: tapeDB.h:41
char record_id[3]
Definition: tapeDB.h:37
#define MAX_NAMESIZE
Definition: tapeDB.h:13
int head[MAX_PASS]
Definition: tapeDB.h:47
int tapehead(int thisSU, short Ondx, struct head_pos **ptape_footage, struct head_pos **pphintsFootage)
struct head_pos pass[MAX_PASS][MAX_INDEX]
Definition: tapeDB.h:50
char exper_name[32]
Definition: tapeDB.h:42
char vsn[MAX_NAMESIZE]
Definition: tapeDB.h:39
char station
Definition: tapeDB.h:40
int head_pos_offset[2]
Definition: tapeDB.h:32
char version_no[2]
Definition: tapeDB.h:38
#define MAX_INDEX
Definition: tapeDB.h:19
int headpos[MAX_PASS]
Definition: tapeDB.h:48
#define MAX_PASS
Definition: tapeDB.h:10
Definition: tapeDB.h:31
Definition: tapeDB.h:36