StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RC_MsgDefs.h
1 #ifndef RC_MSGDEFS_HH
2 #define RC_MSGDEFS_HH
3 // These structures define the message parameters for communication
4 // with the DAQ RC handler.
5 
6 // The message structure contains
7 // Words 1..3 ICCP header
8 // Words 4... Specific parameters for each command
9 //
10 // The structures in this file are only the specific parameters
11 // Most of these are inherited from MsgParam which contain a
12 // param type which should be filled with one of the values below
13 #include "rc.h"
14 
15 #ifdef DEFINE_ONLINE
16 typedef int bool;
17 #endif
18 
19 #include <sys/types.h>
20 #include <iccp.h>
21 
22 #define RCMSGSIZE 120
23 #define RCDATASIZE RCMSGSIZE-sizeof(ic_msg_head)
24 
25 // Supporting enums
26 enum connect_direction {to_handler, from_handler};
27 //enum query_type {all=0, inrun=1, none=2};
28 enum mask_types {literal=1, bits_on=2, bits_off=3};
29 
30 //----------------------------------------
31 // Here are the DAQ message structures....
32 //
33 
34 // handler --> handler
35 struct rc_daq_connect // Used to be ConnectorParam
36 { // I will separate to DAQ_CONNECT / DAQ_CHASER_CONNECT
37  // In all connections
38  u_int fd;
39  u_int addr;
40  int connection_seq; // sequence number for the connection
41  int port; // The port connect
42 };
43 
44 struct rc_daq_error // Used to be ErrorParam
45 {
46  int error;
47  int level;
48 };
49 #define PORTS_USED 1
50 
51 
52 // handler --> rc
54 {
55  int cheese;
56  int cid;
57 };
59 {
60  char text[RCDATASIZE];
61 };
62 
63 // rc --> handler
65 {
66  int pid; // connectors pid
67  connect_direction direction;
68 };
69 struct rc_cmd_nop { uint dummy; }; //
70 struct rc_drc_ping { uint dummy; }; //
71 struct rc_drc_stophandler { uint dummy; }; //
73 {
74  int state;
75 };
77 {
78  int system;
79  int crates;
80  int threads;
81  int status;
82  int is_caller_cheese;
83  bool client_threads;
84  bool ping;
85 };
86 struct rc_cmd_timeout { uint dummy; }; //
87 struct rc_drc_reconfig { uint dummy; }; //
89 {
90  char daqpath[8];
91  int in_run;
92  int rb_mask;
93  mask_types rb_mask_type;
94 };
95 struct rc_cmd_reboot { uint all; };
97 {
98  int run_number;
99  int num_triggers;
100 };
102 {
103  int run_number;
104  int junk;
105 };
107 {
108  int run_number;
109 };
111 {
112  int run_number;
113  int num_triggers;
114 };
116 {
117  int seq;
118  int length;
119 };
121 {
122  int seq;
123 };
125 {
126  int dummy;
127 };
129 {
130  int run_number;
131 };
133 {
134  int run_number;
135 };
137 {
138  int run_number;
139  int type;
140 };
142 {
143  int num_tokens;
144 };
146 {
147  int seq;
148  int print;
149  int all;
150 };
152 {
153  int seq;
154  int all;
155 };
157 {
158  int size;
159 };
161 {
162  int dummy;
163 };
165 {
166  int dummy;
167 };
168 
169 enum cc_command_value { kill_client };
171 {
172  cc_command_value cc_command;
173  int cid;
174 };
175 
177 {
178  int addr;
179  int port;
180  int system;
181 };
182 
184 {
185  int addr;
186  int port;
187 };
188 
189 // system --> Handler
190 struct rc_cmd_ack { uint dummy; };
191 struct rc_cmd_ping { uint dummy; };
193  uint run_number;
194  int num_triggers;
195 };
196 
198 {
199  int run_number;
200  int num_files;
201  int num_events;
202  int junk;
203 };
204 
205 struct rc_daq_run_pause { uint run_number; };
207 {
208  uint run_number;
209  int num_triggers;
210 };
212 {
213  u_int port;
214  u_int handler_id;
215 };
216 struct rc_daq_set_busy { uint run_number; };
217 struct rc_daq_release_busy { uint run_number; };
218 struct rc_daq_flush_tokens { uint run_number; };
220 {
221  uint num_tokens;
222  uint state;
223  uint rb[12];
224 };
226 {
227  uint ntriggers;
228 };
229 
231 {
232  int gb_tokens_run;
233  int bb_tokens_run;
234  int rcc_clock;
235  char file_name[20];
236 };
237 
238 #endif
239 
240 
241 
242 
243 
244 
245 
246 
247 
248 
Definition: rb.hh:21