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

FrameExchangeManager is a base class handling the basic frame exchange sequences for non-QoS stations. More...

#include "frame-exchange-manager.h"

+ Inheritance diagram for ns3::FrameExchangeManager:
+ Collaboration diagram for ns3::FrameExchangeManager:

Classes

struct  OngoingRxInfo
 Information about the MPDU being received. More...
 

Public Types

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.
 

Public Member Functions

 FrameExchangeManager ()
 
 ~FrameExchangeManager () override
 
virtual void CalculateAcknowledgmentTime (WifiAcknowledgment *acknowledgment) const
 Calculate the time required to acknowledge a frame according to the given acknowledgment method.
 
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, const WifiTxVector &txVector, const 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 SetWifiMac (const Ptr< WifiMac > mac)
 Set the MAC layer to use.
 
virtual void SetWifiPhy (const Ptr< WifiPhy > phy)
 Set the PHY layer to use.
 
virtual bool StartTransmission (Ptr< Txop > dcf, MHz_u allowedWidth)
 Request the FrameExchangeManager to start a frame exchange sequence.
 
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::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

virtual void CtsTimeout (Ptr< WifiMpdu > rts, const WifiTxVector &txVector)
 Called when the CTS timeout expires.
 
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 DoDispose () override
 Destructor implementation.
 
void DoSendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiTxVector &ctsTxVector, double rtsSnr)
 Send CTS after receiving RTS.
 
Ptr< WifiMpduDropMpduIfRetryLimitReached (Ptr< WifiPsdu > psdu)
 Wrapper for the GetMpdusToDropOnTxFailure function of the remote station manager that additionally drops the MPDUs in the given PSDU that the remote station manager requested to drop.
 
virtual void EndReceiveAmpdu (Ptr< const WifiPsdu > psdu, const RxSignalInfo &rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &perMpduStatus)
 This method is called when the reception of an A-MPDU including multiple MPDUs is completed.
 
virtual void FinalizeMacHeader (Ptr< const WifiPsdu > psdu)
 Finalize the MAC header of the MPDUs in the given PSDU before transmission.
 
virtual void ForwardMpduDown (Ptr< WifiMpdu > mpdu, WifiTxVector &txVector)
 Forward an MPDU down to the PHY layer.
 
virtual Time GetCtsToSelfDurationId (const WifiTxVector &ctsTxVector, Time txDuration, Time response) const
 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.
 
Ptr< WifiMpduGetFirstFragmentIfNeeded (Ptr< WifiMpdu > mpdu)
 Fragment the given MPDU if needed.
 
virtual Time GetFrameDurationId (const WifiMacHeader &header, uint32_t size, const WifiTxParameters &txParams, Ptr< Packet > fragmentedPacket) const
 Compute how to set the Duration/ID field of a frame being transmitted with the given TX parameters.
 
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 GetRtsDurationId (const WifiTxVector &rtsTxVector, Time txDuration, Time response) const
 Compute how to set the Duration/ID field of an RTS frame to send to protect a frame transmitted with the given TX vector.
 
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 NavResetTimeout ()
 Reset the NAV upon expiration of the NAV reset timer.
 
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 NotifyPacketDiscarded (Ptr< const WifiMpdu > mpdu)
 Pass the given MPDU, discarded because of the max retry limit was reached, to the MPDU dropped callback.
 
virtual void NotifyReceivedNormalAck (Ptr< WifiMpdu > mpdu)
 Notify other components that an MPDU was acknowledged.
 
virtual void PostProcessFrame (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 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).
 
virtual void PreProcessFrame (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 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).
 
virtual void ProtectionCompleted ()
 Transmit prepared frame immediately, if no protection was used, or in a SIFS, if protection was completed successfully.
 
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 ReceiveMpdu (Ptr< const WifiMpdu > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu)
 This method handles the reception of an MPDU (possibly included in an A-MPDU)
 
virtual void ReleaseSequenceNumbers (Ptr< const WifiPsdu > psdu) const
 Make the sequence numbers of MPDUs included in the given PSDU available again if the MPDUs have never been transmitted.
 
virtual void Reset ()
 Reset this frame exchange manager.
 
virtual void RetransmitMpduAfterMissedAck (Ptr< WifiMpdu > mpdu) const
 Retransmit an MPDU that was not acknowledged.
 
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.
 
virtual void TransmissionFailed (bool forceCurrentCw=false)
 Take necessary actions upon a transmission failure.
 
virtual void TransmissionSucceeded ()
 Take necessary actions upon a transmission success.
 
virtual void UpdateNav (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 Update the NAV, if needed, based on the Duration/ID of the given psdu.
 
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

AckedMpdu m_ackedMpduCallback
 the acknowledged MPDU callback
 
MHz_u m_allowedWidth
 the allowed width for the current transmission
 
Ptr< ApWifiMacm_apMac
 AP MAC layer pointer (null if not an AP)
 
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.
 
bool m_protectedIfResponded
 whether a STA is assumed to be protected if replied to a frame requiring acknowledgment
 
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_sentFrameTo
 the STA(s) to which we sent a frame requesting a response
 
std::set< Mac48Addressm_sentRtsTo
 the STA(s) which we sent an RTS to (waiting for CTS)
 
Ptr< StaWifiMacm_staMac
 STA MAC layer pointer (null if not a STA)
 
Ptr< MacTxMiddlem_txMiddle
 the MAC TX Middle on this station
 
Time m_txNav
 the TXNAV timer
 
WifiTxTimer m_txTimer
 the timer set upon frame transmission
 

Private Member Functions

void SendMpdu ()
 Send the current MPDU, which can be acknowledged by a Normal Ack.
 

Private Attributes

Ptr< WifiAckManagerm_ackManager
 Acknowledgment manager.
 
Ptr< Packetm_fragmentedPacket
 the MSDU being fragmented
 
bool m_moreFragments
 true if a fragment has to be sent after a SIFS
 
Ptr< WifiMpdum_mpdu
 the MPDU being transmitted
 
OngoingRxInfo m_ongoingRxInfo {}
 information about the MAC header of the MPDU being received
 
Ptr< WifiProtectionManagerm_protectionManager
 Protection manager.
 
WifiTxParameters m_txParams
 the TX parameters for the current frame
 

Additional Inherited Members

Detailed Description

FrameExchangeManager is a base class handling the basic frame exchange sequences for non-QoS stations.

The fragmentation policy implemented uses a simple fragmentation threshold: any packet bigger than this threshold is fragmented in fragments whose size is smaller than the threshold.

The retransmission policy is also very simple: every packet is retransmitted until it is either successfully transmitted or it has been retransmitted up until the SSRC or SLRC thresholds.

Config Paths

ns3::FrameExchangeManager is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/FrameExchangeManagers/[i]"

Attributes

  • ProtectedIfResponded: Whether a station is assumed to be protected if replied to a frame requiring acknowledgment. If a station is protected, subsequent transmissions to the same station in the same TXOP are not preceded by protection mechanisms.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread
    • Support level: SUPPORTED

No TraceSources are defined for this type.
Group: Wifi

Size of this type is 1160 bytes (on a 64-bit architecture).

Definition at line 59 of file frame-exchange-manager.h.

Member Typedef Documentation

◆ AckedMpdu

typedef for a callback to invoke when an MPDU is successfully acknowledged.

Definition at line 77 of file frame-exchange-manager.h.

◆ DroppedMpdu

typedef for a callback to invoke when an MPDU is dropped.

Definition at line 73 of file frame-exchange-manager.h.

Constructor & Destructor Documentation

◆ FrameExchangeManager()

ns3::FrameExchangeManager::FrameExchangeManager ( )

Definition at line 55 of file frame-exchange-manager.cc.

References NS_LOG_FUNCTION.

◆ ~FrameExchangeManager()

ns3::FrameExchangeManager::~FrameExchangeManager ( )
override

Definition at line 66 of file frame-exchange-manager.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ CalculateAcknowledgmentTime()

void ns3::FrameExchangeManager::CalculateAcknowledgmentTime ( WifiAcknowledgment * acknowledgment) const
virtual

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 in ns3::HeFrameExchangeManager, and ns3::HtFrameExchangeManager.

Definition at line 681 of file frame-exchange-manager.cc.

References ns3::WifiAcknowledgment::acknowledgmentTime, ns3::WifiPhy::CalculateTxDuration(), ns3::GetAckSize(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), m_phy, ns3::WifiAcknowledgment::method, ns3::WifiAcknowledgment::NONE, ns3::WifiAcknowledgment::NORMAL_ACK, NS_ASSERT, NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), SendMpduWithProtection(), and ns3::QosFrameExchangeManager::TryAddMpdu().

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

◆ CalculateProtectionTime()

void ns3::FrameExchangeManager::CalculateProtectionTime ( WifiProtection * protection) const
virtual

Calculate the time required to protect a frame according to the given protection method.

The protection time is stored in the protection object itself.

Parameters
protectionthe protection method

Reimplemented in ns3::HeFrameExchangeManager.

Definition at line 649 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiProtection::CTS_TO_SELF, ns3::GetCtsSize(), ns3::WifiPhy::GetPhyBand(), ns3::GetRtsSize(), ns3::WifiPhy::GetSifs(), m_phy, ns3::WifiProtection::method, ns3::WifiProtection::NONE, NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiProtection::protectionTime, ns3::WifiProtection::RTS_CTS, and ns3::Seconds().

Referenced by ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().

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

◆ CtsTimeout()

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

Called when the CTS timeout expires.

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

Reimplemented in ns3::HeFrameExchangeManager, and ns3::HtFrameExchangeManager.

Definition at line 1059 of file frame-exchange-manager.cc.

References ns3::Create(), DoCtsTimeout(), m_mpdu, and NS_LOG_FUNCTION.

Referenced by ns3::HeFrameExchangeManager::CtsTimeout(), ns3::HtFrameExchangeManager::CtsTimeout(), ns3::HeFrameExchangeManager::DoCtsAfterMuRtsTimeout(), and SendRts().

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

◆ DequeueMpdu()

void ns3::FrameExchangeManager::DequeueMpdu ( Ptr< const WifiMpdu > mpdu)
protectedvirtual

Dequeue the given MPDU from the queue in which it is stored.

Parameters
mpduthe given MPDU

Definition at line 632 of file frame-exchange-manager.cc.

References m_mac, and NS_LOG_DEBUG.

Referenced by ns3::HtFrameExchangeManager::DequeuePsdu(), DropMpduIfRetryLimitReached(), ns3::HtFrameExchangeManager::GetBar(), ReceivedNormalAck(), ns3::HtFrameExchangeManager::SendAddBaResponse(), and SendMpdu().

+ Here is the caller graph for this function:

◆ DoCtsTimeout()

void ns3::FrameExchangeManager::DoCtsTimeout ( Ptr< WifiPsdu > psdu)
protected

Take required actions when the CTS timer fired after sending an RTS to protect the given PSDU expires.

Parameters
psduthe PSDU protected by the failed RTS

Definition at line 1068 of file frame-exchange-manager.cc.

References DropMpduIfRetryLimitReached(), GetWifiRemoteStationManager(), m_linkId, m_sentRtsTo, NS_LOG_FUNCTION, ns3::PeekPointer(), ReleaseSequenceNumbers(), and TransmissionFailed().

Referenced by CtsTimeout(), ns3::HeFrameExchangeManager::CtsTimeout(), and ns3::HtFrameExchangeManager::CtsTimeout().

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

◆ DoDispose()

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

Reimplemented in ns3::HeFrameExchangeManager, ns3::HtFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 89 of file frame-exchange-manager.cc.

References ns3::Object::DoDispose(), m_ackManager, m_apMac, m_channelAccessManager, m_fragmentedPacket, m_mac, m_protectionManager, m_rxMiddle, m_staMac, m_txMiddle, NS_LOG_FUNCTION, Reset(), and ResetPhy().

Referenced by ns3::QosFrameExchangeManager::DoDispose().

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

◆ DoSendCtsAfterRts()

void ns3::FrameExchangeManager::DoSendCtsAfterRts ( const WifiMacHeader & rtsHdr,
WifiTxVector & ctsTxVector,
double rtsSnr )
protected

Send CTS after receiving RTS.

Parameters
rtsHdrthe header of the received RTS
ctsTxVectorthe TXVECTOR to use to transmit the CTS
rtsSnrthe SNR of the RTS in linear scale

Definition at line 811 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::Create(), ForwardMpduDown(), ns3::WifiMacHeader::GetAddr2(), ns3::GetCtsSize(), ns3::WifiMacHeader::GetDuration(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::Time::IsStrictlyNegative(), m_phy, NS_LOG_FUNCTION, ns3::Seconds(), ns3::SnrTag::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_CTS.

Referenced by SendCtsAfterRts().

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

◆ DropMpduIfRetryLimitReached()

Ptr< WifiMpdu > ns3::FrameExchangeManager::DropMpduIfRetryLimitReached ( Ptr< WifiPsdu > psdu)
protected

Wrapper for the GetMpdusToDropOnTxFailure function of the remote station manager that additionally drops the MPDUs in the given PSDU that the remote station manager requested to drop.

Parameters
psduthe given PSDU
Returns
an MPDU that has been dropped, if any, to be notified to the remote station manager through the appropriate function

Definition at line 1008 of file frame-exchange-manager.cc.

References DequeueMpdu(), GetWifiRemoteStationManager(), NotifyPacketDiscarded(), and NS_LOG_FUNCTION.

Referenced by ns3::HeFrameExchangeManager::DoCtsAfterMuRtsTimeout(), DoCtsTimeout(), ns3::HtFrameExchangeManager::MissedBlockAck(), NormalAckTimeout(), and NotifyInternalCollision().

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

◆ EndReceiveAmpdu()

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

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 in ns3::EhtFrameExchangeManager, ns3::HeFrameExchangeManager, and ns3::HtFrameExchangeManager.

Definition at line 1495 of file frame-exchange-manager.cc.

References NS_ASSERT_MSG.

Referenced by Receive().

+ Here is the caller graph for this function:

◆ FinalizeMacHeader()

void ns3::FrameExchangeManager::FinalizeMacHeader ( Ptr< const WifiPsdu > psdu)
protectedvirtual

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

Definition at line 602 of file frame-exchange-manager.cc.

References m_linkId, m_mac, NS_ABORT_MSG, NS_LOG_FUNCTION, ns3::PeekPointer(), ns3::STA, ns3::StaticCast(), ns3::WIFI_PM_ACTIVE, ns3::WIFI_PM_POWERSAVE, ns3::WIFI_PM_SWITCHING_TO_ACTIVE, and ns3::WIFI_PM_SWITCHING_TO_PS.

Referenced by ns3::HtFrameExchangeManager::FinalizeMacHeader(), and ForwardMpduDown().

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

◆ ForwardMpduDown()

void ns3::FrameExchangeManager::ForwardMpduDown ( Ptr< WifiMpdu > mpdu,
WifiTxVector & txVector )
protectedvirtual

Forward an MPDU down to the PHY layer.

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

Reimplemented in ns3::HtFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 583 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::Create(), FinalizeMacHeader(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiPhy::GetPhyBand(), m_allowedWidth, m_phy, m_txNav, Max, ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::WifiPhy::Send().

Referenced by DoSendCtsAfterRts(), ns3::QosFrameExchangeManager::ForwardMpduDown(), SendCtsToSelf(), SendMpdu(), SendNormalAck(), and SendRts().

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

◆ GetAckManager()

Ptr< WifiAckManager > ns3::FrameExchangeManager::GetAckManager ( ) const

Get the Acknowledgment Manager used by this node.

Returns
the Acknowledgment Manager used by this node

Definition at line 127 of file frame-exchange-manager.cc.

References m_ackManager.

Referenced by ns3::EhtFrameExchangeManager::SetLinkId(), ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().

+ Here is the caller graph for this function:

◆ GetAddress()

Mac48Address ns3::FrameExchangeManager::GetAddress ( ) const

Get the MAC address.

Returns
the MAC address

Definition at line 226 of file frame-exchange-manager.cc.

References m_self.

Referenced by ns3::EhtFrameExchangeManager::CreateAliasIfNeeded().

+ Here is the caller graph for this function:

◆ GetAllowedWidth()

MHz_u ns3::FrameExchangeManager::GetAllowedWidth ( ) const
Returns
the width of the channel that the FEM is allowed to use for the current transmission

Definition at line 245 of file frame-exchange-manager.cc.

References m_allowedWidth.

◆ GetBssid()

Mac48Address ns3::FrameExchangeManager::GetBssid ( ) const

Get the Basic Service Set Identification.

Returns
the BSSID

Definition at line 239 of file frame-exchange-manager.cc.

References m_bssid.

◆ GetCtsToSelfDurationId()

Time ns3::FrameExchangeManager::GetCtsToSelfDurationId ( const WifiTxVector & ctsTxVector,
Time txDuration,
Time response ) const
protectedvirtual

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.

Parameters
ctsTxVectorthe TX vector used to send the CTS-to-self frame
txDurationthe TX duration of the data frame
responsethe time taken by the response (acknowledgment) to the data frame
Returns
the computed Duration/ID value for the CTS-to-self frame

Reimplemented in ns3::QosFrameExchangeManager.

Definition at line 856 of file frame-exchange-manager.cc.

References ns3::WifiPhy::GetSifs(), m_phy, and NS_LOG_FUNCTION.

Referenced by ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), and SendCtsToSelf().

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

◆ GetFirstFragmentIfNeeded()

Ptr< WifiMpdu > ns3::FrameExchangeManager::GetFirstFragmentIfNeeded ( Ptr< WifiMpdu > mpdu)
protected

Fragment the given MPDU if needed.

If fragmentation is needed, return the first fragment; otherwise, return the given MPDU. Note that, if fragmentation is applied, the given MPDU is dequeued from the MAC queue and the first fragment is enqueued in its place.

Parameters
mpduthe given MPDU
Returns
the first fragment if fragmentation is needed, the given MPDU otherwise

Definition at line 412 of file frame-exchange-manager.cc.

References ns3::Create(), ns3::Packet::CreateFragment(), GetWifiRemoteStationManager(), m_fragmentedPacket, m_mac, NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::QosFrameExchangeManager::StartFrameExchange(), and StartTransmission().

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

◆ GetFrameDurationId()

Time ns3::FrameExchangeManager::GetFrameDurationId ( const WifiMacHeader & header,
uint32_t size,
const WifiTxParameters & txParams,
Ptr< Packet > fragmentedPacket ) const
protectedvirtual

Compute how to set the Duration/ID field of a frame being transmitted with the given TX parameters.

Parameters
headerthe MAC header of the frame
sizethe size of the frame in bytes
txParamsthe TX parameters used to send the frame
fragmentedPacketthe packet that originated the frame to transmit, in case the latter is a fragment
Returns
the computed Duration/ID value

Reimplemented in ns3::QosFrameExchangeManager.

Definition at line 715 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::GetAckSize(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetFragmentNumber(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::WifiMacHeader::GetSize(), GetWifiRemoteStationManager(), ns3::WifiMacHeader::IsMoreFragments(), ns3::WifiTxParameters::m_acknowledgment, m_phy, ns3::WifiTxParameters::m_txVector, NS_ASSERT, NS_LOG_FUNCTION, and ns3::WIFI_MAC_FCS_LENGTH.

Referenced by ns3::QosFrameExchangeManager::GetFrameDurationId(), and SendMpdu().

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

◆ GetNextFragment()

Ptr< WifiMpdu > ns3::FrameExchangeManager::GetNextFragment ( )
protected

Get the next fragment of the current MSDU.

Only called for fragmented MSDUs.

Returns
the next fragment of the current MSDU.

Definition at line 933 of file frame-exchange-manager.cc.

References ns3::Create(), ns3::Packet::CreateFragment(), ns3::WifiMacHeader::GetFragmentNumber(), ns3::Packet::GetSize(), m_fragmentedPacket, m_mpdu, NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetFragmentNumber(), ns3::WifiMacHeader::SetMoreFragments(), and ns3::WifiMacHeader::SetNoMoreFragments().

Referenced by ReceivedNormalAck().

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

◆ GetOngoingRxInfo()

std::optional< std::reference_wrapper< const FrameExchangeManager::OngoingRxInfo > > ns3::FrameExchangeManager::GetOngoingRxInfo ( ) const
Returns
the information about the MPDU being received by the PHY, if any. This information is available from the time the PHY-RXSTART.indication is received until the end of PSDU reception

Definition at line 329 of file frame-exchange-manager.cc.

References ns3::FrameExchangeManager::OngoingRxInfo::endOfPsduRx, m_ongoingRxInfo, and ns3::Simulator::Now().

Referenced by GetReceivedMacHdr().

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

◆ GetProtectedStas()

const std::set< Mac48Address > & ns3::FrameExchangeManager::GetProtectedStas ( ) const
Returns
the set of stations that have successfully received an RTS in this TXOP.

Definition at line 510 of file frame-exchange-manager.cc.

References m_protectedStas.

◆ GetProtectionManager()

Ptr< WifiProtectionManager > ns3::FrameExchangeManager::GetProtectionManager ( ) const

Get the Protection Manager used by this node.

Returns
the Protection Manager used by this node

Definition at line 114 of file frame-exchange-manager.cc.

References m_protectionManager.

Referenced by ns3::EhtFrameExchangeManager::SetLinkId(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().

+ Here is the caller graph for this function:

◆ GetPsduSize()

uint32_t ns3::FrameExchangeManager::GetPsduSize ( Ptr< const WifiMpdu > mpdu,
const WifiTxVector & txVector ) const
protectedvirtual

Get the size in bytes of the given MPDU, which is to be transmitted with the given TXVECTOR.

The purpose of this method is that it can be overridden to compute the size of an S-MPDU.

Parameters
mpduthe given MPDU
txVectorthe given TXVECTOR
Returns
the size of the MPDU

Reimplemented in ns3::VhtFrameExchangeManager.

Definition at line 643 of file frame-exchange-manager.cc.

Referenced by ns3::VhtFrameExchangeManager::GetPsduSize(), and SendMpdu().

+ Here is the caller graph for this function:

◆ GetReceivedMacHdr()

std::optional< std::reference_wrapper< const WifiMacHeader > > ns3::FrameExchangeManager::GetReceivedMacHdr ( ) const
Returns
the information about the MAC header of the MPDU being received by the PHY, if any. The MAC header is available from the time its reception is completed until the end of PSDU reception

Definition at line 339 of file frame-exchange-manager.cc.

References GetOngoingRxInfo(), and ns3::FrameExchangeManager::OngoingRxInfo::macHdr.

+ Here is the call graph for this function:

◆ GetRtsDurationId()

Time ns3::FrameExchangeManager::GetRtsDurationId ( const WifiTxVector & rtsTxVector,
Time txDuration,
Time response ) const
protectedvirtual

Compute how to set the Duration/ID field of an RTS frame to send to protect a frame transmitted with the given TX vector.

Parameters
rtsTxVectorthe TX vector used to send the RTS frame
txDurationthe TX duration of the data frame
responsethe time taken by the response (acknowledgment) to the data frame
Returns
the computed Duration/ID value for the RTS frame

Reimplemented in ns3::QosFrameExchangeManager.

Definition at line 746 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::GetCtsSize(), ns3::WifiTxVector::GetMode(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), GetWifiRemoteStationManager(), m_phy, m_self, and NS_LOG_FUNCTION.

Referenced by ns3::HeFrameExchangeManager::GetMuRtsDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), and SendRts().

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

◆ GetTxDuration()

Time ns3::FrameExchangeManager::GetTxDuration ( uint32_t ppduPayloadSize,
Mac48Address receiver,
const WifiTxParameters & txParams ) const
protectedvirtual

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.

Parameters
ppduPayloadSizethe new PSDU size
receiverthe MAC address of the receiver of the PSDU
txParamsthe TX parameters
Returns
the updated TX duration

Reimplemented in ns3::HeFrameExchangeManager.

Definition at line 701 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiPhy::GetPhyBand(), m_phy, and ns3::WifiTxParameters::m_txVector.

Referenced by UpdateTxDuration().

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

◆ GetTypeId()

TypeId ns3::FrameExchangeManager::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 37 of file frame-exchange-manager.cc.

References m_protectedIfResponded, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetWifiRemoteStationManager()

Ptr< WifiRemoteStationManager > ns3::FrameExchangeManager::GetWifiRemoteStationManager ( ) const
protected
Returns
the remote station manager operating on our link

Definition at line 170 of file frame-exchange-manager.cc.

References m_linkId, and m_mac.

Referenced by ns3::HtFrameExchangeManager::BlockAckTimeout(), ns3::EhtFrameExchangeManager::CheckEmlsrClientStartingTxop(), ns3::EhtFrameExchangeManager::CreateAliasIfNeeded(), ns3::HeFrameExchangeManager::DoCtsAfterMuRtsTimeout(), DoCtsTimeout(), DropMpduIfRetryLimitReached(), ns3::EhtFrameExchangeManager::DropReceivedIcf(), ns3::EhtFrameExchangeManager::EmlsrSwitchToListening(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), ns3::EhtFrameExchangeManager::ForwardPsduMapDown(), ns3::HtFrameExchangeManager::GetBar(), GetFirstFragmentIfNeeded(), GetFrameDurationId(), ns3::EhtFrameExchangeManager::GetMostRecentRssi(), GetRtsDurationId(), ns3::EhtFrameExchangeManager::IsCrossLinkCollision(), ns3::HtFrameExchangeManager::MissedBlockAck(), ns3::HtFrameExchangeManager::NeedSetupBlockAck(), NormalAckTimeout(), ns3::EhtFrameExchangeManager::NotifyChannelReleased(), NotifyInternalCollision(), ns3::HtFrameExchangeManager::NotifyPacketDiscarded(), ns3::HtFrameExchangeManager::NotifyReceivedNormalAck(), ns3::EhtFrameExchangeManager::PostProcessFrame(), ns3::EhtFrameExchangeManager::PreProcessFrame(), Receive(), ReceivedNormalAck(), ns3::EhtFrameExchangeManager::ReceivedQosNullAfterBsrpTf(), ns3::HtFrameExchangeManager::ReceiveMgtAction(), ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendAddBaResponse(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), ns3::EhtFrameExchangeManager::SendCtsAfterRts(), SendCtsAfterRts(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::HtFrameExchangeManager::SendDelbaFrame(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), SendNormalAck(), ns3::EhtFrameExchangeManager::SetIcfPaddingAndTxVector(), ns3::HtFrameExchangeManager::StartFrameExchange(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::EhtFrameExchangeManager::StartTransmission(), StartTransmission(), ns3::EhtFrameExchangeManager::SwitchToListeningOrUnblockLinks(), ns3::EhtFrameExchangeManager::TxopEnd(), ns3::EhtFrameExchangeManager::UnblockEmlsrLinksIfAllowed(), UpdateNav(), and ns3::EhtFrameExchangeManager::UsingOtherEmlsrLink().

+ Here is the caller graph for this function:

◆ GetWifiTxTimer()

const WifiTxTimer & ns3::FrameExchangeManager::GetWifiTxTimer ( ) const

Get a const reference to the WifiTxTimer object.

Returns
a const reference to the WifiTxTimer object

Definition at line 277 of file frame-exchange-manager.cc.

References m_txTimer.

◆ IsPromisc()

bool ns3::FrameExchangeManager::IsPromisc ( ) const

Check if the device is operating in promiscuous mode.

Returns
true if the device is operating in promiscuous mode, false otherwise

Definition at line 271 of file frame-exchange-manager.cc.

References m_promisc.

◆ NavResetTimeout()

void ns3::FrameExchangeManager::NavResetTimeout ( )
protectedvirtual

Reset the NAV upon expiration of the NAV reset timer.

Reimplemented in ns3::EhtFrameExchangeManager, ns3::HeFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 1308 of file frame-exchange-manager.cc.

References m_channelAccessManager, m_navEnd, ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by ns3::QosFrameExchangeManager::NavResetTimeout(), and UpdateNav().

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

◆ NormalAckTimeout()

void ns3::FrameExchangeManager::NormalAckTimeout ( Ptr< WifiMpdu > mpdu,
const WifiTxVector & txVector )
protectedvirtual

Called when the Ack timeout expires.

Parameters
mpduthe MPDU that solicited a Normal Ack response
txVectorthe TXVECTOR used to transmit the frame soliciting the Normal Ack

Reimplemented in ns3::HeFrameExchangeManager.

Definition at line 1027 of file frame-exchange-manager.cc.

References ns3::Create(), DropMpduIfRetryLimitReached(), GetWifiRemoteStationManager(), m_linkId, m_mac, m_mpdu, NS_LOG_FUNCTION, RetransmitMpduAfterMissedAck(), and TransmissionFailed().

Referenced by SendMpdu().

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

◆ NotifyChannelReleased()

void ns3::FrameExchangeManager::NotifyChannelReleased ( Ptr< Txop > txop)
protectedvirtual

◆ NotifyInternalCollision()

void ns3::FrameExchangeManager::NotifyInternalCollision ( Ptr< Txop > txop)
virtual

Notify that an internal collision has occurred for the given Txop.

Parameters
txopthe Txop for which an internal collision has occurred

Reimplemented in FrameExchangeManagerStub< TxopType >.

Definition at line 1116 of file frame-exchange-manager.cc.

References ns3::Create(), DropMpduIfRetryLimitReached(), GetWifiRemoteStationManager(), m_linkId, NS_LOG_FUNCTION, and ns3::StaticCast().

+ Here is the call graph for this function:

◆ NotifyOffNow()

void ns3::FrameExchangeManager::NotifyOffNow ( )

This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into off mode.

When the device is put into off mode, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled.

Definition at line 1168 of file frame-exchange-manager.cc.

References NS_LOG_DEBUG, and Reset().

+ Here is the call graph for this function:

◆ NotifyPacketDiscarded()

void ns3::FrameExchangeManager::NotifyPacketDiscarded ( Ptr< const WifiMpdu > mpdu)
protectedvirtual

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

Parameters
mpduthe discarded MPDU

Reimplemented in ns3::HtFrameExchangeManager.

Definition at line 283 of file frame-exchange-manager.cc.

References ns3::Callback< R, UArgs >::IsNull(), m_droppedMpduCallback, NS_ASSERT, NS_LOG_FUNCTION, and ns3::WIFI_MAC_DROP_REACHED_RETRY_LIMIT.

Referenced by DropMpduIfRetryLimitReached(), and ns3::HtFrameExchangeManager::NotifyPacketDiscarded().

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

◆ NotifyReceivedNormalAck()

void ns3::FrameExchangeManager::NotifyReceivedNormalAck ( Ptr< WifiMpdu > mpdu)
protectedvirtual

Notify other components that an MPDU was acknowledged.

Parameters
mpduthe MPDU that was acknowledged

Reimplemented in ns3::HtFrameExchangeManager.

Definition at line 1483 of file frame-exchange-manager.cc.

References ns3::Callback< R, UArgs >::IsNull(), m_ackedMpduCallback, and NS_LOG_FUNCTION.

Referenced by ns3::HtFrameExchangeManager::NotifyReceivedNormalAck(), and ReceivedNormalAck().

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

◆ NotifySleepNow()

void ns3::FrameExchangeManager::NotifySleepNow ( )

This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into sleep mode.

When the device is put into sleep mode, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled.

Definition at line 1161 of file frame-exchange-manager.cc.

References NS_LOG_DEBUG, and Reset().

+ Here is the call graph for this function:

◆ NotifySwitchingStartNow()

void ns3::FrameExchangeManager::NotifySwitchingStartNow ( Time duration)
virtual
Parameters
durationswitching delay duration.

This method is typically invoked by the PhyListener to notify the MAC layer that a channel switching occurred. When a channel switching occurs, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled.

Reimplemented in FrameExchangeManagerStub< TxopType >.

Definition at line 1146 of file frame-exchange-manager.cc.

References ns3::WifiTxTimer::IsRunning(), m_linkId, m_mac, m_txTimer, ns3::WifiMac::NotifyChannelSwitching(), NS_LOG_DEBUG, ns3::WifiTxTimer::Reschedule(), Reset(), ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), and ns3::Seconds().

+ Here is the call graph for this function:

◆ PostProcessFrame()

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

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).

Parameters
psduthe received PSDU
txVectorTX vector of the received PSDU

Reimplemented in ns3::EhtFrameExchangeManager, ns3::HeFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 1246 of file frame-exchange-manager.cc.

References NS_LOG_FUNCTION, and UpdateNav().

Referenced by ns3::QosFrameExchangeManager::PostProcessFrame(), and Receive().

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

◆ PreProcessFrame()

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

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).

Parameters
psduthe received PSDU
txVectorTX vector of the received PSDU

Reimplemented in ns3::EhtFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 1240 of file frame-exchange-manager.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::EhtFrameExchangeManager::PreProcessFrame(), ns3::QosFrameExchangeManager::PreProcessFrame(), and Receive().

+ Here is the caller graph for this function:

◆ ProtectionCompleted()

void ns3::FrameExchangeManager::ProtectionCompleted ( )
protectedvirtual

Transmit prepared frame immediately, if no protection was used, or in a SIFS, if protection was completed successfully.

Reimplemented in ns3::EhtFrameExchangeManager, ns3::HeFrameExchangeManager, and ns3::HtFrameExchangeManager.

Definition at line 493 of file frame-exchange-manager.cc.

References ns3::WifiPhy::GetSifs(), m_mpdu, m_phy, m_protectedStas, ns3::WifiTxParameters::m_protection, m_sentRtsTo, m_txParams, ns3::WifiProtection::NONE, NS_ASSERT, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and SendMpdu().

Referenced by ns3::HeFrameExchangeManager::ProtectionCompleted(), ns3::HtFrameExchangeManager::ProtectionCompleted(), ReceiveMpdu(), SendCtsToSelf(), and StartProtection().

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

◆ PsduRxError()

void ns3::FrameExchangeManager::PsduRxError ( Ptr< const WifiPsdu > psdu)
protectedvirtual

This method is called when the reception of a PSDU fails.

Parameters
psduthe PSDU whose reception failed

Reimplemented in ns3::EhtFrameExchangeManager.

Definition at line 1175 of file frame-exchange-manager.cc.

References NS_LOG_FUNCTION.

Referenced by SetWifiPhy().

+ Here is the caller graph for this function:

◆ Receive()

void ns3::FrameExchangeManager::Receive ( Ptr< const WifiPsdu > psdu,
RxSignalInfo rxSignalInfo,
const WifiTxVector & txVector,
const 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.

In case the PSDU contains multiple MPDUs, the perMpduStatus vector is empty when receiving the individual MPDUs.

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

Definition at line 1181 of file frame-exchange-manager.cc.

References EndReceiveAmpdu(), GetWifiRemoteStationManager(), ns3::Mac48Address::IsGroup(), m_linkId, m_promisc, m_rxMiddle, m_self, NS_ASSERT, NS_LOG_FUNCTION, ns3::PeekPointer(), PostProcessFrame(), PreProcessFrame(), and ReceiveMpdu().

Referenced by SetWifiPhy().

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

◆ ReceivedMacHdr()

void ns3::FrameExchangeManager::ReceivedMacHdr ( const WifiMacHeader & macHdr,
const WifiTxVector & txVector,
Time psduDuration )
protectedvirtual

Store information about the MAC header of the MPDU being received.

Parameters
macHdrthe MAC header of the MPDU being received
txVectorthe TXVECTOR used to transmit the PSDU
psduDurationthe remaining duration of the PSDU

Definition at line 320 of file frame-exchange-manager.cc.

References ns3::Time::As(), m_ongoingRxInfo, ns3::Time::MS, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by ResetPhy(), and SetWifiPhy().

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

◆ ReceivedNormalAck()

void ns3::FrameExchangeManager::ReceivedNormalAck ( Ptr< WifiMpdu > mpdu,
const WifiTxVector & txVector,
const WifiTxVector & ackTxVector,
const RxSignalInfo & rxInfo,
double snr )
protectedvirtual

Perform the actions needed when a Normal Ack is received.

Parameters
mpduthe MPDU that was acknowledged
txVectorthe TXVECTOR used to transmit the MPDU that was acknowledged
ackTxVectorthe TXVECTOR used to transmit the Normal Ack frame
rxInfothe info on the received signal (
See also
RxSignalInfo)
Parameters
snrthe SNR at the receiver for the MPDU that was acknowledged

Definition at line 1437 of file frame-exchange-manager.cc.

References ns3::WifiTxTimer::Cancel(), DequeueMpdu(), ns3::WifiTxVector::GetMode(), GetNextFragment(), ns3::Txop::GetWifiMacQueue(), GetWifiRemoteStationManager(), ns3::WifiTxTimer::GotResponseFrom(), m_channelAccessManager, m_dcf, m_linkId, m_moreFragments, m_txTimer, NotifyReceivedNormalAck(), NS_LOG_DEBUG, ns3::Txop::ResetCw(), ns3::RxSignalInfo::snr, and TransmissionSucceeded().

Referenced by ReceiveMpdu().

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

◆ ReceiveMpdu()

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

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 in ns3::EhtFrameExchangeManager, ns3::HeFrameExchangeManager, ns3::HtFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 1322 of file frame-exchange-manager.cc.

References ns3::WifiTxTimer::Cancel(), ns3::Create(), ns3::SnrTag::Get(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiTxVector::GetMode(), ns3::WifiTxTimer::GetReason(), ns3::WifiPhy::GetSifs(), ns3::WifiMacHeader::GetTypeString(), GetWifiRemoteStationManager(), ns3::WifiMacHeader::IsAck(), ns3::WifiMacHeader::IsBeacon(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacHeader::IsCts(), ns3::WifiMacHeader::IsData(), ns3::WifiMacHeader::IsMgt(), ns3::WifiMacHeader::IsProbeResp(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRts(), ns3::WifiTxTimer::IsRunning(), m_channelAccessManager, m_linkId, m_mpdu, m_phy, m_rxMiddle, m_self, m_txParams, m_txTimer, ns3::WifiTxParameters::m_txVector, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ProtectionCompleted(), ReceivedNormalAck(), ns3::Simulator::Schedule(), SendCtsAfterRts(), SendNormalAck(), ns3::SnrTag::Set(), ns3::RxSignalInfo::snr, VirtualCsMediumIdle(), ns3::WifiTxTimer::WAIT_CTS, and ns3::WifiTxTimer::WAIT_NORMAL_ACK.

Referenced by Receive(), and ns3::QosFrameExchangeManager::ReceiveMpdu().

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

◆ ReleaseSequenceNumbers()

void ns3::FrameExchangeManager::ReleaseSequenceNumbers ( Ptr< const WifiPsdu > psdu) const
protectedvirtual

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

Definition at line 1097 of file frame-exchange-manager.cc.

References m_txMiddle, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by DoCtsTimeout(), and ns3::HtFrameExchangeManager::ReleaseSequenceNumbers().

+ Here is the caller graph for this function:

◆ Reset()

void ns3::FrameExchangeManager::Reset ( )
protectedvirtual

Reset this frame exchange manager.

Reimplemented in ns3::HeFrameExchangeManager.

Definition at line 72 of file frame-exchange-manager.cc.

References ns3::EventId::Cancel(), ns3::WifiTxTimer::Cancel(), ns3::WifiTxParameters::Clear(), ns3::FrameExchangeManager::OngoingRxInfo::endOfPsduRx, ns3::EventId::IsPending(), m_dcf, m_mpdu, m_navEnd, m_navResetEvent, m_ongoingRxInfo, m_txParams, m_txTimer, ns3::FrameExchangeManager::OngoingRxInfo::macHdr, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by DoDispose(), NotifyOffNow(), NotifySleepNow(), NotifySwitchingStartNow(), and ns3::HeFrameExchangeManager::Reset().

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

◆ ResetPhy()

void ns3::FrameExchangeManager::ResetPhy ( )
virtual

Remove WifiPhy associated with this FrameExchangeManager.

Definition at line 189 of file frame-exchange-manager.cc.

References ns3::FrameExchangeManager::OngoingRxInfo::endOfPsduRx, ns3::WifiPhy::GetState(), m_ongoingRxInfo, m_phy, ns3::FrameExchangeManager::OngoingRxInfo::macHdr, ns3::MakeCallback(), ns3::MakeNullCallback(), NS_LOG_FUNCTION, ReceivedMacHdr(), RxStartIndication(), ns3::WifiPhy::SetReceiveErrorCallback(), ns3::WifiPhy::SetReceiveOkCallback(), and ns3::ObjectBase::TraceDisconnectWithoutContext().

Referenced by DoDispose(), and ns3::EhtFrameExchangeManager::NotifySwitchingEmlsrLink().

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

◆ RetransmitMpduAfterMissedAck()

void ns3::FrameExchangeManager::RetransmitMpduAfterMissedAck ( Ptr< WifiMpdu > mpdu) const
protectedvirtual

Retransmit an MPDU that was not acknowledged.

Parameters
mpduthe MPDU to retransmit

Reimplemented in ns3::HtFrameExchangeManager.

Definition at line 1053 of file frame-exchange-manager.cc.

References NS_LOG_FUNCTION.

Referenced by NormalAckTimeout(), and ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedAck().

+ Here is the caller graph for this function:

◆ RxStartIndication()

void ns3::FrameExchangeManager::RxStartIndication ( WifiTxVector txVector,
Time psduDuration )
protectedvirtual
Parameters
txVectorthe TXVECTOR decoded from PHY header.
psduDurationthe duration of the PSDU that is about to be received.

This method is typically invoked by the lower PHY layer to notify the MAC layer that the reception of a PSDU is starting. This is equivalent to the PHY-RXSTART primitive. If the reception is correct for at least one MPDU of the PSDU the Receive method will be called after psduDuration.

Reimplemented in ns3::EhtFrameExchangeManager, and ns3::HeFrameExchangeManager.

Definition at line 291 of file frame-exchange-manager.cc.

References ns3::Time::As(), ns3::EventId::Cancel(), ns3::EventId::IsPending(), ns3::WifiTxTimer::IsRunning(), ns3::Time::IsStrictlyPositive(), m_channelAccessManager, m_navResetEvent, m_ongoingRxInfo, m_txTimer, ns3::NanoSeconds(), ns3::Simulator::Now(), NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, PSDU_DURATION_SAFEGUARD, ns3::WifiTxTimer::Reschedule(), and ns3::Time::US.

Referenced by ResetPhy(), ns3::HeFrameExchangeManager::RxStartIndication(), and SetWifiPhy().

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

◆ SendCtsAfterRts()

void ns3::FrameExchangeManager::SendCtsAfterRts ( const WifiMacHeader & rtsHdr,
WifiMode rtsTxMode,
double rtsSnr )
protectedvirtual

Send CTS after receiving RTS.

Parameters
rtsHdrthe header of the received RTS
rtsTxModethe TX mode used to transmit the RTS
rtsSnrthe SNR of the RTS in linear scale

Reimplemented in ns3::EhtFrameExchangeManager.

Definition at line 844 of file frame-exchange-manager.cc.

References DoSendCtsAfterRts(), ns3::WifiMacHeader::GetAddr2(), GetWifiRemoteStationManager(), and NS_LOG_FUNCTION.

Referenced by ReceiveMpdu(), ns3::QosFrameExchangeManager::ReceiveMpdu(), and ns3::EhtFrameExchangeManager::SendCtsAfterRts().

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

◆ SendCtsToSelf()

void ns3::FrameExchangeManager::SendCtsToSelf ( const WifiTxParameters & txParams)
protected

Send CTS for a CTS-to-self mechanism.

Parameters
txParamsthe TX parameters for the data frame

Definition at line 866 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::Create(), ns3::WifiProtection::CTS_TO_SELF, ForwardMpduDown(), ns3::GetCtsSize(), GetCtsToSelfDurationId(), ns3::WifiPhy::GetPhyBand(), ns3::WifiTxParameters::m_acknowledgment, m_phy, ns3::WifiTxParameters::m_protection, m_self, ns3::WifiTxParameters::m_txDuration, NS_ASSERT, NS_LOG_FUNCTION, ProtectionCompleted(), ns3::Simulator::Schedule(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_CTS.

Referenced by StartProtection().

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

◆ SendMpdu()

void ns3::FrameExchangeManager::SendMpdu ( )
private

◆ SendMpduWithProtection()

void ns3::FrameExchangeManager::SendMpduWithProtection ( Ptr< WifiMpdu > mpdu,
WifiTxParameters & txParams )
protected

Send an MPDU with the given TX parameters (with the specified protection).

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

Parameters
mpduthe MPDU to send
txParamsthe TX parameters to use to transmit the MPDU

Definition at line 439 of file frame-exchange-manager.cc.

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

Referenced by ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::QosFrameExchangeManager::StartFrameExchange(), and StartTransmission().

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

◆ SendNormalAck()

void ns3::FrameExchangeManager::SendNormalAck ( const WifiMacHeader & hdr,
const WifiTxVector & dataTxVector,
double dataSnr )
protected

Send Normal Ack.

Parameters
hdrthe header of the frame soliciting the Normal Ack
dataTxVectorthe TXVECTOR used to transmit the frame soliciting the Normal Ack
dataSnrthe SNR of the frame soliciting the Normal Ack in linear scale

Definition at line 897 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::Create(), ForwardMpduDown(), ns3::GetAckSize(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetDuration(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), GetWifiRemoteStationManager(), ns3::Time::IsStrictlyNegative(), m_phy, NS_LOG_FUNCTION, ns3::Seconds(), ns3::SnrTag::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_ACK.

Referenced by ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), and ns3::QosFrameExchangeManager::ReceiveMpdu().

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

◆ SendRts()

void ns3::FrameExchangeManager::SendRts ( const WifiTxParameters & txParams)
protected

◆ SetAckedMpduCallback()

void ns3::FrameExchangeManager::SetAckedMpduCallback ( AckedMpdu callback)

Set the callback to invoke when an MPDU is successfully acked.

Parameters
callbackthe callback to invoke when an MPDU is successfully acked

Definition at line 258 of file frame-exchange-manager.cc.

References m_ackedMpduCallback, and NS_LOG_FUNCTION.

◆ SetAckManager()

void ns3::FrameExchangeManager::SetAckManager ( Ptr< WifiAckManager > ackManager)
virtual

Set the Acknowledgment Manager to use.

Parameters
ackManagerthe Acknowledgment Manager to use

Definition at line 120 of file frame-exchange-manager.cc.

References m_ackManager, and NS_LOG_FUNCTION.

◆ SetAddress()

void ns3::FrameExchangeManager::SetAddress ( Mac48Address address)
virtual

Set the MAC address.

Parameters
addressthe MAC address

Definition at line 216 of file frame-exchange-manager.cc.

References m_self, NS_LOG_FUNCTION, and SetBssid().

+ Here is the call graph for this function:

◆ SetBssid()

void ns3::FrameExchangeManager::SetBssid ( Mac48Address bssid)
virtual

Set the Basic Service Set Identification.

Parameters
bssidthe BSSID

Definition at line 232 of file frame-exchange-manager.cc.

References m_bssid, and NS_LOG_FUNCTION.

Referenced by SetAddress().

+ Here is the caller graph for this function:

◆ SetChannelAccessManager()

void ns3::FrameExchangeManager::SetChannelAccessManager ( const Ptr< ChannelAccessManager > channelAccessManager)
virtual

Set the channel access manager to use.

Parameters
channelAccessManagerthe channel access manager to use

Definition at line 163 of file frame-exchange-manager.cc.

References m_channelAccessManager, and NS_LOG_FUNCTION.

◆ SetDroppedMpduCallback()

void ns3::FrameExchangeManager::SetDroppedMpduCallback ( DroppedMpdu callback)
virtual

Set the callback to invoke when an MPDU is dropped.

Parameters
callbackthe callback to invoke when an MPDU is dropped

Definition at line 251 of file frame-exchange-manager.cc.

References m_droppedMpduCallback, and NS_LOG_FUNCTION.

◆ SetLinkId()

void ns3::FrameExchangeManager::SetLinkId ( uint8_t linkId)
virtual

Set the ID of the link this Frame Exchange Manager is associated with.

Parameters
linkIdthe ID of the link this Frame Exchange Manager is associated with

Reimplemented in ns3::EhtFrameExchangeManager.

Definition at line 133 of file frame-exchange-manager.cc.

References m_linkId, and NS_LOG_FUNCTION.

Referenced by ns3::EhtFrameExchangeManager::SetLinkId().

+ Here is the caller graph for this function:

◆ SetMacRxMiddle()

void ns3::FrameExchangeManager::SetMacRxMiddle ( const Ptr< MacRxMiddle > rxMiddle)
virtual

Set the MAC RX Middle to use.

Parameters
rxMiddlethe MAC RX Middle to use

Definition at line 156 of file frame-exchange-manager.cc.

References m_rxMiddle, and NS_LOG_FUNCTION.

◆ SetMacTxMiddle()

void ns3::FrameExchangeManager::SetMacTxMiddle ( const Ptr< MacTxMiddle > txMiddle)
virtual

Set the MAC TX Middle to use.

Parameters
txMiddlethe MAC TX Middle to use

Definition at line 149 of file frame-exchange-manager.cc.

References m_txMiddle, and NS_LOG_FUNCTION.

◆ SetPromisc()

void ns3::FrameExchangeManager::SetPromisc ( )

Enable promiscuous mode.

Definition at line 265 of file frame-exchange-manager.cc.

References m_promisc.

◆ SetProtectionManager()

void ns3::FrameExchangeManager::SetProtectionManager ( Ptr< WifiProtectionManager > protectionManager)
virtual

Set the Protection Manager to use.

Parameters
protectionManagerthe Protection Manager to use

Definition at line 107 of file frame-exchange-manager.cc.

References m_protectionManager, and NS_LOG_FUNCTION.

◆ SetWifiMac()

void ns3::FrameExchangeManager::SetWifiMac ( const Ptr< WifiMac > mac)
virtual

Set the MAC layer to use.

Parameters
macthe MAC layer to use

Reimplemented in ns3::HtFrameExchangeManager.

Definition at line 140 of file frame-exchange-manager.cc.

References ns3::DynamicCast(), m_apMac, m_mac, m_staMac, and NS_LOG_FUNCTION.

Referenced by ns3::HtFrameExchangeManager::SetWifiMac().

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

◆ SetWifiPhy()

void ns3::FrameExchangeManager::SetWifiPhy ( const Ptr< WifiPhy > phy)
virtual

Set the PHY layer to use.

Parameters
phythe PHY layer to use

Definition at line 176 of file frame-exchange-manager.cc.

References m_phy, ns3::MakeCallback(), NS_LOG_FUNCTION, PsduRxError(), Receive(), ReceivedMacHdr(), RxStartIndication(), ns3::WifiPhy::SetReceiveErrorCallback(), ns3::WifiPhy::SetReceiveOkCallback(), and ns3::ObjectBase::TraceConnectWithoutContext().

+ Here is the call graph for this function:

◆ StartProtection()

void ns3::FrameExchangeManager::StartProtection ( const WifiTxParameters & txParams)
protectedvirtual

Start the protection mechanism indicated by the given TX parameters.

Parameters
txParamsthe TX parameters

Reimplemented in ns3::HeFrameExchangeManager.

Definition at line 472 of file frame-exchange-manager.cc.

References ns3::WifiProtection::CTS_TO_SELF, ns3::WifiTxParameters::m_protection, ns3::WifiProtection::NONE, NS_ABORT_MSG, NS_LOG_FUNCTION, ProtectionCompleted(), ns3::WifiProtection::RTS_CTS, SendCtsToSelf(), and SendRts().

Referenced by SendMpduWithProtection(), ns3::HtFrameExchangeManager::SendPsduWithProtection(), and ns3::HeFrameExchangeManager::StartProtection().

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

◆ StartTransmission()

bool ns3::FrameExchangeManager::StartTransmission ( Ptr< Txop > dcf,
MHz_u allowedWidth )
virtual

Request the FrameExchangeManager to start a frame exchange sequence.

Parameters
dcfthe channel access function that gained channel access. It is the DCF on non-QoS stations and an EDCA on QoS stations.
allowedWidththe allowed width for the frame exchange sequence
Returns
true if a frame exchange sequence was started, false otherwise

Reimplemented in FrameExchangeManagerStub< TxopType >, ns3::EhtFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 349 of file frame-exchange-manager.cc.

References ns3::WifiTxParameters::AddMpdu(), ns3::WifiTxTimer::Cancel(), GetFirstFragmentIfNeeded(), GetWifiRemoteStationManager(), ns3::WifiTxTimer::IsRunning(), m_ackManager, ns3::WifiTxParameters::m_acknowledgment, m_allowedWidth, m_dcf, m_linkId, m_mpdu, ns3::WifiTxParameters::m_protection, m_protectionManager, m_txMiddle, m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::Txop::NotifyChannelAccessed(), NotifyChannelReleased(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, SendMpduWithProtection(), and UpdateTxDuration().

Referenced by ns3::EhtFrameExchangeManager::StartTransmission(), ns3::QosFrameExchangeManager::StartTransmission(), TransmissionSucceeded(), and ns3::HtFrameExchangeManager::TransmissionSucceeded().

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

◆ TransmissionFailed()

void ns3::FrameExchangeManager::TransmissionFailed ( bool forceCurrentCw = false)
protectedvirtual

Take necessary actions upon a transmission failure.

A non-QoS station releases the channel when this method is called.

Parameters
forceCurrentCwwhether to force the contention window to stay equal to the current value (normally, contention window is updated upon TX failure)

Reimplemented in ns3::EhtFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 984 of file frame-exchange-manager.cc.

References m_dcf, m_linkId, m_sentFrameTo, m_txNav, NotifyChannelReleased(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::Txop::UpdateFailedCw().

Referenced by DoCtsTimeout(), NormalAckTimeout(), ns3::EhtFrameExchangeManager::TransmissionFailed(), and ns3::QosFrameExchangeManager::TransmissionFailed().

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

◆ TransmissionSucceeded()

void ns3::FrameExchangeManager::TransmissionSucceeded ( )
protectedvirtual

Take necessary actions upon a transmission success.

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

Reimplemented in ns3::EhtFrameExchangeManager, ns3::HeFrameExchangeManager, ns3::HtFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 959 of file frame-exchange-manager.cc.

References ns3::WifiPhy::GetSifs(), m_allowedWidth, m_dcf, m_moreFragments, m_phy, m_sentFrameTo, NotifyChannelReleased(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and StartTransmission().

Referenced by ReceivedNormalAck(), SendMpdu(), and ns3::QosFrameExchangeManager::TransmissionSucceeded().

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

◆ UpdateNav()

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

Update the NAV, if needed, based on the Duration/ID of the given psdu.

Parameters
psduthe received PSDU
txVectorTxVector of the received PSDU

Reimplemented in ns3::HeFrameExchangeManager, and ns3::QosFrameExchangeManager.

Definition at line 1254 of file frame-exchange-manager.cc.

References ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiPhy::CalculateTxDuration(), ns3::GetCtsSize(), ns3::WifiTxVector::GetMode(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::WifiPhy::GetSlot(), GetWifiRemoteStationManager(), m_channelAccessManager, m_navEnd, m_navResetEvent, m_phy, m_self, NavResetTimeout(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().

Referenced by PostProcessFrame(), and ns3::QosFrameExchangeManager::UpdateNav().

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

◆ UpdateTxDuration()

void ns3::FrameExchangeManager::UpdateTxDuration ( Mac48Address receiver,
WifiTxParameters & txParams ) const
protected

Update the TX duration field of the given TX parameters after that the PSDU addressed to the given receiver has changed.

Parameters
receiverthe MAC address of the receiver of the PSDU
txParamsthe TX parameters

Definition at line 709 of file frame-exchange-manager.cc.

References ns3::WifiTxParameters::GetSize(), GetTxDuration(), and ns3::WifiTxParameters::m_txDuration.

Referenced by ns3::QosFrameExchangeManager::StartFrameExchange(), StartTransmission(), ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().

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

◆ VirtualCsMediumIdle()

bool ns3::FrameExchangeManager::VirtualCsMediumIdle ( ) const
virtual
Returns
true if the virtual CS indication is that the medium is idle

Reimplemented in ns3::HeFrameExchangeManager.

Definition at line 1316 of file frame-exchange-manager.cc.

References m_navEnd, and ns3::Simulator::Now().

Referenced by ReceiveMpdu(), and ns3::QosFrameExchangeManager::ReceiveMpdu().

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

Member Data Documentation

◆ m_ackedMpduCallback

AckedMpdu ns3::FrameExchangeManager::m_ackedMpduCallback
protected

the acknowledged MPDU callback

Definition at line 532 of file frame-exchange-manager.h.

Referenced by NotifyReceivedNormalAck(), and SetAckedMpduCallback().

◆ m_ackManager

Ptr<WifiAckManager> ns3::FrameExchangeManager::m_ackManager
private

Acknowledgment manager.

Definition at line 736 of file frame-exchange-manager.h.

Referenced by DoDispose(), GetAckManager(), SetAckManager(), and StartTransmission().

◆ m_allowedWidth

◆ m_apMac

◆ m_bssid

◆ m_channelAccessManager

◆ m_dcf

Ptr<Txop> ns3::FrameExchangeManager::m_dcf
protected

◆ m_droppedMpduCallback

DroppedMpdu ns3::FrameExchangeManager::m_droppedMpduCallback
protected

the dropped MPDU callback

Definition at line 531 of file frame-exchange-manager.h.

Referenced by NotifyPacketDiscarded(), and SetDroppedMpduCallback().

◆ m_fragmentedPacket

Ptr<Packet> ns3::FrameExchangeManager::m_fragmentedPacket
private

the MSDU being fragmented

Definition at line 733 of file frame-exchange-manager.h.

Referenced by DoDispose(), GetFirstFragmentIfNeeded(), GetNextFragment(), and SendMpdu().

◆ m_linkId

uint8_t ns3::FrameExchangeManager::m_linkId
protected

the ID of the link this object is associated with

Definition at line 528 of file frame-exchange-manager.h.

Referenced by ns3::EhtFrameExchangeManager::CheckEmlsrClientStartingTxop(), ns3::EhtFrameExchangeManager::CreateAliasIfNeeded(), ns3::HeFrameExchangeManager::DoCtsAfterMuRtsTimeout(), DoCtsTimeout(), ns3::EhtFrameExchangeManager::DropReceivedIcf(), ns3::EhtFrameExchangeManager::EmlsrClientCannotRespondToIcf(), FinalizeMacHeader(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), ns3::EhtFrameExchangeManager::ForwardPsduMapDown(), ns3::HtFrameExchangeManager::GetBar(), ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), MldSwapLinksTest::TestFrameExchangeManager::GetLinkId(), ns3::EhtFrameExchangeManager::GetMostRecentRssi(), ns3::HeFrameExchangeManager::GetMuRtsDurationId(), ns3::HtFrameExchangeManager::GetPsduDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), ns3::HeFrameExchangeManager::GetTfRecipients(), GetWifiRemoteStationManager(), ns3::HtFrameExchangeManager::MissedBlockAck(), ns3::HtFrameExchangeManager::NeedSetupBlockAck(), NormalAckTimeout(), ns3::EhtFrameExchangeManager::NotifyChannelReleased(), NotifyChannelReleased(), NotifyInternalCollision(), ns3::HtFrameExchangeManager::NotifyReceivedNormalAck(), ns3::EhtFrameExchangeManager::NotifySwitchingEmlsrLink(), NotifySwitchingStartNow(), ns3::QosFrameExchangeManager::PifsRecovery(), ns3::EhtFrameExchangeManager::PostProcessFrame(), ns3::EhtFrameExchangeManager::PreProcessFrame(), ns3::EhtFrameExchangeManager::ProtectionCompleted(), ns3::HeFrameExchangeManager::ProtectionCompleted(), ns3::EhtFrameExchangeManager::PsduRxError(), Receive(), ReceivedNormalAck(), ns3::EhtFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedAck(), ns3::EhtFrameExchangeManager::SendCtsAfterRts(), ns3::HtFrameExchangeManager::SendDataFrame(), SendMpduWithProtection(), ns3::HeFrameExchangeManager::SendPsduMapWithProtection(), ns3::HtFrameExchangeManager::SendPsduWithProtection(), SetLinkId(), ns3::EhtFrameExchangeManager::ShallDropReceivedMpdu(), ns3::HeFrameExchangeManager::StartFrameExchange(), ns3::HtFrameExchangeManager::StartFrameExchange(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::EhtFrameExchangeManager::StartTransmission(), StartTransmission(), ns3::QosFrameExchangeManager::StartTransmission(), ns3::QosFrameExchangeManager::StartTransmission(), ns3::EhtFrameExchangeManager::TransmissionFailed(), TransmissionFailed(), ns3::QosFrameExchangeManager::TransmissionFailed(), ns3::EhtFrameExchangeManager::TransmissionSucceeded(), ns3::HeFrameExchangeManager::TransmissionSucceeded(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), ns3::QosFrameExchangeManager::TransmissionSucceeded(), ns3::EhtFrameExchangeManager::TxopEnd(), ns3::EhtFrameExchangeManager::UnblockEmlsrLinksIfAllowed(), and ns3::EhtFrameExchangeManager::UsingOtherEmlsrLink().

◆ m_mac

Ptr<WifiMac> ns3::FrameExchangeManager::m_mac
protected

the MAC layer on this station

Definition at line 511 of file frame-exchange-manager.h.

Referenced by ns3::EhtFrameExchangeManager::CheckEmlsrClientStartingTxop(), ns3::EhtFrameExchangeManager::CreateAliasIfNeeded(), DequeueMpdu(), DoDispose(), ns3::EhtFrameExchangeManager::DropReceivedIcf(), ns3::EhtFrameExchangeManager::EmlsrClientCannotRespondToIcf(), ns3::EhtFrameExchangeManager::EmlsrSwitchToListening(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), FinalizeMacHeader(), ns3::HtFrameExchangeManager::FinalizeMacHeader(), ns3::QosFrameExchangeManager::ForwardMpduDown(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), ns3::EhtFrameExchangeManager::ForwardPsduMapDown(), ns3::EhtFrameExchangeManager::GenerateInDeviceInterference(), ns3::HtFrameExchangeManager::GetBaManager(), ns3::HtFrameExchangeManager::GetBar(), GetFirstFragmentIfNeeded(), ns3::EhtFrameExchangeManager::GetMostRecentRssi(), GetWifiRemoteStationManager(), ns3::EhtFrameExchangeManager::IsCrossLinkCollision(), ns3::HtFrameExchangeManager::MissedBlockAck(), ns3::HtFrameExchangeManager::NeedSetupBlockAck(), NormalAckTimeout(), ns3::HtFrameExchangeManager::NotifyPacketDiscarded(), ns3::HtFrameExchangeManager::NotifyReceivedNormalAck(), NotifySwitchingStartNow(), ns3::HtFrameExchangeManager::NotifyTxToEdca(), ns3::QosFrameExchangeManager::PreProcessFrame(), ns3::HtFrameExchangeManager::ReceiveMgtAction(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::ReleaseSequenceNumbers(), ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedAck(), ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendAddBaResponse(), ns3::EhtFrameExchangeManager::SendCtsAfterRts(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::HtFrameExchangeManager::SendDelbaFrame(), ns3::EhtFrameExchangeManager::SendEmlOmn(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SetMultiUserScheduler(), SetWifiMac(), ns3::EhtFrameExchangeManager::ShallDropReceivedMpdu(), ns3::HeFrameExchangeManager::StartFrameExchange(), ns3::EhtFrameExchangeManager::StartTransmission(), and ns3::EhtFrameExchangeManager::UnblockEmlsrLinksIfAllowed().

◆ m_moreFragments

bool ns3::FrameExchangeManager::m_moreFragments
private

true if a fragment has to be sent after a SIFS

Definition at line 734 of file frame-exchange-manager.h.

Referenced by ReceivedNormalAck(), and TransmissionSucceeded().

◆ m_mpdu

Ptr<WifiMpdu> ns3::FrameExchangeManager::m_mpdu
private

◆ m_navEnd

Time ns3::FrameExchangeManager::m_navEnd
protected

◆ m_navResetEvent

EventId ns3::FrameExchangeManager::m_navResetEvent
protected

the event to reset the NAV after an RTS

Definition at line 510 of file frame-exchange-manager.h.

Referenced by Reset(), RxStartIndication(), and UpdateNav().

◆ m_ongoingRxInfo

OngoingRxInfo ns3::FrameExchangeManager::m_ongoingRxInfo {}
private

information about the MAC header of the MPDU being received

Definition at line 739 of file frame-exchange-manager.h.

Referenced by GetOngoingRxInfo(), ReceivedMacHdr(), Reset(), ResetPhy(), and RxStartIndication().

◆ m_phy

Ptr<WifiPhy> ns3::FrameExchangeManager::m_phy
protected

the PHY layer on this station

Definition at line 517 of file frame-exchange-manager.h.

Referenced by CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), CalculateProtectionTime(), DoSendCtsAfterRts(), ns3::EhtFrameExchangeManager::DropReceivedIcf(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), ForwardMpduDown(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), ns3::HtFrameExchangeManager::ForwardPsduDown(), ns3::EhtFrameExchangeManager::ForwardPsduMapDown(), ns3::EhtFrameExchangeManager::GenerateInDeviceInterference(), GetCtsToSelfDurationId(), ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), GetFrameDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), ns3::HeFrameExchangeManager::GetMuRtsDurationId(), GetRtsDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), GetTxDuration(), ns3::EhtFrameExchangeManager::NotifySwitchingEmlsrLink(), ns3::QosFrameExchangeManager::PifsRecovery(), ProtectionCompleted(), ns3::HeFrameExchangeManager::ProtectionCompleted(), ns3::HtFrameExchangeManager::ProtectionCompleted(), ns3::HtFrameExchangeManager::ReceiveMgtAction(), ns3::EhtFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ResetPhy(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), SendCtsToSelf(), SendMpdu(), ns3::HeFrameExchangeManager::SendMuRts(), SendNormalAck(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMapWithProtection(), SendRts(), SetWifiPhy(), ns3::EhtFrameExchangeManager::StartTransmission(), ns3::QosFrameExchangeManager::TransmissionFailed(), TransmissionSucceeded(), ns3::HeFrameExchangeManager::TransmissionSucceeded(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), ns3::QosFrameExchangeManager::TransmissionSucceeded(), ns3::EhtFrameExchangeManager::TxopEnd(), UpdateNav(), ns3::EhtFrameExchangeManager::UpdateTxopEndOnRxEnd(), and ns3::EhtFrameExchangeManager::UpdateTxopEndOnTxStart().

◆ m_promisc

bool ns3::FrameExchangeManager::m_promisc
protected

Flag if the device is operating in promiscuous mode.

Definition at line 530 of file frame-exchange-manager.h.

Referenced by IsPromisc(), Receive(), and SetPromisc().

◆ m_protectedIfResponded

bool ns3::FrameExchangeManager::m_protectedIfResponded
protected

whether a STA is assumed to be protected if replied to a frame requiring acknowledgment

Definition at line 526 of file frame-exchange-manager.h.

Referenced by GetTypeId(), ns3::HeFrameExchangeManager::TransmissionSucceeded(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), and ns3::QosFrameExchangeManager::TransmissionSucceeded().

◆ m_protectedStas

◆ m_protectionManager

Ptr<WifiProtectionManager> ns3::FrameExchangeManager::m_protectionManager
private

Protection manager.

Definition at line 735 of file frame-exchange-manager.h.

Referenced by DoDispose(), GetProtectionManager(), SetProtectionManager(), and StartTransmission().

◆ m_rxMiddle

Ptr<MacRxMiddle> ns3::FrameExchangeManager::m_rxMiddle
protected

◆ m_self

◆ m_sentFrameTo

◆ m_sentRtsTo

◆ m_staMac

◆ m_txMiddle

◆ m_txNav

◆ m_txParams

WifiTxParameters ns3::FrameExchangeManager::m_txParams
private

the TX parameters for the current frame

Definition at line 732 of file frame-exchange-manager.h.

Referenced by ProtectionCompleted(), ReceiveMpdu(), Reset(), SendMpdu(), and SendMpduWithProtection().

◆ m_txTimer


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