rtxBitEncode.h File Reference
Bit encode functions. More...
#include "rtxsrc/rtxContext.h"
Go to the source code of this file.
Functions | |
EXTERNRT int | rtxEncBit (OSCTXT *pctxt, OSBOOL value) |
This function will set the bit at the current encode bit cursor position to 1 or 0 and advance the cursor pointer. | |
EXTERNRT int | rtxEncBits (OSCTXT *pctxt, OSUINT32 value, size_t nbits) |
This function will encode a series of bits (up to 32) from an unsigned integer value. | |
EXTERNRT int | rtxEncBitsFromByteArray (OSCTXT *pctxt, const OSOCTET *pvalue, size_t nbits) |
This function will encode a series of bits from an octet array. | |
EXTERNRT int | rtxCopyBits (OSCTXT *pctxt, const OSOCTET *pvalue, size_t nbits, OSUINT32 bitOffset) |
This function will encode a series of bits from an octet array. |
Detailed Description
Bit encode functions.
Definition in file rtxBitEncode.h.
Function Documentation
EXTERNRT int rtxCopyBits | ( | OSCTXT * | pctxt, | |
const OSOCTET * | pvalue, | |||
size_t | nbits, | |||
OSUINT32 | bitOffset | |||
) |
This function will encode a series of bits from an octet array.
Encoding started from specified bit offset.
- 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 bit string to be encoded. nbits Number of bits from the value to encode. bitOffset Starting bit offset.
- Returns:
- Status of the operation. Zero if successful; a negative status code if failed.
EXTERNRT int rtxEncBit | ( | OSCTXT * | pctxt, | |
OSBOOL | value | |||
) |
This function will set the bit at the current encode bit cursor position to 1 or 0 and advance the cursor pointer.
- 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. value The value to be encoded.
EXTERNRT int rtxEncBits | ( | OSCTXT * | pctxt, | |
OSUINT32 | value, | |||
size_t | nbits | |||
) |
This function will encode a series of bits (up to 32) from 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. value The value to be encoded. nbits Number of bits from the value to encode.
- Returns:
- Status of the operation. Zero if successful; a negative status code if failed.
EXTERNRT int rtxEncBitsFromByteArray | ( | OSCTXT * | pctxt, | |
const OSOCTET * | pvalue, | |||
size_t | nbits | |||
) |
This function will encode a series of bits from 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. pvalue Pointer to bit string to be encoded. nbits Number of bits from the value to encode.
- Returns:
- Status of the operation. Zero if successful; a negative status code if failed.