rtxBitDecode.h File Reference

Bit decode functions. More...

#include "rtxsrc/rtxContext.h"

Go to the source code of this file.


Defines

#define DEC_BIT(pctxt, pvalue)

Functions

EXTERNRT int rtxDecBit (OSCTXT *pctxt, OSBOOL *pvalue)
 This function will decode a single bit and return the result in an OSBOOL value.
EXTERNRT int rtxDecBits (OSCTXT *pctxt, OSUINT32 *pvalue, OSUINT32 nbits)
 This function decodes up to sizeof(unsigned) bits and returns the result in an unsigned integer value.
EXTERNRT int rtxDecBitsToByteArray (OSCTXT *pctxt, OSOCTET *pbuffer, OSUINT32 bufsiz, OSUINT32 nbits)
 This function decodes bits and returns the result in an octet array.

Detailed Description

Bit decode functions.

Definition in file rtxBitDecode.h.


Function Documentation

EXTERNRT int rtxDecBit ( OSCTXT pctxt,
OSBOOL *  pvalue 
)

This function will decode a single bit and return the result in an OSBOOL value.

Parameters:
pctxt A pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalue A pointer to the BOOLEAN value to receive the decoded result.
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.

EXTERNRT int rtxDecBits ( OSCTXT pctxt,
OSUINT32 *  pvalue,
OSUINT32  nbits 
)

This function decodes up to sizeof(unsigned) bits and returns the result in an unsigned integer value.

Parameters:
pctxt Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalue Pointer to value to be receive decoded result.
nbits Number of bits to read from decode buffer.
Returns:
Status of the operation. Zero if successful; a negative status code if failed.

EXTERNRT int rtxDecBitsToByteArray ( OSCTXT pctxt,
OSOCTET *  pbuffer,
OSUINT32  bufsiz,
OSUINT32  nbits 
)

This function decodes bits and returns the result in an octet array.

Parameters:
pctxt Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pbuffer Address of buffer to receive decoded binary data.
bufsiz Size of output buffer.
nbits Number of bits to read from decode buffer.
Returns:
Status of the operation. Zero if successful; a negative status code if failed.