McStas Readout Master 0.3.3
Loading...
Searching...
No Matches
readout_structs.h
1
9
10#ifndef READOUT_STRUCTS_H
11#define READOUT_STRUCTS_H
12
13#ifdef WIN32
14// Export symbols if compile flags "READOUT_SHARED" and "READOUT_EXPORT" are set on Windows.
15 #ifdef READOUT_SHARED
16 #ifdef READOUT_EXPORT
17 #define RL_API __declspec(dllexport)
18 #else
19 #define RL_API __declspec(dllimport)
20 #endif
21 #else
22 // Disable definition if linking statically.
23 #define RL_API
24 #endif
25#else
26// Disable definition for non-Win32 systems.
27#define RL_API
28#endif
29
30#include <stdint.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36 struct CAEN_readout {
37 uint8_t channel;
38 uint16_t a;
39 uint16_t b;
40 uint16_t c;
41 uint16_t d;
42 };
43
45 uint8_t channel;
46 uint8_t pos;
47 uint16_t adc;
48 };
49
50 struct CDT_readout {
51 uint8_t om;
52 uint8_t cathode;
53 uint8_t anode;
54 };
55
56 struct VMM3_readout {
57 uint16_t bc;
58 uint16_t otadc;
59 uint8_t geo;
60 uint8_t tdc;
61 uint8_t vmm;
62 uint8_t channel;
63 };
64
65 struct BM0_readout {
66 uint8_t channel;
67 };
68
69 struct BM2_readout {
70 uint8_t channel;
71 uint16_t pos_x;
72 uint16_t pos_y;
73 };
74
75 struct BMI_readout {
76 uint8_t channel;
77 uint8_t sum;
78 uint32_t adc; // 24 bit ADC value, but stored in a 32 bit integer for alignment reasons
79 };
80
81 typedef struct CAEN_readout CAEN_readout_t;
83 typedef struct CDT_readout CDT_readout_t;
84 typedef struct VMM3_readout VMM3_readout_t;
85 typedef struct BM0_readout BM0_readout_t;
86 typedef struct BM2_readout BM2_readout_t;
87 typedef struct BMI_readout BMI_readout_t;
88
89
90#ifdef __cplusplus
91}
92#endif
93
94#endif