26 #include "ns3/traced-value.h"
33 class QosBlockedDestinations;
34 class MgtAddBaResponseHeader;
36 class AggregationCapableTransmissionListener;
38 class QosFrameExchangeManager;
39 class WifiTxParameters;
341 Time availableTime,
bool initialFrame);
425 uint32_t
GetMinCw (
void)
const override;
433 uint32_t
GetMaxCw (
void)
const override;
441 uint8_t
GetAifsn (
void)
const override;
static Mac48Address GetBroadcast(void)
Smart pointer class similar to boost::intrusive_ptr.
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Time m_muEdcaTimer
the MU EDCA Timer
QosTxop(AcIndex ac=AC_UNDEF)
Constructor.
uint32_t m_muCwMax
the MU CW maximum
uint32_t m_muCwMin
the MU CW minimum
uint8_t m_blockAckThreshold
the block ack threshold (use BA mechanism if number of packets in queue reaches this value.
TracedCallback< Time, Time > m_txopTrace
TXOP trace callback.
virtual bool IsTxopStarted(void) const
Return true if a TXOP has started.
void SetMuCwMax(uint16_t cwMax)
Set the maximum contention window size to use while the MU EDCA Timer is running.
Time m_failedAddBaTimeout
timeout after failed BA agreement
uint16_t PeekNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i....
void SetQosFrameExchangeManager(const Ptr< QosFrameExchangeManager > qosFem)
Set the Frame Exchange Manager associated with this QoS STA.
bool IsQosTxop(void) const override
Check for QoS TXOP.
void DoInitialize(void) override
Initialize() implementation.
Time m_startTxop
the start TXOP time
void NotifyChannelAccessed(Time txopDuration) override
Called by the FrameExchangeManager to notify that channel access has been granted for the given amoun...
void NotifyChannelReleased(void) override
Called by the FrameExchangeManager to notify the completion of the transmissions.
void AssignSequenceNumber(Ptr< WifiMacQueueItem > mpdu) const
Assign a sequence number to the given MPDU, if it is not a fragment and it is not a retransmitted fra...
void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid)
Callback when ADDBA response is not received after timeout.
void SetMuEdcaTimer(Time timer)
Set the MU EDCA Timer.
uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid) const
uint8_t m_muAifsn
the MU AIFSN
Time m_txopDuration
the duration of a TXOP
void DoDispose(void) override
Destructor implementation.
bool HasFramesToTransmit(void) override
Check if the Txop has frames to transmit.
virtual Time GetRemainingTxop(void) const
Return the remaining duration in the current TXOP.
bool IsQosOldPacket(Ptr< const WifiMacQueueItem > mpdu)
Check if the given MPDU is to be considered old according to the current starting sequence number of ...
uint8_t GetBlockAckThreshold(void) const
Return the current threshold for block ack mechanism.
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
AcIndex m_ac
the access category
bool MuEdcaTimerRunning(void) const
Return true if the MU EDCA Timer is running, false otherwise.
void SetDroppedMpduCallback(DroppedMpdu callback) override
bool m_useExplicitBarAfterMissedBlockAck
flag whether explicit BlockAckRequest should be sent upon missed BlockAck Response
Time GetFailedAddBaTimeout(void) const
Get the timeout for failed BA agreement.
void CompleteMpduTx(Ptr< WifiMacQueueItem > mpdu)
Stores an MPDU (part of an A-MPDU) in block ack agreement (i.e.
friend class AggregationCapableTransmissionListener
allow AggregationCapableTransmissionListener class access
Ptr< const WifiMacQueueItem > PrepareBlockAckRequest(Mac48Address recipient, uint8_t tid) 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...
bool GetBaAgreementEstablished(Mac48Address address, uint8_t tid) const
uint32_t GetMinCw(void) const override
Return the minimum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
void ResetBa(Mac48Address recipient, uint8_t tid)
Reset BA agreement after BA negotiation failed.
void PushFront(Ptr< const Packet > packet, const WifiMacHeader &hdr)
Time GetAddBaResponseTimeout(void) const
Get the timeout for ADDBA response.
void StartMuEdcaTimerNow(void)
Start the MU EDCA Timer.
BlockAckType GetBlockAckType(Mac48Address recipient, uint8_t tid) const
uint8_t GetAifsn(void) const override
Return the number of slots that make up an AIFS according to the EDCA Parameter Set or the MU EDCA Pa...
Ptr< WifiMacQueueItem > GetNextMpdu(Ptr< const WifiMacQueueItem > peekedItem, WifiTxParameters &txParams, Time availableTime, bool initialFrame)
Prepare the frame to transmit starting from the MPDU that has been previously peeked by calling PeekN...
uint16_t GetBlockAckInactivityTimeout(void) const
Get the BlockAck inactivity timeout.
Ptr< BlockAckManager > GetBaManager(void)
Get the Block Ack Manager associated with this QosTxop.
bool UseExplicitBarAfterMissedBlockAck(void) const
Return true if an explicit BlockAckRequest is sent after a missed BlockAck.
bool EdcaDisabled(void) const
Return true if the EDCA is disabled (the MU EDCA Timer is running and the MU AIFSN is zero),...
void SetFailedAddBaTimeout(Time failedAddBaTimeout)
Set the timeout for failed BA agreement.
uint16_t m_blockAckInactivityTimeout
the BlockAck inactivity timeout value (in TUs, i.e.
void SetMuAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS while the MU EDCA Timer is running.
AcIndex GetAccessCategory(void) const
Get the access category of this object.
uint32_t GetMaxCw(void) const override
Return the maximum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
void GotAddBaResponse(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
Event handler when an ADDBA response is received.
Time m_muEdcaTimerStartTime
last start time of the MU EDCA Timer
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ack mechanism.
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.
BlockAckReqType GetBlockAckReqType(Mac48Address recipient, uint8_t tid) const
void SetAddBaResponseTimeout(Time addBaResponseTimeout)
Set the timeout to wait for ADDBA response.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< QosFrameExchangeManager > m_qosFem
the QoS Frame Exchange Manager
uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid) const
void SetMuCwMin(uint16_t cwMin)
Set the minimum contention window size to use while the MU EDCA Timer is running.
Ptr< const WifiMacQueueItem > PeekNextMpdu(uint8_t tid=8, Mac48Address recipient=Mac48Address::GetBroadcast(), Ptr< const WifiMacQueueItem > item=nullptr)
Peek the next frame to transmit to the given receiver and of the given TID from the EDCA queue.
Ptr< QosBlockedDestinations > m_qosBlockedDestinations
the QoS blocked destinations
Time m_addBaResponseTimeout
timeout for ADDBA response
void ScheduleBar(Ptr< const WifiMacQueueItem > bar, bool skipIfNoDataQueued=false)
Ptr< BlockAckManager > m_baManager
the block ack manager
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
Handle packet fragmentation and retransmissions for data and management frames.
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 ...
@ AC_UNDEF
Total number of ACs.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The different BlockAckRequest variants.
The different BlockAck variants.