/common/home/bel/bella/lnx/exports/build/current/all/cop-libs/vx/ixf_i.h

00001 #ifndef _IXF_I_H
00002 #define _IXF_I_H
00003 
00004 #include <stdarg.h>
00005 
00006 /*
00007  * internal types and function prototypes
00008  */
00009 #include "isintf.h"
00010 #include "rsintf.h"
00011 #include "ix_tools.h"
00012 #include "uv.h"
00013 #include "xfer.h"
00014 #include "xfreader.h"
00015 
00016 #ifdef IXF_INT
00017 #include "ssdef.h"
00018 #endif
00019 
00020 #define FV_ERROR 0x01
00021 #define FV_DEBUG 0x02
00022 #define FV_SYS 0x04
00023 #define FV_NET 0x08
00024 #define FV_UV 0x10
00025 #define FV_LOG 0x20
00026 #define FV_CAP 0x40
00027 #define FV_ALL 0xFFFFFFFF
00028 
00029 #define NET_NODE_ENV "NET_NODE"
00030 #define NET_IP_ENV "NET_IP"
00031 
00032 #define CONFIG_ENV "BELA_CONFIGDIR"
00033 
00034 #define IXF_MAX_PROC 256
00035 #define IXF_MAX_EXITHDL 32
00036 #define IXF_MAX_REFL 8
00037 
00038 // max number of netman packets to queue
00039 #define IXF_MAX_NETMANQUEUE 128
00040 
00041 #define IXF_NETMAN_PACKET_TAG 0xFF
00042 
00043 typedef struct
00044 {
00045   int done;
00046   ix_log_t *plog;
00047 
00048   int msgqueue;
00049 
00050   is_port_t procinf[IXF_MAX_PROC];
00051   rs_reg_t rs;
00052   int regdone;
00053   xf_refl_t * refl_list[IXF_MAX_REFL];
00054   UV_CHANGE_CB uv_user_cb;
00055 
00056   ix_net_t *pudp;
00057   ix_net_t *ptcp;
00058   int netman_evid;
00059   int netman_blocked;
00060   char *netman_packet_buffer;
00061   ix_queue_t *netman_queue;
00062   ix_cs_t *netman_cs;
00063 
00064   int cap_evid;
00065   int cap_rc;
00066   ix_cs_t *cap_cs;
00067 
00068   ix_qio_t *getch_qio;
00069 } ixf_t;
00070 
00071 
00072 typedef struct
00073 {
00074   void *fb;     // fortran data buffer
00075   int  evn;       // event number 
00076 } ixf_buf_t;
00077 
00078 
00079 // c_max_multipacket_data_len
00080 #define IXF_PROC_NAME_LEN 6
00081 #define IXF_C_MAX_MP_DATA_LEN 8700
00082 #define IXF_NET_LEN (8700 + 44 + 2)
00083 #define IXF_DATA_PC 0xF0
00084 #define IXF_ERROR_PC 0x70
00085 
00086 typedef struct 
00087 {
00088   union
00089   {
00090     struct
00091     {
00092       int io_status;
00093       int dev_status;
00094     };
00095     struct
00096     {
00097       short io_status_lo;
00098       short io_status_hi;
00099       int   dev_status;
00100     };
00101     struct
00102     {
00103       short ret_status;
00104       short term_offset; // location of line terminator
00105       short term_value;  // value of terminator
00106       short term_size;   // size of terminator
00107     };
00108   };
00109 } ixf_iosb_t;
00110 
00111 // net packet structure of fortran programs
00112 typedef struct
00113 {
00114   int16_t dest_node;                          // DestinationNode
00115   unsigned char dest_proc[IXF_PROC_NAME_LEN]; // DestinationProcess
00116   unsigned char dest_proc_ext[IXF_PROC_NAME_LEN]; // DProcess_Ext
00117   int16_t src_node;                           // SourceNode
00118   unsigned char src_proc[IXF_PROC_NAME_LEN];  // SourceProcess
00119   unsigned char src_proc_ext[IXF_PROC_NAME_LEN];  // SProcess_Ext
00120   int16_t packet_ident;                       // PacketIdent
00121   int16_t ret_status;                         // ReturnStatus
00122   int16_t msg_number;                         // MessageNumber
00123   int16_t byte_count;                         // ByteCount
00124   int16_t packet_code;                        // PacketCode
00125   int16_t ack_last;                           // Union of Acknowledge and 
00126                                               // LastMsgNr
00127   int16_t data_index;                         // Structure of data_index and
00128   int16_t data_len;                           // data_len
00129 } ixf_net_header_t;
00130 
00131 typedef struct
00132 {
00133   int16_t reserved;                            // filler for alignment
00134   int16_t typefield;                           // TypeField
00135   ixf_net_header_t h;                          // H
00136   unsigned char data[IXF_C_MAX_MP_DATA_LEN];   // CData
00137 } ixf_net_t;
00138 
00139 struct  descriptor_s
00140 {
00141         unsigned short  len;
00142         unsigned char   type;   
00143         unsigned char   clas;   
00144         char            *s;
00145 };
00146 
00147 
00148 #define DSC$K_DTYPE_T 14
00149 #define DSC$K_CLASS_S 1
00150 #define DESCRIPTOR(name,str,length) { name.len = length; \
00151   name.type = DSC$K_DTYPE_T; \
00152   name.clas = DSC$K_CLASS_S; \
00153   name.s = str; }
00154 
00155 #undef max
00156 #define max(x,y) ((x) > (y) ? (x) : (y))
00157 
00158 #undef min
00159 #define min(x,y) ((x) < (y) ? (x) : (y))
00160 
00161 /*
00162 int h_get_reginfo( int node, char *proc, rs_reg_t *preg );
00163 int h_get_reginfo_direct( int node, char *proc, rs_reg_t *pinfo );
00164 int h_mark_reginfo_invalid( int node, char *proc );
00165 */
00166 
00167 int ixf_sendme( char * buf,  int len );
00168 int ixf_uv_intern( char *name );
00169 int ixf_uv_cb ( char *adr, int type, UV_VALUE val, int cnt, void *userarg );
00170 int ixf_add_cb ( char *path, char *file );
00171 int ixf_rm_cb ( char *filepath );
00172 int ixf_init_log(void);
00173 
00174 /* netman.c */
00175 int save_netman_packet( ix_net_t *pnet );
00176 
00177 #endif
00178 
00179 

Generated on 4 Mar 2014 for ixf by  doxygen 1.4.7