Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
326 | f9daq | 1 | #ifndef _DATAIO_H_ |
2 | #define _DATAIO_H_ |
||
3 | #include "stdint.h" |
||
4 | |||
5 | #define EVTREC_ID 1 |
||
6 | #define RUNINFO_ID 2 |
||
7 | #define POSREC_ID 3 |
||
8 | #define RUNREC_ID 4 |
||
9 | #define DATREC_ID 5 |
||
10 | #define ITERATORREC_ID 6 |
||
11 | #define ENDREC_ID 7 |
||
12 | #define CAENV729REC_ID 8 |
||
13 | #define MONREC_ID 9 |
||
14 | |||
15 | typedef struct { |
||
16 | uint32_t id; |
||
17 | uint32_t len; |
||
18 | } HEADERREC; |
||
19 | |||
20 | #pragma pack(4) |
||
21 | typedef struct { |
||
22 | uint32_t id,len; |
||
23 | uint32_t fver,time; |
||
24 | uint32_t nev,ped; |
||
25 | int32_t nx,x0,dx,ny,y0,dy,direction; |
||
26 | char serial[0xFF]; |
||
27 | } RUNREC; |
||
28 | #pragma pack() |
||
29 | |||
30 | typedef struct { |
||
31 | uint32_t id,len; |
||
32 | uint32_t cmd,x0; |
||
33 | uint32_t dx,nx; |
||
34 | uint32_t chip,ch,neve,writemode; |
||
35 | } RUNINFO; |
||
36 | |||
37 | typedef struct { |
||
38 | uint32_t id,len; |
||
39 | uint32_t time; |
||
40 | } ENDREC; |
||
41 | |||
42 | typedef struct { |
||
43 | uint32_t id,len; |
||
44 | uint32_t time; |
||
45 | int32_t ix,x,xset,iy,y,yset; |
||
46 | } POSREC; |
||
47 | |||
48 | typedef struct { |
||
49 | uint32_t id,len; |
||
50 | uint32_t time,nev; |
||
51 | } EVTREC; |
||
52 | |||
53 | typedef struct { |
||
54 | uint32_t id,len; |
||
55 | int chip,channel; |
||
56 | uint32_t cmd,data,retval; |
||
57 | } DATREC; |
||
58 | |||
59 | typedef struct { |
||
60 | uint32_t id,len; |
||
61 | int level; |
||
62 | int n; |
||
63 | double value,step; |
||
64 | } ITERATORREC; |
||
65 | |||
66 | typedef struct { |
||
67 | uint32_t id,len; |
||
68 | uint32_t time; |
||
69 | int32_t imon[24],iset[24],vmon[24],vset[24],status[24]; |
||
70 | } MONREC; |
||
71 | |||
72 | #endif /* _DATAIO_H_ */ |