GSI Object Oriented Online Offline (Go4)  GO4-6.1.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
f_ut_status.c
Go to the documentation of this file.
1 // $Id: f_ut_status.c 3056 2021-03-12 10:47:43Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 //
14 // NOTE !!!!!!!
15 // To avoid hanging sockets on Lynx, we read one byte less than MBS sends.
16 // This byte is the last of process name table, so never used.
17 // In MBS the problem can be fixed. Then this workaround can be rolled back.
18 // Reason is that client must close socket before server.
19 
20 #include "typedefs.h"
21 #include <stdlib.h>
22 #include <stdio.h>
23 #include <errno.h>
24 #include <string.h>
25 #include <memory.h>
26 #include <sys/types.h>
27 #include <ctype.h>
28 #include "sbs_def.h"
29 #include "sys_def.h"
30 #include "ml_def.h"
31 #include "s_daqst.h"
32 #include "s_setup.h"
33 #include "s_set_ml.h"
34 #include "s_set_mo.h"
35 #include "f_stccomm.h"
36 #include "f_swaplw.h"
37 
38 #define VERSION__DAQST 63
39 #define VERSION__SETUP 63
40 #define VERSION__SET_ML 63
41 #define VERSION__SET_MO 63
42 /*****************+***********+****************************************/
43 /* */
44 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
45 /* Postfach 11 05 52 */
46 /* D-64220 Darmstadt */
47 /* */
48 /*1+ C Procedure *************+****************************************/
49 /* */
50 /*+ Module : f_ut_status_ini */
51 /* */
52 /*--------------------------------------------------------------------*/
53 /*+ CALLING : l_status=f_ut_status_ini(s_daqst) */
54 /*--------------------------------------------------------------------*/
55 /* */
56 /*+ PURPOSE : Initialize s_daqst. */
57 /* */
58 /*+ ARGUMENTS : */
59 /*+ s_daqst : pointer to s_daqst */
60 /*2+Implementation************+****************************************/
61 /*+ File name : f_ut_status.c */
62 /*+ Home direct.: /mbs/prod/src */
63 /*+ Version : 2.01 */
64 /*+ Author : H.G.Essel */
65 /*+ Created : 14-Nov-1998 */
66 /*+ Object libr.: mbslib.a */
67 /*+ Updates : Date Purpose */
68 /*1- C Procedure *************+****************************************/
70 {
71  if(ps_daqst == NULL) return -1;
72 
73  ps_daqst->l_endian = 1;
74  ps_daqst->l_version = VERSION__DAQST;
75  ps_daqst->l_daqst_lw = sizeof(s_daqst)/4;
76  ps_daqst->l_fix_lw = ((long)&ps_daqst->c_pname[0][0]-(long)ps_daqst)/4;
79  ps_daqst->l_sbs__n_trg_typ = SBS__N_TRG_TYP;
80  ps_daqst->bh_daqst_initalized = 1;
81 
82  return 0;
83 }
84 
85 
86 /*****************+***********+****************************************/
87 /* */
88 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
89 /* Postfach 11 05 52 */
90 /* D-64220 Darmstadt */
91 /* */
92 /*1+ C Procedure *************+****************************************/
93 /* */
94 /*+ Module : f_ut_status */
95 /* */
96 /*--------------------------------------------------------------------*/
97 /*+ CALLING : l_status=f_ut_status(s_daqst, socket) */
98 /*--------------------------------------------------------------------*/
99 /* */
100 /*+ PURPOSE : Send s_daqst to socket. */
101 /* */
102 /*+ ARGUMENTS : */
103 /*+ s_daqst : pointer to s_daqst */
104 /*+ socket : Tcp socket from accept */
105 /*2+Implementation************+****************************************/
106 /*+ File name : f_ut_status.c */
107 /*+ Home direct.: /mbs/prod/src */
108 /*+ Version : 2.01 */
109 /*+ Author : H.G.Essel */
110 /*+ Created : 14-Nov-1998 */
111 /*+ Object libr.: mbslib.a */
112 /*+ Updates : Date Purpose */
113 /*1- C Procedure *************+****************************************/
114 INTS4 f_ut_status(s_daqst *ps_daqst, INTS4 l_tcp)
115 {
117 
118 l = ps_daqst->l_fix_lw * 4 + ps_daqst->l_procs_run * ps_daqst->l_sbs__str_len_64;
119 /*printf("daqst Send %d LW + %d LW",ps_daqst->l_fix_lw,ps_daqst->l_procs_run * ps_daqst->l_sbs__str_len_64/4);*/
120 l_status = f_stc_write (ps_daqst, l, l_tcp);
121 return l_status;
122 }
123 
124 /*****************+***********+****************************************/
125 /* */
126 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
127 /* Postfach 11 05 52 */
128 /* D-64220 Darmstadt */
129 /* */
130 /*1+ C Procedure *************+****************************************/
131 /* */
132 /*+ Module : f_ut_status_r */
133 /* */
134 /*--------------------------------------------------------------------*/
135 /*+ CALLING : l_status=f_ut_status_r(s_daqst, socket) */
136 /*--------------------------------------------------------------------*/
137 /* */
138 /*+ PURPOSE : Read s_daqst from socket. */
139 /* */
140 /*+ ARGUMENTS : */
141 /*+ s_daqst : pointer to s_daqst */
142 /*+ socket : Tcp socket from connect */
143 /*2+Implementation************+****************************************/
144 /*+ File name : f_ut_status.c */
145 /*+ Home direct.: /mbs/prod/src */
146 /*+ Version : 2.01 */
147 /*+ Author : H.G.Essel */
148 /*+ Created : 14-Nov-1998 */
149 /*+ Object libr.: mbslib.a */
150 /*+ Updates : Date Purpose */
151 /*1- C Procedure *************+****************************************/
152 INTS4 f_ut_status_r(s_daqst *ps_daqst, INTS4 l_tcp)
153 {
154  INTS4 l_swap=0, len_64, n_trg, max_proc;
155  INTS4 l_cmd;
156  INTS4 k;
157  INTS4 l_status;
158 
159  memset((void *)ps_daqst,0,sizeof(s_daqst));
160  l_cmd=1;
161  l_status = f_stc_write (&l_cmd,4,l_tcp); if (l_status != STC__SUCCESS) return(-1);
162  l_status = f_stc_read (&ps_daqst->l_endian,28,l_tcp,-1); if (l_status != STC__SUCCESS) return(-1);
163  if(ps_daqst->l_endian != 1) l_swap = 1;
164  if(l_swap == 1) l_status = f_swaplw((INTS4 *)&ps_daqst->l_endian,7,NULL);
165  len_64=ps_daqst->l_sbs__str_len_64;
166  n_trg=ps_daqst->l_sbs__n_trg_typ;
167  max_proc=ps_daqst->l_sys__n_max_procs;
168  if(ps_daqst->l_version == 1)
169  {
170  // MBS v44 and previous no longer supported
171  return(-1);
172  }
173  // MBS v50
174  if(ps_daqst->l_version == 2)
175  {
176  k=(48+n_trg*3)*4; // up to bl_n_evt inclusive
177  l_status = f_stc_read (&ps_daqst->bh_daqst_initalized, k , l_tcp,-1);
178  k=(24+max_proc*5)*4; // bh_running up to bl_event_build_on inclusive
179  l_status = f_stc_read (&ps_daqst->bh_running[0], k , l_tcp,-1);
180  k=len_64*15; // strings up to c_file_name inclusive
181  l_status = f_stc_read (&ps_daqst->c_user[0], k , l_tcp,-1);
182  l_status = f_stc_read (&ps_daqst->c_out_chan[0], len_64 , l_tcp,-1);
183  ps_daqst->l_fix_lw += n_trg*3 + 212 + len_64/4*3;
184  if(l_swap == 1)
185  l_status = f_swaplw((INTS4 *)&ps_daqst->bh_daqst_initalized, (ps_daqst->l_fix_lw-7) - (19 * len_64/4),NULL);
186  }
187  // MBS v51 and v62/v63
188  if((ps_daqst->l_version == 51) || (ps_daqst->l_version == 62) || (ps_daqst->l_version == 63))
189  {
190  l_status = f_stc_read (&ps_daqst->bh_daqst_initalized, (ps_daqst->l_fix_lw-7)*4 , l_tcp,-1);
191  if(l_swap == 1)
192  l_status = f_swaplw((INTS4 *)&ps_daqst->bh_daqst_initalized, (ps_daqst->l_fix_lw-7) - (19 * len_64/4),NULL);
193  }
194 
195  //l_status = f_stc_read (&ps_daqst->c_pname[0], ps_daqst->l_procs_run * len_64, l_tcp,-1);
196  // workaround:
197  l_status = f_stc_read (&ps_daqst->c_pname[0], ps_daqst->l_procs_run * len_64 -1, l_tcp,-1);
198  return l_status;
199 }
200 
201 /*****************+***********+****************************************/
202 /* */
203 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
204 /* Postfach 11 05 52 */
205 /* D-64220 Darmstadt */
206 /* */
207 /*1+ C Procedure *************+****************************************/
208 /* */
209 /*+ Module : f_ut_setup_ini */
210 /* */
211 /*--------------------------------------------------------------------*/
212 /*+ CALLING : l_status=f_ut_setup_ini(s_setup) */
213 /*--------------------------------------------------------------------*/
214 /* */
215 /*+ PURPOSE : Initialize s_setup. */
216 /* */
217 /*+ ARGUMENTS : */
218 /*+ s_setup : pointer to s_setup */
219 /*2+Implementation************+****************************************/
220 /*+ File name : f_ut_status.c */
221 /*+ Home direct.: /mbs/prod/src */
222 /*+ Version : 2.01 */
223 /*+ Author : H.G.Essel */
224 /*+ Created : 14-Nov-1998 */
225 /*+ Object libr.: mbslib.a */
226 /*+ Updates : Date Purpose */
227 /*1- C Procedure *************+****************************************/
229 {
230 if(ps_setup == NULL) return -1;
231 ps_setup->l_endian = 1;
232 ps_setup->l_version = VERSION__SETUP;
233 ps_setup->bl_struc_len = sizeof(s_setup)/4;
234 ps_setup->l_fix_lw = ((long)&ps_setup->lp_rem_mem_base[0]-(long)ps_setup)/4;
235 ps_setup->bl_sbs__n_cr = SBS__N_CR;
237 return 0;
238 }
239 
240 
241 
242 /*****************+***********+****************************************/
243 /* */
244 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
245 /* Postfach 11 05 52 */
246 /* D-64220 Darmstadt */
247 /* */
248 /*1+ C Procedure *************+****************************************/
249 /* */
250 /*+ Module : f_ut_setup_copy64 */
251 /* */
252 /*--------------------------------------------------------------------*/
253 /*+ CALLING : l_status=f_ut_setup_copy64(s_setup, s_setup_64_receiver) */
254 /*--------------------------------------------------------------------*/
255 /* */
256 /*+ PURPOSE : copy 64 bit setup structure to local setup */
257 /* */
258 /*+ ARGUMENTS : */
259 /*+ s_setup : pointer to s_setup
260  * s_setup_64_receiver : pointer to helper structure
261  * */
262 /*2+Implementation************+****************************************/
263 /*+ File name : f_ut_setup_copy64 */
264 /*+ Home direct.: /mbs/prod/src */
265 /*+ Version : 1.00 */
266 /*+ Author : J.Adamczewski-Musch */
267 /*+ Created : 6-Feb-2015 */
268 /*+ Object libr.: mbslib.a */
269 /*+ Updates : Date Purpose */
270 /*1- C Procedure *************+****************************************/
272 {
273  if(ps_setup == NULL || src == NULL) return -1;
274  ps_setup->bl_sbs__n_cr = src->bl_sbs__n_cr;
275  ps_setup->bl_sbs__n_trg_typ = src->bl_sbs__n_trg_typ;
276  ps_setup->bi_master=src->bi_master;
277  ps_setup->bl_no_crates=src->bl_no_crates;
278  ps_setup->bh_crate_nr=src->bh_crate_nr;
279  ps_setup->bl_ev_buf_len=src->bl_ev_buf_len;
280  ps_setup->bl_n_ev_buf=src->bl_n_ev_buf;
281  ps_setup->bl_n_stream=src->bl_n_stream;
282  ps_setup->bi_evt_typ_sy= src->bi_evt_typ_sy;
283  ps_setup->bi_evt_typ_asy=src->bi_evt_typ_asy;
284  ps_setup->bi_evt_subtyp_sy=src->bi_evt_subtyp_sy;
285  ps_setup->bi_evt_subtyp_asy=src->bi_evt_subtyp_asy;
286  ps_setup->h_se_control=src->h_se_control;
287  ps_setup->bh_rd_typ=src->bh_rd_typ;
288  ps_setup->bh_col_mode=src->bh_col_mode;
289  ps_setup->bl_loc_esone_base=src->bl_loc_esone_base;
290  ps_setup->bl_rem_esone_base=src->bl_rem_esone_base;
291  ps_setup->bl_esone_off=src->bl_esone_off;
292  ps_setup->bl_cvc_crr_off=src->bl_cvc_crr_off;
293  ps_setup->bl_cvc_csr_off=src->bl_cvc_csr_off;
294  ps_setup->bl_cvc_clb_off=src->bl_cvc_clb_off;
295  ps_setup->bl_se_meb_asy_len=src->bl_se_meb_asy_len;
296  ps_setup->bh_meb_asy_flg=src->bh_meb_asy_flg;
298  ps_setup->bl_ml_pipe_seg_len=src->bl_ml_pipe_seg_len;
299  ps_setup->bl_ml_pipe_len=src->bl_ml_pipe_len;
300  ps_setup->bl_n_col_retry=src->bl_n_col_retry;
301  ps_setup->bh_meb_trig_mode=src->bh_meb_trig_mode;
304  ps_setup->lp_cvc_irq=src->lp_cvc_irq;
305  ps_setup->bl_cvc_irq_len=src->bl_cvc_irq_len;
308  ps_setup->h_rd_tab_flg=src->h_rd_tab_flg;
309  ps_setup->bl_init_read_len=src->bl_init_read_len;
310  return 0;
311 }
312 
313 
314 
315 /*****************+***********+****************************************/
316 /* */
317 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
318 /* Postfach 11 05 52 */
319 /* D-64220 Darmstadt */
320 /* */
321 /*1+ C Procedure *************+****************************************/
322 /* */
323 /*+ Module : f_ut_setup_copy32 */
324 /* */
325 /*--------------------------------------------------------------------*/
326 /*+ CALLING : l_status=f_ut_setup_copy32(s_setup, s_setup_32_receiver) */
327 /*--------------------------------------------------------------------*/
328 /* */
329 /*+ PURPOSE : copy 32 bit setup structure to local setup */
330 /* */
331 /*+ ARGUMENTS : */
332 /*+ s_setup : pointer to s_setup
333  * s_setup_64_receiver : pointer to helper structure
334  * */
335 /*2+Implementation************+****************************************/
336 /*+ File name : f_ut_setup_copy64 */
337 /*+ Home direct.: /mbs/prod/src */
338 /*+ Version : 1.00 */
339 /*+ Author : J.Adamczewski-Musch */
340 /*+ Created : 6-Feb-2015 */
341 /*+ Object libr.: mbslib.a */
342 /*+ Updates : Date Purpose */
343 /*1- C Procedure *************+****************************************/
345 {
346  if(ps_setup == NULL || src == NULL) return -1;
347  ps_setup->bl_sbs__n_cr = src->bl_sbs__n_cr;
348  ps_setup->bl_sbs__n_trg_typ = src->bl_sbs__n_trg_typ;
349  ps_setup->bi_master=src->bi_master;
350  ps_setup->bl_no_crates=src->bl_no_crates;
351  ps_setup->bh_crate_nr=src->bh_crate_nr;
352  ps_setup->bl_ev_buf_len=src->bl_ev_buf_len;
353  ps_setup->bl_n_ev_buf=src->bl_n_ev_buf;
354  ps_setup->bl_n_stream=src->bl_n_stream;
355  ps_setup->bi_evt_typ_sy= src->bi_evt_typ_sy;
356  ps_setup->bi_evt_typ_asy=src->bi_evt_typ_asy;
357  ps_setup->bi_evt_subtyp_sy=src->bi_evt_subtyp_sy;
358  ps_setup->bi_evt_subtyp_asy=src->bi_evt_subtyp_asy;
359  ps_setup->h_se_control=src->h_se_control;
360  ps_setup->bh_rd_typ=src->bh_rd_typ;
361  ps_setup->bh_col_mode=src->bh_col_mode;
362  ps_setup->bl_loc_esone_base=src->bl_loc_esone_base;
363  ps_setup->bl_rem_esone_base=src->bl_rem_esone_base;
364  ps_setup->bl_esone_off=src->bl_esone_off;
365  ps_setup->bl_cvc_crr_off=src->bl_cvc_crr_off;
366  ps_setup->bl_cvc_csr_off=src->bl_cvc_csr_off;
367  ps_setup->bl_cvc_clb_off=src->bl_cvc_clb_off;
368  ps_setup->bl_se_meb_asy_len=src->bl_se_meb_asy_len;
369  ps_setup->bh_meb_asy_flg=src->bh_meb_asy_flg;
371  ps_setup->bl_ml_pipe_seg_len=src->bl_ml_pipe_seg_len;
372  ps_setup->bl_ml_pipe_len=src->bl_ml_pipe_len;
373  ps_setup->bl_n_col_retry=src->bl_n_col_retry;
374  ps_setup->bh_meb_trig_mode=src->bh_meb_trig_mode;
377  ps_setup->lp_cvc_irq=src->lp_cvc_irq;
378  ps_setup->bl_cvc_irq_len=src->bl_cvc_irq_len;
381  ps_setup->h_rd_tab_flg=src->h_rd_tab_flg;
382  ps_setup->bl_init_read_len=src->bl_init_read_len;
383  return 0;
384 }
385 
386 
387 
388 
389 /*****************+***********+****************************************/
390 /* */
391 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
392 /* Postfach 11 05 52 */
393 /* D-64220 Darmstadt */
394 /* */
395 /*1+ C Procedure *************+****************************************/
396 /* */
397 /*+ Module : f_ut_setup */
398 /* */
399 /*--------------------------------------------------------------------*/
400 /*+ CALLING : l_status=f_ut_setup(s_setup, s_setup, socket) */
401 /*--------------------------------------------------------------------*/
402 /* */
403 /*+ PURPOSE : Write s_setup to socket. */
404 /* */
405 /*+ ARGUMENTS : */
406 /*+ s_setup : pointer to s_setup */
407 /*+ s_setup : pointer to copy of s_setup */
408 /*+ socket : Tcp socket from accept */
409 /*2+Implementation************+****************************************/
410 /*+ File name : f_ut_status.c */
411 /*+ Home direct.: /mbs/prod/src */
412 /*+ Version : 2.01 */
413 /*+ Author : H.G.Essel */
414 /*+ Created : 14-Nov-1998 */
415 /*+ Object libr.: mbslib.a */
416 /*+ Updates : Date Purpose */
417 /*1- C Procedure *************+****************************************/
418 INTS4 f_ut_setup(s_setup *ps_setup, INTU4 *pl_o, INTS4 l_tcp)
419 {
420 INTS4 i,l,k,n=0,l_status;
421 INTU4 *pl_count,*pl_size;
422 
423 l_status = f_ut_setup_ini(ps_setup);
424 
425 /*printf("setup Send %d LW + ",ps_setup->l_fix_lw);*/
426 l_status = f_stc_write (ps_setup, ps_setup->l_fix_lw*4, l_tcp);
427 pl_count = pl_o++;
428 pl_size = pl_o++;
429 l = 0;
430 for(i=0; i<ps_setup->bl_sbs__n_cr; i++)
431 {
432  if(ps_setup->bh_rd_flg[i] != 0)
433  {
434  n=0;
435  l++;
436  *pl_o++ = i; n++;
437  *pl_o++ = (INTU4) ps_setup->lp_rem_mem_base[i]; n++;
438  *pl_o++ = (INTU4) ps_setup->bl_rem_mem_off[i]; n++;
439  *pl_o++ = (INTU4) ps_setup->bl_rem_mem_len[i]; n++;
440  *pl_o++ = (INTU4) ps_setup->lp_rem_cam_base[i]; n++;
441  *pl_o++ = (INTU4) ps_setup->bl_rem_cam_off[i]; n++;
442  *pl_o++ = (INTU4) ps_setup->bl_rem_cam_len[i]; n++;
443  *pl_o++ = (INTU4) ps_setup->lp_loc_mem_base[i]; n++;
444  *pl_o++ = (INTU4) ps_setup->bl_loc_mem_len[i]; n++;
445  *pl_o++ = (INTU4) ps_setup->lp_loc_pipe_base[i]; n++;
446  *pl_o++ = (INTU4) ps_setup->bl_pipe_off[i]; n++;
447  *pl_o++ = (INTU4) ps_setup->bl_pipe_seg_len[i]; n++;
448  *pl_o++ = (INTU4) ps_setup->bl_pipe_len[i]; n++;
449  *pl_o++ = (INTU4) ps_setup->bh_controller_id[i]; n++;
450  *pl_o++ = (INTU4) ps_setup->bh_sy_asy_flg[i]; n++;
451  *pl_o++ = (INTU4) ps_setup->bh_trig_stat_nr[i]; n++;
452  *pl_o++ = (INTU4) ps_setup->bl_trig_cvt[i]; n++;
453  *pl_o++ = (INTU4) ps_setup->bl_trig_fct[i]; n++;
454  *pl_o++ = (INTU4) ps_setup->i_se_typ[i]; n++;
455  *pl_o++ = (INTU4) ps_setup->i_se_subtyp[i]; n++;
456  *pl_o++ = (INTU4) ps_setup->i_se_procid[i]; n++;
457  *pl_o++ = (INTU4) ps_setup->bh_rd_flg[i]; n++;
458  *pl_o++ = (INTU4) ps_setup->bl_init_tab_off[i]; n++;
459  *pl_o++ = (INTU4) ps_setup->bi_init_tab_len[i]; n++;
460  for(k=0;k<ps_setup->bl_sbs__n_trg_typ;k++)
461  *pl_o++ = (INTU4) ps_setup->bl_max_se_len[i][k];
462  for(k=0;k<ps_setup->bl_sbs__n_trg_typ;k++)
463  *pl_o++ = (INTU4) ps_setup->bl_rd_tab_off[i][k];
464  for(k=0;k<ps_setup->bl_sbs__n_trg_typ;k++)
465  *pl_o++ = (INTU4) ps_setup->bi_rd_tab_len[i][k];
466  n = n + 3 * ps_setup->bl_sbs__n_trg_typ;
467  }
468 }
469 *pl_count=l;
470 *pl_size=n;
471 l = l * n + 2;
472 /*printf("%d \n",l);*/
473 l_status = f_stc_write (pl_count, l * 4, l_tcp);
474 return l_status;
475 }
476 
477 /*****************+***********+****************************************/
478 /* */
479 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
480 /* Postfach 11 05 52 */
481 /* D-64220 Darmstadt */
482 /* */
483 /*1+ C Procedure *************+****************************************/
484 /* */
485 /*+ Module : f_ut_setup_r */
486 /* */
487 /*--------------------------------------------------------------------*/
488 /*+ CALLING : l_status=f_ut_setup_r(s_setup, socket) */
489 /*--------------------------------------------------------------------*/
490 /* */
491 /*+ PURPOSE : Read s_setup from socket. */
492 /* */
493 /*+ ARGUMENTS : */
494 /*+ s_setup : pointer to s_setup */
495 /*+ socket : Tcp socket from connect */
496 /*2+Implementation************+****************************************/
497 /*+ File name : f_ut_status.c */
498 /*+ Home direct.: /mbs/prod/src */
499 /*+ Version : 2.01 */
500 /*+ Author : H.G.Essel */
501 /*+ Created : 14-Nov-1998 */
502 /*+ Object libr.: mbslib.a */
503 /*+ Updates : Date Purpose */
504 /*1- C Procedure *************+****************************************/
505 INTS4 f_ut_setup_r(s_setup *ps_setup, INTS4 l_tcp)
506 {
507 
508  /* TODO TODO JAM64 adjust different member length here for 64 bit senders
509  * Probably we need architecture independent structure for tcp communication?*/
510 
511 INTS4 l_swap=0;
512 INTS4 l_cmd;
513 INTS4 i,k,l_items,l_size,l_crate;
514 INTU4 *pl_b,*pl_o;
516 s_setup_64_receiver *ps_setup_64=0;
517 s_setup_32_receiver *ps_setup_32=0;
518 
519  memset(ps_setup,0,sizeof(s_setup));
520 l_cmd=2;
521 l_status = f_stc_write (&l_cmd,4,l_tcp); if (l_status != STC__SUCCESS) return(-1);
522 l_status = f_stc_read (&ps_setup->l_endian,16,l_tcp,-1); if (l_status != STC__SUCCESS) return(-1);
523 if(ps_setup->l_endian != 1) l_swap = 1;
524 if(l_swap == 1) l_status = f_swaplw((INTS4 *) &ps_setup->l_endian,4,NULL);
525 if((ps_setup->l_version != VERSION__SETUP) && (ps_setup->l_version != 1))
526 {
527  printf ("f_ut_setup_r sees setup version %d, current version is %d", ps_setup->l_version, VERSION__SETUP);
528  return -1; // correct for legacy MBS
529 }
530 
531 // JAM here decide if setup comes from 32 or 64 bit host:
532 if(ps_setup->l_fix_lw == 40)
533 {
534  // data from 32 bit machine. first use auxiliary structure:
535  ps_setup_32 = (s_setup_32_receiver*) malloc (sizeof( s_setup_32_receiver));
536  if (ps_setup_32 == NULL) {
537  printf ("f_ut_setup_r memory allocation error");
538  return -1;
539  }
540  l_status = f_stc_read (&ps_setup_32->bl_sbs__n_cr, (ps_setup->l_fix_lw-4)*4 , l_tcp,-1);
541  l_status = f_stc_read (&l_items,4 , l_tcp,-1);
542  l_status = f_stc_read (&l_size,4 , l_tcp,-1);
543  if(l_swap == 1) l_status = f_swaplw((INTS4 *) &ps_setup_32->bl_sbs__n_cr, (ps_setup->l_fix_lw-4),NULL);
544  if(l_swap == 1) l_status = f_swaplw(&l_items,1,NULL);
545  if(l_swap == 1) l_status = f_swaplw(&l_size,1,NULL);
546 
547  // copy values to actual local setup (which can be both 32 or 64 bit, it should work):
548  f_ut_setup_copy32(ps_setup,ps_setup_32);
549  free(ps_setup_32);
550 }
551 else if(ps_setup->l_fix_lw == 46)
552 {
553  // 64 bit with mbs >v6.3. use auxiliary structure:
554  ps_setup_64 = (s_setup_64_receiver*) malloc (sizeof( s_setup_64_receiver));
555  if (ps_setup_64 == NULL) {
556  printf ("f_ut_setup_r memory allocation error");
557  return -1;
558  }
559 
560  l_status = f_stc_read (&ps_setup_64->bl_sbs__n_cr, (ps_setup->l_fix_lw-4)*4 , l_tcp,-1);
561  l_status = f_stc_read (&l_items,4 , l_tcp,-1);
562  l_status = f_stc_read (&l_size,4 , l_tcp,-1);
563  if(l_swap == 1) l_status = f_swaplw((INTS4 *) &ps_setup_64->bl_sbs__n_cr, (ps_setup->l_fix_lw-4),NULL);
564  if(l_swap == 1) l_status = f_swaplw(&l_items,1,NULL);
565  if(l_swap == 1) l_status = f_swaplw(&l_size,1,NULL);
566 
567  // copy values to actual local setup (which can be both 32 or 64 bit, it should work):
568  f_ut_setup_copy64(ps_setup,ps_setup_64);
569  free(ps_setup_64);
570 }
571 else
572 {
573  printf("f_ut_setup_r finds non consistent l_fix_lw=%d. do not read further!", ps_setup->l_fix_lw);
574  return -1;
575 }
576 
577 // the rest does not depend on architecture, each word is transferred separately with 4 bytes
578 // (losing some 64 bit addresses, but anyway now TODO adjust sending of data too):
579 
580 pl_b = (INTU4 *) malloc(l_size * l_items * 4);
581  l_status = f_stc_read (pl_b,l_size * l_items * 4, l_tcp,-1);
582 if(l_swap == 1) l_status = f_swaplw((INTS4 *) pl_b,l_size * l_items,NULL);
583 
584 pl_o = pl_b;
585 for(i=0;i<l_items;i++)
586 {
587  l_crate = *pl_o++;
588  ps_setup->lp_rem_mem_base[l_crate] = *pl_o++;
589  ps_setup->bl_rem_mem_off[l_crate] = *pl_o++;
590  ps_setup->bl_rem_mem_len[l_crate] = *pl_o++;
591  ps_setup->lp_rem_cam_base[l_crate] = *pl_o++;
592  ps_setup->bl_rem_cam_off[l_crate] = *pl_o++;
593  ps_setup->bl_rem_cam_len[l_crate] = *pl_o++;
594  ps_setup->lp_loc_mem_base[l_crate] = *pl_o++;
595  ps_setup->bl_loc_mem_len[l_crate] = *pl_o++;
596  ps_setup->lp_loc_pipe_base[l_crate] = *pl_o++;
597  ps_setup->bl_pipe_off[l_crate] = *pl_o++;
598  ps_setup->bl_pipe_seg_len[l_crate] = *pl_o++;
599  ps_setup->bl_pipe_len[l_crate] = *pl_o++;
600  ps_setup->bh_controller_id[l_crate] = *pl_o++;
601  ps_setup->bh_sy_asy_flg[l_crate] = *pl_o++;
602  ps_setup->bh_trig_stat_nr[l_crate] = *pl_o++;
603  ps_setup->bl_trig_cvt[l_crate] = *pl_o++;
604  ps_setup->bl_trig_fct[l_crate] = *pl_o++;
605  ps_setup->i_se_typ[l_crate] = *pl_o++;
606  ps_setup->i_se_subtyp[l_crate] = *pl_o++;
607  ps_setup->i_se_procid[l_crate] = *pl_o++;
608  ps_setup->bh_rd_flg[l_crate] = *pl_o++;
609  ps_setup->bl_init_tab_off[l_crate] = *pl_o++;
610  ps_setup->bi_init_tab_len[l_crate] = *pl_o++;
611  for(k=0;k<ps_setup->bl_sbs__n_trg_typ;k++) ps_setup->bl_max_se_len[l_crate][k] = *pl_o++;
612  for(k=0;k<ps_setup->bl_sbs__n_trg_typ;k++) ps_setup->bl_rd_tab_off[l_crate][k] = *pl_o++;
613  for(k=0;k<ps_setup->bl_sbs__n_trg_typ;k++) ps_setup->bi_rd_tab_len[l_crate][k] = *pl_o++;
614 } /* setup */
615 
616 free(pl_b);
617 return 0;
618 }
619 
620 /*****************+***********+****************************************/
621 /* */
622 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
623 /* Postfach 11 05 52 */
624 /* D-64220 Darmstadt */
625 /* */
626 /*1+ C Procedure *************+****************************************/
627 /* */
628 /*+ Module : f_ut_set_ml_ini */
629 /* */
630 /*--------------------------------------------------------------------*/
631 /*+ CALLING : l_status=f_ut_set_ml_ini(s_set_ml) */
632 /*--------------------------------------------------------------------*/
633 /* */
634 /*+ PURPOSE : Initialize s_set_ml. */
635 /* */
636 /*+ ARGUMENTS : */
637 /*+ s_set_ml : pointer to s_set_ml */
638 /*2+Implementation************+****************************************/
639 /*+ File name : f_ut_status.c */
640 /*+ Home direct.: /mbs/prod/src */
641 /*+ Version : 2.01 */
642 /*+ Author : H.G.Essel */
643 /*+ Created : 14-Nov-1998 */
644 /*+ Object libr.: mbslib.a */
645 /*+ Updates : Date Purpose */
646 /*1- C Procedure *************+****************************************/
648 {
649 if(ps_set_ml == NULL) return -1;
650 ps_set_ml->l_endian = 1;
651 ps_set_ml->l_version = VERSION__SET_ML;
652 ps_set_ml->l_set_ml_lw = sizeof(s_set_ml)/4;
653 ps_set_ml->l_fix_lw = ((long)&ps_set_ml->c_rd_hostname[0][0]-(long)ps_set_ml)/4;
654 ps_set_ml->l_ml__n_rd_pipe = ML__N_RD_PIPE;
655 ps_set_ml->l_short_len = 16;
656 ps_set_ml->l_long_len = 128;
657 return 0;
658 }
659 
660 /*****************+***********+****************************************/
661 /* */
662 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
663 /* Postfach 11 05 52 */
664 /* D-64220 Darmstadt */
665 /* */
666 /*1+ C Procedure *************+****************************************/
667 /* */
668 /*+ Module : f_ut_set_ml */
669 /* */
670 /*--------------------------------------------------------------------*/
671 /*+ CALLING : l_status=f_ut_set_ml(s_set_ml, s_set_ml, socket) */
672 /*--------------------------------------------------------------------*/
673 /* */
674 /*+ PURPOSE : Write s_set_ml to socket. */
675 /* */
676 /*+ ARGUMENTS : */
677 /*+ s_set_ml : pointer to s_set_ml */
678 /*+ s_set_ml : pointer to copy of s_set_ml */
679 /*+ socket : Tcp socket from accept */
680 /*2+Implementation************+****************************************/
681 /*+ File name : f_ut_status.c */
682 /*+ Home direct.: /mbs/prod/src */
683 /*+ Version : 2.01 */
684 /*+ Author : H.G.Essel */
685 /*+ Created : 14-Nov-1998 */
686 /*+ Object libr.: mbslib.a */
687 /*+ Updates : Date Purpose */
688 /*1- C Procedure *************+****************************************/
689 INTS4 f_ut_set_ml(s_set_ml *ps_set_ml, INTU4 *pl_o, INTS4 l_tcp)
690 {
691 INTS4 i,l,k,l_status;
692 INTU4 *pl_count,*pl_s;
693 
694 l_status = f_ut_set_ml_ini(ps_set_ml);
695 
696 pl_count = pl_o;
697 /*printf("MLset Send %d LW + ",ps_set_ml->l_fix_lw);*/
698 l_status = f_stc_write (ps_set_ml, ps_set_ml->l_fix_lw*4, l_tcp);
699 l = 0;
700 for(i=0; i<ps_set_ml->l_n_rd_pipe; i++)
701 {
702  l++;
703  pl_s = (INTU4 *)&ps_set_ml->c_rd_hostname[i];
704  for(k=0;k<ps_set_ml->l_short_len/4;k++)*pl_o++ = *pl_s++;
705  pl_s = (INTU4 *)&ps_set_ml->c_sbs_setup_path[i];
706  for(k=0;k<ps_set_ml->l_long_len/4;k++)*pl_o++ = *pl_s++;
707 }
708 l = l * (ps_set_ml->l_short_len + ps_set_ml->l_long_len);
709 /*printf("%d \n",l);*/
710 l_status = f_stc_write (pl_count, l , l_tcp);
711 return l_status;
712 }
713 
714 /*****************+***********+****************************************/
715 /* */
716 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
717 /* Postfach 11 05 52 */
718 /* D-64220 Darmstadt */
719 /* */
720 /*1+ C Procedure *************+****************************************/
721 /* */
722 /*+ Module : f_ut_set_ml_r */
723 /* */
724 /*--------------------------------------------------------------------*/
725 /*+ CALLING : l_status=f_ut_set_ml_r(s_set_ml, socket) */
726 /*--------------------------------------------------------------------*/
727 /* */
728 /*+ PURPOSE : Read s_set_ml from socket. */
729 /* */
730 /*+ ARGUMENTS : */
731 /*+ s_set_ml : pointer to s_set_ml */
732 /*+ socket : Tcp socket from connect */
733 /*2+Implementation************+****************************************/
734 /*+ File name : f_ut_status.c */
735 /*+ Home direct.: /mbs/prod/src */
736 /*+ Version : 2.01 */
737 /*+ Author : H.G.Essel */
738 /*+ Created : 14-Nov-1998 */
739 /*+ Object libr.: mbslib.a */
740 /*+ Updates : Date Purpose */
741 /*1- C Procedure *************+****************************************/
742 INTS4 f_ut_set_ml_r(s_set_ml *ps_set_ml, INTS4 l_tcp)
743 {
744 INTS4 l_swap=0;
745 INTS4 l_cmd;
746 INTS4 i;
748 
749 l_cmd=3;
750 l_status = f_stc_write (&l_cmd,4, l_tcp); if (l_status != STC__SUCCESS) return(-1);
751 l_status = f_stc_read (&ps_set_ml->l_endian,16,l_tcp,-1); if (l_status != STC__SUCCESS) return(-1);
752 if(ps_set_ml->l_endian != 1) l_swap = 1;
753 if(l_swap == 1) l_status = f_swaplw((INTS4 *)&ps_set_ml->l_endian,4,NULL);
754 if( (ps_set_ml->l_version != VERSION__SET_ML) && (ps_set_ml->l_version != 1)) return -1; // correct legacy MBS version
755  l_status = f_stc_read (&ps_set_ml->l_ml__n_rd_pipe,(ps_set_ml->l_fix_lw-4)*4 , l_tcp,-1);
756 if(l_swap == 1) l_status = f_swaplw((INTS4 *)&ps_set_ml->l_ml__n_rd_pipe,(ps_set_ml->l_fix_lw-4)-4,NULL); /* last 16 byte are char */
757 for(i=0;i<ps_set_ml->l_n_rd_pipe;i++)
758 {
759  l_status = f_stc_read (&ps_set_ml->c_rd_hostname[i], ps_set_ml->l_short_len, l_tcp,-1);
760  l_status = f_stc_read (&ps_set_ml->c_sbs_setup_path[i],ps_set_ml->l_long_len, l_tcp,-1);
761 }
762 return 0;
763 }
764 /*****************+***********+****************************************/
765 /* */
766 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */
767 /* Postfach 11 05 52 */
768 /* D-64220 Darmstadt */
769 /* */
770 /*1+ C Procedure *************+****************************************/
771 /* */
772 /*+ Module : f_ut_set_mo_ini */
773 /* */
774 /*--------------------------------------------------------------------*/
775 /*+ CALLING : l_status=f_ut_set_mo_ini(s_set_mo) */
776 /*--------------------------------------------------------------------*/
777 /* */
778 /*+ PURPOSE : Initialize s_set_mo. */
779 /* */
780 /*+ ARGUMENTS : */
781 /*+ s_set_mo : pointer to s_set_mo */
782 /*2+Implementation************+****************************************/
783 /*+ File name : f_ut_status.c */
784 /*+ Home direct.: /mbs/prod/src */
785 /*+ Version : 2.01 */
786 /*+ Author : H.G.Essel */
787 /*+ Created : 24-Oct-2005 */
788 /*+ Object libr.: mbslib.a */
789 /*+ Updates : Date Purpose */
790 /*1- C Procedure *************+****************************************/
792 {
793  INTS4 i;
794 if(ps_set_mo == NULL) return -1;
795 ps_set_mo->l_endian = 1;
796 ps_set_mo->l_version = VERSION__SET_MO;
797 ps_set_mo->l_set_mo_lw = sizeof(s_set_mo)/4;
798 ps_set_mo->l_swap_lw = ((long)&ps_set_mo->c_ds_hostname[0][0]-(long)ps_set_mo)/4;
799 ps_set_mo->l_max_nodes = MO__N_NODE;
800 ps_set_mo->l_no_senders = 0;
801 ps_set_mo->l_no_receivers = 0;
802  for(i=0;i<MO__N_NODE;i++)if(strlen(&ps_set_mo->c_ds_hostname[i][0]) > 0) ps_set_mo->l_no_senders++;
803  for(i=0;i<MO__N_NODE;i++)if(strlen(&ps_set_mo->c_dr_hostname[i][0]) > 0) ps_set_mo->l_no_receivers++;
804 return 0;
805 }
806 /*1+ C Procedure *************+****************************************/
807 /* */
808 /*+ Module : f_ut_set_mo */
809 /* */
810 /*--------------------------------------------------------------------*/
811 /*+ CALLING : l_status=f_ut_set_mo(s_set_mo, socket) */
812 /*--------------------------------------------------------------------*/
813 /* */
814 /*+ PURPOSE : Send s_set_mo to socket. */
815 /* */
816 /*+ ARGUMENTS : */
817 /*+ s_daqst : pointer to s_set_mo */
818 /*+ socket : Tcp socket from accept */
819 /*2+Implementation************+****************************************/
820 /*+ File name : f_ut_status.c */
821 /*+ Home direct.: /mbs/prod/src */
822 /*+ Version : 2.01 */
823 /*+ Author : H.G.Essel */
824 /*+ Created : 25.Oct.2005 */
825 /*+ Object libr.: mbslib.a */
826 /*+ Updates : Date Purpose */
827 /*1- C Procedure *************+****************************************/
828 INTS4 f_ut_set_mo(s_set_mo *ps_set_mo, INTS4 l_tcp)
829 {
830  INTS4 l_status;
831 
832  l_status = f_ut_set_mo_ini(ps_set_mo);
833  if (l_status != 0)
834  return l_status;
835  l_status = f_stc_write(ps_set_mo, ps_set_mo->l_set_mo_lw * 4, l_tcp);
836  return l_status;
837 }
838 
839 
840 /*1+ C Procedure *************+****************************************/
841 /* */
842 /*+ Module : f_ut_set_mo_r */
843 /* */
844 /*--------------------------------------------------------------------*/
845 /*+ CALLING : l_status=f_ut_set_mo_r(s_set_mo, socket) */
846 /*--------------------------------------------------------------------*/
847 /* */
848 /*+ PURPOSE : Read s_set_mo from socket. */
849 /* */
850 /*+ ARGUMENTS : */
851 /*+ s_set_mo : pointer to s_set_mo */
852 /*+ socket : Tcp socket from connect */
853 /*2+Implementation************+****************************************/
854 /*+ File name : f_ut_status.c */
855 /*+ Home direct.: /mbs/prod/src */
856 /*+ Version : 2.01 */
857 /*+ Author : H.G.Essel */
858 /*+ Created : 25.Oct.2005 */
859 /*+ Object libr.: mbslib.a */
860 /*+ Updates : Date Purpose */
861 /*1- C Procedure *************+****************************************/
862 INTS4 f_ut_set_mo_r(s_set_mo *ps_set_mo, INTS4 l_tcp)
863 {
864 INTS4 l_swap=0;
865 INTS4 l_cmd;
867 
868 l_cmd=4;
869 l_status = f_stc_write (&l_cmd,4, l_tcp); if (l_status != STC__SUCCESS) return(-1);
870 l_status = f_stc_read (ps_set_mo,16,l_tcp,-1); if (l_status != STC__SUCCESS) return(-1);
871 if(ps_set_mo->l_endian != 1) l_swap=1;
872 if(l_swap) l_status = f_swaplw((INTS4*)ps_set_mo,4,NULL);
873 
874 l_status = f_stc_read (&ps_set_mo->l_max_nodes,(ps_set_mo->l_set_mo_lw-4)*4, l_tcp,-1);
875 if(l_swap) l_status = f_swaplw((INTS4*)&ps_set_mo->l_max_nodes,ps_set_mo->l_swap_lw-4,NULL);
876 
877 return 0;
878 }
INTU4 bh_crate_nr
Definition: s_setup.h:48
INTU4 bl_n_col_retry
Definition: s_setup.h:534
INTU4 bl_sbs__n_trg_typ
Definition: s_setup.h:467
ADDRS lp_rem_mem_base[SBS__N_CR]
Definition: s_setup.h:165
#define VERSION__SETUP
Definition: f_ut_status.c:39
INTU4 bh_special_meb_trig_type
Definition: s_setup.h:554
INTU4 l_fix_lw
Definition: s_set_ml.h:38
INTU4 l_version
Definition: s_set_ml.h:36
INTU4 bl_cvc_crr_off
Definition: s_setup.h:91
INTS4 f_ut_status(s_daqst *ps_daqst, INTS4 l_tcp)
Definition: f_ut_status.c:114
INTU4 bl_se_meb_asy_len
Definition: s_setup.h:518
INTU4 bh_controller_id[SBS__N_CR]
Definition: s_setup.h:207
INTS4 f_stc_read(void *p_buffer, INTS4 i_buflen, INTS4 i_channel, INTS4 i_timeout)
Definition: f_stccomm.c:134
ADDRS bl_rem_mem_len[SBS__N_CR]
Definition: s_setup.h:172
int f_swaplw(int *pp_source, int l_len, int *pp_dest)
Definition: f_swaplw.c:69
INTU4 l_fix_lw
Definition: s_setup.h:41
INTU4 bl_rem_esone_base
Definition: s_setup.h:306
INTU4 bi_master
Definition: s_setup.h:45
INTU4 bi_evt_subtyp_asy
Definition: s_setup.h:483
ADDRS bl_special_meb_trig_base
Definition: s_setup.h:135
#define SBS__N_TRG_TYP
Definition: sbs_def.h:25
INTU4 bl_sbs__n_trg_typ
Definition: s_setup.h:261
INTS4 f_ut_setup(s_setup *ps_setup, INTU4 *pl_o, INTS4 l_tcp)
Definition: f_ut_status.c:418
CHARS c_rd_hostname[ML__N_RD_PIPE][16]
Definition: s_set_ml.h:93
INTU4 bl_special_meb_trig_base
Definition: s_setup.h:349
INTS4 f_ut_set_mo(s_set_mo *ps_set_mo, INTS4 l_tcp)
Definition: f_ut_status.c:828
INTU4 bl_no_crates
Definition: s_setup.h:47
ADDRS bl_rem_cam_off[SBS__N_CR]
Definition: s_setup.h:180
INTU4 bl_trig_fct[SBS__N_CR]
Definition: s_setup.h:219
CHARS c_user[SBS__STR_LEN_64]
Definition: s_daqst.h:127
INTU4 bi_evt_subtyp_asy
Definition: s_setup.h:59
INTS4 f_ut_status_r(s_daqst *ps_daqst, INTS4 l_tcp)
Definition: f_ut_status.c:152
INTU4 bh_meb_asy_flg
Definition: s_setup.h:520
INTS4 f_stc_write(void *p_buffer, INTS4 i_buflen, INTS4 i_channel)
Definition: f_stccomm.c:339
INTU4 l_no_senders
Definition: s_set_mo.h:31
INTU4 bl_ml_pipe_len
Definition: s_setup.h:531
INTU4 bh_meb_trig_mode
Definition: s_setup.h:113
INTU4 bl_se_meb_asy_len
Definition: s_setup.h:312
CHARS c_ds_hostname[MO__N_NODE][16]
Definition: s_set_mo.h:101
INTU4 l_set_ml_lw
Definition: s_set_ml.h:37
INTU4 bl_init_read_len
Definition: s_setup.h:370
ADDRS bl_loc_mem_len[SBS__N_CR]
Definition: s_setup.h:189
INTU4 bl_cvc_irq_source_off
Definition: s_setup.h:360
INTU4 bh_col_mode
Definition: s_setup.h:67
INTU4 bl_n_ev_buf
Definition: s_setup.h:53
INTU4 l_long_len
Definition: s_set_ml.h:41
INTS4 f_ut_set_mo_r(s_set_mo *ps_set_mo, INTS4 l_tcp)
Definition: f_ut_status.c:862
INTU4 l_sbs__n_trg_typ
Definition: s_daqst.h:28
INTU4 bh_meb_asy_flg
Definition: s_setup.h:96
INTU4 bl_ml_pipe_seg_len
Definition: s_setup.h:319
INTU4 bl_se_meb_asy_len
Definition: s_setup.h:94
INTS4 i_se_subtyp[SBS__N_CR]
Definition: s_setup.h:221
INTS4 h_rd_tab_flg
Definition: s_setup.h:153
INTU4 bh_trig_stat_nr[SBS__N_CR]
Definition: s_setup.h:217
INTU4 l_swap_lw
Definition: s_set_mo.h:29
INTU4 bl_cvc_irq_mask_off
Definition: s_setup.h:361
INTU4 bl_cvc_csr_off
Definition: s_setup.h:92
int l
Definition: f_mbs_status.c:34
INTU4 bi_rd_tab_len[SBS__N_CR][SBS__N_TRG_TYP]
Definition: s_setup.h:242
#define SYS__N_MAX_PROCS
Definition: sys_def.h:28
INTS4 f_ut_set_mo_ini(s_set_mo *ps_set_mo)
Definition: f_ut_status.c:791
CHARS c_dr_hostname[MO__N_NODE][16]
Definition: s_set_mo.h:103
INTS4 f_ut_setup_copy64(s_setup *ps_setup, s_setup_64_receiver *src)
Definition: f_ut_status.c:271
INTU4 l_version
Definition: s_set_mo.h:27
ADDRS bl_ml_pipe_seg_len
Definition: s_setup.h:103
INTU4 bl_cvc_irq_len
Definition: s_setup.h:572
INTU4 bh_meb_trig_mode
Definition: s_setup.h:537
INTS4 f_ut_set_ml_r(s_set_ml *ps_set_ml, INTS4 l_tcp)
Definition: f_ut_status.c:742
INTU4 l_daqst_lw
Definition: s_daqst.h:24
INTU4 bi_evt_typ_asy
Definition: s_setup.h:481
INTU4 bl_ml_pipe_len
Definition: s_setup.h:107
unsigned int INTU4
Definition: typedefs.h:29
INTU4 l_endian
Definition: s_set_mo.h:26
INTU4 bl_n_col_retry
Definition: s_setup.h:325
INTU4 l_no_receivers
Definition: s_set_mo.h:32
#define STC__SUCCESS
Definition: f_stccomm.h:369
#define SBS__STR_LEN_64
Definition: sbs_def.h:21
INTU4 bl_esone_off
Definition: s_setup.h:90
ADDRS bl_pipe_seg_len[SBS__N_CR]
Definition: s_setup.h:203
ADDRS lp_loc_mem_base[SBS__N_CR]
Definition: s_setup.h:186
CHARS c_out_chan[SBS__STR_LEN_64]
Definition: s_daqst.h:143
int l_status
Definition: f_evcli.c:185
#define ML__N_RD_PIPE
Definition: ml_def.h:19
int INTS4
Definition: typedefs.h:28
INTU4 bl_ml_pipe_len
Definition: s_setup.h:322
ADDRS bl_pipe_off[SBS__N_CR]
Definition: s_setup.h:199
INTU4 bl_struc_len
Definition: s_setup.h:40
INTU4 bh_daqst_initalized
Definition: s_daqst.h:29
INTU4 bl_cvc_clb_off
Definition: s_setup.h:517
INTS4 f_ut_set_ml_ini(s_set_ml *ps_set_ml)
Definition: f_ut_status.c:647
INTU4 bl_init_tab_off[SBS__N_CR]
Definition: s_setup.h:228
INTU4 l_sys__n_max_procs
Definition: s_daqst.h:26
INTU4 bl_ml_pipe_base_addr
Definition: s_setup.h:316
INTS4 f_ut_setup_ini(s_setup *ps_setup)
Definition: f_ut_status.c:228
INTU4 bl_cvc_csr_off
Definition: s_setup.h:516
#define MO__N_NODE
Definition: mo_def.h:27
INTS4 l_n_rd_pipe
Definition: s_set_ml.h:43
INTU4 bi_evt_typ_asy
Definition: s_setup.h:57
ADDRS lp_loc_pipe_base[SBS__N_CR]
Definition: s_setup.h:196
INTU4 bl_cvc_irq_mask_off
Definition: s_setup.h:150
INTU4 bl_n_stream
Definition: s_setup.h:54
INTS4 f_ut_setup_copy32(s_setup *ps_setup, s_setup_32_receiver *src)
Definition: f_ut_status.c:344
ADDR64 bl_ml_pipe_base_addr
Definition: s_setup.h:523
#define SBS__N_CR
Definition: sbs_def.h:24
INTU4 bh_sy_asy_flg[SBS__N_CR]
Definition: s_setup.h:211
INTU4 bh_special_meb_trig_type
Definition: s_setup.h:345
#define VERSION__SET_MO
Definition: f_ut_status.c:41
ADDRS bl_rem_mem_off[SBS__N_CR]
Definition: s_setup.h:169
ADDRS bl_ml_pipe_base_addr
Definition: s_setup.h:99
INTU4 bl_n_col_retry
Definition: s_setup.h:110
#define VERSION__SET_ML
Definition: f_ut_status.c:40
INTU4 bl_cvc_irq_len
Definition: s_setup.h:359
INTU4 bl_cvc_irq_source_off
Definition: s_setup.h:149
INTS4 i_se_procid[SBS__N_CR]
Definition: s_setup.h:222
CHARS c_pname[SYS__N_MAX_PROCS][SBS__STR_LEN_64]
Definition: s_daqst.h:145
INTU4 bl_loc_esone_base
Definition: s_setup.h:304
INTU4 bl_init_read_len
Definition: s_setup.h:583
INTU4 l_version
Definition: s_setup.h:39
INTU4 bl_sbs__n_trg_typ
Definition: s_setup.h:43
INTU4 bi_evt_subtyp_asy
Definition: s_setup.h:277
INTU4 bl_cvc_clb_off
Definition: s_setup.h:93
INTU4 bl_rd_tab_off[SBS__N_CR][SBS__N_TRG_TYP]
Definition: s_setup.h:238
INTU4 bi_evt_subtyp_sy
Definition: s_setup.h:276
INTU4 bi_evt_subtyp_sy
Definition: s_setup.h:58
INTU4 l_short_len
Definition: s_set_ml.h:40
INTU4 l_endian
Definition: s_daqst.h:22
INTU4 l_endian
Definition: s_set_ml.h:35
INTU4 bl_ev_buf_len
Definition: s_setup.h:52
INTU4 bh_meb_trig_mode
Definition: s_setup.h:328
INTU4 bl_rem_cam_len[SBS__N_CR]
Definition: s_setup.h:183
INTU4 bl_max_se_len[SBS__N_CR][SBS__N_TRG_TYP]
Definition: s_setup.h:236
INTU4 l_ml__n_rd_pipe
Definition: s_set_ml.h:39
ADDRS bl_loc_esone_base
Definition: s_setup.h:86
INTU4 l_version
Definition: s_daqst.h:23
INTU4 bi_evt_subtyp_sy
Definition: s_setup.h:482
INTU4 bi_evt_typ_sy
Definition: s_setup.h:56
INTU4 bi_evt_typ_asy
Definition: s_setup.h:275
INTS4 f_ut_setup_r(s_setup *ps_setup, INTS4 l_tcp)
Definition: f_ut_status.c:505
INTS4 h_se_control
Definition: s_setup.h:60
INTU4 bh_meb_asy_flg
Definition: s_setup.h:314
INTU4 bl_cvc_irq_len
Definition: s_setup.h:148
CHARS c_sbs_setup_path[ML__N_RD_PIPE][128]
Definition: s_set_ml.h:96
INTU4 l_max_nodes
Definition: s_set_mo.h:30
INTS4 f_ut_status_ini(s_daqst *ps_daqst)
Definition: f_ut_status.c:69
INTU4 bi_init_tab_len[SBS__N_CR]
Definition: s_setup.h:232
ADDR64 bl_rem_esone_base
Definition: s_setup.h:512
INTU4 l_endian
Definition: s_setup.h:38
INTU4 l_fix_lw
Definition: s_daqst.h:25
INTU4 bl_cvc_clb_off
Definition: s_setup.h:311
INTU4 lp_cvc_irq
Definition: s_setup.h:147
INTU4 bl_cvc_crr_off
Definition: s_setup.h:515
INTU4 bl_cvc_crr_off
Definition: s_setup.h:309
INTU4 l_procs_run
Definition: s_daqst.h:32
ADDR64 bl_loc_esone_base
Definition: s_setup.h:510
INTU4 bh_running[SYS__N_MAX_PROCS]
Definition: s_daqst.h:83
INTU4 bl_init_read_len
Definition: s_setup.h:159
INTS4 i_se_typ[SBS__N_CR]
Definition: s_setup.h:220
INTU4 bl_sbs__n_cr
Definition: s_setup.h:42
ADDRS bl_rem_esone_base
Definition: s_setup.h:88
INTU4 bh_rd_flg[SBS__N_CR]
Definition: s_setup.h:224
INTS4 f_ut_set_ml(s_set_ml *ps_set_ml, INTU4 *pl_o, INTS4 l_tcp)
Definition: f_ut_status.c:689
INTU4 l_set_mo_lw
Definition: s_set_mo.h:28
#define VERSION__DAQST
Definition: f_ut_status.c:38
INTU4 bl_cvc_csr_off
Definition: s_setup.h:310
ADDR64 bl_ml_pipe_seg_len
Definition: s_setup.h:527
INTU4 bl_cvc_irq_mask_off
Definition: s_setup.h:574
INTU4 bl_trig_cvt[SBS__N_CR]
Definition: s_setup.h:218
INTU4 bh_rd_typ
Definition: s_setup.h:62
ADDRS lp_rem_cam_base[SBS__N_CR]
Definition: s_setup.h:178
ADDR64 bl_special_meb_trig_base
Definition: s_setup.h:559
INTU4 bl_cvc_irq_source_off
Definition: s_setup.h:573
INTU4 bl_pipe_len[SBS__N_CR]
Definition: s_setup.h:206
INTU4 l_sbs__str_len_64
Definition: s_daqst.h:27
INTU4 bh_special_meb_trig_type
Definition: s_setup.h:130