00001 // $Id: s_set_mo.h 478 2009-10-29 12:26:09Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 /* 00015 * N.Kurz 8-Jun-1998 00016 * 00017 * within this structure the setup information for a n # m 00018 * (multiple output/collector) mbs system is specified 00019 */ 00020 00021 #include "typedefs.h" 00022 #include "mo_def.h" 00023 00024 typedef struct 00025 { 00026 INTU4 l_endian; /* must be 1 */ 00027 INTU4 l_version; /* structure version */ 00028 INTU4 l_set_mo_lw; /* length of structure */ 00029 INTU4 l_swap_lw; /* longwords to be swapped */ 00030 INTU4 l_max_nodes; /* set to MO__N_NODE */ 00031 INTU4 l_no_senders; /* actual number of senders */ 00032 INTU4 l_no_receivers; /* actual number of receivers */ 00033 INTU4 bl_dr_active[MO__N_NODE]; /* active receivers */ 00034 00035 INTU4 l_rd_pipe_base_addr [MO__N_NODE] [MO__N_NODE]; 00036 /* base addresses of all pipes residing on the ds nodes seen remote */ 00037 /* from dr nodes l_rd_pipe_base_addr[dr_node_id][ds_node_id]. */ 00038 /* this setup parametes are only necessary for an address mapped */ 00039 /* transfer mode (l_trans_mode = 0). */ 00040 INTU4 l_rd_pipe_seg_len [MO__N_NODE]; 00041 /* size of pipe segments on ds nodes. index is ds id. this information */ 00042 /* is only necessary if transfer type 0 (single shot data transfer) */ 00043 /* from any of the ds nodes. !!!! WARNING !!!! this information is */ 00044 /* redundant. the size is also specified in the setup.usf or */ 00045 /* set_ml.usf of the ds node and must match. */ 00046 INTU4 l_rd_pipe_trans_mode [MO__N_NODE] [MO__N_NODE]; 00047 /* data transfer mode from ds nodes to dr nodes */ 00048 /* l_rd_pipe_base_addr[dr_node_id][ds_node_id]. */ 00049 /* transfer mode: 0xxx = address mapped, dr reads data */ 00050 /* 1xxx = message oriented mode ( tcp ), ds sends data */ 00051 /* 01xx = address mapped DMA modes (various) */ 00052 /* */ 00053 /* 0x 0 = standard singe cycle address mapped */ 00054 /* 0x 101 = VME DMA E7 */ 00055 /* 0x 102 = VME DMA RIO2 <- RIO2 */ 00056 /* 0x 103 = VSB DMA RIO2 <- "any" VSB slave device */ 00057 /* 0x 104 = PVIC DMA RIO2 */ 00058 /* 0x 105 = VME DMA RIO2 <- E7 / VME memory */ 00059 /* 0x1001 = TCP sockets */ 00060 INTU4 l_form_mode; 00061 /* two format modes have been forseen, whereas only mode 1 is imple- */ 00062 /* mented yet. */ 00063 /* mode 1: ds node sends data, or dr node reads data (depending on */ 00064 /* transfer type) to an intermediate event buffer of size */ 00065 /* l_max_evt_size. formatting, and possible byte swapping is */ 00066 /* done afterwards from the intermediate event buffer into the */ 00067 /* streams. */ 00068 /* mode 2: ds node sends data, or dr node reads data and formats */ 00069 /* immediately into the streams. not yet implemented */ 00070 INTU4 l_base_addr_evt_buf[MO__N_NODE]; 00071 /* if l_form_mode = 1: (intermediate formatting) */ 00072 /* for transfer types where address mapped writing from ds node or dma */ 00073 /* data transfer is done a shared segement is needed and created with */ 00074 /* physical base address l_base_addr_evt_buf and size l_max_evt_size. */ 00075 /* if l_form_mode = 2: (direct formatting) */ 00076 /* a shared segment for this buffer must also be created for */ 00077 /* direct formatting into streams if the ds node writes address mapped */ 00078 /* or dma is done. this buffer will be used to hold an event if the */ 00079 /* actual stream has less space than l_max_evt_size since in this mode */ 00080 /* the actual event size is not known before the transfer of the last */ 00081 /* fraction. */ 00082 /* */ 00083 /* if l_base_addr_evt_buf != 0 an smem_create segment will be created */ 00084 /* if l_base_addr_evt_buf = 0 ( or not specified) a buffer of size */ 00085 /* l_max_evt_size will be created with malloc and is therefore not */ 00086 /* contigious in the address space. */ 00087 /* MO__N_NODE runs over dr node ids. */ 00088 INTU4 l_max_evt_size; 00089 /* TOTAL maximum event size, which could occur within this setup. */ 00090 /* in bytes. */ 00091 INTU4 l_n_frag; 00092 /* many subevents/fragments can be send/read in one transfer (i.e. */ 00093 /* tcp, vme block transfer) from m_ds to m_dr if the data is conscu- */ 00094 /* tive. l_n_frag specifies the number fragments sent in such a packet */ 00095 INTU4 l_ev_buf_len [MO__N_NODE]; 00096 INTU4 l_n_ev_buf [MO__N_NODE]; 00097 INTU4 l_n_stream [MO__N_NODE]; 00098 INTU4 l_base_addr_stream_seg [MO__N_NODE]; 00099 /* only nedded if l_form mode = 2. see explanation above */ 00100 INTU4 l_out_mode [MO__N_NODE]; 00101 CHARS c_ds_hostname [MO__N_NODE][16]; 00102 /* name of ds nodes */ 00103 CHARS c_dr_hostname [MO__N_NODE][16]; 00104 /* name of dr nodes */ 00105 00106 } s_set_mo;