#include <wifi-mac-queue.h>
Classes | |
struct | Item |
Public Member Functions | |
void | SetMaxSize (uint32_t maxSize) |
void | SetMaxDelay (Time delay) |
uint32_t | GetMaxSize (void) const |
Time | GetMaxDelay (void) const |
void | Enqueue (Ptr< const Packet > packet, const WifiMacHeader &hdr) |
void | PushFront (Ptr< const Packet > packet, const WifiMacHeader &hdr) |
Ptr< const Packet > | Dequeue (WifiMacHeader *hdr) |
Ptr< const Packet > | Peek (WifiMacHeader *hdr) |
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) |
uint32_t | GetNPacketsByTidAndAddress (uint8_t tid, WifiMacHeader::AddressType type, Mac48Address addr) |
Ptr< const Packet > | DequeueFirstAvailable (WifiMacHeader *hdr, Time &tStamp, const QosBlockedDestinations *blockedPackets) |
Ptr< const Packet > | PeekFirstAvailable (WifiMacHeader *hdr, Time &tStamp, const QosBlockedDestinations *blockedPackets) |
void | Flush (void) |
bool | IsEmpty (void) |
uint32_t | GetSize (void) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::WifiMacQueue. |
This queue implements the timeout procedure described in IEEE Std. 802.11-2007, 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).
Ptr<const Packet> ns3::WifiMacQueue::DequeueFirstAvailable | ( | WifiMacHeader * | hdr, | |
Time & | tStamp, | |||
const QosBlockedDestinations * | blockedPackets | |||
) |
Returns first available packet for transmission. A packet could be no available if it's a QoS packet with a tid and an address1 fields equal to tid and addr respectively that index a pending agreement in the BlockAckManager object. So that packet must not be transmitted until reception of an ADDBA response frame from station addressed by addr. This method removes the packet from queue.
uint32_t ns3::WifiMacQueue::GetNPacketsByTidAndAddress | ( | uint8_t | tid, | |
WifiMacHeader::AddressType | type, | |||
Mac48Address | addr | |||
) |
Returns number of QoS packets having tid equals to tid and address specified by type equals to addr.
static TypeId ns3::WifiMacQueue::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::WifiMacQueue.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
No TraceSources 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).
Ptr<const Packet> ns3::WifiMacQueue::PeekFirstAvailable | ( | WifiMacHeader * | hdr, | |
Time & | tStamp, | |||
const QosBlockedDestinations * | blockedPackets | |||
) |
Returns first available packet for transmission. The packet isn't removed from queue.
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)).