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...
 
 WifiMacQueueItem (Ptr< const Packet > p, const WifiMacHeader &header, Time tstamp)
 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...
 
WifiMacHeaderGetHeader (void)
 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 stored by this item, including header size and trailer size. More...
 
Time GetTimeStamp (void) const
 Get the timestamp included in this item. More...
 
virtual void Print (std::ostream &os) const
 Print the item contents. 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 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/2]

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 34 of file wifi-mac-queue-item.cc.

◆ WifiMacQueueItem() [2/2]

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

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.
tstampthe timestamp associated with the created item.

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

◆ ~WifiMacQueueItem()

ns3::WifiMacQueueItem::~WifiMacQueueItem ( )
virtual

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

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 69 of file wifi-mac-queue-item.cc.

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

+ Here is the call graph for this function:

◆ GetHeader() [1/2]

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

Get the header stored in this item.

Returns
the header stored in this item.

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

References m_header.

◆ GetHeader() [2/2]

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

Get the header stored in this item.

Returns
the header stored in this item.

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

References m_header.

◆ 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 51 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 stored by this item, including header size and trailer size.

Returns
the size of the packet stored by this item.

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

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

+ 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 75 of file wifi-mac-queue-item.cc.

References m_tstamp.

◆ Print()

void ns3::WifiMacQueueItem::Print ( std::ostream &  os) const
virtual

Print the item contents.

Parameters
osoutput stream in which the data should be printed.

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

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::Packet::GetSize(), ns3::WifiMacHeader::IsQosAck(), ns3::WifiMacHeader::IsQosBlockAck(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsQosNoAck(), m_header, m_packet, m_tstamp, and ns3::Simulator::Now().

Referenced by ns3::operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_header

WifiMacHeader ns3::WifiMacQueueItem::m_header
private

Wifi MAC header associated with the packet.

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

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

◆ m_packet

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

The packet contained in this queue item.

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

Referenced by GetPacket(), GetSize(), and Print().

◆ m_tstamp

Time ns3::WifiMacQueueItem::m_tstamp
private

timestamp when the packet arrived at the queue

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

Referenced by GetTimeStamp(), and Print().


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