26 #include "ns3/traced-value.h" 37 class QosBlockedDestinations;
38 class MgtAddBaResponseHeader;
40 class AggregationCapableTransmissionListener;
95 friend class ::AmpduAggregationTest;
96 friend class ::TwoLevelAggregationTest;
97 friend class ::HeAggregationTest;
416 bool aggregate =
true, uint32_t ampduSize = 0,
487 uint16_t
timeout,
bool immediateBAck);
AcIndex m_ac
the access category
void MissedAck(void)
Event handler when an ACK is missed.
Ptr< const WifiMacQueueItem > PeekNextFrame(uint8_t tid=8, Mac48Address recipient=Mac48Address::GetBroadcast())
Peek the next frame to transmit to the given receiver and of the given TID from the Block Ack manager...
Simulation virtual time values and global simulation resolution.
Time GetTxopRemaining(void) const
Return the remaining duration in the current TXOP.
bool GetAmpduExist(Mac48Address dest) const
Return whether A-MPDU is used to transmit data to a peer station.
void ResetBa(Mac48Address recipient, uint8_t tid)
Reset BA agreement after BA negotiation failed.
void VerifyBlockAck(void)
Verifies if dequeued packet has to be transmitted with ack policy Block Ack.
void RestartAccessIfNeeded(void)
Restart access request if needed.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
BlockAckType m_blockAckType
the Block ACK type
Time m_startTxop
the start TXOP time
Mac48Address MapDestAddressForAggregation(const WifiMacHeader &hdr)
This functions are used only to correctly set destination address in A-MSDU subframes.
bool m_isAccessRequestedForRts
flag whether access is requested to transmit a RTS frame
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
void MissedBlockAck(uint8_t nMpdus)
Event handler when a Block ACK timeout has occurred.
bool NeedBarRetransmission(void)
Check if Block ACK Request should be re-transmitted.
Ptr< WifiMacQueueItem > DequeuePeekedFrame(Ptr< const WifiMacQueueItem > peekedItem, WifiTxVector txVector, bool aggregate=true, uint32_t ampduSize=0, Time ppduDurationLimit=Seconds(0))
Dequeue the frame that has been previously peeked by calling PeekNextFrame or PeekNextFrameByTidAndAd...
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the Block Ack inactivity timeout.
void SendDelbaFrame(Mac48Address addr, uint8_t tid, bool byOriginator)
Sends DELBA frame to cancel a block ack agreement with sta addressed by addr for tid tid...
uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid) const
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
Event handler when a DELBA frame is received.
void SetAccessCategory(AcIndex ac)
Set the access category of this EDCAF.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t GetBlockAckThreshold(void) const
Return the current threshold for block ACK mechanism.
void DoDispose(void)
Destructor implementation.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
uint32_t GetTxopFragmentSize(void) const
Calculate the size of the current TXOP fragment.
Time m_failedAddBaTimeout
timeout after failed BA agreement
control how a packet is transmitted.
bool IsLastFragment(void) const
Check if the current fragment is the last fragment.
uint32_t GetFragmentOffset(void) const
Calculate the offset for the current fragment.
Time GetAddBaResponseTimeout(void) const
Get the timeout for ADDBA response.
friend class AggregationCapableTransmissionListener
allow AggregationCapableTransmissionListener class access
uint32_t GetNextFragmentSize(void) const
Calculate the size of the next fragment.
void SetAmpduExist(Mac48Address dest, bool enableAmpdu)
Set indication whether A-MPDU is used to transmit data to a peer station.
void StartAccessIfNeeded(void)
Request access from DCF manager if needed.
void SetFailedAddBaTimeout(Time failedAddBaTimeout)
Set the timeout for failed BA agreement.
void SendBlockAckRequest(const Bar &bar)
After that all packets, for which a block ack agreement was established, have been transmitted...
Ptr< BlockAckManager > m_baManager
the Block ACK manager
static Mac48Address GetBroadcast(void)
void GotAddBaResponse(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
Event handler when an ADDBA response is received.
void SetTypeOfStation(TypeOfStation type)
Set type of station with the given type.
uint32_t GetFragmentSize(void) const
Calculate the size of the current fragment.
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
void PushFront(Ptr< const Packet > packet, const WifiMacHeader &hdr)
uint16_t PeekNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...
bool IsQosTxop(void) const
Check for QoS TXOP.
uint32_t GetNTxopFragment(void) const
Calculate the number of TXOP fragments needed for the transmission of the current packet...
void SetAddBaResponseTimeout(Time addBaResponseTimeout)
Set the timeout to wait for ADDBA response.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void BaTxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver.
Bar m_currentBar
the current BAR
void NotifyMissedCts(std::list< Ptr< WifiMacQueueItem >> mpduList)
Event handler when a CTS timeout has occurred.
void CompleteMpduTx(Ptr< WifiMacQueueItem > mpdu)
Stores an MPDU (part of an A-MPDU) in blockackagreement (i.e.
MacLowTransmissionParameters GetTransmissionParameters(Ptr< const WifiMacQueueItem > frame) const
Compute the MacLow transmission parameters for the given frame.
void BaTxOk(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver.
void EndTxNoAck(void)
Event handler when a transmission that does not require an ACK has completed.
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ACK mechanism.
uint8_t m_blockAckThreshold
the Block ACK threshold
Two Level Aggregation Test.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this QosTxop is associated to.
uint32_t GetTxopFragmentOffset(uint32_t fragmentNumber) const
Calculate the offset for the fragment.
void NotifyCollision(void)
Notify the EDCAF that collision has occurred.
bool IsQosOldPacket(Ptr< const WifiMacQueueItem > mpdu)
Check if the given MPDU is to be considered old according to the current starting sequence number of ...
void GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr)
Event handler when a Block ACK is received.
void GotAck(void)
Event handler when an ACK is received.
void StartNextPacket(void)
Start transmission for the next packet if allowed by the TxopLimit.
802.11ax aggregation test which permits 64 or 256 MPDUs in A-MPDU according to the negociated buffer ...
void CompleteTx(void)
For now is typically invoked to complete transmission of a packets sent with ack policy Block Ack: th...
Mac48Address MapSrcAddressForAggregation(const WifiMacHeader &hdr)
This functions are used only to correctly set source address in A-MSDU subframes. ...
bool GetBaAgreementEstablished(Mac48Address address, uint8_t tid) const
bool m_useExplicitBarAfterMissedBlockAck
flag whether explicit Block Ack Request should be sent upon missed Block Ack Response ...
TypeOfStation GetTypeOfStation(void) const
Return type of station.
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< QosBlockedDestinations > m_qosBlockedDestinations
QOS blocked destinations.
void NotifyAccessGranted(void)
Notify the EDCAF that access has been granted.
uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid) const
void CompleteConfig(void)
Complete block ACK configuration.
bool m_currentIsFragmented
flag whether current packet is fragmented
TracedCallback< Time, Time > m_txopTrace
TXOP trace callback.
void DoInitialize(void)
Initialize() implementation.
void TerminateTxop(void)
Update backoff and restart access if needed.
bool NeedFragmentation(void) const
Check if the current packet should be fragmented.
TypeOfStation
Enumeration for type of station.
Time m_currentPacketTimestamp
the current packet timestamp
bool IsTxopFragmentation(void) const
Check if the current packet is fragmented because of an exceeded TXOP duration.
Ptr< Packet > GetFragmentPacket(WifiMacHeader *hdr)
Get the next fragment from the packet with appropriate Wifi header for the fragment.
Time GetFailedAddBaTimeout(void) const
Get the timeout for failed BA agreement.
uint16_t m_blockAckInactivityTimeout
the Block ACK inactivity timeout
bool SetupBlockAckIfNeeded(void)
If number of packets in the queue reaches m_blockAckThreshold value, an ADDBA Request frame is sent t...
void NotifyInternalCollision(void)
Notify the EDCAF that internal collision has occurred.
uint32_t GetNextTxopFragmentSize(uint32_t fragmentNumber) const
Calculate the size of the next TXOP fragment.
TypeOfStation m_typeOfStation
the type of station
a unique identifier for an interface.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid)
Callback when ADDBA response is not received after timeout.
Time m_addBaResponseTimeout
timeout for ADDBA response
std::map< Mac48Address, bool > m_aMpduEnabled
list containing flags whether A-MPDU is enabled for a given destination address
void SendAddBaRequest(Mac48Address recipient, uint8_t tid, uint16_t startSeq, uint16_t timeout, bool immediateBAck)
Sends an ADDBA Request to establish a block ack agreement with sta addressed by recipient for tid tid...
BlockAckType
The different block ACK policies.
Handle packet fragmentation and retransmissions for data and management frames.