26 #include "ns3/traced-value.h"
34 class QosBlockedDestinations;
37 class MgtAddBaResponseHeader;
39 class AggregationCapableTransmissionListener;
72 friend class ::AmpduAggregationTest;
449 uint16_t
timeout,
bool immediateBAck);
void DoDispose(void)
Destructor implementation.
Simulation virtual time values and global simulation resolution.
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the Block Ack inactivity timeout.
uint16_t m_blockAckInactivityTimeout
the Block ACK inactivity timeout
uint32_t GetFragmentOffset(void) const
Calculate the offset for the current fragment.
uint32_t GetTxopFragmentOffset(uint32_t fragmentNumber) const
Calculate the offset for the fragment.
void VerifyBlockAck(void)
Verifies if dequeued packet has to be transmitted with ack policy Block Ack.
void StartNextPacket(void)
Start transmission for the next packet if allowed by the TxopLimit.
void NotifyCollision(void)
Notify the EDCAF that collision has occurred.
void CompleteMpduTx(Ptr< const Packet > packet, WifiMacHeader hdr, Time tstamp)
Stores an MPDU (part of an A-MPDU) in blockackagreement (i.e.
bool HasTxop(void) const
Check if the station has TXOP granted for the next MPDU.
void SendBlockAckRequest(const Bar &bar)
After that all packets, for which a block ack agreement was established, have been transmitted...
void SetAccessCategory(AcIndex ac)
Set the access category of this EDCAF.
bool NeedBarRetransmission(void)
Check if Block ACK Request should be re-transmitted.
uint8_t m_blockAckThreshold
the Block ACK threshold
uint32_t GetNextFragmentSize(void) const
Calculate the size of the next fragment.
Time GetTxopRemaining(void) const
Return the remaining duration in the current TXOP.
Ptr< MsduAggregator > m_msduAggregator
A-MSDU aggregator.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this EdcaTxopN is associated to.
BlockAckType
Enumeration for different block ACK policies.
uint32_t GetFragmentSize(void) const
Calculate the size of the current fragment.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
uint32_t GetTxopFragmentSize() const
Calculate the size of the current TXOP fragment.
void MissedBlockAck(uint8_t nMpdus)
Event handler when a Block ACK timeout has occurred.
bool m_isAccessRequestedForRts
flag whether access is requested to transmit a RTS frame
Ptr< MpduAggregator > m_mpduAggregator
A-MPDU aggregator.
AcIndex m_ac
the access category
void MissedAck(void)
Event handler when an ACK is missed.
TracedCallback< Time, Time > m_txopTrace
TXOP trace callback.
This queue contains packets for a particular access class.
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
Event handler when a DELBA frame is received.
void NotifyAccessGranted(void)
Notify the EDCAF that access has been granted.
void RemoveRetransmitPacket(uint8_t tid, Mac48Address recipient, uint16_t seqnumber)
Remove a packet after you peek in the retransmit queue and get it.
void NotifyInternalCollision(void)
Notify the EDCAF that internal collision has occurred.
std::map< Mac48Address, bool > m_aMpduEnabled
list containing flags whether A-MPDU is enabled for a given destination address
TracedValue< uint32_t > m_cwTrace
CW trace value.
TracedValue< uint32_t > m_backoffTrace
backoff trace value
uint32_t GetNTxopFragment() const
Calculate the number of TXOP fragments needed for the transmission of the current packet...
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...
Ptr< const Packet > PeekNextRetransmitPacket(WifiMacHeader &header, Mac48Address recipient, uint8_t tid, Time *timestamp)
Peek in retransmit queue and get the next packet without removing it from the queue.
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 SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ACK mechanism.
void SetMsduAggregator(const Ptr< MsduAggregator > aggr)
Set the aggregator used to construct A-MSDU subframes.
void MissedCts(void)
Event handler when a CTS timeout has occurred.
void SetTypeOfStation(TypeOfStation type)
Set type of station with the given type.
bool IsTxopFragmentation() 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.
uint32_t GetNRetryNeededPackets(Mac48Address recipient, uint8_t tid) const
Time m_currentPacketTimestamp
the current packet timestamp
friend class AggregationCapableTransmissionListener
allow AggregationCapableTransmissionListener class access
void EndTxNoAck(void)
Event handler when a transmission that does not require an ACK has completed.
bool NeedFragmentation(void) const
Check if the current packet should be fragmented.
void GotAck(void)
Event handler when an ACK is received.
Ptr< MpduAggregator > GetMpduAggregator(void) const
Returns the aggregator used to construct A-MPDU subframes.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< MsduAggregator > GetMsduAggregator(void) const
Returns the aggregator used to construct A-MSDU subframes.
Bar m_currentBar
the current BAR
bool IsEdca()
Check for EDCA.
TypeOfStation GetTypeOfStation(void) const
Return type of station.
Mac48Address MapDestAddressForAggregation(const WifiMacHeader &hdr)
This functions are used only to correctly set destination address in A-MSDU subframes.
bool SetupBlockAckIfNeeded()
If number of packets in the queue reaches m_blockAckThreshold value, an ADDBA Request frame is sent t...
bool GetBaAgreementExists(Mac48Address address, uint8_t tid) const
void SetAmpduExist(Mac48Address dest, bool enableAmpdu)
Set indication whether A-MPDU is used to transmit data to a peer station.
void BaTxOk(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver.
Time m_startTxop
the start TXOP time
uint32_t GetNextTxopFragmentSize(uint32_t fragmentNumber) const
Calculate the size of the next TXOP fragment.
bool GetAmpduExist(Mac48Address dest) const
Return whether A-MPDU is used to transmit data to a peer station.
void GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr)
Event handler when a Block ACK is received.
void DoInitialize(void)
Initialize() implementation.
void PushFront(Ptr< const Packet > packet, const WifiMacHeader &hdr)
static TypeId GetTypeId(void)
Get the type ID.
void BaTxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver.
Ptr< QosBlockedDestinations > m_qosBlockedDestinations
QOS blocked destinations.
void CompleteConfig(void)
Complete block ACK configuration.
BlockAckType m_blockAckType
the Block ACK type
void RestartAccessIfNeeded(void)
Restart access request if needed.
void CompleteAmpduTransfer(Mac48Address recipient, uint8_t tid)
uint8_t GetBlockAckThreshold(void) const
Return the current threshold for block ACK mechanism.
void CompleteTx(void)
For now is typically invoked to complete transmission of a packets sent with ack policy Block Ack: th...
bool IsLastFragment(void) const
Check if the current fragment is the last fragment.
uint16_t PeekNextSequenceNumberFor(WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...
void StartAccessIfNeeded(void)
Request access from DCF manager if needed.
bool m_currentIsFragmented
flag whether current packet is fragmented
TypeOfStation
Enumeration for type of station.
Ptr< BlockAckManager > m_baManager
the Block ACK manager
handle packet fragmentation and retransmissions.
uint32_t GetNOutstandingPacketsInBa(Mac48Address address, uint8_t tid) const
a unique identifier for an interface.
bool NeedsAccess(void) const
Check if the EDCAF requires access.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
void SetMpduAggregator(const Ptr< MpduAggregator > aggr)
Set the aggregator used to construct A-MPDU subframes.
void GotAddBaResponse(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
Event handler when an ADDBA response is received.
TypeOfStation m_typeOfStation
the type of station
Mac48Address MapSrcAddressForAggregation(const WifiMacHeader &hdr)
This functions are used only to correctly set source address in A-MSDU subframes. ...
uint16_t GetNextSequenceNumberFor(WifiMacHeader *hdr)
Return the next sequence number for the given header.