26 #include "ns3/traced-value.h" 35 class QosBlockedDestinations;
38 class MgtAddBaResponseHeader;
40 class AggregationCapableTransmissionListener;
94 friend class ::AmpduAggregationTest;
445 uint16_t
timeout,
bool immediateBAck);
bool GetBaAgreementExists(Mac48Address address, uint8_t tid) const
AcIndex m_ac
the access category
void MissedAck(void)
Event handler when an ACK is missed.
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 VerifyBlockAck(void)
Verifies if dequeued packet has to be transmitted with ack policy Block Ack.
void RestartAccessIfNeeded(void)
Restart access request if needed.
BlockAckType m_blockAckType
the Block ACK type
Ptr< MpduAggregator > GetMpduAggregator(void) const
Returns the aggregator used to construct A-MPDU subframes.
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
bool SetupBlockAckIfNeeded()
If number of packets in the queue reaches m_blockAckThreshold value, an ADDBA Request frame is sent t...
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.
uint32_t GetTxopFragmentSize() const
Calculate the size of the current TXOP fragment.
Ptr< MpduAggregator > m_mpduAggregator
A-MPDU aggregator.
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...
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.
uint16_t GetNextSequenceNumberFor(WifiMacHeader *hdr)
Return the next sequence number for the given header.
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...
bool IsLastFragment(void) const
Check if the current fragment is the last fragment.
void SetMsduAggregator(const Ptr< MsduAggregator > aggr)
Set the aggregator used to construct A-MSDU subframes.
bool IsTxopFragmentation() const
Check if the current packet is fragmented because of an exceeded TXOP duration.
Ptr< MsduAggregator > m_msduAggregator
A-MSDU aggregator.
uint32_t GetFragmentOffset(void) const
Calculate the offset for the current fragment.
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 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
void CompleteAmpduTransfer(Mac48Address recipient, uint8_t tid)
TracedValue< uint32_t > m_backoffTrace
backoff trace value
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.
void MissedCts(void)
Event handler when a CTS timeout has occurred.
uint32_t GetFragmentSize(void) const
Calculate the size of the current fragment.
void PushFront(Ptr< const Packet > packet, const WifiMacHeader &hdr)
uint32_t GetNTxopFragment() const
Calculate the number of TXOP fragments needed for the transmission of the current packet...
bool IsQosTxop() const
Check for QoS TXOP.
void SetMpduAggregator(const Ptr< MpduAggregator > aggr)
Set the aggregator used to construct A-MPDU subframes.
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 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.
TracedValue< uint32_t > m_cwTrace
CW trace value.
uint8_t m_blockAckThreshold
the Block ACK threshold
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.
void RemoveRetransmitPacket(uint8_t tid, Mac48Address recipient, uint16_t seqnumber)
Remove a packet after you peek in the retransmit queue and get it.
Ptr< const Packet > PeekNextRetransmitPacket(WifiMacHeader &header, uint8_t tid, Time *timestamp)
Peek in retransmit queue and get the next packet without removing it from the queue.
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.
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. ...
TypeOfStation GetTypeOfStation(void) const
Return type of station.
Ptr< QosBlockedDestinations > m_qosBlockedDestinations
QOS blocked destinations.
void NotifyAccessGranted(void)
Notify the EDCAF that access has been granted.
void CompleteMpduTx(Ptr< const Packet > packet, WifiMacHeader hdr, Time tstamp)
Stores an MPDU (part of an A-MPDU) in blockackagreement (i.e.
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.
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
Ptr< Packet > GetFragmentPacket(WifiMacHeader *hdr)
Get the next fragment from the packet with appropriate Wifi header for the fragment.
uint16_t m_blockAckInactivityTimeout
the Block ACK inactivity timeout
bool HasTxop(void) const
Check if the station has TXOP granted for the next MPDU.
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 ...
std::map< Mac48Address, bool > m_aMpduEnabled
list containing flags whether A-MPDU is enabled for a given destination address
Ptr< MsduAggregator > GetMsduAggregator(void) const
Returns the aggregator used to construct A-MSDU subframes.
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.
uint16_t PeekNextSequenceNumberFor(WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...