GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
f_evt.h
Go to the documentation of this file.
1 // $Id: f_evt.h 793 2011-09-05 18:11:29Z 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 /***************** f_evt.h ******************************/
15 #ifndef F_EVT
16 #define F_EVT
17 
18 #include "typedefs.h"
19 
20 /* ++++++++++++++++ include UNIX standard headers +++++++++++++++++++++++++ */
21 
22 #if MBS_ENDIAN == 1
23 #include "s_ve10_1.h"
24 #include "s_ves10_1.h"
25 #include "s_evhe.h"
26 #include "s_bufhe.h"
27 #else
28 #include "s_ve10_1_swap.h"
29 #include "s_ves10_1_swap.h"
30 #include "s_evhe_swap.h"
31 #include "s_bufhe_swap.h"
32 #endif
33 
34 #define MAX_BUF_LGTH 32768
35 #define MIN_BUF_LGTH 512
36 #define MAX_BUFS_IN_STREAM 100 /* at a maximum, 100 buffers per stream */
37 #define MAX_LONG 99999999 /* maximum long data */
38 
39 typedef struct
40 {
50 } s_taghe;
51 
52 typedef struct
53 {
56 } s_tag;
57 
58 struct sLmdControl;
59 
60 
61 typedef struct
62 {
63  INTS4 l_server_type; /* number specifying input source */
64  INTS4 l_buf_type; /* buffer type number */
65  INTS4 l_buf_subtype; /* buffer subtype number */
66  INTS4 l_channel_no; /* file descripter or server No. */
67  INTS4 l_buf_size; /* buffer size */
71  INTS4 l_bufs_in_stream; /* # of buffers per stream */
73  INTS4 l_io_buf_size; /* I/O buffer size=l_buf_size*l_bufs_in_stream */
75  INTS4 l_evt_buf_size; /* internal buffer size */
78  INTS4 l_timeout; /* -1 (default) no timeout */
79  INTS4 l_events; /* events since open */
80  INTS4 l_buffers; /* buffers since open */
81  INTS4 l_kbytes; /* kbytes since open */
86  CHARS *pc_io_buf; /* pointer to I/O buffer to server */
87  CHARS *pc_evt_buf; /* pointer to internal event buffer */
89  s_bufhe s_bufhe_1; /* keep buffer header of 1st buffer for spanned event */
91  CHARS c_channel[128]; /* channel name */
92  INTS4 l_tagfile_no; /* file descripter or server No. */
99 
120 INTS4 f_evt_rev_port(INTS4); /* obsolete */
123 
124 /* ******************************/
125 /* Input selector */
126 /* ******************************/
127 #define GETEVT__FILE 1
128 #define GETEVT__STREAM 2
129 #define GETEVT__TRANS 3
130 #define GETEVT__EVENT 4
131 #define GETEVT__REVSERV 5
132 #define GETEVT__RFIO 6
133 #define GETEVT__TAGINDEX 10
134 #define GETEVT__TAGNUMBER 11
135 /* ********************************************************************** */
136 /* error messages */
137 /* ********************************************************************** */
138 #define GETEVT__SUCCESS 0
139 #define GETEVT__FAILURE 1
140 #define GETEVT__FRAGMENT 2
141 #define GETEVT__NOMORE 3
142 #define GETEVT__NOFILE 4
143 #define GETEVT__NOSERVER 5
144 #define GETEVT__RDERR 6
145 #define GETEVT__CLOSE_ERR 7
146 #define GETEVT__NOCHANNEL 8
147 #define GETEVT__TIMEOUT 9
148 #define GETEVT__NOTAGFILE 10
149 #define GETEVT__NOTAG 11
150 #define GETEVT__TAGRDERR 12
151 #define GETEVT__TAGWRERR 13
152 #define GETEVT__NOLMDFILE 14
153 
154 #define PUTEVT__SUCCESS 0
155 #define PUTEVT__FILE_EXIST 101
156 #define PUTEVT__FAILURE 102
157 #define PUTEVT__TOOBIG 103
158 #define PUTEVT__TOO_SMALLS 104
159 #define PUTEVT__CLOSE_ERR 105
160 #define PUTEVT__WRERR 106
161 #define PUTEVT__NOCHANNEL 107
162 
163 #endif
164 /***************** End f_evt.h ******************************/
INTS4 f_evt_put_buffer(s_evt_channel *, s_bufhe *)
Definition: f_evt.c:1470
INTS4 l_buf_type
Definition: f_evt.h:64
INTS4 f_evt_timeout(s_evt_channel *, INTS4)
Definition: f_evt.c:1858
INTS4 l_last
Definition: f_evt.h:48
INTS4 f_evt_cre_tagfile(CHARS *, CHARS *, INTS4(*)())
Definition: f_evt.c:2233
INTS4 l_channel_no
Definition: f_evt.h:66
s_tag * ps_tag
Definition: f_evt.h:96
CHARS * pc_evt_buf
Definition: f_evt.h:87
INTS4 l_first_buf
Definition: f_evt.h:84
INTS4 l_buffers
Definition: f_evt.h:44
INTS4 l_lmdswap
Definition: f_evt.h:94
sLmdControl * pLmd
Definition: f_evt.h:97
INTS4 f_evt_get_buffer(s_evt_channel *, INTS4 *)
Definition: f_evt.c:1717
s_bufhe s_bufhe_1
Definition: f_evt.h:89
INTS4 l_buffers
Definition: f_evt.h:80
INTS4 l_first_get
Definition: f_evt.h:82
s_bufhe * ps_bufhe
Definition: f_evt.h:88
INTS4 l_buf_size
Definition: f_evt.h:67
INTS4 f_evt_get_tagnext(s_evt_channel *, INTS4, INTS4 **)
Definition: f_evt.c:2619
Definition: s_evhe.h:32
INTS4 l_bufs_in_stream
Definition: f_evt.h:71
INTS4 f_evt_get_close(s_evt_channel *)
Definition: f_evt.c:1113
INTS4 l_first_put
Definition: f_evt.h:83
INTS4 l_kbytes
Definition: f_evt.h:81
INTS4 l_filesize
Definition: f_evt.h:46
INTS4 l_buf_no
Definition: f_evt.h:68
INTS4 f_evt_put_open(CHARS *, INTS4, INTS4, INTS4, INTS4, s_evt_channel *, CHARS *)
Definition: f_evt.c:1205
s_taghe * ps_taghe
Definition: f_evt.h:95
CHARS * pc_io_buf
Definition: f_evt.h:86
s_evt_channel * f_evt_control()
Definition: f_evt.c:2845
INTS4 l_evt_buf_posi
Definition: f_evt.h:76
INTS4 l_offset
Definition: f_evt.h:55
INTS4 f_evt_source_port(INTS4 l_port)
Definition: f_evt.c:495
INTS4 l_stream_bufs
Definition: f_evt.h:72
INTS4 l_first
Definition: f_evt.h:47
INTS4 l_tagswap
Definition: f_evt.h:93
INTS4 f_evt_error(INTS4, CHARS *, INTS4)
Definition: f_evt.c:1610
int INTS4
Definition: typedefs.h:28
INTS4 l_tagfile_no
Definition: f_evt.h:92
CHARS * f_evt_get_buffer_ptr(s_evt_channel *)
Definition: f_evt.c:1955
INTS4 l_version
Definition: f_evt.h:42
INTS4 f_evt_put_event(s_evt_channel *, INTS4 *)
Definition: f_evt.c:1327
INTS4 f_evt_skip_buffer(s_evt_channel *, INTS4)
Definition: f_evt.c:1803
INTS4 f_evt_get_open(INTS4, CHARS *, s_evt_channel *, CHARS **, INTS4, INTS4)
Definition: f_evt.c:561
Definition: f_evt.h:39
INTS4 l_endian
Definition: f_evt.h:41
INTS4 l_evt_size
Definition: f_evt.h:77
INTS4 f_evt_get_tagevent(s_evt_channel *, INTS4, INTS4, INTS4 **)
Definition: f_evt.c:2668
INTS4 l_events
Definition: f_evt.h:45
INTS4 f_evt_get_event(s_evt_channel *, INTS4 **, INTS4 **)
Definition: f_evt.c:923
INTS4 l_frag_len
Definition: f_evt.h:85
INTS4 l_bufsize
Definition: f_evt.h:43
INTS4 l_timeout
Definition: f_evt.h:78
INTS4 l_io_buf_size
Definition: f_evt.h:73
INTS4 f_evt_get_tagopen(s_evt_channel *, CHARS *, CHARS *, CHARS **, INTS4)
Definition: f_evt.c:2495
INTS4 l_buf_posi
Definition: f_evt.h:69
Definition: f_evt.h:52
INTS4 f_evt_type(s_bufhe *, s_evhe *, INTS4, INTS4, INTS4, INTS4)
Definition: f_evt.c:306
INTS4 f_evt_swap(CHARS *, INTS4)
Definition: f_evt.c:1878
INTS4 l_linear
Definition: f_evt.h:49
INTS4 f_evt_get_tagclose(s_evt_channel *)
Definition: f_evt.c:2828
INTS4 l_event
Definition: f_evt.h:54
INTS4 l_events
Definition: f_evt.h:79
char CHARS
Definition: typedefs.h:21
INTS4 f_evt_get_subevent(s_ve10_1 *, INTS4, INTS4 **, INTS4 **, INTS4 *)
Definition: f_evt.c:243
INTS4 l_buf_subtype
Definition: f_evt.h:65
INTS4 f_evt_rev_port(INTS4)
Definition: f_evt.c:518
s_ve10_1 * ps_ve10_1
Definition: f_evt.h:90
INTS4 f_evt_put_close(s_evt_channel *)
Definition: f_evt.c:1516
INTS4 l_io_buf_posi
Definition: f_evt.h:74
INTS4 l_evt_buf_size
Definition: f_evt.h:75
INTS4 l_server_type
Definition: f_evt.h:63
INTS4 l_buf_lmt
Definition: f_evt.h:70