![]() |
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.
| DtBitMask::~DtBitMask | ( | ) | [virtual] |
Destructor.
References myBitField.
| void DtBitMask::decode | ( | const char * | buffer, |
| unsigned int | numBytes | ||
| ) | [virtual] |
Decode the buffer into this bit mask.
References lengthToWords(), myBitField, myLength, and reset().
Referenced by DtRtiMtdDestinationList::get().
| void DtBitMask::encode | ( | char * | buffer | ) | const [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().
| bool DtBitMask::getBit | ( | unsigned int | bitPosition | ) | const [virtual] |
Get bit from bit field.
References myBitField, and myLength.
Referenced by DtSmartForwardingProcessor::lostConnection().
| bool DtBitMask::isEmpty | ( | ) | const [virtual] |
Is this bitMask == 0?
References lengthToWords(), myBitField, and myLength.
Referenced by DtUpdateInterRoutingFilter::doFilter(), DtSmartForwardingProcessor::filterUpdateInterDestinations(), and DtObjectMgr::sendBestEffortUpdateMsg().
| unsigned int DtBitMask::length | ( | ) | const [inline, virtual] |
Get number of data bits in field ( does not include padding )
References myLength.
Referenced by DtSmartForwardingProcessor::lostConnection(), operator&=(), operator=(), and operator|=().
| unsigned int DtBitMask::lengthToChars | ( | unsigned int | length | ) | [static] |
Convert length in bits to length in chars.
Referenced by netSize(), and DtRtiMtdDestinationList::set().
| unsigned int DtBitMask::lengthToWords | ( | unsigned int | length | ) | [static] |
Convert length in bits to length in 32-bit words.
Referenced by decode(), DtBitMask(), encode(), isEmpty(), numSet(), operator&=(), operator=(), operator|=(), print(), and reset().
| unsigned int DtBitMask::netSize | ( | ) | const [virtual] |
Get number of bytes used to represent padded bit field.
References lengthToChars(), and myLength.
| unsigned int DtBitMask::numSet | ( | ) | const [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.
| void DtBitMask::print | ( | bool | listHandles = false | ) | const [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(), DtRtiMsg::printHeader(), and setBit().
| void DtBitMask::reset | ( | bool | value = false | ) | [virtual] |
Reset bit mask to empty ( all false )
References lengthToWords(), myBitField, and myLength.
Referenced by decode(), DtRtiObject::divestRemoteSubscriptions(), DtBitMask(), DtRtiObject::DtRtiObject(), DtRtiObject::getDestinations(), DtInteractionClassInfo::publish(), DtObjectClassInfo::publish(), DtInteractionClassInfo::restore(), DtFedExec::sendSyncPointReport(), DtFedExec::sendSyncPointStatusReport(), DtRtiObject::setAllDestinations(), and DtInteractionClassInfo::~DtInteractionClassInfo().
| void DtBitMask::setBit | ( | unsigned int | bitPosition, |
| bool | isOn = true |
||
| ) | [virtual] |
Set / Unset bit in bit field.
References myBitField, myLength, and print().
Referenced by DtRtiMtdDestinationList::addDestination(), DtInteractionClassInfo::addRemotePassiveSubscription(), DtRtiObject::addRemoteSubscribe(), DtInteractionClassInfo::addRemoteSubscription(), DtRtiMsgForwarder::ConnectionInfo::ConnectionInfo(), DtInteractionClassInfo::deleteRemoteSubscription(), DtRtiObject::remotePassiveSubscribe(), DtRtiMtdDestinationList::removeDestination(), DtRtiObject::removeDiscoveredClass(), DtRtiObject::removeRemoteSubscribe(), DtInteractionMgr::sendInteractionMsg(), and DtRtiObject::setDiscoveredClass().
MAKRti::DtU32* DtBitMask::myBitField [protected] |
Data Members.
The variable length bit-field
Referenced by decode(), DtBitMask(), encode(), getBit(), isEmpty(), numSet(), operator&=(), operator=(), operator|=(), print(), reset(), setBit(), and ~DtBitMask().
unsigned int DtBitMask::myLength [protected] |
The number of bits represented.
Referenced by decode(), DtBitMask(), encode(), getBit(), isEmpty(), length(), netSize(), numSet(), operator&=(), operator=(), operator|=(), print(), reset(), and setBit().