Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/MbsAPI/f_evt_old.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 /*****************  f_evt.h ******************************/
00017 #include "typedefs.h"
00018 
00019 #ifndef GETEVT
00020 #define GETEVT
00021 
00022 
00023 #ifdef GSI__WINNT
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <fcntl.h>
00027 #include <string.h>
00028 #include <memory.h>
00029 #include <sys/timeb.h>
00030 #include <sys/types.h>
00031 #include <sys/stat.h>
00032 #include <fcntl.h>
00033 #define DEF_FILE_ACCE S_IREAD|S_IWRITE  /* rw */
00034 #define GET__OPEN_FLAG O_RDONLY
00035 #define PUT__OPEN_APD_FLAG O_RDWR|O_APPEND
00036 #define PUT__CRT_FLAG O_CREAT|O_RDWR
00037 #define PUT__CRT_OPT ""
00038 
00039 #include <winsock.h>
00040 #define    WS_VERSION_REQD     0x0101
00041 #define    WS_VERSION_MAJOR    HIBYTE(WS_VERSION_REQD)
00042 #define    WS_VERSION_MINOR    LOBYTE(WS_VERSION_REQD)
00043 #define    MIN_SOCKETS_REQD    6
00044 WSADATA    wsaData;
00045 #endif
00046 
00047 
00048 
00049 
00050 #ifdef Linux /* Linux */
00051 #include <stdio.h>
00052 #include <stdlib.h>
00053 #include <fcntl.h>
00054 #include <string.h>
00055 #include <unistd.h>
00056 #include <memory.h>
00057 #include <pwd.h>
00058 #include <sys/time.h>
00059 #include <sys/timeb.h>
00060 #include <sys/types.h>
00061 #include <sys/stat.h>
00062 #define DEF_FILE_ACCE S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH  /* rw-r--r-- */
00063 #define GET__OPEN_FLAG O_RDONLY
00064 #define PUT__OPEN_APD_FLAG O_RDWR|O_APPEND
00065 #define PUT__CRT_FLAG O_CREAT|O_RDWR
00066 #define PUT__CRT_OPT ""
00067 #endif
00068 
00069 #ifdef _AIX
00070 #include <stdio.h>
00071 #include <stdlib.h>
00072 #include <fcntl.h>
00073 #include <string.h>
00074 #include <unistd.h>
00075 #include <memory.h>
00076 #include <pwd.h>
00077 #include <sys/time.h>
00078 #include <sys/timeb.h>
00079 #include <sys/types.h>
00080 #include <sys/mode.h>
00081 #define DEF_FILE_ACCE S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH  /* rw-r--r-- */
00082 #define GET__OPEN_FLAG O_RDONLY
00083 #define PUT__OPEN_APD_FLAG O_RDWR|O_APPEND
00084 #define PUT__CRT_FLAG O_CREAT|O_RDWR
00085 #define PUT__CRT_OPT ""
00086 #endif
00087 
00088 #ifdef VMS
00089 #include <unixio.h>
00090 #include <unixlib.h>
00091 #include <file.h>
00092 #include <stdio.h>
00093 #include <stdlib.h>
00094 #include <fcntl.h>
00095 #include <string.h>
00096 #include <sys/time.h>
00097 #include <sys/timeb.h>
00098 #include <sys/types.h>
00099 #include <unistd.h>
00100 #define DEF_FILE_ACCE 644          /* rw-r--r-- */
00101 #define GET__OPEN_FLAG O_RDONLY
00102 #define PUT__OPEN_APD_FLAG O_RDWR|O_APPEND
00103 #define PUT__CRT_FLAG O_CREAT|O_WRONLY
00104 #define PUT__CRT_OPT "rfm=fix"
00105 #endif
00106 
00107 #define MAX_BUF_LGTH 32768
00108 #define MIN_BUF_LGTH 512
00109 #define MAX_BUFS_IN_STREAM 100    /* at a maximum, 100 buffers per stream */
00110 #define MAX_LONG 99999999         /* maximum long data */
00111 
00112 struct s_evt_channel
00113 {
00114    INTS4    l_server_type;    /* number specifying input source */
00115    INTS4    l_buf_type;       /* buffer type number               */
00116    INTS4    l_buf_subtype;    /* buffer subtype number            */
00117    INTS4    l_channel_no;     /* file descripter or server No.    */
00118    INTS4    l_buf_size;       /* buffer size                      */
00119    INTS4    l_buf_no;
00120    INTS4    l_buf_posi;
00121    INTS4    l_buf_lmt;
00122    INTS4    l_bufs_in_stream; /* # of buffers per stream          */
00123    INTS4    l_stream_bufs;
00124    INTS4    l_io_buf_size;    /* I/O buffer size=l_buf_size*l_bufs_in_stream */
00125    INTS4    l_io_buf_posi;
00126    INTS4    l_evt_buf_size;   /* internal buffer size             */
00127    INTS4    l_evt_buf_posi;
00128    INTS4    l_evt_size;
00129    INTS4    l_events;         /* events since open             */
00130    INTS4    l_buffers;        /* buffers since open             */
00131    INTS4    l_kbytes;         /* kbytes since open             */
00132    INTS4    l_first_get;
00133    INTS4    l_first_put;
00134    INTS4    l_first_buf;
00135    INTS4    l_frag_len;
00136    CHARS    *pc_io_buf;       /* pointer to I/O buffer to server  */
00137    CHARS    *pc_evt_buf;      /* pointer to internal event buffer */
00138    s_bufhe  *ps_bufhe;
00139    s_ve10_1 *ps_ve10_1;
00140    CHARS    c_channel[128];   /* channel name */
00141 } ;
00142 
00143 INTS4 f_evt_get_open(INTS4, CHARS *, s_evt_channel *, CHARS **, INTS4, INTS4);
00144 INTS4 f_evt_get_event(s_evt_channel *, INTS4 **, INTS4 **);
00145 INTS4 f_evt_get_buffer(s_evt_channel *, INTS4 *);
00146 INTS4 f_evt_get_close(s_evt_channel *);
00147 INTS4 f_evt_put_open(CHARS *,INTS4,INTS4,INTS4,INTS4,s_evt_channel *,CHARS *);
00148 INTS4 f_evt_put_event(s_evt_channel *, INTS4 *);
00149 INTS4 f_evt_put_buffer(s_evt_channel *, s_bufhe *);
00150 INTS4 f_evt_put_close(s_evt_channel *);
00151 INTS4 f_evt_error( INTS4 , CHARS * , INTS4 );
00152 INTS4 f_evt_swap(CHARS *, INTS4);
00153 
00154 /* ******************************/
00155 /*  Input selector              */
00156 /* ******************************/
00157 #define GETEVT__FILE     1
00158 #define GETEVT__STREAM   2
00159 #define GETEVT__TRANS    3
00160 #define GETEVT__EVENT    4
00161 #define GETEVT__REVSERV  5
00162 /* ********************************************************************** */
00163 /*                   error messages                                       */
00164 /* ********************************************************************** */
00165 #define GETEVT__SUCCESS     0
00166 #define GETEVT__FAILURE     1
00167 #define GETEVT__FRAGMENT    2
00168 #define GETEVT__NOMORE      3
00169 #define GETEVT__NOFILE      4
00170 #define GETEVT__NOSERVER    5
00171 #define GETEVT__RDERR       6
00172 #define GETEVT__CLOSE_ERR   7
00173 #define GETEVT__NOCHANNEL   8
00174 
00175 #define PUTEVT__SUCCESS     0
00176 #define PUTEVT__FILE_EXIST  11
00177 #define PUTEVT__FAILURE     12
00178 #define PUTEVT__TOOBIG      13
00179 #define PUTEVT__TOO_SMALLS  14
00180 #define PUTEVT__CLOSE_ERR   15
00181 #define PUTEVT__WRERR       16
00182 #define PUTEVT__NOCHANNEL   17
00183 
00184 #endif
00185 /*****************  End f_evt.h ******************************/
00186 
00187 
00188 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:08 2005 for Go4-v2.10-5 by doxygen1.2.15