Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef F_EVT
00016 #define F_EVT
00017
00018 #include "typedefs.h"
00019
00020
00021
00022 #if MBS_ENDIAN == 1
00023 #include "s_ve10_1.h"
00024 #include "s_ves10_1.h"
00025 #include "s_evhe.h"
00026 #include "s_bufhe.h"
00027 #else
00028 #include "s_ve10_1_swap.h"
00029 #include "s_ves10_1_swap.h"
00030 #include "s_evhe_swap.h"
00031 #include "s_bufhe_swap.h"
00032 #endif
00033
00034 #define MAX_BUF_LGTH 32768
00035 #define MIN_BUF_LGTH 512
00036 #define MAX_BUFS_IN_STREAM 100
00037 #define MAX_LONG 99999999
00038
00039 typedef struct
00040 {
00041 INTS4 l_endian;
00042 INTS4 l_version;
00043 INTS4 l_bufsize;
00044 INTS4 l_buffers;
00045 INTS4 l_events;
00046 INTS4 l_filesize;
00047 INTS4 l_first;
00048 INTS4 l_last;
00049 INTS4 l_linear;
00050 } s_taghe;
00051
00052 typedef struct
00053 {
00054 INTS4 l_event;
00055 INTS4 l_offset;
00056 } s_tag;
00057
00058 struct sLmdControl;
00059
00060
00061 typedef struct
00062 {
00063 INTS4 l_server_type;
00064 INTS4 l_buf_type;
00065 INTS4 l_buf_subtype;
00066 INTS4 l_channel_no;
00067 INTS4 l_buf_size;
00068 INTS4 l_buf_no;
00069 INTS4 l_buf_posi;
00070 INTS4 l_buf_lmt;
00071 INTS4 l_bufs_in_stream;
00072 INTS4 l_stream_bufs;
00073 INTS4 l_io_buf_size;
00074 INTS4 l_io_buf_posi;
00075 INTS4 l_evt_buf_size;
00076 INTS4 l_evt_buf_posi;
00077 INTS4 l_evt_size;
00078 INTS4 l_timeout;
00079 INTS4 l_events;
00080 INTS4 l_buffers;
00081 INTS4 l_kbytes;
00082 INTS4 l_first_get;
00083 INTS4 l_first_put;
00084 INTS4 l_first_buf;
00085 INTS4 l_frag_len;
00086 CHARS *pc_io_buf;
00087 CHARS *pc_evt_buf;
00088 s_bufhe *ps_bufhe;
00089 s_bufhe s_bufhe_1;
00090 s_ve10_1 *ps_ve10_1;
00091 CHARS c_channel[128];
00092 INTS4 l_tagfile_no;
00093 INTS4 l_tagswap;
00094 INTS4 l_lmdswap;
00095 s_taghe *ps_taghe;
00096 s_tag *ps_tag;
00097 sLmdControl *pLmd;
00098 } s_evt_channel;
00099
00100 INTS4 f_evt_cre_tagfile(CHARS *,CHARS *, INTS4 (*)());
00101 INTS4 f_evt_get_tagopen(s_evt_channel *,CHARS *,CHARS *,CHARS **,INTS4);
00102 INTS4 f_evt_get_tagevent(s_evt_channel *,INTS4,INTS4,INTS4 **);
00103 INTS4 f_evt_get_tagnext(s_evt_channel *,INTS4,INTS4 **);
00104 INTS4 f_evt_get_tagclose(s_evt_channel *);
00105 INTS4 f_evt_get_open(INTS4, CHARS *, s_evt_channel *, CHARS **, INTS4, INTS4);
00106 INTS4 f_evt_get_event(s_evt_channel *, INTS4 **, INTS4 **);
00107 INTS4 f_evt_get_subevent(s_ve10_1 *,INTS4,INTS4 **,INTS4 **,INTS4 *);
00108 INTS4 f_evt_get_buffer(s_evt_channel *, INTS4 *);
00109 INTS4 f_evt_get_close(s_evt_channel *);
00110 CHARS * f_evt_get_buffer_ptr(s_evt_channel *);
00111 INTS4 f_evt_skip_buffer(s_evt_channel *, INTS4);
00112 INTS4 f_evt_put_open(CHARS *,INTS4,INTS4,INTS4,INTS4,s_evt_channel *,CHARS *);
00113 INTS4 f_evt_put_event(s_evt_channel *, INTS4 *);
00114 INTS4 f_evt_put_buffer(s_evt_channel *, s_bufhe *);
00115 INTS4 f_evt_put_close(s_evt_channel *);
00116 INTS4 f_evt_type(s_bufhe *,s_evhe *,INTS4,INTS4,INTS4,INTS4);
00117 INTS4 f_evt_error( INTS4 , CHARS * , INTS4 );
00118 INTS4 f_evt_timeout(s_evt_channel *, INTS4 );
00119 INTS4 f_evt_source_port(INTS4 l_port);
00120 INTS4 f_evt_rev_port(INTS4);
00121 INTS4 f_evt_swap(CHARS *, INTS4);
00122 s_evt_channel * f_evt_control();
00123
00124
00125
00126
00127 #define GETEVT__FILE 1
00128 #define GETEVT__STREAM 2
00129 #define GETEVT__TRANS 3
00130 #define GETEVT__EVENT 4
00131 #define GETEVT__REVSERV 5
00132 #define GETEVT__RFIO 6
00133 #define GETEVT__TAGINDEX 10
00134 #define GETEVT__TAGNUMBER 11
00135
00136
00137
00138 #define GETEVT__SUCCESS 0
00139 #define GETEVT__FAILURE 1
00140 #define GETEVT__FRAGMENT 2
00141 #define GETEVT__NOMORE 3
00142 #define GETEVT__NOFILE 4
00143 #define GETEVT__NOSERVER 5
00144 #define GETEVT__RDERR 6
00145 #define GETEVT__CLOSE_ERR 7
00146 #define GETEVT__NOCHANNEL 8
00147 #define GETEVT__TIMEOUT 9
00148 #define GETEVT__NOTAGFILE 10
00149 #define GETEVT__NOTAG 11
00150 #define GETEVT__TAGRDERR 12
00151 #define GETEVT__TAGWRERR 13
00152 #define GETEVT__NOLMDFILE 14
00153
00154 #define PUTEVT__SUCCESS 0
00155 #define PUTEVT__FILE_EXIST 101
00156 #define PUTEVT__FAILURE 102
00157 #define PUTEVT__TOOBIG 103
00158 #define PUTEVT__TOO_SMALLS 104
00159 #define PUTEVT__CLOSE_ERR 105
00160 #define PUTEVT__WRERR 106
00161 #define PUTEVT__NOCHANNEL 107
00162
00163 #endif
00164