28 #ifndef _RTXBITDECODE_H_ 29 #define _RTXBITDECODE_H_ 37 #define DEC_BIT(pctxt,pvalue) \ 38 (((pctxt)->buffer.byteIndex >= (pctxt)->buffer.size) ? \ 39 rtxDecBit (pctxt, pvalue) \ 41 (*(pvalue) = (pctxt)->buffer.data[(pctxt)->buffer.byteIndex], \ 42 --(pctxt)->buffer.bitOffset == 0 ? \ 43 ((pctxt)->buffer.bitOffset = 8, (pctxt)->buffer.byteIndex++) \ 45 (*(pvalue) >>= (pctxt)->buffer.bitOffset), \ 49 EXTERNRT
int rtxMoveBitCursor (
OSCTXT* pctxt,
int bitOffset);
112 (
OSCTXT* pctxt, OSUINT8* pvalue, OSUINT8 nbits);
130 (
OSCTXT* pctxt, OSUINT16* pvalue, OSUINT8 nbits);
145 (
OSCTXT* pctxt, OSOCTET* pbuffer, OSSIZE bufsiz, OSSIZE nbits);
EXTERNRT int rtxDecBitsToSize(OSCTXT *pctxt, OSSIZE *pvalue, OSSIZE nbits)
This function decodes up to sizeof(size_t) bits and returns the result in a size-typed value...
EXTERNRT int rtxDecBitsToByte(OSCTXT *pctxt, OSUINT8 *pvalue, OSUINT8 nbits)
This function decodes bits and returns the result in a byte (octet) value.
Common run-time context definitions.
EXTERNRT int rtxSkipBits(OSCTXT *pctxt, OSSIZE nbits)
This function skips the given number of bits.
EXTERNRT int rtxDecBitsToByteArray(OSCTXT *pctxt, OSOCTET *pbuffer, OSSIZE bufsiz, OSSIZE nbits)
This function decodes bits and returns the result in an octet array.
EXTERNRT int rtxPeekBit(OSCTXT *pctxt, OSBOOL *pvalue)
This function decodes the bit at the current position and the resets the bit cursor back to the origi...
EXTERNRT int rtxDecBit(OSCTXT *pctxt, OSBOOL *pvalue)
This function will decode a single bit and return the result in an OSBOOL value.
EXTERNRT int rtxDecBitsToUInt16(OSCTXT *pctxt, OSUINT16 *pvalue, OSUINT8 nbits)
This function decodes bits and returns the result in an unsigned 16-bit (short) value.
EXTERNRT int rtxDecBits(OSCTXT *pctxt, OSUINT32 *pvalue, OSSIZE nbits)
This function decodes up to sizeof(unsigned) bits and returns the result in an unsigned integer value...
Run-time context structure.