Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 /* 
0002 ** formatError.h
0003 ** 
0004 ** Author: $Author: purschke $  
0005 **   Date: $Date: 2000/07/21 01:51:13 $ 
0006 ** 
0007 ** $Log: formatError.h,v $
0008 ** Revision 1.1.1.1  2000/07/21 01:51:13  purschke
0009 ** mlp -- adding the new automakified "basic" module to CVS.
0010 **
0011 **
0012 ** Revision 1.5  1998/12/17 21:57:06  phoncs
0013 ** (stephen markacs) better bounds checking in version gets
0014 **
0015 ** Revision 1.4  1998/12/11 22:01:18  markacs
0016 ** (stephen markacs) adding log into cvs tags
0017 ** 
0018 */
0019 /*
0020 **  formatError.h
0021 **
0022 **   Definitions of various error-handling macros, prototypes, variables etc
0023 */
0024 
0025 #ifndef _FORMATERROR_
0026 #define _FORMATERROR_
0027 
0028 #include "phenixOnline.h"
0029 
0030 /*
0031 **  Use C linkage for error routines
0032 */
0033 #ifdef __cplusplus
0034 extern "C" {
0035 #endif
0036 
0037 typedef UINT ERRORVALUE;
0038 
0039 #define FORMAT_ERROR_SUBTYPE_FRAME 1
0040 #define FORMAT_ERROR_SUBTYPE_PACKET 2
0041 #define FORMAT_ERROR_SUBTYPE_USER 3
0042 
0043 CONSTANT UINT errorTypeFrame = FORMAT_ERROR_SUBTYPE_FRAME;
0044 CONSTANT UINT errorTypePacket = FORMAT_ERROR_SUBTYPE_PACKET;
0045 CONSTANT UINT errorTypeUser = FORMAT_ERROR_SUBTYPE_USER;
0046 
0047 /*
0048 **  Some function prototypes
0049 */
0050 void setFrameError(ERRORVALUE, PHDWORD*, PHDWORD);
0051 
0052 void setPacketError(ERRORVALUE, PHDWORD*, PHDWORD);
0053 
0054 void setUserError(ERRORVALUE, PHDWORD);
0055 
0056 void setFrameSuccess ();
0057 
0058 void setPacketSuccess ();
0059 
0060 ERRORVALUE formatGetError (UINT*, PHDWORD**, PHDWORD*);
0061 
0062 ERRORVALUE formatGetErrorNumber ( );
0063 
0064 PHDWORD* formatGetErrorPointer ( );
0065 
0066 PHDWORD formatGetErrorAdditionalData ( );
0067 
0068 /*
0069 **  Error code definitions
0070 */
0071 enum formatErrorCodes {
0072   FORAMT_ERR_SUCCESS = 0,
0073   FORMAT_ERR_INVALID_HEADER,
0074   FORMAT_ERR_INVALID_HDRVERSION,
0075   FORMAT_ERR_INVALID_PACKET_HDRVERSION,
0076   FORMAT_ERR_INVALID_DATA,
0077   FORMAT_ERR_HISTORY_OVERFLOW,
0078   FORMAT_ERR_ERROR_OVERFLOW,
0079   FORMAT_ERR_BUFFER_OVERFLOW,
0080   FORMAT_ERR_INVALID_MODIFY,
0081   FORMAT_ERR_INVALID_FRAMEMARK,
0082   FORMAT_ERR_LENGTH_OVERFLOW,
0083   FORMAT_ERR_INVALID_HDRLENGTH,
0084   FORMAT_ERR_INVALID_APPEND,
0085   FORMAT_ERR_WRONG_STRUCTURE,
0086   FORMAT_ERR_HDR_INCONSISTENCY,
0087   FORMAT_ERR_DATA_INCONSISTENCY,
0088   FORMAT_ERR_NONEMPTY_PACKET
0089 };
0090 
0091 /*
0092 **  Use C linkage for below structures
0093 */
0094 #ifdef __cplusplus
0095 }
0096 #endif
0097 
0098 #endif
0099 
0100 
0101 
0102 
0103