A Discrete-Event Network Simulator
API
ns3::WifiMacQueueItem Class Reference

WifiMacQueueItem stores (const) packets along with their Wifi MAC headers and the time when they were enqueued. More...

#include "wifi-mac-queue-item.h"

+ Inheritance diagram for ns3::WifiMacQueueItem:
+ Collaboration diagram for ns3::WifiMacQueueItem:

Public Member Functions

 WifiMacQueueItem (Ptr< const Packet > p, const WifiMacHeader &header)
 Create a Wifi MAC queue item containing a packet and a Wifi MAC header. More...
 
virtual ~WifiMacQueueItem ()
 
Mac48Address GetDestinationAddress (void) const
 Return the destination address present in the header. More...
 
const WifiMacHeaderGetHeader (void) const
 Get the header stored in this item. More...
 
Ptr< const PacketGetPacket (void) const
 Get the packet stored in this item. More...
 
uint32_t GetSize (void) const
 Return the size of the packet included in this item. More...
 
Time GetTimeStamp (void) const
 Get the timestamp included in this item. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< WifiMacQueueItem >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Private Member Functions

 WifiMacQueueItem ()
 Default constructor. More...
 
 WifiMacQueueItem (const WifiMacQueueItem &)
 Copy constructor. More...
 
WifiMacQueueItemoperator= (const WifiMacQueueItem &)
 Assignment operator. More...
 

Private Attributes

WifiMacHeader m_header
 Wifi MAC header associated with the packet. More...
 
Ptr< const Packetm_packet
 The packet contained in this queue item. More...
 
Time m_tstamp
 timestamp when the packet arrived at the queue More...
 

Detailed Description

WifiMacQueueItem stores (const) packets along with their Wifi MAC headers and the time when they were enqueued.

Definition at line 41 of file wifi-mac-queue-item.h.

Constructor & Destructor Documentation

◆ WifiMacQueueItem() [1/3]

ns3::WifiMacQueueItem::WifiMacQueueItem ( Ptr< const Packet p,
const WifiMacHeader header 
)

Create a Wifi MAC queue item containing a packet and a Wifi MAC header.

Parameters
pthe const packet included in the created item.
headerthe Wifi Mac header included in the created item.

Definition at line 31 of file wifi-mac-queue-item.cc.

◆ ~WifiMacQueueItem()

ns3::WifiMacQueueItem::~WifiMacQueueItem ( )
virtual

Definition at line 38 of file wifi-mac-queue-item.cc.

◆ WifiMacQueueItem() [2/3]

ns3::WifiMacQueueItem::WifiMacQueueItem ( )
private

Default constructor.

Defined and unimplemented to avoid misuse

◆ WifiMacQueueItem() [3/3]

ns3::WifiMacQueueItem::WifiMacQueueItem ( const WifiMacQueueItem )
private

Copy constructor.

Defined and unimplemented to avoid misuse

Member Function Documentation

◆ GetDestinationAddress()

Mac48Address ns3::WifiMacQueueItem::GetDestinationAddress ( void  ) const

Return the destination address present in the header.

Returns
the destination address

Definition at line 55 of file wifi-mac-queue-item.cc.

References ns3::WifiMacHeader::GetAddr1(), and m_header.

+ Here is the call graph for this function:

◆ GetHeader()

const WifiMacHeader & ns3::WifiMacQueueItem::GetHeader ( void  ) const

Get the header stored in this item.

Returns
the header stored in this item.

Definition at line 49 of file wifi-mac-queue-item.cc.

References m_header.

Referenced by TwoLevelAggregationTest::DoRun().

+ Here is the caller graph for this function:

◆ GetPacket()

Ptr< const Packet > ns3::WifiMacQueueItem::GetPacket ( void  ) const

Get the packet stored in this item.

Returns
the packet stored in this item.

Definition at line 43 of file wifi-mac-queue-item.cc.

References m_packet.

Referenced by TwoLevelAggregationTest::DoRun(), and WifiAcMappingTest::PacketEnqueuedInWifiMacQueue().

+ Here is the caller graph for this function:

◆ GetSize()

uint32_t ns3::WifiMacQueueItem::GetSize ( void  ) const

Return the size of the packet included in this item.

Returns
the size of the packet included in this item.

Definition at line 67 of file wifi-mac-queue-item.cc.

References ns3::WifiMacHeader::GetSerializedSize(), ns3::Packet::GetSize(), m_header, and m_packet.

+ Here is the call graph for this function:

◆ GetTimeStamp()

Time ns3::WifiMacQueueItem::GetTimeStamp ( void  ) const

Get the timestamp included in this item.

Returns
the timestamp included in this item.

Definition at line 61 of file wifi-mac-queue-item.cc.

References m_tstamp.

Referenced by TwoLevelAggregationTest::DoRun().

+ Here is the caller graph for this function:

◆ operator=()

WifiMacQueueItem& ns3::WifiMacQueueItem::operator= ( const WifiMacQueueItem )
private

Assignment operator.

Defined and unimplemented to avoid misuse

Returns

Member Data Documentation

◆ m_header

WifiMacHeader ns3::WifiMacQueueItem::m_header
private

Wifi MAC header associated with the packet.

Definition at line 106 of file wifi-mac-queue-item.h.

Referenced by GetDestinationAddress(), GetHeader(), and GetSize().

◆ m_packet

Ptr<const Packet> ns3::WifiMacQueueItem::m_packet
private

The packet contained in this queue item.

Definition at line 105 of file wifi-mac-queue-item.h.

Referenced by GetPacket(), and GetSize().

◆ m_tstamp

Time ns3::WifiMacQueueItem::m_tstamp
private

timestamp when the packet arrived at the queue

Definition at line 107 of file wifi-mac-queue-item.h.

Referenced by GetTimeStamp().


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