00001 /************************************************************************************ 00002 * msgBuff.h 00003 * 00004 * synopsis: Contains prototypes of routines which are in msgBuff.c. Contains the 00005 * structure tags which describe the primitive list buffer. 00006 * 00007 * related files: 00008 * listManager.c: Routines which manage the execution of a primitive list and 00009 * writing the reply data. 00010 * msgBuff.c: Contains some routines involved in reading a primitive list. 00011 * 00012 * Damon Fasching, UW Madison/LBNL fasching@wisconsin.cern.ch 00013 * Douglas Ferguson, UW Madison/LBNL (510) 486-5230 dpferguson@lbl.gov 00014 ************************************************************************************/ 00015 #ifndef MSG_BUFF 00016 #define MSG_BUFF 00017 00018 #include "processor.h" 00019 00020 /* Orig definitions: */ 00021 struct MSG_LIST_HEAD { /* header for message (primitive and reply) lists */ 00022 UINT32 length; /* total number of words in the list */ 00023 UINT32 index; /* list index */ 00024 UINT32 numMsgs; /* number of primitives */ 00025 UINT32 primListRevision; /* revision number of available primitives */ 00026 }; 00027 struct MSG_LIST_TAIL { /* trailer for message (primitive and reply) lists */ 00028 UINT32 length; /* should = length in the header, a check */ 00029 UINT32 checksum; /* checksum */ 00030 }; 00031 struct MSG_LIST { 00032 UINT32 *base; /* base address of the buffer */ 00033 UINT32 buffSize; /* size of the buffer in words */ 00034 UINT32 *rwPtr; /* current address */ 00035 UINT32 msgCounter; /* primitive or reply message counter */ 00036 UINT32 checksumWC; /* number of words to use in checksum calculation */ 00037 UINT32 checksum; /* locally calculated value of checksum */ 00038 struct MSG_LIST_HEAD head; /* holds list header */ 00039 struct MSG_LIST_TAIL tail; /* holds list trailer */ 00040 }; 00041 struct MSG_HEAD { 00042 UINT32 length; 00043 UINT32 index; 00044 UINT32 id; 00045 UINT32 primRevision; 00046 }; 00047 00048 00049 #endif