rtxBitString.h File Reference

  • Contains utility functions for setting, clearing, and testing bits at any position in an arbitrarily sized array of bytes.
More...

#include "rtxsrc/rtxContext.h"

Go to the source code of this file.

Defines

#define OSRTBYTEARRAYSIZE(numbits)   ((numbits+7)/8)
 This macro is used to calculate the byte array size required to hold the given number of bits.

Functions

EXTERNRT OSUINT32 rtxGetBitCount (OSUINT32 value)
 This function returns the minimum size of the bit field required to hold the given integer value.
EXTERNRT int rtxSetBit (OSOCTET *pBits, OSSIZE numbits, OSSIZE bitIndex)
 This function sets the specified zero-counted bit in the bit string.
EXTERNRT OSUINT32 rtxSetBitFlags (OSUINT32 flags, OSUINT32 mask, OSBOOL action)
 This function sets one or more bits to TRUE or FALSE in a 32-bit unsigned bit flag set.
EXTERNRT int rtxClearBit (OSOCTET *pBits, OSSIZE numbits, OSSIZE bitIndex)
 This function clears the specified zero-counted bit in the bit string.
EXTERNRT OSBOOL rtxTestBit (const OSOCTET *pBits, OSSIZE numbits, OSSIZE bitIndex)
 This function tests the specified zero-counted bit in the bit string.
EXTERNRT OSSIZE rtxLastBitSet (const OSOCTET *pBits, OSSIZE numbits)
 This function returns the zero-counted index of the last bit set in a bit string.
EXTERNRT int rtxCheckBitBounds (OSCTXT *pctxt, OSOCTET **ppBits, OSSIZE *pNumocts, OSSIZE minRequiredBits, OSSIZE preferredLimitBits)
 Check whether the given bit string is large enough, and expand it if necessary.

Detailed Description

  • Contains utility functions for setting, clearing, and testing bits at any position in an arbitrarily sized array of bytes.

Definition in file rtxBitString.h.