source: tools/FAD/format_headers/packed_formatfad.h@ 9488

Last change on this file since 9488 was 271, checked in by dneise, 14 years ago
added sclkon & sclkoff command to 'fad'
File size: 1.9 KB
Line 
1#ifndef PACKED_FORMATFAD_H_
2#define PACKED_FORMATFAD_H_
3
4
5typedef struct
6{
7 unsigned short start_package_flag;
8 unsigned short package_length;
9 unsigned short version_no;
10 unsigned long trigger_id;
11 unsigned char trigger_type;
12 unsigned char trigger_crc;
13 unsigned long local_trigger_id;
14 unsigned char local_trigger_type;
15 unsigned char local_trigger_crc;
16 unsigned short board_id;
17 short drs_temperature[4];
18 unsigned short dac[8]; // new in version 0x0102
19} __attribute__((__packed__)) PEVNT_HEADER;
20
21typedef struct
22{
23 unsigned short channel_id;
24 unsigned short channel_start_cell;
25 unsigned short channel_roi;
26 unsigned short *channel_adc_data;
27} __attribute__((__packed__)) PCHANNEL;
28
29typedef struct
30{
31 unsigned short channel_id;
32 unsigned short channel_start_cell;
33 unsigned short channel_roi;
34} __attribute__((__packed__)) PCHANNELHEADER;
35
36
37typedef struct
38{
39 PEVNT_HEADER evnt_header;
40 PCHANNEL channel[4 * 9];
41 unsigned short package_crc; // new in version 0x0101
42 unsigned short end_package_flag;
43} __attribute__((__packed__)) PEVNT;
44
45typedef struct
46{
47 unsigned short start_package_flag;
48 unsigned short package_length;
49 unsigned short version_no;
50 unsigned long trigger_id;
51 unsigned char trigger_type;
52 unsigned char trigger_crc;
53 unsigned long local_trigger_id;
54 unsigned char local_trigger_type;
55 unsigned char local_trigger_crc;
56 unsigned short board_id;
57 short drs_temperature[4];
58 unsigned short dac[8]; // new in version 0x0102
59}UPEVNT_HEADER;
60
61typedef struct
62{
63 unsigned short channel_id;
64 unsigned short channel_start_cell;
65 unsigned short channel_roi;
66 unsigned short *channel_adc_data;
67}UPCHANNEL;
68
69typedef struct
70{
71 unsigned short channel_id;
72 unsigned short channel_start_cell;
73 unsigned short channel_roi;
74}UPCHANNELHEADER;
75
76
77typedef struct
78{
79 UPEVNT_HEADER evnt_header;
80 UPCHANNEL channel[4 * 9];
81 unsigned short package_crc; // new in version 0x0101
82 unsigned short end_package_flag;
83}UPEVNT;
84
85
86#endif /*PACKED_FORMATFAD_H_*/
Note: See TracBrowser for help on using the repository browser.