00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef F_EVT
00018 #define F_EVT
00019
00020 #include "typedefs.h"
00021
00022
00023
00024 #if MBS_ENDIAN == 1
00025 #include "s_ve10_1.h"
00026 #include "s_ves10_1.h"
00027 #include "s_evhe.h"
00028 #include "s_bufhe.h"
00029 #else
00030 #include "s_ve10_1_swap.h"
00031 #include "s_ves10_1_swap.h"
00032 #include "s_evhe_swap.h"
00033 #include "s_bufhe_swap.h"
00034 #endif
00035
00036 #include "fLmd.h"
00037
00038 #define MAX_BUF_LGTH 32768
00039 #define MIN_BUF_LGTH 512
00040 #define MAX_BUFS_IN_STREAM 100
00041 #define MAX_LONG 99999999
00042
00043 typedef struct
00044 {
00045 INTS4 l_endian;
00046 INTS4 l_version;
00047 INTS4 l_bufsize;
00048 INTS4 l_buffers;
00049 INTS4 l_events;
00050 INTS4 l_filesize;
00051 INTS4 l_first;
00052 INTS4 l_last;
00053 INTS4 l_linear;
00054 } s_taghe;
00055
00056 typedef struct
00057 {
00058 INTS4 l_event;
00059 INTS4 l_offset;
00060 } s_tag;
00061
00062 typedef struct
00063 {
00064 INTS4 l_server_type;
00065 INTS4 l_buf_type;
00066 INTS4 l_buf_subtype;
00067 INTS4 l_channel_no;
00068 INTS4 l_buf_size;
00069 INTS4 l_buf_no;
00070 INTS4 l_buf_posi;
00071 INTS4 l_buf_lmt;
00072 INTS4 l_bufs_in_stream;
00073 INTS4 l_stream_bufs;
00074 INTS4 l_io_buf_size;
00075 INTS4 l_io_buf_posi;
00076 INTS4 l_evt_buf_size;
00077 INTS4 l_evt_buf_posi;
00078 INTS4 l_evt_size;
00079 INTS4 l_timeout;
00080 INTS4 l_events;
00081 INTS4 l_buffers;
00082 INTS4 l_kbytes;
00083 INTS4 l_first_get;
00084 INTS4 l_first_put;
00085 INTS4 l_first_buf;
00086 INTS4 l_frag_len;
00087 CHARS *pc_io_buf;
00088 CHARS *pc_evt_buf;
00089 s_bufhe *ps_bufhe;
00090 s_bufhe s_bufhe_1;
00091 s_ve10_1 *ps_ve10_1;
00092 CHARS c_channel[128];
00093 INTS4 l_tagfile_no;
00094 INTS4 l_tagswap;
00095 INTS4 l_lmdswap;
00096 s_taghe *ps_taghe;
00097 s_tag *ps_tag;
00098 sLmdControl *pLmd;
00099 } s_evt_channel;
00100
00101 INTS4 f_evt_cre_tagfile(CHARS *,CHARS *, INTS4 (*)());
00102 INTS4 f_evt_get_tagopen(s_evt_channel *,CHARS *,CHARS *,CHARS **,INTS4);
00103 INTS4 f_evt_get_tagevent(s_evt_channel *,INTS4,INTS4,INTS4 **);
00104 INTS4 f_evt_get_tagnext(s_evt_channel *,INTS4,INTS4 **);
00105 INTS4 f_evt_get_tagclose(s_evt_channel *);
00106 INTS4 f_evt_get_open(INTS4, CHARS *, s_evt_channel *, CHARS **, INTS4, INTS4);
00107 INTS4 f_evt_get_event(s_evt_channel *, INTS4 **, INTS4 **);
00108 INTS4 f_evt_get_subevent(s_ve10_1 *,INTS4,INTS4 **,INTS4 **,INTS4 *);
00109 INTS4 f_evt_get_buffer(s_evt_channel *, INTS4 *);
00110 INTS4 f_evt_get_close(s_evt_channel *);
00111 CHARS * f_evt_get_buffer_ptr(s_evt_channel *);
00112 INTS4 f_evt_skip_buffer(s_evt_channel *, INTS4);
00113 INTS4 f_evt_put_open(CHARS *,INTS4,INTS4,INTS4,INTS4,s_evt_channel *,CHARS *);
00114 INTS4 f_evt_put_event(s_evt_channel *, INTS4 *);
00115 INTS4 f_evt_put_buffer(s_evt_channel *, s_bufhe *);
00116 INTS4 f_evt_put_close(s_evt_channel *);
00117 INTS4 f_evt_type(s_bufhe *,s_evhe *,INTS4,INTS4,INTS4,INTS4);
00118 INTS4 f_evt_error( INTS4 , CHARS * , INTS4 );
00119 INTS4 f_evt_timeout(s_evt_channel *, INTS4 );
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
00165
00166