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