Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:44

0001 /* 
0002 ** errorBlock.h
0003 ** 
0004 ** Author: $Author: purschke $  
0005 **   Date: $Date: 2000/07/21 01:51:12 $ 
0006 ** 
0007 ** $Log: errorBlock.h,v $
0008 ** Revision 1.1.1.1  2000/07/21 01:51:12  purschke
0009 ** mlp -- adding the new automakified "basic" module to CVS.
0010 **
0011 **
0012 ** Revision 1.3  1998/12/11 22:01:17  markacs
0013 ** (stephen markacs) adding log into cvs tags
0014 ** 
0015 */
0016 /*
0017 **  formatError.h
0018 **
0019 **      Definitions of various error-handling macros, prototypes, variables etc
0020 */
0021 
0022 #ifndef _ERRORBLOCK_
0023 #define _ERRORBLOCK_
0024 
0025 #include "phenixOnline.h"
0026 
0027 /*
0028 **  Use C linkage
0029 */
0030 #ifdef __cplusplus
0031 extern "C" {
0032 #endif
0033 
0034 
0035   struct errorEntryV1 {
0036     BYTE    severity;
0037     BYTE    deviceType;
0038     SWORD   deviceId;
0039     
0040     SWORD   errorCode;
0041     SWORD   detectCode;
0042     
0043     PHDWORD addData[2];
0044   };
0045   
0046   typedef struct errorEntryV1 ERRORENTRYV1, *ERRORENTRYV1_ptr;
0047   
0048 #define ERROR_ENTRY_V1_LENGTH sizeof(ERRORENTRYV1)/4
0049   CONSTANT UINT errorEntryV1Length = ERROR_ENTRY_V1_LENGTH;
0050   
0051   enum daqErrorCodes {
0052     InvalidFrameHeader = 1,
0053     InvalidSourceId = 2,
0054     InvalidFrameType = 3
0055   };
0056   
0057   VALUE_ret calcNumErrorsV1 (UINT);
0058   void endianSwapErrorV1 (ERRORENTRYV1_ptr, ERRORENTRYV1_ptr);
0059   
0060 #ifdef __cplusplus
0061 }
0062 #endif
0063 
0064 #endif