32 uint16_t partialVirtualBitmapSize =
34 return partialVirtualBitmapSize + 3;
55 return std::set<uint16_t>(start,
m_aidValues.cend());
68 for (
auto byte : partialVirtualBitmap)
89 auto bitmapControl = start.ReadU8();
93 uint8_t partialVirtualBitmapOffset = bitmapControl & 0xFE;
98 for (octetIndex = partialVirtualBitmapOffset;
99 octetIndex < static_cast<uint16_t>(partialVirtualBitmapOffset + length - 3);
102 if (
auto octet = start.ReadU8(); octet > 0)
105 for (uint8_t position = 0; position < 8; position++)
107 if ((octet >> position) & 0x1)
114 return 3 + octetIndex - partialVirtualBitmapOffset;
123 return (aid >> 3) & 0xff;
132 return 0x01 << (aid & 0x07);
138 return (octet << 3) + position;
182 bitmapControl |= 0x01;
185 return bitmapControl;
202 return partialVirtualBitmap;
211 for (uint16_t aid = 0; aid < 2008; ++aid)
iterator in a Buffer instance
std::set< uint16_t > m_aidValues
List of AID values included in this TIM.
uint8_t GetAidBit(uint16_t aid) const
Obtain an octet with a set bit, corresponding to the provided AID value.
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
uint8_t m_dtimPeriod
The DTIM Period field.
uint8_t GetPartialVirtualBitmapOffset() const
Get the Partial Virtual Bitmap offset, i.e., the number (denoted as N1 by the specs) of the first oct...
std::vector< uint8_t > GetPartialVirtualBitmap() const
uint8_t m_dtimCount
The DTIM Count field.
uint16_t GetAidFromOctetIndexAndBitPosition(uint16_t octet, uint8_t position) const
Obtain the AID value represented by a certain octet index and bit position inside the Virtual Bitmap.
void AddAid(uint16_t aid)
Add the provided AID value to the list contained in the Virtual Bitmap.
void Print(std::ostream &os) const override
Generate human-readable form of IE.
uint8_t GetAidOctetIndex(uint16_t aid) const
Obtain the index of the octet where the provided AID value should be set in the Virtual Bitmap.
uint8_t GetLastNonZeroOctetIndex() const
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
std::set< uint16_t > GetAidSet(uint16_t aid=0) const
Return the AID values, greater than the given AID value, whose corresponding bits are set in the virt...
bool m_hasMulticastPending
Whether there is Multicast / Broadcast data.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
bool HasAid(uint16_t aid) const
Check whether the bit corresponding to the provided AID is set in the Virtual Bitmap included in this...
uint8_t GetBitmapControl() const
The Bitmap Control field is optional if the TIM is carried in an S1G PPDU, while it is always present...
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.