18#include "ns3/traced-value.h"
25class MgtAddBaResponseHeader;
27class AggregationCapableTransmissionListener;
29class QosFrameExchangeManager;
30class WifiTxParameters;
320 void SetMuCwMin(uint16_t cwMin, uint8_t linkId);
328 void SetMuCwMax(uint16_t cwMax, uint8_t linkId);
336 void SetMuAifsn(uint8_t aifsn, uint8_t linkId);
391 uint8_t
GetAifsn(uint8_t linkId)
const override;
422 QosLinkEntity&
GetLink(uint8_t linkId)
const;
static Mac48Address GetBroadcast()
Smart pointer class similar to boost::intrusive_ptr.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
TracedCallback< Time, Time, uint8_t > TxopTracedCallback
TracedCallback for TXOP trace typedef.
std::unique_ptr< LinkEntity > CreateLinkEntity() const override
Create a LinkEntity object.
uint8_t m_blockAckThreshold
the block ack threshold (use BA mechanism if number of packets in queue reaches this value.
Ptr< BlockAckManager > GetBaManager()
Get the Block Ack Manager associated with this QosTxop.
Time m_failedAddBaTimeout
timeout after failed BA agreement
Ptr< WifiMpdu > PeekNextMpdu(uint8_t linkId, uint8_t tid=8, Mac48Address recipient=Mac48Address::GetBroadcast(), Ptr< const WifiMpdu > mpdu=nullptr)
Peek the next frame to transmit on the given link to the given receiver and of the given TID from the...
uint16_t PeekNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i....
void SetMuCwMin(uint16_t cwMin, uint8_t linkId)
Set the minimum contention window size to use while the MU EDCA Timer is running for the given link.
bool UseExplicitBarAfterMissedBlockAck() const
Return true if an explicit BlockAckRequest is sent after a missed BlockAck.
bool EdcaDisabled(uint8_t linkId) const
Return true if the EDCA is disabled (the MU EDCA Timer is running and the MU AIFSN is zero) for the g...
Time GetAddBaResponseTimeout() const
Get the timeout for ADDBA response.
AcIndex GetAccessCategory() const
Get the access category of this object.
void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid)
Callback when ADDBA response is not received after timeout.
uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid) const
void DoDispose() override
Destructor implementation.
void SetMuCwMax(uint16_t cwMax, uint8_t linkId)
Set the maximum contention window size to use while the MU EDCA Timer is running for the given link.
bool MuEdcaTimerRunning(uint8_t linkId) const
Return true if the MU EDCA Timer is running for the given link, false otherwise.
void StartMuEdcaTimerNow(uint8_t linkId)
Start the MU EDCA Timer for the given link.
uint8_t GetBlockAckThreshold() const
Return the current threshold for block ack mechanism.
void NotifyChannelReleased(uint8_t linkId) override
Called by the FrameExchangeManager to notify the completion of the transmissions.
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
uint16_t GetBlockAckInactivityTimeout() const
Get the BlockAck inactivity timeout.
TxopTracedCallback m_txopTrace
TXOP trace callback.
virtual Time GetRemainingTxop(uint8_t linkId) const
Return the remaining duration in the current TXOP on the given link.
AcIndex m_ac
the access category
void SetDroppedMpduCallback(DroppedMpdu callback) override
bool m_useExplicitBarAfterMissedBlockAck
flag whether explicit BlockAckRequest should be sent upon missed BlockAck Response
void SetMuAifsn(uint8_t aifsn, uint8_t linkId)
Set the number of slots that make up an AIFS while the MU EDCA Timer is running for the given link.
friend class AggregationCapableTransmissionListener
allow AggregationCapableTransmissionListener class access
void NotifyOriginatorAgreementNoReply(const Mac48Address &recipient, uint8_t tid)
Take action upon notification of ADDBA_REQUEST frame being discarded (likely due to exceeded max retr...
virtual std::optional< Time > GetTxopStartTime(uint8_t linkId) const
uint8_t GetQosQueueSize(uint8_t tid, Mac48Address receiver) const
Get the value for the Queue Size subfield of the QoS Control field of a QoS data frame of the given T...
void ResetBa(Mac48Address recipient, uint8_t tid)
Reset BA agreement after BA negotiation failed.
Time GetFailedAddBaTimeout() const
Get the timeout for failed BA agreement.
void GotAddBaResponse(const MgtAddBaResponseHeader &respHdr, Mac48Address recipient)
Event handler when an ADDBA response is received.
static TypeId GetTypeId()
Get the type ID.
void AssignSequenceNumber(Ptr< WifiMpdu > mpdu) const
Assign a sequence number to the given MPDU, if it is not a fragment and it is not a retransmitted fra...
void SetFailedAddBaTimeout(Time failedAddBaTimeout)
Set the timeout for failed BA agreement.
uint16_t m_blockAckInactivityTimeout
the BlockAck inactivity timeout value (in TUs, i.e.
QosLinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
void CreateQueue(AcIndex aci) override
Create a wifi MAC queue containing packets of the given AC.
Ptr< WifiMpdu > GetNextMpdu(uint8_t linkId, Ptr< WifiMpdu > peekedItem, WifiTxParameters &txParams, Time availableTime, bool initialFrame)
Prepare the frame to transmit on the given link starting from the MPDU that has been previously peeke...
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ack mechanism.
bool IsQosOldPacket(Ptr< const WifiMpdu > mpdu)
Check if the given MPDU is to be considered old according to the current starting sequence number of ...
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
Event handler when a DELBA frame is received.
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the BlockAck inactivity timeout.
uint8_t m_nMaxInflights
the maximum number of links on which an MPDU can be in-flight at the same time
void CompleteMpduTx(Ptr< WifiMpdu > mpdu)
Stores an MPDU (part of an A-MPDU) in block ack agreement (i.e.
void SetAddBaResponseTimeout(Time addBaResponseTimeout)
Set the timeout to wait for ADDBA response.
std::pair< CtrlBAckRequestHeader, WifiMacHeader > PrepareBlockAckRequest(Mac48Address recipient, uint8_t tid) const
bool HasFramesToTransmit(uint8_t linkId) override
Check if the Txop has frames to transmit over the given link.
uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid) const
bool IsQosTxop() const override
Check for QoS TXOP.
Time m_addBaResponseTimeout
timeout for ADDBA response
void NotifyChannelAccessed(uint8_t linkId, Time txopDuration) override
Called by the FrameExchangeManager to notify that channel access has been granted on the given link f...
void SetMuEdcaTimer(Time timer, uint8_t linkId)
Set the MU EDCA Timer for the given link.
Ptr< BlockAckManager > m_baManager
the block ack manager
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
uint32_t GetMinCw() const
Return the minimum contention window size.
uint8_t GetAifsn() const
Return the number of slots that make up an AIFS.
uint32_t GetMaxCw() const
Return the maximum contention window size.
a unique identifier for an interface.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
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.
Structure holding information specific to a single link.
uint8_t muAifsn
the MU AIFSN
Time muEdcaTimerStartTime
last start time of the MU EDCA Timer
uint32_t muCwMax
the MU CW maximum
std::optional< Time > startTxop
the start TXOP time
uint32_t muCwMin
the MU CW minimum
Time txopDuration
the duration of a TXOP
Time muEdcaTimer
the MU EDCA Timer
~QosLinkEntity() override=default
Destructor (a virtual method is needed to make this struct polymorphic)
Structure holding information specific to a single link.