A Discrete-Event Network Simulator
API
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:

Public Types

typedef Callback< void, Ptr< const WifiMacQueueItem > > AckedMpdu
 typedef for a callback to invoke when an MPDU is successfully acknowledged. More...
 
typedef Callback< void, WifiMacDropReason, Ptr< const WifiMacQueueItem > > DroppedMpdu
 typedef for a callback to invoke when an MPDU is dropped. More...
 

Public Member Functions

 FrameExchangeManager ()
 
virtual ~FrameExchangeManager ()
 
virtual void CalculateAcknowledgmentTime (WifiAcknowledgment *acknowledgment) const
 Calculate the time required to acknowledge a frame according to the given acknowledgment method. More...
 
virtual void CalculateProtectionTime (WifiProtection *protection) const
 Calculate the time required to protect a frame according to the given protection method. More...
 
Ptr< WifiAckManagerGetAckManager (void) const
 Get the Acknowledgment Manager used by this node. More...
 
Ptr< WifiProtectionManagerGetProtectionManager (void) const
 Get the Protection Manager used by this node. More...
 
const WifiTxTimerGetWifiTxTimer (void) const
 Get a const reference to the WifiTxTimer object. More...
 
bool IsPromisc (void) const
 Check if the device is operating in promiscuous mode. More...
 
virtual void NotifyInternalCollision (Ptr< Txop > txop)
 Notify that an internal collision has occurred for the given Txop. More...
 
void NotifyOffNow (void)
 This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into off mode. More...
 
void NotifySleepNow (void)
 This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into sleep mode. More...
 
void NotifySwitchingStartNow (Time duration)
 
void Receive (Ptr< 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. More...
 
virtual void ResetPhy (void)
 Remove WifiPhy associated with this FrameExchangeManager. More...
 
void SetAckedMpduCallback (AckedMpdu callback)
 Set the callback to invoke when an MPDU is successfully acked. More...
 
virtual void SetAckManager (Ptr< WifiAckManager > ackManager)
 Set the Acknowledgment Manager to use. More...
 
virtual void SetAddress (Mac48Address address)
 Set the MAC address. More...
 
virtual void SetBssid (Mac48Address bssid)
 Set the Basic Service Set Identification. More...
 
virtual void SetChannelAccessManager (const Ptr< ChannelAccessManager > channelAccessManager)
 Set the channel access manager to use. More...
 
virtual void SetDroppedMpduCallback (DroppedMpdu callback)
 Set the callback to invoke when an MPDU is dropped. More...
 
virtual void SetMacRxMiddle (const Ptr< MacRxMiddle > rxMiddle)
 Set the MAC RX Middle to use. More...
 
virtual void SetMacTxMiddle (const Ptr< MacTxMiddle > txMiddle)
 Set the MAC TX Middle to use. More...
 
void SetPromisc (void)
 Enable promiscuous mode. More...
 
virtual void SetProtectionManager (Ptr< WifiProtectionManager > protectionManager)
 Set the Protection Manager to use. More...
 
virtual void SetWifiMac (const Ptr< RegularWifiMac > mac)
 Set the MAC layer to use. More...
 
virtual void SetWifiPhy (const Ptr< WifiPhy > phy)
 Set the PHY layer to use. More...
 
virtual bool StartTransmission (Ptr< Txop > dcf)
 Request the FrameExchangeManager to start a frame exchange sequence. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

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

Protected Member Functions

virtual void CtsTimeout (Ptr< WifiMacQueueItem > rts, const WifiTxVector &txVector)
 Called when the CTS timeout expires. More...
 
virtual void DequeueMpdu (Ptr< const WifiMacQueueItem > mpdu)
 Dequeue the given MPDU from the queue in which it is stored. More...
 
void DoDispose () override
 Destructor implementation. More...
 
void DoSendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiTxVector &ctsTxVector, double rtsSnr)
 Send CTS after receiving RTS. More...
 
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. More...
 
virtual void ForwardMpduDown (Ptr< WifiMacQueueItem > mpdu, WifiTxVector &txVector)
 Forward an MPDU down to the PHY layer. More...
 
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. More...
 
Ptr< WifiMacQueueItemGetFirstFragmentIfNeeded (Ptr< WifiMacQueueItem > mpdu)
 Fragment the given MPDU if needed. More...
 
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. More...
 
Ptr< WifiMacQueueItemGetNextFragment (void)
 Get the next fragment of the current MSDU. More...
 
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. More...
 
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. More...
 
virtual void NavResetTimeout (void)
 Reset the NAV upon expiration of the NAV reset timer. More...
 
void NormalAckTimeout (Ptr< WifiMacQueueItem > mpdu, const WifiTxVector &txVector)
 Called when the Ack timeout expires. More...
 
virtual void NotifyPacketDiscarded (Ptr< const WifiMacQueueItem > mpdu)
 Pass the given MPDU, discarded because of the max retry limit was reached, to the MPDU dropped callback. More...
 
virtual void NotifyReceivedNormalAck (Ptr< WifiMacQueueItem > mpdu)
 Notify other components that an MPDU was acknowledged. More...
 
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., setting the NAV or the TXOP holder). More...
 
virtual void ReceivedNormalAck (Ptr< WifiMacQueueItem > mpdu, const WifiTxVector &txVector, const WifiTxVector &ackTxVector, const RxSignalInfo &rxInfo, double snr)
 Perform the actions needed when a Normal Ack is received. More...
 
virtual void ReceiveMpdu (Ptr< WifiMacQueueItem > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu)
 This method handles the reception of an MPDU (possibly included in an A-MPDU) More...
 
virtual void RetransmitMpduAfterMissedAck (Ptr< WifiMacQueueItem > mpdu) const
 Retransmit an MPDU that was not acknowledged. More...
 
virtual void RetransmitMpduAfterMissedCts (Ptr< WifiMacQueueItem > mpdu) const
 Retransmit an MPDU that was not sent because a CTS was not received. More...
 
void SendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiMode rtsTxMode, double rtsSnr)
 Send CTS after receiving RTS. More...
 
void SendCtsToSelf (const WifiTxParameters &txParams)
 Send CTS for a CTS-to-self mechanism. More...
 
void SendMpduWithProtection (Ptr< WifiMacQueueItem > mpdu, WifiTxParameters &txParams)
 Send an MPDU with the given TX parameters (with the specified protection). More...
 
void SendNormalAck (const WifiMacHeader &hdr, const WifiTxVector &dataTxVector, double dataSnr)
 Send Normal Ack. More...
 
void SendRts (const WifiTxParameters &txParams)
 Send RTS to begin RTS-CTS-Data-Ack transaction. More...
 
virtual void TransmissionFailed (void)
 Take necessary actions upon a transmission failure. More...
 
virtual void TransmissionSucceeded (void)
 Take necessary actions upon a transmission success. More...
 
virtual void UpdateNav (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 Update the NAV, if needed, based on the Duration/ID of the given psdu. More...
 
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. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Protected Attributes

AckedMpdu m_ackedMpduCallback
 the acknowledged MPDU callback More...
 
Mac48Address m_bssid
 BSSID address (Mac48Address) More...
 
Ptr< ChannelAccessManagerm_channelAccessManager
 the channel access manager More...
 
Ptr< Txopm_dcf
 the DCF/EDCAF that gained channel access More...
 
DroppedMpdu m_droppedMpduCallback
 the dropped MPDU callback More...
 
Ptr< RegularWifiMacm_mac
 the MAC layer on this station More...
 
Time m_navEnd
 NAV expiration time. More...
 
EventId m_navResetEvent
 the event to reset the NAV after an RTS More...
 
Ptr< WifiPhym_phy
 the PHY layer on this station More...
 
bool m_promisc
 Flag if the device is operating in promiscuous mode. More...
 
Ptr< MacRxMiddlem_rxMiddle
 the MAC RX Middle on this station More...
 
Mac48Address m_self
 the MAC address of this device More...
 
Ptr< MacTxMiddlem_txMiddle
 the MAC TX Middle on this station More...
 
WifiTxTimer m_txTimer
 the timer set upon frame transmission More...
 

Private Member Functions

virtual void Reset (void)
 Reset this frame exchange manager. More...
 
void RxStartIndication (WifiTxVector txVector, Time psduDuration)
 
void SendMpdu (void)
 Send the current MPDU, which can be acknowledged by a Normal Ack. More...
 

Private Attributes

Ptr< WifiAckManagerm_ackManager
 Acknowledgment manager. More...
 
Ptr< Packetm_fragmentedPacket
 the MSDU being fragmented More...
 
bool m_moreFragments
 true if a fragment has to be sent after a SIFS More...
 
Ptr< WifiMacQueueItemm_mpdu
 the MPDU being transmitted More...
 
Ptr< WifiProtectionManagerm_protectionManager
 Protection manager. More...
 
WifiTxParameters m_txParams
 the TX parameters for the current frame More...
 

Additional Inherited Members

Detailed Description

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

Introspection did not find any typical Config paths.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 424 bytes (on a 64-bit architecture).

Definition at line 51 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 69 of file frame-exchange-manager.h.

◆ DroppedMpdu

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

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

Constructor & Destructor Documentation

◆ FrameExchangeManager()

ns3::FrameExchangeManager::FrameExchangeManager ( )

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

References NS_LOG_FUNCTION.

◆ ~FrameExchangeManager()

ns3::FrameExchangeManager::~FrameExchangeManager ( )
virtual

Definition at line 62 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::HtFrameExchangeManager, and ns3::HeFrameExchangeManager.

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

References ns3::WifiAcknowledgment::acknowledgmentTime, ns3::WifiNormalAck::ackTxVector, 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

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

References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiProtection::CTS_TO_SELF, ns3::WifiRtsCtsProtection::ctsTxVector, ns3::WifiCtsToSelfProtection::ctsTxVector, 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, ns3::WifiRtsCtsProtection::rtsTxVector, 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< WifiMacQueueItem 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::HtFrameExchangeManager.

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

References DequeueMpdu(), ns3::WifiMacQueueItem::GetHeader(), m_dcf, m_mac, m_mpdu, NotifyPacketDiscarded(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Txop::ResetCw(), RetransmitMpduAfterMissedCts(), TransmissionFailed(), and ns3::Txop::UpdateFailedCw().

Referenced by ns3::HtFrameExchangeManager::CtsTimeout(), 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 WifiMacQueueItem mpdu)
protectedvirtual

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

Parameters
mpduthe given MPDU

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

References m_mac, and NS_LOG_DEBUG.

Referenced by CtsTimeout(), ns3::HtFrameExchangeManager::DequeuePsdu(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), ns3::HtFrameExchangeManager::MissedBlockAck(), NormalAckTimeout(), NotifyInternalCollision(), ReceivedNormalAck(), and SendMpdu().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::FrameExchangeManager::DoDispose ( void  )
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::QosFrameExchangeManager, ns3::HtFrameExchangeManager, and ns3::HeFrameExchangeManager.

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

References ns3::Object::DoDispose(), m_ackManager, m_channelAccessManager, m_fragmentedPacket, m_mac, m_phy, m_protectionManager, m_rxMiddle, m_txMiddle, ns3::MakeCallback(), NS_LOG_FUNCTION, Reset(), RxStartIndication(), and ns3::ObjectBase::TraceDisconnectWithoutContext().

Referenced by ns3::QosFrameExchangeManager::DoDispose(), and ns3::WaveFrameExchangeManager::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

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

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

References NS_ASSERT_MSG.

Referenced by Receive().

+ Here is the caller graph for this function:

◆ ForwardMpduDown()

void ns3::FrameExchangeManager::ForwardMpduDown ( Ptr< WifiMacQueueItem 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::QosFrameExchangeManager, and ns3::HtFrameExchangeManager.

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

References m_phy, 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 ( void  ) const

Get the Acknowledgment Manager used by this node.

Returns
the Acknowledgment Manager used by this node

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

References m_ackManager.

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

+ Here is the caller graph for this function:

◆ 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 642 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< WifiMacQueueItem > ns3::FrameExchangeManager::GetFirstFragmentIfNeeded ( Ptr< WifiMacQueueItem 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 317 of file frame-exchange-manager.cc.

References ns3::Packet::Copy(), ns3::Packet::CreateFragment(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacQueueItem::GetPacket(), ns3::WifiMacQueueItem::GetQueueAc(), ns3::WifiMacQueueItem::GetTimeStamp(), ns3::WifiMacQueueItem::IsFragment(), m_fragmentedPacket, m_mac, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiMacHeader::SetMoreFragments().

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 520 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::Packet::GetSize(), ns3::WifiMacHeader::GetSize(), ns3::WifiMacHeader::IsMoreFragments(), ns3::WifiTxParameters::m_acknowledgment, m_mac, m_phy, ns3::WifiTxParameters::m_txVector, ns3::Time::Min(), min, 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< WifiMacQueueItem > ns3::FrameExchangeManager::GetNextFragment ( void  )
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 712 of file frame-exchange-manager.cc.

References ns3::Packet::CreateFragment(), ns3::WifiMacHeader::GetFragmentNumber(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacQueueItem::GetPacketSize(), ns3::Packet::GetSize(), ns3::WifiMacHeader::IsMoreFragments(), 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:

◆ GetProtectionManager()

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

Get the Protection Manager used by this node.

Returns
the Protection Manager used by this node

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

References m_protectionManager.

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

+ Here is the caller 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 548 of file frame-exchange-manager.cc.

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

Referenced by 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 507 of file frame-exchange-manager.cc.

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

Referenced by ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits(), and UpdateTxDuration().

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

◆ GetTypeId()

TypeId ns3::FrameExchangeManager::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

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

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetWifiTxTimer()

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

Get a const reference to the WifiTxTimer object.

Returns
a const reference to the WifiTxTimer object

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

References m_txTimer.

◆ IsPromisc()

bool ns3::FrameExchangeManager::IsPromisc ( void  ) 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 211 of file frame-exchange-manager.cc.

References m_promisc.

◆ NavResetTimeout()

void ns3::FrameExchangeManager::NavResetTimeout ( void  )
protectedvirtual

Reset the NAV upon expiration of the NAV reset timer.

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

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

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

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

◆ NormalAckTimeout()

void ns3::FrameExchangeManager::NormalAckTimeout ( Ptr< WifiMacQueueItem mpdu,
const WifiTxVector txVector 
)
protected

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

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

References DequeueMpdu(), ns3::WifiMacQueueItem::GetHeader(), m_dcf, m_mac, m_mpdu, NotifyPacketDiscarded(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Txop::ResetCw(), RetransmitMpduAfterMissedAck(), ns3::WifiMacHeader::SetRetry(), TransmissionFailed(), and ns3::Txop::UpdateFailedCw().

Referenced by AmpduAggregationTest::DoRun(), and SendMpdu().

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

◆ 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 842 of file frame-exchange-manager.cc.

References DequeueMpdu(), ns3::Txop::GetWifiMacQueue(), ns3::Txop::IsQosTxop(), m_mac, NotifyPacketDiscarded(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosTxop::PeekNextMpdu(), ns3::Txop::ResetCw(), and ns3::Txop::UpdateFailedCw().

+ Here is the call graph for this function:

◆ NotifyOffNow()

void ns3::FrameExchangeManager::NotifyOffNow ( void  )

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 900 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 WifiMacQueueItem 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 223 of file frame-exchange-manager.cc.

References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_droppedMpduCallback, and ns3::WIFI_MAC_DROP_REACHED_RETRY_LIMIT.

Referenced by CtsTimeout(), NormalAckTimeout(), NotifyInternalCollision(), 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< WifiMacQueueItem mpdu)
protectedvirtual

Notify other components that an MPDU was acknowledged.

Parameters
mpduthe MPDU that was acknowledged

Reimplemented in ns3::HtFrameExchangeManager.

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

References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::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 ( void  )

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

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

References m_mac, NS_LOG_DEBUG, and Reset().

+ Here is the call 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., setting the NAV or the TXOP holder).

Parameters
psduthe received PSDU
txVectorTX vector of the received PSDU

Reimplemented in ns3::QosFrameExchangeManager.

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

References NS_LOG_FUNCTION, and UpdateNav().

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

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

◆ Receive()

void ns3::FrameExchangeManager::Receive ( Ptr< 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.

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 907 of file frame-exchange-manager.cc.

References ns3::WifiPsdu::begin(), EndReceiveAmpdu(), ns3::WifiPsdu::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiPsdu::GetHeader(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiMacHeader::IsAck(), ns3::WifiMacHeader::IsCts(), ns3::WifiMacHeader::IsData(), ns3::Mac48Address::IsGroup(), m_mac, m_promisc, m_rxMiddle, m_self, NS_ASSERT, NS_LOG_FUNCTION, PreProcessFrame(), and ReceiveMpdu().

Referenced by SetWifiPhy().

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

◆ ReceivedNormalAck()

void ns3::FrameExchangeManager::ReceivedNormalAck ( Ptr< WifiMacQueueItem 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 1122 of file frame-exchange-manager.cc.

References ns3::WifiTxTimer::Cancel(), DequeueMpdu(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiTxVector::GetMode(), GetNextFragment(), ns3::Txop::GetWifiMacQueue(), ns3::WifiMacHeader::IsMoreFragments(), m_channelAccessManager, m_dcf, m_mac, 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< WifiMacQueueItem 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::QosFrameExchangeManager, ns3::HtFrameExchangeManager, and ns3::HeFrameExchangeManager.

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

References ns3::Packet::AddPacketTag(), ns3::WifiTxTimer::Cancel(), ns3::Packet::Copy(), ns3::SnrTag::Get(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiTxVector::GetMode(), ns3::WifiMacQueueItem::GetPacket(), ns3::WifiTxTimer::GetReason(), ns3::WifiPhy::GetSifs(), ns3::WifiMacHeader::GetTypeString(), ns3::WifiMacHeader::IsAck(), ns3::WifiMacHeader::IsBeacon(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacHeader::IsCts(), ns3::WifiMacHeader::IsData(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsMgt(), ns3::WifiMacHeader::IsProbeResp(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRts(), ns3::WifiTxTimer::IsRunning(), m_channelAccessManager, m_mac, m_mpdu, m_navEnd, m_phy, m_rxMiddle, m_self, m_txParams, m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::Simulator::Now(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), ReceivedNormalAck(), ns3::Simulator::Schedule(), SendCtsAfterRts(), SendMpdu(), SendNormalAck(), ns3::SnrTag::Set(), ns3::RxSignalInfo::snr, 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:

◆ Reset()

void ns3::FrameExchangeManager::Reset ( void  )
privatevirtual

Reset this frame exchange manager.

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

References ns3::EventId::Cancel(), ns3::WifiTxTimer::Cancel(), ns3::WifiTxParameters::Clear(), ns3::EventId::IsRunning(), m_dcf, m_mpdu, m_navEnd, m_navResetEvent, m_txParams, m_txTimer, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by DoDispose(), NotifyOffNow(), NotifySleepNow(), and NotifySwitchingStartNow().

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

◆ ResetPhy()

void ns3::FrameExchangeManager::ResetPhy ( void  )
virtual

◆ RetransmitMpduAfterMissedAck()

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

Retransmit an MPDU that was not acknowledged.

Parameters
mpduthe MPDU to retransmit

Reimplemented in ns3::HtFrameExchangeManager.

Definition at line 795 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:

◆ RetransmitMpduAfterMissedCts()

void ns3::FrameExchangeManager::RetransmitMpduAfterMissedCts ( Ptr< WifiMacQueueItem mpdu) const
protectedvirtual

Retransmit an MPDU that was not sent because a CTS was not received.

Parameters
mpduthe MPDU to retransmit

Reimplemented in ns3::HtFrameExchangeManager.

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

References ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacHeader::IsRetry(), m_txMiddle, and NS_LOG_FUNCTION.

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

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

◆ RxStartIndication()

void ns3::FrameExchangeManager::RxStartIndication ( WifiTxVector  txVector,
Time  psduDuration 
)
private
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.

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

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

Referenced by DoDispose(), ResetPhy(), 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 
)
protected

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

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

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

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

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

◆ SendCtsToSelf()

◆ SendMpdu()

◆ SendMpduWithProtection()

void ns3::FrameExchangeManager::SendMpduWithProtection ( Ptr< WifiMacQueueItem 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 342 of file frame-exchange-manager.cc.

References CalculateAcknowledgmentTime(), ns3::WifiProtection::CTS_TO_SELF, ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacQueueItem::IsQueued(), ns3::WifiTxParameters::m_acknowledgment, m_mpdu, ns3::WifiTxParameters::m_protection, m_txParams, ns3::Time::Min(), ns3::WifiProtection::NONE, NS_ABORT_MSG, NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiProtection::RTS_CTS, SendCtsToSelf(), SendMpdu(), SendRts(), and ns3::WifiAckManager::SetQosAckPolicy().

Referenced by ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::WaveFrameExchangeManager::StartTransmission(), 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

◆ SendRts()

◆ 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 198 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 117 of file frame-exchange-manager.cc.

References m_ackManager, and NS_LOG_FUNCTION.

Referenced by PowerRateAdaptationTest::ConfigureNode(), WifiTest::CreateOne(), InterferenceHelperSequenceTest::CreateOne(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), and HeAggregationTest::DoRunSubTest().

+ Here is the caller graph for this function:

◆ SetAddress()

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

Set the MAC address.

Parameters
addressthe MAC address

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

References first::address, m_self, and NS_LOG_FUNCTION.

◆ SetBssid()

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

Set the Basic Service Set Identification.

Parameters
bssidthe BSSID

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

References m_bssid, and NS_LOG_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 151 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 191 of file frame-exchange-manager.cc.

References m_droppedMpduCallback, and NS_LOG_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 144 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 137 of file frame-exchange-manager.cc.

References m_txMiddle, and NS_LOG_FUNCTION.

◆ SetPromisc()

void ns3::FrameExchangeManager::SetPromisc ( void  )

Enable promiscuous mode.

Definition at line 205 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 104 of file frame-exchange-manager.cc.

References m_protectionManager, and NS_LOG_FUNCTION.

Referenced by PowerRateAdaptationTest::ConfigureNode(), WifiTest::CreateOne(), InterferenceHelperSequenceTest::CreateOne(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), and HeAggregationTest::DoRunSubTest().

+ Here is the caller graph for this function:

◆ SetWifiMac()

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

Set the MAC layer to use.

Parameters
macthe MAC layer to use

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

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

References m_mac, third::mac, and NS_LOG_FUNCTION.

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

+ 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 158 of file frame-exchange-manager.cc.

References m_phy, ns3::MakeCallback(), NS_LOG_FUNCTION, third::phy, Receive(), RxStartIndication(), ns3::WifiPhy::SetReceiveOkCallback(), and ns3::ObjectBase::TraceConnectWithoutContext().

+ Here is the call graph for this function:

◆ StartTransmission()

bool ns3::FrameExchangeManager::StartTransmission ( Ptr< Txop dcf)
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.
Returns
true if a frame exchange sequence was started, false otherwise

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

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

References ns3::WifiTxParameters::AddMpdu(), ns3::WifiTxTimer::Cancel(), ns3::WifiMacHeader::GetAddr1(), GetFirstFragmentIfNeeded(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacQueueItem::GetPacketSize(), ns3::WifiMacHeader::GetSequenceControl(), ns3::Txop::GetWifiMacQueue(), ns3::WifiMacHeader::IsData(), ns3::WifiMacQueueItem::IsFragment(), ns3::WifiMacHeader::IsMgt(), ns3::WifiMacHeader::IsRetry(), ns3::WifiTxTimer::IsRunning(), m_ackManager, ns3::WifiTxParameters::m_acknowledgment, m_dcf, m_mac, m_mpdu, ns3::WifiTxParameters::m_protection, m_protectionManager, m_txMiddle, m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::Txop::NotifyChannelAccessed(), ns3::Txop::NotifyChannelReleased(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, SendMpduWithProtection(), ns3::WifiMacHeader::SetSequenceNumber(), and UpdateTxDuration().

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

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

◆ TransmissionFailed()

void ns3::FrameExchangeManager::TransmissionFailed ( void  )
protectedvirtual

Take necessary actions upon a transmission failure.

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

Reimplemented in ns3::QosFrameExchangeManager.

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

References m_dcf, ns3::Txop::NotifyChannelReleased(), and NS_LOG_FUNCTION.

Referenced by CtsTimeout(), NormalAckTimeout(), 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 ( void  )
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::QosFrameExchangeManager, and ns3::HtFrameExchangeManager.

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

References ns3::WifiPhy::GetSifs(), m_dcf, m_moreFragments, m_phy, ns3::Txop::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

◆ 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 514 of file frame-exchange-manager.cc.

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

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

+ 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 391 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 551 of file frame-exchange-manager.h.

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

◆ m_bssid

◆ m_channelAccessManager

◆ m_dcf

◆ m_droppedMpduCallback

DroppedMpdu ns3::FrameExchangeManager::m_droppedMpduCallback
protected

the dropped MPDU callback

Definition at line 390 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 548 of file frame-exchange-manager.h.

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

◆ m_mac

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

the MAC layer on this station

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

Referenced by ns3::HtFrameExchangeManager::BlockAckTimeout(), ns3::HtFrameExchangeManager::CreateBlockAckAgreement(), CtsTimeout(), ns3::HtFrameExchangeManager::CtsTimeout(), DequeueMpdu(), DoDispose(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), ns3::QosFrameExchangeManager::ForwardMpduDown(), ns3::HtFrameExchangeManager::GetBaManager(), ns3::WaveFrameExchangeManager::GetDataTxVector(), GetFirstFragmentIfNeeded(), GetFrameDurationId(), GetRtsDurationId(), ns3::HeFrameExchangeManager::GetSupportedBaBufferSize(), ns3::HtFrameExchangeManager::MissedBlockAck(), ns3::HtFrameExchangeManager::NeedSetupBlockAck(), NormalAckTimeout(), NotifyInternalCollision(), ns3::HtFrameExchangeManager::NotifyPacketDiscarded(), ns3::HtFrameExchangeManager::NotifyReceivedNormalAck(), NotifySwitchingStartNow(), ns3::HtFrameExchangeManager::NotifyTxToEdca(), ns3::QosFrameExchangeManager::PreProcessFrame(), Receive(), ReceivedNormalAck(), ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedAck(), ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedCts(), ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendAddBaResponse(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), SendCtsAfterRts(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::HtFrameExchangeManager::SendDelbaFrame(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), SendNormalAck(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::HeFrameExchangeManager::SetMultiUserScheduler(), SetWifiMac(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::HtFrameExchangeManager::StartFrameExchange(), and StartTransmission().

◆ m_moreFragments

bool ns3::FrameExchangeManager::m_moreFragments
private

true if a fragment has to be sent after a SIFS

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

Referenced by ReceivedNormalAck(), and TransmissionSucceeded().

◆ m_mpdu

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

◆ m_navEnd

Time ns3::FrameExchangeManager::m_navEnd
protected

NAV expiration time.

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

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

◆ m_navResetEvent

EventId ns3::FrameExchangeManager::m_navResetEvent
protected

the event to reset the NAV after an RTS

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

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

◆ m_phy

◆ m_promisc

bool ns3::FrameExchangeManager::m_promisc
protected

Flag if the device is operating in promiscuous mode.

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

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

◆ m_protectionManager

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

Protection manager.

Definition at line 550 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_txMiddle

◆ m_txParams

WifiTxParameters ns3::FrameExchangeManager::m_txParams
private

the TX parameters for the current frame

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

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

◆ m_txTimer


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