#include <wifi-mac-queue.h>
Public Member Functions | |
Ptr< const Packet > | DequeueByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, WifiMacHeader::AddressType type, Mac48Address addr) |
Ptr< const Packet > | PeekByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, WifiMacHeader::AddressType type, Mac48Address addr) |
bool | Remove (Ptr< const Packet > packet) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::WifiMacQueue. |
This queue implements what is needed for the 802.11e standard Specifically, it refers to 802.11e/D9, section 9.9.1.6, paragraph 6.
When a packet is received by the MAC, to be sent to the PHY, it is queued in the internal queue after being tagged by the current time.
When a packet is dequeued, the queue checks its timestamp to verify whether or not it should be dropped. If dot11EDCATableMSDULifetime has elapsed, it is dropped. Otherwise, it is returned to the caller.
Ptr<const Packet> ns3::WifiMacQueue::DequeueByTidAndAddress | ( | WifiMacHeader * | hdr, | |
uint8_t | tid, | |||
WifiMacHeader::AddressType | type, | |||
Mac48Address | addr | |||
) |
Searchs and returns, if is present in this queue, first packet having address indicated by type equals to addr, and tid equals to tid. This method removes the packet from this queue. Is typically used by ns3::EdcaTxopN in order to perform correct MSDU aggregation (A-MSDU).
static TypeId ns3::WifiMacQueue::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::WifiMacQueue.
Attributes defined for this type:
Reimplemented from ns3::Object.
Ptr<const Packet> ns3::WifiMacQueue::PeekByTidAndAddress | ( | WifiMacHeader * | hdr, | |
uint8_t | tid, | |||
WifiMacHeader::AddressType | type, | |||
Mac48Address | addr | |||
) |
Searchs and returns, if is present in this queue, first packet having address indicated by type equals to addr, and tid equals to tid. This method doesn't remove the packet from this queue. Is typically used by ns3::EdcaTxopN in order to perform correct MSDU aggregation (A-MSDU).
If exists, removes packet from queue and returns true. Otherwise it takes no effects and return false. Deletion of the packet is performed in linear time (O(n)).