00001 // -*- C++ -*- 00002 00003 #ifndef _included_DAGHIOParam_h 00004 #define _included_DAGHIOParam_h 00005 00011 /* DAGH IO Msg Types */ 00012 00013 #define DAGHIOTypeShift (8) 00014 #define DAGHIOInitReqTag (1 << DAGHIOTypeShift) 00015 #define DAGHIOEndReqTag (2 << DAGHIOTypeShift) 00016 #define DAGHIOCloseReqTag (4 << DAGHIOTypeShift) 00017 #define DAGHIOCloseTag (5 << DAGHIOTypeShift) 00018 #define DAGHIOWriteReqTag (6 << DAGHIOTypeShift) 00019 #define DAGHIOWriteDataTag (7 << DAGHIOTypeShift) 00020 #define DAGHIOReadReqTag (8 << DAGHIOTypeShift) 00021 #define DAGHIOReadDataTag (9 << DAGHIOTypeShift) 00022 #define DAGHIOFlushReqTag (10 << DAGHIOTypeShift) 00023 00024 /* Moved these to DAGHParams.h so that they 00025 can be used by DAGHSteer classes - 10/28/97 */ 00026 /* DAGH IO Data Types */ 00027 00028 //#define DAGH_Integer (1) 00029 //#define DAGH_Real (2) 00030 //#define DAGH_Double (3) 00031 //#define DAGH_Character (4) 00032 //#define DAGH_Byte (5) 00033 00034 inline static unsigned DAGHIO_DataSize(int const type) 00035 { return ( (type == DAGH_Integer) ? sizeof(INTEGER) : 00036 (type == DAGH_Real) ? sizeof(REAL) : 00037 (type == DAGH_Double) ? sizeof(DOUBLE) : 00038 (type == DAGH_Character) ? sizeof(CHARACTER) : 00039 (type == DAGH_Byte) ? 1 : 1 ); } 00040 00041 /* DAGH IO Functions */ 00042 struct gdhdr; 00043 class GridHierarchy; 00044 00045 typedef void (*DAGHIO_WriteFunc) (class GridHierarchy & , struct gdhdr *, void *); 00046 typedef void (*DAGHIO_ReadFunc) (class GridHierarchy & , struct gdhdr *, void *); 00047 typedef void (*DAGHIO_PingFunc) (class GridHierarchy &); 00048 00049 extern DAGHIO_WriteFunc *DAGHIO_Write; 00050 extern DAGHIO_ReadFunc *DAGHIO_Read; 00051 extern DAGHIO_PingFunc *DAGHIO_Flush; 00052 extern DAGHIO_PingFunc *DAGHIO_Close; 00053 00054 #endif