WifiMacQueueItem stores (const) packets along with their Wifi MAC headers and the time when they were enqueued. More...
#include "wifi-mac-queue-item.h"
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 WifiMacHeader & | GetHeader (void) const |
Get the header stored in this item. More... | |
WifiMacHeader & | GetHeader (void) |
Get the header stored in this item. More... | |
Ptr< const Packet > | GetPacket (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... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (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 Packet > | m_packet |
The packet contained in this queue item. More... | |
Time | m_tstamp |
timestamp when the packet arrived at the queue More... | |
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.
ns3::WifiMacQueueItem::WifiMacQueueItem | ( | Ptr< const Packet > | p, |
const WifiMacHeader & | header | ||
) |
Create a Wifi MAC queue item containing a packet and a Wifi MAC header.
p | the const packet included in the created item. |
header | the Wifi Mac header included in the created item. |
Definition at line 34 of file wifi-mac-queue-item.cc.
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.
p | the const packet included in the created item. |
header | the Wifi Mac header included in the created item. |
tstamp | the timestamp associated with the created item. |
Definition at line 39 of file wifi-mac-queue-item.cc.
|
virtual |
Definition at line 46 of file wifi-mac-queue-item.cc.
Mac48Address ns3::WifiMacQueueItem::GetDestinationAddress | ( | void | ) | const |
Return the destination address present in the header.
Definition at line 69 of file wifi-mac-queue-item.cc.
References ns3::WifiMacHeader::GetAddr1(), and m_header.
const WifiMacHeader & ns3::WifiMacQueueItem::GetHeader | ( | void | ) | const |
Get the header stored in this item.
Definition at line 57 of file wifi-mac-queue-item.cc.
References m_header.
WifiMacHeader & ns3::WifiMacQueueItem::GetHeader | ( | void | ) |
Get the header stored in this item.
Definition at line 63 of file wifi-mac-queue-item.cc.
References m_header.
Get 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().
uint32_t ns3::WifiMacQueueItem::GetSize | ( | void | ) | const |
Return the size of the packet stored by this item, including header size and trailer size.
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.
Time ns3::WifiMacQueueItem::GetTimeStamp | ( | void | ) | const |
Get the timestamp included in this item.
Definition at line 75 of file wifi-mac-queue-item.cc.
References m_tstamp.
|
virtual |
Print the item contents.
os | output 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<<().
|
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().
The packet contained in this queue item.
Definition at line 106 of file wifi-mac-queue-item.h.
Referenced by GetPacket(), GetSize(), and Print().
|
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().