39 void WireGet (
const epicsUInt8 * pWireSrc, T & );
42 void WireSet (
const T &, epicsUInt8 * pWireDst );
45 void AlignedWireGet (
const T &, T & );
48 void AlignedWireSet (
const T &, T & );
83 AlignedWireGet ( _ref, tmp );
90 AlignedWireSet ( src, _ref );
104 AlignedWireGet ( _ref, tmp );
109 inline epicsUInt16 byteSwap (
const epicsUInt16 & src )
111 return static_cast < epicsUInt16 >
112 ( ( src << 8u ) | ( src >> 8u ) );
116 inline epicsUInt32 byteSwap (
const epicsUInt32 & src )
118 epicsUInt32 tmp0 = byteSwap (
119 static_cast < epicsUInt16 > ( src >> 16u ) );
120 epicsUInt32 tmp1 = byteSwap (
121 static_cast < epicsUInt16 > ( src ) );
122 return static_cast < epicsUInt32 >
123 ( ( tmp1 << 16u ) | tmp0 );
160 inline void WireGet (
const epicsUInt8 * pWireSrc, T & dst )
166 WireGet ( pWireSrc, tmp._u );
171 inline void WireGet < epicsUInt8 > (
172 const epicsUInt8 * pWireSrc, epicsUInt8 & dst )
178 inline void WireGet < epicsUInt16 > (
179 const epicsUInt8 * pWireSrc, epicsUInt16 & dst )
181 dst = static_cast < epicsUInt16 > (
182 ( pWireSrc[0] << 8u ) | pWireSrc[1] );
186 inline void WireGet < epicsUInt32 > (
187 const epicsUInt8 * pWireSrc, epicsUInt32 & dst )
189 dst = static_cast < epicsUInt32 > (
190 ( pWireSrc[0] << 24u ) |
191 ( pWireSrc[1] << 16u ) |
192 ( pWireSrc[2] << 8u ) |
197 inline void WireSet (
const T & src, epicsUInt8 * pWireDst )
204 WireSet ( tmp._u, pWireDst );
208 inline void WireSet < epicsUInt8 > (
209 const epicsUInt8 & src, epicsUInt8 * pWireDst )
215 inline void WireSet < epicsUInt16 > (
216 const epicsUInt16 & src, epicsUInt8 * pWireDst )
218 pWireDst[0] = static_cast < epicsUInt8 > ( src >> 8u );
219 pWireDst[1] = static_cast < epicsUInt8 > ( src );
223 inline void WireSet < epicsUInt32 > (
224 const epicsUInt32 & src, epicsUInt8 * pWireDst )
226 pWireDst[0] = static_cast < epicsUInt8 > ( src >> 24u );
227 pWireDst[1] = static_cast < epicsUInt8 > ( src >> 16u );
228 pWireDst[2] = static_cast < epicsUInt8 > ( src >> 8u );
229 pWireDst[3] = static_cast < epicsUInt8 > ( src );
233 inline void AlignedWireGet (
const T & src, T & dst )
240 AlignedWireGet ( srcu._u, dstu._u );
245 inline void AlignedWireSet (
const T & src, T & dst )
252 AlignedWireSet ( srcu._u, dstu._u );
256 #include "osdWireFormat.h"
258 #endif // osiWireFormat
The core data types used by epics.