A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::HtFrameExchangeManager Class Reference

HtFrameExchangeManager handles the frame exchange sequences for HT stations. More...

#include "ht-frame-exchange-manager.h"

+ Inheritance diagram for ns3::HtFrameExchangeManager:
+ Collaboration diagram for ns3::HtFrameExchangeManager:

Public Member Functions

 HtFrameExchangeManager ()
 
 ~HtFrameExchangeManager () override
 
void CalculateAcknowledgmentTime (WifiAcknowledgment *acknowledgment) const override
 Calculate the time required to acknowledge a frame according to the given acknowledgment method.
 
Ptr< WifiMpduGetBar (AcIndex ac, std::optional< uint8_t > optTid=std::nullopt, std::optional< Mac48Address > optAddress=std::nullopt)
 Get the next BlockAckRequest or MU-BAR Trigger Frame to send, if any.
 
Ptr< MpduAggregatorGetMpduAggregator () const
 Returns the aggregator used to construct A-MPDU subframes.
 
Ptr< MsduAggregatorGetMsduAggregator () const
 Returns the aggregator used to construct A-MSDU subframes.
 
virtual bool IsWithinAmpduSizeLimit (uint32_t ampduSize, Mac48Address receiver, uint8_t tid, WifiModulationClass modulation) const
 Check whether an A-MPDU of the given size meets the constraint on the maximum size for A-MPDUs sent to the given receiver, belonging to the given TID and transmitted using the given modulation class.
 
bool IsWithinLimitsIfAddMpdu (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams, Time ppduDurationLimit) const override
 Check if the PSDU obtained by aggregating the given MPDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MPDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()).
 
virtual bool IsWithinLimitsIfAggregateMsdu (Ptr< const WifiMpdu > msdu, const WifiTxParameters &txParams, Time ppduDurationLimit) const
 Check if the PSDU obtained by aggregating the given MSDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MSDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()).
 
void SendAddBaResponse (const MgtAddBaRequestHeader &reqHdr, Mac48Address originator)
 This method can be called to accept a received ADDBA Request.
 
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 SetWifiMac (const Ptr< WifiMac > mac) override
 Set the MAC layer to use.
 
bool StartFrameExchange (Ptr< QosTxop > edca, Time availableTime, bool initialFrame) override
 Start a frame exchange (including protection frames and acknowledgment frames as needed) that fits within the given availableTime (if different than Time::Min()).
 
virtual bool TryAggregateMsdu (Ptr< const WifiMpdu > msdu, WifiTxParameters &txParams, Time availableTime) const
 Check if aggregating an MSDU to the current MPDU (as specified by the given TX parameters) does not violate the size and time constraints, while taking into account the possibly updated protection and acknowledgment methods.
 
- Public Member Functions inherited from ns3::QosFrameExchangeManager
 QosFrameExchangeManager ()
 
 ~QosFrameExchangeManager () override
 
virtual Ptr< WifiMpduCreateAliasIfNeeded (Ptr< WifiMpdu > mpdu) const
 Create an alias of the given MPDU for transmission by this Frame Exchange Manager.
 
virtual bool IsWithinSizeAndTimeLimits (uint32_t ppduPayloadSize, Mac48Address receiver, const WifiTxParameters &txParams, Time ppduDurationLimit) const
 Check whether the transmission time of the frame being built (as described by the given TX parameters) does not exceed the given PPDU duration limit if the size of the PSDU addressed to the given receiver becomes ppduPayloadSize.
 
bool StartTransmission (Ptr< Txop > edca, MHz_u allowedWidth) override
 Request the FrameExchangeManager to start a frame exchange sequence.
 
bool TryAddMpdu (Ptr< const WifiMpdu > mpdu, WifiTxParameters &txParams, Time availableTime) const
 Recompute the protection and acknowledgment methods to use if the given MPDU is added to the frame being built (as described by the given TX parameters) and check whether the duration of the frame exchange sequence (including protection and acknowledgment) does not exceed the given available time.
 
- Public Member Functions inherited from ns3::FrameExchangeManager
 FrameExchangeManager ()
 
 ~FrameExchangeManager () override
 
virtual void CalculateProtectionTime (WifiProtection *protection) const
 Calculate the time required to protect a frame according to the given protection method.
 
Ptr< WifiAckManagerGetAckManager () const
 Get the Acknowledgment Manager used by this node.
 
Mac48Address GetAddress () const
 Get the MAC address.
 
MHz_u GetAllowedWidth () const
 
Mac48Address GetBssid () const
 Get the Basic Service Set Identification.
 
std::optional< std::reference_wrapper< const OngoingRxInfo > > GetOngoingRxInfo () const
 
const std::set< Mac48Address > & GetProtectedStas () const
 
Ptr< WifiProtectionManagerGetProtectionManager () const
 Get the Protection Manager used by this node.
 
std::optional< std::reference_wrapper< const WifiMacHeader > > GetReceivedMacHdr () const
 
const WifiTxTimerGetWifiTxTimer () const
 Get a const reference to the WifiTxTimer object.
 
bool IsPromisc () const
 Check if the device is operating in promiscuous mode.
 
virtual void NotifyInternalCollision (Ptr< Txop > txop)
 Notify that an internal collision has occurred for the given Txop.
 
void NotifyOffNow ()
 This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into off mode.
 
void NotifySleepNow ()
 This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into sleep mode.
 
virtual void NotifySwitchingStartNow (Time duration)
 
void Receive (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > perMpduStatus)
 This method is intended to be called by the PHY layer every time an MPDU is received and also when the reception of an A-MPDU is completed.
 
virtual void ResetPhy ()
 Remove WifiPhy associated with this FrameExchangeManager.
 
void SetAckedMpduCallback (AckedMpdu callback)
 Set the callback to invoke when an MPDU is successfully acked.
 
virtual void SetAckManager (Ptr< WifiAckManager > ackManager)
 Set the Acknowledgment Manager to use.
 
virtual void SetAddress (Mac48Address address)
 Set the MAC address.
 
virtual void SetBssid (Mac48Address bssid)
 Set the Basic Service Set Identification.
 
virtual void SetChannelAccessManager (const Ptr< ChannelAccessManager > channelAccessManager)
 Set the channel access manager to use.
 
virtual void SetDroppedMpduCallback (DroppedMpdu callback)
 Set the callback to invoke when an MPDU is dropped.
 
virtual void SetLinkId (uint8_t linkId)
 Set the ID of the link this Frame Exchange Manager is associated with.
 
virtual void SetMacRxMiddle (const Ptr< MacRxMiddle > rxMiddle)
 Set the MAC RX Middle to use.
 
virtual void SetMacTxMiddle (const Ptr< MacTxMiddle > txMiddle)
 Set the MAC TX Middle to use.
 
void SetPromisc ()
 Enable promiscuous mode.
 
virtual void SetProtectionManager (Ptr< WifiProtectionManager > protectionManager)
 Set the Protection Manager to use.
 
virtual void SetWifiPhy (const Ptr< WifiPhy > phy)
 Set the PHY layer to use.
 
virtual bool VirtualCsMediumIdle () const
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::QosFrameExchangeManager
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::FrameExchangeManager
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Types

typedef std::pair< Mac48Address, uint8_t > AgreementKey
 agreement key typedef (MAC address and TID)
 

Protected Member Functions

virtual void BlockAckTimeout (Ptr< WifiPsdu > psdu, const WifiTxVector &txVector)
 Called when the BlockAck timeout expires.
 
void CtsTimeout (Ptr< WifiMpdu > rts, const WifiTxVector &txVector) override
 Called when the CTS timeout expires.
 
void DequeuePsdu (Ptr< const WifiPsdu > psdu)
 Dequeue the MPDUs of the given PSDU from the queue in which they are stored.
 
void DoDispose () override
 Destructor implementation.
 
void EndReceiveAmpdu (Ptr< const WifiPsdu > psdu, const RxSignalInfo &rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &perMpduStatus) override
 This method is called when the reception of an A-MPDU including multiple MPDUs is completed.
 
void FinalizeMacHeader (Ptr< const WifiPsdu > psdu) override
 Finalize the MAC header of the MPDUs in the given PSDU before transmission.
 
void ForwardMpduDown (Ptr< WifiMpdu > mpdu, WifiTxVector &txVector) override
 Forward an MPDU down to the PHY layer.
 
virtual void ForwardPsduDown (Ptr< const WifiPsdu > psdu, WifiTxVector &txVector)
 Forward a PSDU down to the PHY layer.
 
Ptr< BlockAckManagerGetBaManager (uint8_t tid) const
 Get the Block Ack Manager handling the given TID.
 
virtual Time GetPsduDurationId (Time txDuration, const WifiTxParameters &txParams) const
 Compute how to set the Duration/ID field of PSDUs that do not include fragments.
 
virtual Ptr< WifiPsduGetWifiPsdu (Ptr< WifiMpdu > mpdu, const WifiTxVector &txVector) const
 Get a PSDU containing the given MPDU.
 
virtual void MissedBlockAck (Ptr< WifiPsdu > psdu, const WifiTxVector &txVector, bool &resetCw)
 Take necessary actions when a BlockAck is missed, such as scheduling a BlockAckReq frame or the retransmission of the unacknowledged frames.
 
virtual bool NeedSetupBlockAck (Mac48Address recipient, uint8_t tid)
 A Block Ack agreement needs to be established with the given recipient for the given TID if it does not already exist (or exists and is in state RESET) and:
 
void NotifyPacketDiscarded (Ptr< const WifiMpdu > mpdu) override
 Pass the given MPDU, discarded because of the max retry limit was reached, to the MPDU dropped callback.
 
void NotifyReceivedNormalAck (Ptr< WifiMpdu > mpdu) override
 Notify other components that an MPDU was acknowledged.
 
virtual void NotifyTxToEdca (Ptr< const WifiPsdu > psdu) const
 Notify the transmission of the given PSDU to the EDCAF associated with the AC the PSDU belongs to.
 
void ProtectionCompleted () override
 Transmit prepared frame upon successful protection mechanism.
 
void ReceiveMgtAction (Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
 Process a received management action frame that relates to Block Ack agreement.
 
void ReceiveMpdu (Ptr< const WifiMpdu > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu) override
 This method handles the reception of an MPDU (possibly included in an A-MPDU)
 
void ReleaseSequenceNumbers (Ptr< const WifiPsdu > psdu) const override
 Make the sequence numbers of MPDUs included in the given PSDU available again if the MPDUs have never been transmitted.
 
void RetransmitMpduAfterMissedAck (Ptr< WifiMpdu > mpdu) const override
 Retransmit an MPDU that was not acknowledged.
 
bool SendAddBaRequest (Mac48Address recipient, uint8_t tid, uint16_t startingSeq, uint16_t timeout, bool immediateBAck, Time availableTime)
 Sends an ADDBA Request to establish a block ack agreement with STA addressed by recipient for TID tid.
 
void SendBlockAck (const RecipientBlockAckAgreement &agreement, Time durationId, WifiTxVector &blockAckTxVector, double rxSnr)
 Create a BlockAck frame with header equal to blockAck and start its transmission.
 
virtual bool SendDataFrame (Ptr< WifiMpdu > peekedItem, Time availableTime, bool initialFrame)
 Given a non-broadcast QoS data frame, prepare the PSDU to transmit by attempting A-MSDU and A-MPDU aggregation (if enabled), while making sure that the frame exchange (possibly including protection and acknowledgment) is completed within the given available time.
 
virtual bool SendMpduFromBaManager (Ptr< WifiMpdu > mpdu, Time availableTime, bool initialFrame)
 If the given MPDU contains a BlockAckReq frame (the duration of which plus the response fits within the given available time, if the latter is not Time::Min() and this is not the initial frame of a TXOP), transmit the frame and return true.
 
void SendPsduWithProtection (Ptr< WifiPsdu > psdu, WifiTxParameters &txParams)
 Send a PSDU (A-MPDU or BlockAckReq frame) requesting a BlockAck frame or a BlockAckReq frame followed by a BlockAck frame for the acknowledgment.
 
void TransmissionSucceeded () override
 Take necessary actions upon a transmission success.
 
- Protected Member Functions inherited from ns3::QosFrameExchangeManager
virtual void ClearTxopHolderIfNeeded ()
 Clear the TXOP holder if the NAV counted down to zero (includes the case of NAV reset).
 
void DoDispose () override
 Destructor implementation.
 
virtual std::optional< Mac48AddressFindTxopHolder (const WifiMacHeader &hdr, const WifiTxVector &txVector)
 Determine the holder of the TXOP, if possible, based on the received frame.
 
void ForwardMpduDown (Ptr< WifiMpdu > mpdu, WifiTxVector &txVector) override
 Forward an MPDU down to the PHY layer.
 
Time GetCtsToSelfDurationId (const WifiTxVector &ctsTxVector, Time txDuration, Time response) const override
 Compute how to set the Duration/ID field of a CTS-to-self frame to send to protect a frame transmitted with the given TX vector.
 
Time GetFrameDurationId (const WifiMacHeader &header, uint32_t size, const WifiTxParameters &txParams, Ptr< Packet > fragmentedPacket) const override
 Compute how to set the Duration/ID field of a frame being transmitted with the given TX parameters.
 
Time GetRtsDurationId (const WifiTxVector &rtsTxVector, Time txDuration, Time response) const override
 Compute how to set the Duration/ID field of an RTS frame to send to protect a frame transmitted with the given TX vector.
 
void NavResetTimeout () override
 Reset the NAV upon expiration of the NAV reset timer.
 
void PifsRecovery ()
 Perform a PIFS recovery as a response to transmission failure within a TXOP.
 
void PostProcessFrame (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) override
 Perform actions that are possibly needed after receiving any frame, independently of whether the frame is addressed to this station (e.g., setting the NAV or the TXOP holder).
 
void PreProcessFrame (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) override
 Perform actions that are possibly needed when receiving any frame, independently of whether the frame is addressed to this station (e.g., storing buffer status reports).
 
void ReceiveMpdu (Ptr< const WifiMpdu > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu) override
 This method handles the reception of an MPDU (possibly included in an A-MPDU)
 
virtual bool SendCfEndIfNeeded ()
 Send a CF-End frame to indicate the completion of the TXOP, provided that the remaining duration is long enough to transmit this frame.
 
virtual bool StartTransmission (Ptr< QosTxop > edca, Time txopDuration)
 Request the FrameExchangeManager to start a frame exchange sequence.
 
void TransmissionFailed () override
 Take necessary actions upon a transmission failure.
 
void TransmissionSucceeded () override
 Take necessary actions upon a transmission success.
 
void UpdateNav (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) override
 Update the NAV, if needed, based on the Duration/ID of the given psdu.
 
- Protected Member Functions inherited from ns3::FrameExchangeManager
virtual void DequeueMpdu (Ptr< const WifiMpdu > mpdu)
 Dequeue the given MPDU from the queue in which it is stored.
 
void DoCtsTimeout (Ptr< WifiPsdu > psdu)
 Take required actions when the CTS timer fired after sending an RTS to protect the given PSDU expires.
 
void DoSendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiTxVector &ctsTxVector, double rtsSnr)
 Send CTS after receiving RTS.
 
Ptr< WifiMpduGetFirstFragmentIfNeeded (Ptr< WifiMpdu > mpdu)
 Fragment the given MPDU if needed.
 
Ptr< WifiMpduGetNextFragment ()
 Get the next fragment of the current MSDU.
 
virtual uint32_t GetPsduSize (Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector) const
 Get the size in bytes of the given MPDU, which is to be transmitted with the given TXVECTOR.
 
virtual Time GetTxDuration (uint32_t ppduPayloadSize, Mac48Address receiver, const WifiTxParameters &txParams) const
 Get the updated TX duration of the frame associated with the given TX parameters if the size of the PSDU addressed to the given receiver becomes ppduPayloadSize.
 
Ptr< WifiRemoteStationManagerGetWifiRemoteStationManager () const
 
virtual void NormalAckTimeout (Ptr< WifiMpdu > mpdu, const WifiTxVector &txVector)
 Called when the Ack timeout expires.
 
virtual void NotifyChannelReleased (Ptr< Txop > txop)
 Notify the given Txop that channel has been released.
 
virtual void PsduRxError (Ptr< const WifiPsdu > psdu)
 This method is called when the reception of a PSDU fails.
 
virtual void ReceivedMacHdr (const WifiMacHeader &macHdr, const WifiTxVector &txVector, Time psduDuration)
 Store information about the MAC header of the MPDU being received.
 
virtual void ReceivedNormalAck (Ptr< WifiMpdu > mpdu, const WifiTxVector &txVector, const WifiTxVector &ackTxVector, const RxSignalInfo &rxInfo, double snr)
 Perform the actions needed when a Normal Ack is received.
 
virtual void Reset ()
 Reset this frame exchange manager.
 
virtual void RxStartIndication (WifiTxVector txVector, Time psduDuration)
 
virtual void SendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiMode rtsTxMode, double rtsSnr)
 Send CTS after receiving RTS.
 
void SendCtsToSelf (const WifiTxParameters &txParams)
 Send CTS for a CTS-to-self mechanism.
 
void SendMpduWithProtection (Ptr< WifiMpdu > mpdu, WifiTxParameters &txParams)
 Send an MPDU with the given TX parameters (with the specified protection).
 
void SendNormalAck (const WifiMacHeader &hdr, const WifiTxVector &dataTxVector, double dataSnr)
 Send Normal Ack.
 
void SendRts (const WifiTxParameters &txParams)
 Send RTS to begin RTS-CTS-Data-Ack transaction.
 
virtual void StartProtection (const WifiTxParameters &txParams)
 Start the protection mechanism indicated by the given TX parameters.
 
void UpdateTxDuration (Mac48Address receiver, WifiTxParameters &txParams) const
 Update the TX duration field of the given TX parameters after that the PSDU addressed to the given receiver has changed.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Protected Attributes

Ptr< MpduAggregatorm_mpduAggregator
 A-MPDU aggregator.
 
Ptr< MsduAggregatorm_msduAggregator
 A-MSDU aggregator.
 
std::map< AgreementKey, Ptr< WifiMpdu > > m_pendingAddBaResp
 pending ADDBA_RESPONSE frames indexed by agreement key
 
- Protected Attributes inherited from ns3::QosFrameExchangeManager
Ptr< QosTxopm_edca
 the EDCAF that gained channel access
 
bool m_setQosQueueSize
 whether to set the Queue Size subfield of the QoS Control field of QoS data frames
 
std::optional< Mac48Addressm_txopHolder
 MAC address of the TXOP holder.
 
- Protected Attributes inherited from ns3::FrameExchangeManager
AckedMpdu m_ackedMpduCallback
 the acknowledged MPDU callback
 
MHz_u m_allowedWidth
 the allowed width for the current transmission
 
Mac48Address m_bssid
 BSSID address (Mac48Address)
 
Ptr< ChannelAccessManagerm_channelAccessManager
 the channel access manager
 
Ptr< Txopm_dcf
 the DCF/EDCAF that gained channel access
 
DroppedMpdu m_droppedMpduCallback
 the dropped MPDU callback
 
uint8_t m_linkId
 the ID of the link this object is associated with
 
Ptr< WifiMacm_mac
 the MAC layer on this station
 
Time m_navEnd
 NAV expiration time.
 
EventId m_navResetEvent
 the event to reset the NAV after an RTS
 
Ptr< WifiPhym_phy
 the PHY layer on this station
 
bool m_promisc
 Flag if the device is operating in promiscuous mode.
 
std::set< Mac48Addressm_protectedStas
 STAs that have replied to an RTS in this TXOP.
 
Ptr< MacRxMiddlem_rxMiddle
 the MAC RX Middle on this station
 
Mac48Address m_self
 the MAC address of this device
 
std::set< Mac48Addressm_sentRtsTo
 the STA(s) which we sent an RTS to (waiting for CTS)
 
Ptr< MacTxMiddlem_txMiddle
 the MAC TX Middle on this station
 
WifiTxTimer m_txTimer
 the timer set upon frame transmission
 

Private Member Functions

void SendPsdu ()
 Send the current PSDU, which can be acknowledged by a BlockAck frame or followed by a BlockAckReq frame and a BlockAck frame.
 

Private Attributes

Ptr< WifiPsdum_psdu
 the A-MPDU being transmitted
 
WifiTxParameters m_txParams
 the TX parameters for the current frame
 

Friends

class ::AmpduAggregationTest
 allow AmpduAggregationTest class access
 

Additional Inherited Members

- Public Types inherited from ns3::FrameExchangeManager
typedef Callback< void, Ptr< const WifiMpdu > > AckedMpdu
 typedef for a callback to invoke when an MPDU is successfully acknowledged.
 
typedef Callback< void, WifiMacDropReason, Ptr< const WifiMpdu > > DroppedMpdu
 typedef for a callback to invoke when an MPDU is dropped.
 

Detailed Description

HtFrameExchangeManager handles the frame exchange sequences for HT stations.

Definition at line 31 of file ht-frame-exchange-manager.h.

Member Typedef Documentation

◆ AgreementKey

typedef std::pair<Mac48Address, uint8_t> ns3::HtFrameExchangeManager::AgreementKey
protected

agreement key typedef (MAC address and TID)

Definition at line 347 of file ht-frame-exchange-manager.h.

Constructor & Destructor Documentation

◆ HtFrameExchangeManager()

ns3::HtFrameExchangeManager::HtFrameExchangeManager ( )

Definition at line 49 of file ht-frame-exchange-manager.cc.

References ns3::CreateObject(), m_mpduAggregator, m_msduAggregator, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ ~HtFrameExchangeManager()

ns3::HtFrameExchangeManager::~HtFrameExchangeManager ( )
override

Definition at line 56 of file ht-frame-exchange-manager.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ BlockAckTimeout()

void ns3::HtFrameExchangeManager::BlockAckTimeout ( Ptr< WifiPsdu > psdu,
const WifiTxVector & txVector )
protectedvirtual

Called when the BlockAck timeout expires.

Parameters
psduthe PSDU (BlockAckReq or A-MPDU) that solicited a BlockAck response
txVectorthe TXVECTOR used to send the PSDU that solicited a BlockAck response

Reimplemented in ns3::HeFrameExchangeManager.

Definition at line 1336 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::QosFrameExchangeManager::m_edca, ns3::FrameExchangeManager::m_linkId, m_psdu, MissedBlockAck(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Txop::ResetCw(), ns3::QosFrameExchangeManager::TransmissionFailed(), and ns3::Txop::UpdateFailedCw().

Referenced by SendPsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalculateAcknowledgmentTime()

void ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime ( WifiAcknowledgment * acknowledgment) const
overridevirtual

Calculate the time required to acknowledge a frame according to the given acknowledgment method.

The acknowledgment time is stored in the acknowledgment object itself.

Parameters
acknowledgmentthe acknowledgment method

Reimplemented from ns3::FrameExchangeManager.

Definition at line 629 of file ht-frame-exchange-manager.cc.

References ns3::WifiAcknowledgment::BAR_BLOCK_ACK, ns3::WifiAcknowledgment::BLOCK_ACK, ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::WifiPhy::CalculateTxDuration(), ns3::GetBlockAckRequestSize(), ns3::GetBlockAckSize(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::FrameExchangeManager::m_phy, ns3::WifiAcknowledgment::method, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by SendPsduWithProtection(), and TryAggregateMsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CtsTimeout()

void ns3::HtFrameExchangeManager::CtsTimeout ( Ptr< WifiMpdu > rts,
const WifiTxVector & txVector )
overrideprotectedvirtual

Called when the CTS timeout expires.

Parameters
rtsthe RTS that solicited a CTS response
txVectorthe TXVECTOR used to transmit the RTS frame

Reimplemented from ns3::FrameExchangeManager.

Definition at line 960 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::CtsTimeout(), ns3::FrameExchangeManager::DoCtsTimeout(), m_psdu, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DequeuePsdu()

void ns3::HtFrameExchangeManager::DequeuePsdu ( Ptr< const WifiPsdu > psdu)
protected

Dequeue the MPDUs of the given PSDU from the queue in which they are stored.

Parameters
psduthe given PSDU

Definition at line 1113 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::DequeueMpdu(), NS_LOG_DEBUG, and ns3::PeekPointer().

Referenced by ns3::HeFrameExchangeManager::DoCtsAfterMuRtsTimeout(), MissedBlockAck(), ReceiveMpdu(), and SendPsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::HtFrameExchangeManager::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::FrameExchangeManager.

Definition at line 62 of file ht-frame-exchange-manager.cc.

References ns3::WifiTxParameters::Clear(), ns3::QosFrameExchangeManager::DoDispose(), m_mpduAggregator, m_msduAggregator, m_pendingAddBaResp, m_psdu, m_txParams, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ EndReceiveAmpdu()

void ns3::HtFrameExchangeManager::EndReceiveAmpdu ( Ptr< const WifiPsdu > psdu,
const RxSignalInfo & rxSignalInfo,
const WifiTxVector & txVector,
const std::vector< bool > & perMpduStatus )
overrideprotectedvirtual

This method is called when the reception of an A-MPDU including multiple MPDUs is completed.

Parameters
psduthe received PSDU
rxSignalInfothe info on the received signal (
See also
RxSignalInfo)
Parameters
txVectorTxVector of the received PSDU
perMpduStatusper MPDU reception status

Reimplemented from ns3::FrameExchangeManager.

Definition at line 1760 of file ht-frame-exchange-manager.cc.

References ns3::WifiPhy::GetSifs(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, ns3::WifiMacHeader::NORMAL_ACK, NS_ASSERT, NS_LOG_DEBUG, ns3::Simulator::Schedule(), SendBlockAck(), and ns3::RxSignalInfo::snr.

+ Here is the call graph for this function:

◆ FinalizeMacHeader()

void ns3::HtFrameExchangeManager::FinalizeMacHeader ( Ptr< const WifiPsdu > psdu)
overrideprotectedvirtual

Finalize the MAC header of the MPDUs in the given PSDU before transmission.

Tasks performed by this method include setting the Power Management flag in the MAC header.

Parameters
psduthe given PSDU

Reimplemented from ns3::FrameExchangeManager.

Definition at line 1078 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::FinalizeMacHeader(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsQosEosp(), ns3::FrameExchangeManager::m_mac, ns3::QosFrameExchangeManager::m_setQosQueueSize, NS_LOG_FUNCTION, ns3::PeekPointer(), ns3::WifiMacHeader::SetQosEosp(), ns3::WifiMacHeader::SetQosQueueSize(), and ns3::STA.

Referenced by ForwardPsduDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ForwardMpduDown()

void ns3::HtFrameExchangeManager::ForwardMpduDown ( Ptr< WifiMpdu > mpdu,
WifiTxVector & txVector )
overrideprotectedvirtual

Forward an MPDU down to the PHY layer.

Parameters
mpduthe MPDU to forward down
txVectorthe TXVECTOR used to transmit the MPDU

Reimplemented from ns3::FrameExchangeManager.

Definition at line 663 of file ht-frame-exchange-manager.cc.

References ForwardPsduDown(), and GetWifiPsdu().

Referenced by ns3::HeFrameExchangeManager::SendMuRts(), and SendPsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ForwardPsduDown()

void ns3::HtFrameExchangeManager::ForwardPsduDown ( Ptr< const WifiPsdu > psdu,
WifiTxVector & txVector )
protectedvirtual

Forward a PSDU down to the PHY layer.

Also, notify the Block Ack Manager of the transmission of the constituent MPDUs.

Parameters
psduthe PSDU to forward down
txVectorthe TXVECTOR used to transmit the MPDU

Reimplemented in ns3::EhtFrameExchangeManager.

Definition at line 1124 of file ht-frame-exchange-manager.cc.

References FinalizeMacHeader(), ns3::WifiTxVector::GetChannelWidth(), ns3::FrameExchangeManager::m_allowedWidth, ns3::FrameExchangeManager::m_phy, NotifyTxToEdca(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhy::Send(), and ns3::WifiTxVector::SetAggregation().

Referenced by ForwardMpduDown(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), SendBlockAck(), SendPsdu(), and ns3::HeFrameExchangeManager::SendPsduMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBaManager()

Ptr< BlockAckManager > ns3::HtFrameExchangeManager::GetBaManager ( uint8_t tid) const
protected

Get the Block Ack Manager handling the given TID.

Parameters
tidthe given TID
Returns
the Block Ack Manager handling the given TID

Definition at line 94 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::m_mac.

Referenced by MissedBlockAck(), NotifyPacketDiscarded(), NotifyReceivedNormalAck(), ReceiveMgtAction(), ReceiveMpdu(), SendAddBaRequest(), SendAddBaResponse(), and SendPsdu().

+ Here is the caller graph for this function:

◆ GetBar()

Ptr< WifiMpdu > ns3::HtFrameExchangeManager::GetBar ( AcIndex ac,
std::optional< uint8_t > optTid = std::nullopt,
std::optional< Mac48Address > optAddress = std::nullopt )

Get the next BlockAckRequest or MU-BAR Trigger Frame to send, if any.

If TID and recipient address are given, then only return a BlockAckRequest, if any, addressed to that recipient and for the given TID.

Parameters
acthe AC whose queue is searched for BlockAckRequest or Trigger Frames
optTidthe TID (optional)
optAddressthe recipient of the BAR (optional)
Returns
the next BAR or Trigger Frame to be sent, if any

Definition at line 399 of file ht-frame-exchange-manager.cc.

References ns3::Create(), ns3::FrameExchangeManager::DequeueMpdu(), ns3::CtrlBAckRequestHeader::GetStartingSequence(), ns3::CtrlBAckRequestHeader::GetTidInfo(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_self, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::CtrlBAckRequestHeader::SetStartingSequence(), ns3::WIFI_CTL_QUEUE, and ns3::WIFI_UNICAST.

Referenced by ns3::HeFrameExchangeManager::StartFrameExchange(), StartFrameExchange(), and TransmissionSucceeded().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMpduAggregator()

Ptr< MpduAggregator > ns3::HtFrameExchangeManager::GetMpduAggregator ( ) const

Returns the aggregator used to construct A-MPDU subframes.

Returns
the aggregator used to construct A-MPDU subframes.

Definition at line 88 of file ht-frame-exchange-manager.cc.

References m_mpduAggregator.

◆ GetMsduAggregator()

Ptr< MsduAggregator > ns3::HtFrameExchangeManager::GetMsduAggregator ( ) const

Returns the aggregator used to construct A-MSDU subframes.

Returns
the aggregator used to construct A-MSDU subframes.

Definition at line 82 of file ht-frame-exchange-manager.cc.

References m_msduAggregator.

◆ GetPsduDurationId()

Time ns3::HtFrameExchangeManager::GetPsduDurationId ( Time txDuration,
const WifiTxParameters & txParams ) const
protectedvirtual

Compute how to set the Duration/ID field of PSDUs that do not include fragments.

Parameters
txDurationthe duration of the PSDU transmission
txParamsthe TX parameters used to send the PSDU
Returns
the value for the Duration/ID field

Definition at line 882 of file ht-frame-exchange-manager.cc.

References ns3::QosTxop::GetRemainingTxop(), ns3::Txop::GetTxopLimit(), ns3::Time::IsZero(), ns3::WifiTxParameters::m_acknowledgment, ns3::QosFrameExchangeManager::m_edca, ns3::FrameExchangeManager::m_linkId, NS_ASSERT, NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by SendPsdu(), and ns3::HeFrameExchangeManager::SendPsduMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::HtFrameExchangeManager::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 40 of file ht-frame-exchange-manager.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetWifiPsdu()

Ptr< WifiPsdu > ns3::HtFrameExchangeManager::GetWifiPsdu ( Ptr< WifiMpdu > mpdu,
const WifiTxVector & txVector ) const
protectedvirtual

Get a PSDU containing the given MPDU.

Parameters
mpduthe given MPDU
txVectorthe TXVECTOR to use to send the MPDU
Returns
a PSDU containing the given MPDU

Reimplemented in ns3::VhtFrameExchangeManager.

Definition at line 669 of file ht-frame-exchange-manager.cc.

References ns3::Create().

Referenced by ForwardMpduDown(), SendBlockAck(), and SendMpduFromBaManager().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsWithinAmpduSizeLimit()

bool ns3::HtFrameExchangeManager::IsWithinAmpduSizeLimit ( uint32_t ampduSize,
Mac48Address receiver,
uint8_t tid,
WifiModulationClass modulation ) const
virtual

Check whether an A-MPDU of the given size meets the constraint on the maximum size for A-MPDUs sent to the given receiver, belonging to the given TID and transmitted using the given modulation class.

Parameters
ampduSizethe size in bytes of the A-MPDU.
receiverthe address of the station that is the receiver of the A-MPDU
tidthe TID of the A-MPDU
modulationthe modulation class used to transmit the A-MPDU
Returns
true if the constraint on the max A-MPDU size is met.

Definition at line 1185 of file ht-frame-exchange-manager.cc.

References m_mpduAggregator, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by IsWithinLimitsIfAddMpdu(), and IsWithinLimitsIfAggregateMsdu().

+ Here is the caller graph for this function:

◆ IsWithinLimitsIfAddMpdu()

bool ns3::HtFrameExchangeManager::IsWithinLimitsIfAddMpdu ( Ptr< const WifiMpdu > mpdu,
const WifiTxParameters & txParams,
Time ppduDurationLimit ) const
overridevirtual

Check if the PSDU obtained by aggregating the given MPDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MPDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()).

Parameters
mpduthe given MPDU
txParamsthe TX parameters
ppduDurationLimitthe constraint on the PPDU transmission time
Returns
true if the size and time constraints are met, false otherwise

Reimplemented from ns3::QosFrameExchangeManager.

Definition at line 1142 of file ht-frame-exchange-manager.cc.

References ns3::WifiTxVector::GetModulationClass(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiTxParameters::GetSize(), IsWithinAmpduSizeLimit(), ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits(), ns3::WifiTxParameters::LastAddedIsFirstMpdu(), ns3::WifiTxParameters::m_txVector, NS_ABORT_MSG, NS_ASSERT, NS_LOG_FUNCTION, and ns3::WifiTxParameters::PsduInfo::seqNumbers.

+ Here is the call graph for this function:

◆ IsWithinLimitsIfAggregateMsdu()

bool ns3::HtFrameExchangeManager::IsWithinLimitsIfAggregateMsdu ( Ptr< const WifiMpdu > msdu,
const WifiTxParameters & txParams,
Time ppduDurationLimit ) const
virtual

Check if the PSDU obtained by aggregating the given MSDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MSDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()).

Parameters
msduthe given MSDU
txParamsthe TX parameters
ppduDurationLimitthe constraint on the PPDU transmission time
Returns
true if the size and time constraints are met, false otherwise

Definition at line 1289 of file ht-frame-exchange-manager.cc.

References ns3::WifiTxParameters::PsduInfo::ampduSize, ns3::WifiTxVector::GetModulationClass(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiTxParameters::GetSize(), IsWithinAmpduSizeLimit(), ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits(), m_msduAggregator, ns3::WifiTxParameters::m_txVector, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by TryAggregateMsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MissedBlockAck()

void ns3::HtFrameExchangeManager::MissedBlockAck ( Ptr< WifiPsdu > psdu,
const WifiTxVector & txVector,
bool & resetCw )
protectedvirtual

Take necessary actions when a BlockAck is missed, such as scheduling a BlockAckReq frame or the retransmission of the unacknowledged frames.

Parameters
psduthe PSDU (BlockAckReq or A-MPDU) that solicited a BlockAck response
txVectorthe TXVECTOR used to send the PSDU that solicited a BlockAck response
[out]resetCwtrue if we shall stop retransmitting the PSDU

The BlockAckReq must be sent on the same link as the data frames to avoid issues. As an example, assume that an A-MPDU is sent on link 0, the BlockAck timer expires and the BlockAckReq is sent on another link (e.g., on link 1). When the originator processes the BlockAck response, it will not interpret a '0' in the bitmap corresponding to the transmitted MPDUs as a negative acknowledgment, because the BlockAck is received on a different link than the one on which the MPDUs are (still) inflight. Hence, such MPDUs stay inflight and are not retransmitted.

Definition at line 1361 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::DequeueMpdu(), DequeuePsdu(), GetBaManager(), ns3::CtrlBAckRequestHeader::GetTidInfo(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_mac, NotifyPacketDiscarded(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::PeekPointer().

Referenced by BlockAckTimeout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NeedSetupBlockAck()

bool ns3::HtFrameExchangeManager::NeedSetupBlockAck ( Mac48Address recipient,
uint8_t tid )
protectedvirtual

A Block Ack agreement needs to be established with the given recipient for the given TID if it does not already exist (or exists and is in state RESET) and:

  • the number of packets in the queue reaches the BlockAckThreshold value OR
  • MPDU aggregation is enabled and there is more than one packet in the queue OR
  • the station is a VHT station
Parameters
recipientaddress of the recipient.
tidtraffic ID.
Returns
true if a Block Ack agreement needs to be established, false otherwise.

Definition at line 100 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_mac, m_mpduAggregator, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_QOSDATA_QUEUE, and ns3::WIFI_UNICAST.

Referenced by StartFrameExchange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyPacketDiscarded()

void ns3::HtFrameExchangeManager::NotifyPacketDiscarded ( Ptr< const WifiMpdu > mpdu)
overrideprotectedvirtual

Pass the given MPDU, discarded because of the max retry limit was reached, to the MPDU dropped callback.

Parameters
mpduthe discarded MPDU

Reimplemented from ns3::FrameExchangeManager.

Definition at line 766 of file ht-frame-exchange-manager.cc.

References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::WifiActionHeader::ActionValue::blockAck, ns3::WifiActionHeader::GetAction(), GetBaManager(), ns3::WifiActionHeader::GetCategory(), ns3::GetTid(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::NotifyPacketDiscarded(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosTxop::ResetBa(), and ns3::Simulator::Schedule().

Referenced by ns3::HeFrameExchangeManager::DoCtsAfterMuRtsTimeout(), and MissedBlockAck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyReceivedNormalAck()

◆ NotifyTxToEdca()

void ns3::HtFrameExchangeManager::NotifyTxToEdca ( Ptr< const WifiPsdu > psdu) const
protectedvirtual

Notify the transmission of the given PSDU to the EDCAF associated with the AC the PSDU belongs to.

Parameters
psduthe PSDU to transmit

Definition at line 1061 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::m_mac, NS_LOG_FUNCTION, and ns3::PeekPointer().

Referenced by ForwardPsduDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProtectionCompleted()

void ns3::HtFrameExchangeManager::ProtectionCompleted ( )
overrideprotectedvirtual

Transmit prepared frame upon successful protection mechanism.

Reimplemented from ns3::FrameExchangeManager.

Definition at line 946 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::m_protectedStas, m_psdu, ns3::FrameExchangeManager::m_sentRtsTo, NS_LOG_FUNCTION, ns3::FrameExchangeManager::ProtectionCompleted(), and SendPsdu().

Referenced by ReceiveMpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReceiveMgtAction()

void ns3::HtFrameExchangeManager::ReceiveMgtAction ( Ptr< const WifiMpdu > mpdu,
const WifiTxVector & txVector )
protected

Process a received management action frame that relates to Block Ack agreement.

Parameters
mpduthe MPDU carrying the received management action frame
txVectorthe TXVECTOR used to transmit the management action frame

Definition at line 1670 of file ht-frame-exchange-manager.cc.

References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE, ns3::WifiActionHeader::BLOCK_ACK_DELBA, ns3::WifiActionHeader::ActionValue::blockAck, ns3::WifiPhy::CalculateTxDuration(), ns3::GetAckSize(), ns3::WifiActionHeader::GetAction(), GetBaManager(), ns3::WifiActionHeader::GetCategory(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::MgtDelBaHeader::GetTid(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::MgtDelBaHeader::IsByOriginator(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and SendAddBaResponse().

Referenced by ReceiveMpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReceiveMpdu()

void ns3::HtFrameExchangeManager::ReceiveMpdu ( Ptr< const WifiMpdu > mpdu,
RxSignalInfo rxSignalInfo,
const WifiTxVector & txVector,
bool inAmpdu )
overrideprotectedvirtual

This method handles the reception of an MPDU (possibly included in an A-MPDU)

Parameters
mpduthe received MPDU
rxSignalInfothe info on the received signal (
See also
RxSignalInfo)
Parameters
txVectorTxVector of the received PSDU
inAmpdutrue if the MPDU is part of an A-MPDU

Reimplemented from ns3::FrameExchangeManager.

Definition at line 1514 of file ht-frame-exchange-manager.cc.

References ns3::WifiTxTimer::Cancel(), DequeuePsdu(), ns3::SnrTag::Get(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiPsdu::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetBaManager(), ns3::WifiMacHeader::GetDuration(), ns3::WifiPsdu::GetHeader(), ns3::WifiTxVector::GetMode(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiMacHeader::GetQosAckPolicy(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiTxTimer::GetReason(), ns3::WifiPhy::GetSifs(), ns3::CtrlBAckRequestHeader::GetStartingSequence(), ns3::CtrlBAckRequestHeader::GetTidInfo(), ns3::CtrlBAckResponseHeader::GetTidInfo(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::WifiMacHeader::HasData(), ns3::WifiMacHeader::IsAction(), ns3::WifiMacHeader::IsBlockAck(), ns3::WifiMacHeader::IsBlockAckReq(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacHeader::IsCts(), ns3::WifiMacHeader::IsMgt(), ns3::CtrlBAckRequestHeader::IsMultiTid(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxTimer::IsRunning(), ns3::FrameExchangeManager::m_channelAccessManager, ns3::QosFrameExchangeManager::m_edca, ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, m_psdu, ns3::FrameExchangeManager::m_self, m_txParams, ns3::FrameExchangeManager::m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::WifiMacHeader::NORMAL_ACK, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, ProtectionCompleted(), ReceiveMgtAction(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::Txop::ResetCw(), ns3::Simulator::Schedule(), SendBlockAck(), ns3::FrameExchangeManager::SendNormalAck(), ns3::RxSignalInfo::snr, TransmissionSucceeded(), ns3::WifiTxTimer::WAIT_BLOCK_ACK, and ns3::WifiTxTimer::WAIT_CTS.

+ Here is the call graph for this function:

◆ ReleaseSequenceNumbers()

void ns3::HtFrameExchangeManager::ReleaseSequenceNumbers ( Ptr< const WifiPsdu > psdu) const
overrideprotectedvirtual

Make the sequence numbers of MPDUs included in the given PSDU available again if the MPDUs have never been transmitted.

Parameters
psduthe given PSDU

Reimplemented from ns3::FrameExchangeManager.

Definition at line 832 of file ht-frame-exchange-manager.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_txMiddle, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::FrameExchangeManager::ReleaseSequenceNumbers(), and ns3::SEQNO_SPACE_SIZE.

Referenced by ns3::HeFrameExchangeManager::DoCtsAfterMuRtsTimeout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RetransmitMpduAfterMissedAck()

void ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedAck ( Ptr< WifiMpdu > mpdu) const
overrideprotectedvirtual

Retransmit an MPDU that was not acknowledged.

Parameters
mpduthe MPDU to retransmit

Reimplemented from ns3::FrameExchangeManager.

Definition at line 812 of file ht-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_mac, NS_LOG_FUNCTION, and ns3::FrameExchangeManager::RetransmitMpduAfterMissedAck().

+ Here is the call graph for this function:

◆ SendAddBaRequest()

bool ns3::HtFrameExchangeManager::SendAddBaRequest ( Mac48Address recipient,
uint8_t tid,
uint16_t startingSeq,
uint16_t timeout,
bool immediateBAck,
Time availableTime )
protected

Sends an ADDBA Request to establish a block ack agreement with STA addressed by recipient for TID tid.

Parameters
recipientaddress of the recipient.
tidtraffic ID.
startingSeqthe BA agreement starting sequence number
timeouttimeout value.
immediateBAckflag to indicate whether immediate BlockAck is used.
availableTimethe amount of time allowed for the frame exchange. Equals Time::Min() in case the TXOP limit is null
Returns
true if ADDBA Request frame is transmitted, false otherwise

Definition at line 138 of file ht-frame-exchange-manager.cc.

References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::Create(), GetBaManager(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::FrameExchangeManager::m_allowedWidth, ns3::FrameExchangeManager::m_bssid, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_self, ns3::FrameExchangeManager::m_txMiddle, ns3::WifiTxParameters::m_txVector, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::FrameExchangeManager::SendMpduWithProtection(), ns3::WifiActionHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::MgtAddBaRequestHeader::SetAmsduSupport(), ns3::MgtAddBaRequestHeader::SetBufferSize(), ns3::MgtAddBaRequestHeader::SetDelayedBlockAck(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::MgtAddBaRequestHeader::SetImmediateBlockAck(), ns3::MgtAddBaRequestHeader::SetStartingSequence(), ns3::MgtAddBaRequestHeader::SetTid(), ns3::MgtAddBaRequestHeader::SetTimeout(), ns3::WifiMacHeader::SetType(), timeout, ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::WIFI_MAC_MGT_ACTION.

Referenced by StartFrameExchange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendAddBaResponse()

void ns3::HtFrameExchangeManager::SendAddBaResponse ( const MgtAddBaRequestHeader & reqHdr,
Mac48Address originator )

This method can be called to accept a received ADDBA Request.

An ADDBA Response will be constructed and queued for transmission.

Parameters
reqHdrthe received ADDBA Request header.
originatorthe MAC address of the originator.

Definition at line 212 of file ht-frame-exchange-manager.cc.

References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE, ns3::Create(), ns3::FrameExchangeManager::DequeueMpdu(), GetBaManager(), ns3::MgtAddBaRequestHeader::GetStartingSequence(), ns3::MgtAddBaRequestHeader::GetTid(), ns3::MgtAddBaRequestHeader::GetTimeout(), ns3::MgtAddBaResponseHeader::GetTimeout(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::MgtAddBaRequestHeader::IsAmsduSupported(), ns3::MgtAddBaRequestHeader::IsImmediateBlockAck(), ns3::FrameExchangeManager::m_bssid, ns3::FrameExchangeManager::m_mac, m_pendingAddBaResp, ns3::FrameExchangeManager::m_rxMiddle, ns3::FrameExchangeManager::m_self, ns3::MicroSeconds(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), SendDelbaFrame(), ns3::WifiActionHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::MgtAddBaResponseHeader::SetAmsduSupport(), ns3::MgtAddBaResponseHeader::SetBufferSize(), ns3::MgtAddBaResponseHeader::SetDelayedBlockAck(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::MgtAddBaResponseHeader::SetImmediateBlockAck(), ns3::MgtAddBaResponseHeader::SetStatusCode(), ns3::StatusCode::SetSuccess(), ns3::MgtAddBaResponseHeader::SetTid(), ns3::MgtAddBaResponseHeader::SetTimeout(), ns3::WifiMacHeader::SetType(), timeout, and ns3::WIFI_MAC_MGT_ACTION.

Referenced by ReceiveMgtAction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendBlockAck()

void ns3::HtFrameExchangeManager::SendBlockAck ( const RecipientBlockAckAgreement & agreement,
Time durationId,
WifiTxVector & blockAckTxVector,
double rxSnr )
protected

Create a BlockAck frame with header equal to blockAck and start its transmission.

Parameters
agreementthe agreement the Block Ack response belongs to
durationIdthe Duration/ID of the frame soliciting this Block Ack response
blockAckTxVectorthe transmit vector for the Block Ack response
rxSnrthe receive SNR

Definition at line 1463 of file ht-frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::Create(), ns3::RecipientBlockAckAgreement::FillBlockAckBitmap(), ForwardPsduDown(), ns3::BlockAckAgreement::GetBlockAckType(), ns3::BlockAckAgreement::GetPeer(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::BlockAckAgreement::GetTid(), GetWifiPsdu(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::Time::IsStrictlyNegative(), ns3::FrameExchangeManager::m_phy, ns3::FrameExchangeManager::m_self, NS_LOG_FUNCTION, ns3::Seconds(), ns3::SnrTag::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::CtrlBAckResponseHeader::SetTidInfo(), ns3::CtrlBAckResponseHeader::SetType(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_BACKRESP.

Referenced by EndReceiveAmpdu(), and ReceiveMpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendDataFrame()

bool ns3::HtFrameExchangeManager::SendDataFrame ( Ptr< WifiMpdu > peekedItem,
Time availableTime,
bool initialFrame )
protectedvirtual

Given a non-broadcast QoS data frame, prepare the PSDU to transmit by attempting A-MSDU and A-MPDU aggregation (if enabled), while making sure that the frame exchange (possibly including protection and acknowledgment) is completed within the given available time.

Parameters
peekedItemthe given non-broadcast QoS data frame
availableTimethe amount of time allowed for the frame exchange. Equals Time::Min() in case the TXOP limit is null
initialFrametrue if the frame being transmitted is the initial frame of the TXOP. This is used to determine whether the TXOP limit can be exceeded
Returns
true if frame is transmitted, false otherwise

Definition at line 582 of file ht-frame-exchange-manager.cc.

References ns3::WifiAcknowledgment::BAR_BLOCK_ACK, ns3::Create(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_allowedWidth, ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_mac, m_mpduAggregator, ns3::WifiTxParameters::m_txVector, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::FrameExchangeManager::SendMpduWithProtection(), and SendPsduWithProtection().

Referenced by StartFrameExchange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendDelbaFrame()

void ns3::HtFrameExchangeManager::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.

Parameters
addraddress of the recipient.
tidtraffic ID.
byOriginatorflag to indicate whether this is set by the originator.

Definition at line 311 of file ht-frame-exchange-manager.cc.

References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_DELBA, ns3::Create(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::FrameExchangeManager::m_bssid, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_self, NS_LOG_FUNCTION, ns3::WifiActionHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::MgtDelBaHeader::SetByOriginator(), ns3::MgtDelBaHeader::SetByRecipient(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::MgtDelBaHeader::SetTid(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_MGT_ACTION.

Referenced by SendAddBaResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendMpduFromBaManager()

bool ns3::HtFrameExchangeManager::SendMpduFromBaManager ( Ptr< WifiMpdu > mpdu,
Time availableTime,
bool initialFrame )
protectedvirtual

If the given MPDU contains a BlockAckReq frame (the duration of which plus the response fits within the given available time, if the latter is not Time::Min() and this is not the initial frame of a TXOP), transmit the frame and return true.

Otherwise, return false.

Parameters
mpduthe given MPDU
availableTimethe amount of time allowed for the frame exchange. Equals Time::Min() in case the TXOP limit is null
initialFrametrue if the frame being transmitted is the initial frame of the TXOP. This is used to determine whether the TXOP limit can be exceeded
Returns
true if frame is transmitted, false otherwise

Definition at line 543 of file ht-frame-exchange-manager.cc.

References ns3::WifiAcknowledgment::BLOCK_ACK, GetWifiPsdu(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_allowedWidth, ns3::WifiTxParameters::m_txVector, NS_ABORT_IF, NS_LOG_DEBUG, NS_LOG_FUNCTION, SendPsduWithProtection(), and ns3::QosFrameExchangeManager::TryAddMpdu().

Referenced by StartFrameExchange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendPsdu()

void ns3::HtFrameExchangeManager::SendPsdu ( )
private

Send the current PSDU, which can be acknowledged by a BlockAck frame or followed by a BlockAckReq frame and a BlockAck frame.

Definition at line 977 of file ht-frame-exchange-manager.cc.

References ns3::WifiAcknowledgment::BAR_BLOCK_ACK, ns3::WifiPsdu::begin(), ns3::WifiAcknowledgment::BLOCK_ACK, BlockAckTimeout(), ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiPhy::CalculateTxDuration(), DequeuePsdu(), ForwardMpduDown(), ForwardPsduDown(), ns3::WifiPsdu::GetAckPolicyForTid(), ns3::WifiPsdu::GetAddr1(), GetBaManager(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiPhy::GetPhyBand(), GetPsduDurationId(), ns3::WifiPhy::GetSifs(), ns3::WifiPsdu::GetSize(), ns3::WifiPhy::GetSlot(), ns3::WifiPsdu::GetTids(), ns3::WifiTxTimer::IsRunning(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_channelAccessManager, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, m_psdu, m_txParams, ns3::FrameExchangeManager::m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::WifiMacHeader::NO_ACK, ns3::WifiAcknowledgment::NONE, NS_ABORT_MSG, NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::WifiTxTimer::Set(), ns3::WifiPsdu::SetDuration(), timeout, TransmissionSucceeded(), and ns3::WifiTxTimer::WAIT_BLOCK_ACK.

Referenced by ProtectionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendPsduWithProtection()

void ns3::HtFrameExchangeManager::SendPsduWithProtection ( Ptr< WifiPsdu > psdu,
WifiTxParameters & txParams )
protected

Send a PSDU (A-MPDU or BlockAckReq frame) requesting a BlockAck frame or a BlockAckReq frame followed by a BlockAck frame for the acknowledgment.

Note that txParams is moved to m_txParams and hence is left in an undefined state.

Parameters
psduthe PSDU to send
txParamsthe TX parameters to use to transmit the PSDU

Definition at line 903 of file ht-frame-exchange-manager.cc.

References CalculateAcknowledgmentTime(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_linkId, ns3::WifiTxParameters::m_protection, m_psdu, m_txParams, ns3::WifiProtection::NONE, NS_ASSERT, NS_LOG_FUNCTION, ns3::PeekPointer(), ns3::WifiAckManager::SetQosAckPolicy(), and ns3::FrameExchangeManager::StartProtection().

Referenced by SendDataFrame(), and SendMpduFromBaManager().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWifiMac()

void ns3::HtFrameExchangeManager::SetWifiMac ( const Ptr< WifiMac > mac)
overridevirtual

Set the MAC layer to use.

Parameters
macthe MAC layer to use

Reimplemented from ns3::FrameExchangeManager.

Definition at line 74 of file ht-frame-exchange-manager.cc.

References m_mpduAggregator, m_msduAggregator, and ns3::FrameExchangeManager::SetWifiMac().

+ Here is the call graph for this function:

◆ StartFrameExchange()

bool ns3::HtFrameExchangeManager::StartFrameExchange ( Ptr< QosTxop > edca,
Time availableTime,
bool initialFrame )
overridevirtual

Start a frame exchange (including protection frames and acknowledgment frames as needed) that fits within the given availableTime (if different than Time::Min()).

Parameters
edcathe EDCAF which has been granted the opportunity to transmit
availableTimethe amount of time allowed for the frame exchange. Pass Time::Min() in case the TXOP limit is null
initialFrametrue if the frame being transmitted is the initial frame of the TXOP. This is used to determine whether the TXOP limit can be exceeded
Returns
true if a frame exchange is started, false otherwise

Reimplemented from ns3::QosFrameExchangeManager.

Definition at line 340 of file ht-frame-exchange-manager.cc.

References ns3::QosFrameExchangeManager::CreateAliasIfNeeded(), ns3::WifiMacHeader::GetAddr1(), GetBar(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::FrameExchangeManager::GetWifiRemoteStationManager(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_txMiddle, NeedSetupBlockAck(), NS_LOG_DEBUG, NS_LOG_FUNCTION, SendAddBaRequest(), SendDataFrame(), SendMpduFromBaManager(), and ns3::QosFrameExchangeManager::StartFrameExchange().

Referenced by ns3::HeFrameExchangeManager::StartFrameExchange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TransmissionSucceeded()

void ns3::HtFrameExchangeManager::TransmissionSucceeded ( )
overrideprotectedvirtual

Take necessary actions upon a transmission success.

A non-QoS station transmits the next fragment, if any, or releases the channel, otherwise.

Reimplemented from ns3::FrameExchangeManager.

Definition at line 742 of file ht-frame-exchange-manager.cc.

References ns3::QosTxop::GetAccessCategory(), GetBar(), ns3::WifiPhy::GetSifs(), ns3::Txop::GetTxopLimit(), ns3::Time::IsZero(), ns3::QosFrameExchangeManager::m_edca, ns3::FrameExchangeManager::m_linkId, ns3::FrameExchangeManager::m_phy, NS_LOG_DEBUG, ns3::Simulator::Schedule(), ns3::Seconds(), ns3::FrameExchangeManager::StartTransmission(), and ns3::QosFrameExchangeManager::TransmissionSucceeded().

Referenced by ReceiveMpdu(), and SendPsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TryAggregateMsdu()

bool ns3::HtFrameExchangeManager::TryAggregateMsdu ( Ptr< const WifiMpdu > msdu,
WifiTxParameters & txParams,
Time availableTime ) const
virtual

Check if aggregating an MSDU to the current MPDU (as specified by the given TX parameters) does not violate the size and time constraints, while taking into account the possibly updated protection and acknowledgment methods.

If size and time constraints are met, the TX parameters are modified with the updated protection and acknowledgment methods.

Parameters
msduthe given MSDU
txParamsthe TX parameters
availableTimethe constraint on the TX time of the PSDU, if different than Time::Min()
Returns
true if aggregating an MSDU to the current PSDU does not violate the size and time constraints

Definition at line 1210 of file ht-frame-exchange-manager.cc.

References ns3::WifiTxParameters::AggregateMsdu(), CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::FrameExchangeManager::GetAckManager(), ns3::FrameExchangeManager::GetProtectionManager(), IsWithinLimitsIfAggregateMsdu(), ns3::WifiTxParameters::m_acknowledgment, ns3::WifiTxParameters::m_protection, ns3::WifiTxParameters::m_txDuration, ns3::Time::Min(), NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiTxParameters::UndoAddMpdu(), and ns3::FrameExchangeManager::UpdateTxDuration().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ ::AmpduAggregationTest

friend class ::AmpduAggregationTest
friend

allow AmpduAggregationTest class access

Definition at line 35 of file ht-frame-exchange-manager.h.

Member Data Documentation

◆ m_mpduAggregator

Ptr<MpduAggregator> ns3::HtFrameExchangeManager::m_mpduAggregator
protected

◆ m_msduAggregator

Ptr<MsduAggregator> ns3::HtFrameExchangeManager::m_msduAggregator
protected

◆ m_pendingAddBaResp

std::map<AgreementKey, Ptr<WifiMpdu> > ns3::HtFrameExchangeManager::m_pendingAddBaResp
protected

pending ADDBA_RESPONSE frames indexed by agreement key

Definition at line 353 of file ht-frame-exchange-manager.h.

Referenced by DoDispose(), NotifyReceivedNormalAck(), and SendAddBaResponse().

◆ m_psdu

Ptr<WifiPsdu> ns3::HtFrameExchangeManager::m_psdu
private

the A-MPDU being transmitted

Definition at line 362 of file ht-frame-exchange-manager.h.

Referenced by BlockAckTimeout(), CtsTimeout(), DoDispose(), ProtectionCompleted(), ReceiveMpdu(), SendPsdu(), and SendPsduWithProtection().

◆ m_txParams

WifiTxParameters ns3::HtFrameExchangeManager::m_txParams
private

the TX parameters for the current frame

Definition at line 363 of file ht-frame-exchange-manager.h.

Referenced by DoDispose(), ReceiveMpdu(), SendPsdu(), and SendPsduWithProtection().


The documentation for this class was generated from the following files: