7 #ifndef _phenixOnlineIncludeProtection_
8 #define _phenixOnlineIncludeProtection_
18 #define CONSTANT const
20 #define CONSTANT static
24 #define INLINE_P inline
25 #define INLINE_D inline
27 #define INLINE_P inline
28 #define INLINE_D inline
35 #if !defined(DCM) && !defined(VXWORKS)
42 #define DWORD_SIZE sizeof(PHDWORD)
43 #define SWORD_SIZE sizeof(SWORD)
48 #define PRDF_BIG_ENDIAN 2
49 #define PRDF_LITTLE_ENDIAN 1
55 #define PRDF_LOCAL_ENDIANISM PRDF_LITTLE_ENDIAN
92 #define dwordCopy(out_ptr, in_ptr, numDwords) \
93 memcpy (out_ptr, in_ptr, 4*(numDwords))
95 #define dwordClear(out_ptr, numDwords) \
96 memset (out_ptr, 0, 4*(numDwords))
98 #define byteClear(out_ptr, numBytes) \
99 memset (out_ptr, 0, numBytes)
101 #define byteCopy(out_ptr, in_ptr, numBytes) \
102 memcpy (out_ptr, in_ptr, numBytes)
120 outDword = (inDword & 0xFF) << 24;
121 outDword |= (inDword >> 8 & 0xFF) << 16;
122 outDword |= (inDword >> 16 & 0xFF) << 8;
123 outDword |= (inDword >> 24 & 0xFF);
143 #define getWordMACRO(packet_ptr,offsetOfDWORD) (*((packet_ptr)+(offsetOfDWORD)))
145 #define getBitsMACRO(packet_ptr,offsetOfDWORD,offsetInDWORD,mask) \
146 (((*((packet_ptr)+(offsetOfDWORD)))&(mask))>>offsetInDWORD)
149 #define setWordMACRO(packet_ptr,offsetOfDword,value) \
150 (*(packet_ptr+offsetOfDword))=value
153 #define setBitsMACRO(packet_ptr,offsetOfDword,offsetInDword,mask,value) \
154 (*(packet_ptr+offsetOfDword))&=(~mask); \
155 (*(packet_ptr+offsetOfDword))|=(value<<offsetInDword)