![]() |
MAK RTIspy API Documentation for HLA Evolved
|
DtBitMask represents a variable length bit-field which may be used to represent an array of boolean data. More...
Collaboration diagram for DtBitMask:Public Member Functions | |
| DtBitMask (unsigned int length) | |
| Default Constructor. | |
| DtBitMask (const char *bitMask, unsigned int length) | |
| Constructor from net format ( length is the un-padded field length in bits ) | |
| DtBitMask (const DtBitMask &orig) | |
| Copy Constructor. | |
| virtual | ~DtBitMask () |
| Destructor. | |
| virtual const DtBitMask & | operator= (const DtBitMask &orig) |
| Assignment Operator. | |
| virtual const DtBitMask & | operator&= (const DtBitMask &orig) |
| Bitwise AND Assignment Operator (may resize mask if too small) | |
| virtual const DtBitMask & | operator|= (const DtBitMask &orig) |
| Bitwise OR Assignment Operator (may resize mask if too small) | |
| virtual unsigned int | length () const |
| Get number of data bits in field ( does not include padding ) | |
| virtual bool | isEmpty () const |
| Is this bitMask == 0? | |
| virtual unsigned int | numSet () const |
| Get the number of set bits. | |
| virtual void | reset (bool value=false) |
| Reset bit mask to empty ( all false ) | |
| virtual void | setBit (unsigned int bitPosition, bool isOn=true) |
| Set / Unset bit in bit field. | |
| virtual bool | getBit (unsigned int bitPosition) const |
| Get bit from bit field. | |
| virtual unsigned int | netSize () const |
| Get number of bytes used to represent padded bit field. | |
| virtual void | encode (char *buffer) const |
| Copy the bit mask into the provided buffer ( padded bit field ) in an endian safe way ( assumes buffer has at least netSize() bytes ) | |
| virtual void | decode (const char *buffer, unsigned int numBytes) |
| Decode the buffer into this bit mask. | |
| virtual void | print (bool listHandles=false) const |
| Print a hexadecimal string representation of the mask words If enabled, handle values (high bit positions) are listed. | |
Static Public Member Functions | |
| static unsigned int | lengthToWords (unsigned int length) |
| Convert length in bits to length in 32-bit words. | |
| static unsigned int | lengthToChars (unsigned int length) |
| Convert length in bits to length in chars. | |
Protected Attributes | |
| MAKRti::DtU32 * | myBitField |
| Data Members. | |
| unsigned int | myLength |
| The number of bits represented. | |
DtBitMask represents a variable length bit-field which may be used to represent an array of boolean data.
The bit-field is 32-bit aligned for network representation.
| DtBitMask::DtBitMask | ( | unsigned int | length | ) |
Default Constructor.
References lengthToWords(), myBitField, myLength, and reset().
| DtBitMask::DtBitMask | ( | const char * | bitMask, |
| unsigned int | length | ||
| ) |
Constructor from net format ( length is the un-padded field length in bits )
References lengthToWords(), myBitField, and myLength.
| DtBitMask::DtBitMask | ( | const DtBitMask & | orig | ) |
Copy Constructor.
References lengthToWords(), myBitField, and myLength.
|
virtual |
Destructor.
References myBitField.
|
virtual |
Decode the buffer into this bit mask.
References lengthToWords(), myBitField, myLength, and reset().
Referenced by DtRtiMtdDestinationList::get().
|
virtual |
Copy the bit mask into the provided buffer ( padded bit field ) in an endian safe way ( assumes buffer has at least netSize() bytes )
References lengthToWords(), myBitField, and myLength.
Referenced by DtRtiMtdDestinationList::set().
|
virtual |
Get bit from bit field.
References myBitField, and myLength.
Referenced by DtSmartForwardingProcessor::lostConnection().
|
virtual |
Is this bitMask == 0?
References lengthToWords(), myBitField, and myLength.
Referenced by DtUpdateInterRoutingFilter::doFilter(), DtInternalRoutingFilter::doFilter(), and DtSmartForwardingProcessor::filterUpdateInterDestinations().
|
inlinevirtual |
Get number of data bits in field ( does not include padding )
References myLength.
Referenced by DtSmartForwardingProcessor::lostConnection(), operator&=(), operator=(), and operator|=().
|
static |
Convert length in bits to length in chars.
Referenced by netSize(), and DtRtiMtdDestinationList::set().
|
static |
Convert length in bits to length in 32-bit words.
Referenced by decode(), DtBitMask(), encode(), isEmpty(), numSet(), operator&=(), operator=(), operator|=(), print(), and reset().
|
virtual |
Get number of bytes used to represent padded bit field.
References lengthToChars(), and myLength.
|
virtual |
Get the number of set bits.
References lengthToWords(), myBitField, and myLength.
Bitwise AND Assignment Operator (may resize mask if too small)
References length(), lengthToWords(), myBitField, and myLength.
Assignment Operator.
References length(), lengthToWords(), myBitField, and myLength.
Bitwise OR Assignment Operator (may resize mask if too small)
References length(), lengthToWords(), myBitField, and myLength.
|
virtual |
Print a hexadecimal string representation of the mask words If enabled, handle values (high bit positions) are listed.
References lengthToWords(), myBitField, and myLength.
Referenced by DtRoutePrinterFilter::doFilter(), DtInternalRoutePrinterFilter::doFilter(), DtRtiMsg::printHeader(), and setBit().
|
virtual |
Reset bit mask to empty ( all false )
References lengthToWords(), myBitField, and myLength.
Referenced by DtInteractionMgr::addPendingSubscription(), decode(), DtRtiObject::divestRemoteSubscriptions(), DtBitMask(), DtRtiObject::DtRtiObject(), DtRtiObject::getDestinations(), DtObjectMgr::insertDiscBitMask(), DtObjectMgr::insertNonDiscBitMask(), DtObjectMgr::insertRegBitMask(), DtObjectMgr::insertSubBitMask(), DtInteractionClassInfo::publish(), DtObjectClassInfo::publish(), DtInteractionClassInfo::restore(), DtConnectionMgr::sendDirectedAndDelete(), DtConnectionMgr::sendDirectedStampedAndDelete(), DtConnectionMgr::sendDirectedStampedAnonymousAndDelete(), DtObjectMgr::sendRegisterMsg(), DtInteractionMgr::sendSubscribeMsg(), DtObjectMgr::sendSubscribeMsg(), DtFedExec::sendSyncPointReport(), DtFedExec::sendSyncPointStatusReport(), DtRtiObject::setAllDestinations(), and DtInteractionClassInfo::~DtInteractionClassInfo().
|
virtual |
Set / Unset bit in bit field.
References myBitField, myLength, and print().
Referenced by DtRtiMtdDestinationList::addDestination(), DtInteractionMgr::addPendingSubscription(), DtInteractionClassInfo::addRemotePassiveSubscription(), DtRtiObject::addRemoteSubscribe(), DtInteractionClassInfo::addRemoteSubscription(), DtRtiMsgForwarder::ConnectionInfo::ConnectionInfo(), DtInteractionClassInfo::deleteRemoteSubscription(), DtRtiObject::getAttributeOwnerDestinationMask(), DtRtiObject::getBaseClassDestinations(), DtObjectMgr::insertDiscBitMask(), DtObjectMgr::insertNonDiscBitMask(), DtObjectMgr::insertRegBitMask(), DtObjectMgr::insertSubBitMask(), DtRtiObject::remotePassiveSubscribe(), DtRtiMtdDestinationList::removeDestination(), DtRtiObject::removeDiscoveredClass(), DtRtiObject::removeRemoteSubscribe(), DtInteractionMgr::sendInteractionMsg(), and DtRtiObject::setDiscoveredClass().
|
protected |
Data Members.
The variable length bit-field
Referenced by decode(), DtBitMask(), encode(), getBit(), isEmpty(), numSet(), operator&=(), operator=(), operator|=(), print(), reset(), setBit(), and ~DtBitMask().
|
protected |
The number of bits represented.
Referenced by decode(), DtBitMask(), encode(), getBit(), isEmpty(), length(), netSize(), numSet(), operator&=(), operator=(), operator|=(), print(), reset(), and setBit().