ns-3
ns3::WifiMacQueue Class Reference

#include <wifi-mac-queue.h>

Inheritance diagram for ns3::WifiMacQueue:
Collaboration diagram for ns3::WifiMacQueue:

List of all members.

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 PacketDequeue (WifiMacHeader *hdr)
Ptr< const PacketPeek (WifiMacHeader *hdr)
Ptr< const PacketDequeueByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, WifiMacHeader::AddressType type, Mac48Address addr)
Ptr< const PacketPeekByTidAndAddress (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 PacketDequeueFirstAvailable (WifiMacHeader *hdr, Time &tStamp, const QosBlockedDestinations *blockedPackets)
Ptr< const PacketPeekFirstAvailable (WifiMacHeader *hdr, Time &tStamp, const QosBlockedDestinations *blockedPackets)
void Flush (void)
bool IsEmpty (void)
uint32_t GetSize (void)
- Public Member Functions inherited from ns3::Object
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Dispose (void)
void AggregateObject (Ptr< Object > other)
AggregateIterator GetAggregateIterator (void) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
uint32_t GetReferenceCount (void) const
- Public Member Functions inherited from ns3::ObjectBase
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::WifiMacQueue.

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
virtual void NotifyNewAggregate (void)
virtual void DoStart (void)
virtual void DoDispose (void)
 Object (const Object &o)

Detailed Description

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.


Member Function Documentation

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).

References NS_ASSERT.

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.

References NS_ASSERT.

Referenced by ns3::BlockAckManager::SwitchToBlockAckIfNeeded().

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:

  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/BE_EdcaTxopN/Queue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/BK_EdcaTxopN/Queue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/DcaTxop/Queue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/VI_EdcaTxopN/Queue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/VO_EdcaTxopN/Queue

Attributes defined for this type:

  • MaxPacketNumber: If a packet arrives when there are already this number of packets, it is dropped.
  • MaxDelay: If a packet stays longer than this delay in the queue, it is dropped.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +10000000000.0ns
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::Object.

References ns3::Seconds(), and ns3::TypeId::SetParent().

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).

References NS_ASSERT.

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.

bool ns3::WifiMacQueue::Remove ( Ptr< const Packet packet)

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)).


The documentation for this class was generated from the following files: