30 #include "ns3/packet.h"
31 #include "ns3/simulator.h"
161 typedef std::list<WifiMacQueueElem>::iterator
Iterator;
257 virtual void Print(std::ostream& os)
const;
310 static constexpr std::size_t
ALIAS = 1;
A template-based reference counting class.
static Time Now()
Return the current simulation virtual time.
Simulation virtual time values and global simulation resolution.
This queue implements the timeout procedure described in (Section 9.19.2.6 "Retransmit procedures" pa...
WifiMpdu stores a (const) packet along with a MAC header.
InstanceInfo m_instanceInfo
information associated with the instance type
Time GetTimestamp() const
bool HasSeqNoAssigned() const
Time GetExpiryTime() const
static constexpr std::size_t ALIAS
index of an alias in the InstanceInfo variant
void ResetInFlight(uint8_t linkId) const
Mark this MPDU as not being in flight on the given link.
WifiMacHeader m_header
Information stored by both the original copy and the aliases.
void SetInFlight(uint8_t linkId) const
Mark this MPDU as being in flight on the given link.
Iterator GetQueueIt() const
const WifiMacHeader & GetHeader() const
Get the header stored in this item.
std::variant< OriginalInfo, Ptr< WifiMpdu > > InstanceInfo
Information stored by the original copy and an alias, respectively.
void Aggregate(Ptr< const WifiMpdu > msdu)
Aggregate the MSDU contained in the given MPDU to this MPDU (thus constituting an A-MSDU).
OriginalInfo & GetOriginalInfo()
uint32_t GetSize() const
Return the size of the packet stored by this item, including header size and trailer size.
Ptr< Packet > GetProtocolDataUnit() const
Get the MAC protocol data unit (MPDU) corresponding to this item (i.e.
void DoAggregate(Ptr< const WifiMpdu > msdu)
Aggregate the MSDU contained in the given MPDU to this MPDU (thus constituting an A-MSDU).
std::list< std::pair< Ptr< const Packet >, AmsduSubframeHeader > > DeaggregatedMsdus
DeaggregatedMsdus typedef.
void UnassignSeqNo()
Record that a sequence number is no (longer) assigned to this MPDU.
virtual void Print(std::ostream &os) const
Print the item contents.
WifiMpdu()=default
Private default constructor (used to construct aliases).
Ptr< const Packet > GetPacket() const
Get the packet stored in this item.
std::list< std::pair< Ptr< const Packet >, AmsduSubframeHeader > >::const_iterator DeaggregatedMsdusCI
DeaggregatedMsdusCI typedef.
DeaggregatedMsdusCI end() const
Get a constant iterator indicating past-the-last MSDU in the list of aggregated MSDUs.
DeaggregatedMsdusCI begin() const
Get a constant iterator pointing to the first MSDU in the list of aggregated MSDUs.
uint32_t GetPacketSize() const
Return the size in bytes of the packet or control header or management header stored by this item.
AcIndex GetQueueAc() const
Get the AC of the queue this item is stored into.
std::list< WifiMacQueueElem >::iterator Iterator
Const iterator typedef.
Mac48Address GetDestinationAddress() const
Return the destination address present in the header.
bool IsQueued() const
Return true if this item is stored in some queue, false otherwise.
void SetQueueIt(std::optional< Iterator > queueIt, WmqIteratorTag tag)
Set the queue iterator stored by this object.
bool IsFragment() const
Return true if this item contains an MSDU fragment, false otherwise.
std::set< uint8_t > GetInFlightLinkIds() const
Ptr< const WifiMpdu > GetOriginal() const
void AssignSeqNo(uint16_t seqNo)
Set the sequence number of this MPDU (and of the original copy, if this is an alias) to the given val...
Ptr< WifiMpdu > CreateAlias(uint8_t linkId) const
Create an alias for this MPDU (which must be an original copy) for transmission on the link with the ...
static constexpr std::size_t ORIGINAL
index of original copy in the InstanceInfo variant
Tag used to allow (only) WifiMacQueue to access the queue iterator stored by a WifiMpdu.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Information stored by the original copy only.
Time m_timestamp
construction time
bool m_seqNoAssigned
whether a sequence number has been assigned
DeaggregatedMsdus m_msduList
list of aggregated MSDUs included in this MPDU
Ptr< const Packet > m_packet
MSDU or A-MSDU contained in this queue item.
std::optional< Iterator > m_queueIt
Queue iterator pointing to this MPDU, if queued.