Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 /* 
0002 ** frameHdrV1.h
0003 ** 
0004 ** Author: $Author: purschke $  
0005 **   Date: $Date: 2000/07/21 01:51:13 $ 
0006 ** 
0007 ** $Log: frameHdrV1.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.3  1998/12/11 22:01:33  markacs
0013 ** (stephen markacs) adding log into cvs tags
0014 ** 
0015 */
0016 /*
0017 **  Version 1 frame header definitions
0018 **
0019 */
0020 
0021 #ifndef _FRAMEHDRV1_
0022 #define _FRAMEHDRV1_
0023 
0024 #include "phenixOnline.h"
0025 #include "frameV1Public.h"
0026 
0027 /*
0028 **  Use C linkage for below structures
0029 */
0030 #ifdef __cplusplus
0031 extern "C" {
0032 #endif
0033 
0034 
0035 #define STATUS_OFFSET_OF_DWORD 2
0036 #define STATUS_OFFSET_IN_DWORD 0
0037 #define STATUS_NUM_BITS 16
0038 #define STATUS_MASK 0x0000ffff
0039 
0040 #define SEQUENCE_NUMBER_OFFSET_OF_DWORD 3
0041 #define SEQUENCE_NUMBER_OFFSET_IN_DWORD 24
0042 #define SEQUENCE_NUMBER_NUM_BITS 8
0043 #define SEQUENCE_NUMBER_MASK 0xff000000
0044 
0045 #define SEQUENCE_CODE_OFFSET_OF_DWORD 3
0046 #define SEQUENCE_CODE_OFFSET_IN_DWORD 16
0047 #define SEQUENCE_CODE_NUM_BITS 8
0048 #define SEQUENCE_CODE_MASK 0x00ff0000
0049 
0050 #define SOURCE_ID_OFFSET_OF_DWORD 3
0051 #define SOURCE_ID_OFFSET_IN_DWORD 0 
0052 #define SOURCE_ID_NUM_BITS 16
0053 #define SOURCE_ID_MASK 0x0000ffff
0054 
0055 #define DATA_TYPE_OFFSET_OF_DWORD 4
0056 #define DATA_TYPE_OFFSET_IN_DWORD 24
0057 #define DATA_TYPE_NUM_BITS 8
0058 #define DATA_TYPE_MASK 0xff000000
0059 
0060 #define FRAME_TYPE_OFFSET_OF_DWORD 4
0061 #define FRAME_TYPE_OFFSET_IN_DWORD 16 
0062 #define FRAME_TYPE_NUM_BITS 8
0063 #define FRAME_TYPE_MASK 0x00ff0000
0064 
0065 #define ERROR_LENGTH_OFFSET_OF_DWORD 4
0066 #define ERROR_LENGTH_OFFSET_IN_DWORD 0
0067 #define ERROR_LENGTH_NUM_BITS 16
0068 #define ERROR_LENGTH_MASK 0x0000ffff
0069 
0070 #define HISTORY_LENGTH_OFFSET_OF_DWORD 5
0071 #define HISTORY_LENGTH_OFFSET_IN_DWORD 16
0072 #define HISTORY_LENGTH_NUM_BITS 16
0073 #define HISTORY_LENGTH_MASK 0xffff0000
0074 
0075 #define ALIGN_LENGTH_OFFSET_OF_DWORD 5
0076 #define ALIGN_LENGTH_OFFSET_IN_DWORD 8
0077 #define ALIGN_LENGTH_NUM_BITS 8
0078 #define ALIGN_LENGTH_MASK 0x0000ff00
0079 
0080 #define PADDING_OFFSET_OF_DWORD 5
0081 #define PADDING_OFFSET_IN_DWORD 0
0082 #define PADDING_NUM_BITS 8
0083 #define PADDING_MASK 0x000000ff
0084 
0085 #define ALIGN_OFFSET_OF_DWORD 6
0086 
0087 /*
0088 **  Parameters specific to V1 frames
0089 */
0090 #define V1_FRAMEHDR_VERSION 1
0091 #define V1_FRAMEHDR_LENGTH  8
0092 #define V1_FRAMEMARK 0xFFFFFF00
0093 #define V1_ALIGN_LENGTH 2
0094 #define V1_FRAME_QUANTUM 2
0095 
0096 /*
0097 ** Some constants for V1 frame definition
0098 */
0099 
0100 CONSTANT UINT v1FrameHdrVersion = V1_FRAMEHDR_VERSION;
0101 CONSTANT PHDWORD v1FrameHdrLength = V1_FRAMEHDR_LENGTH;
0102 CONSTANT PHDWORD v1FrameMark = V1_FRAMEMARK;
0103 CONSTANT UINT v1AlignLength = V1_ALIGN_LENGTH;
0104 CONSTANT UINT v1FrameQuantum = V1_FRAME_QUANTUM;
0105 
0106 #ifdef __cplusplus
0107 } 
0108 /* end of extern "C"  */
0109 #endif
0110 
0111 #endif 
0112 /* end of ifndef _FRAMEHDRV1_ */
0113 
0114 
0115 
0116 
0117 
0118 
0119 
0120