A Discrete-Event Network Simulator
API
ns3::WaveFrameExchangeManager Class Reference

This class is the subclass of QosFrameExchangeManager to provide support for MAC extension (1) allows higher layer control data rate and tx power level. More...

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

+ Inheritance diagram for ns3::WaveFrameExchangeManager:
+ Collaboration diagram for ns3::WaveFrameExchangeManager:

Public Member Functions

 WaveFrameExchangeManager ()
 
virtual ~WaveFrameExchangeManager ()
 
void SetWaveNetDevice (Ptr< WaveNetDevice > device)
 
virtual bool StartTransmission (Ptr< Txop > dcf)
 Request the FrameExchangeManager to start a frame exchange sequence. More...
 
- Public Member Functions inherited from ns3::QosFrameExchangeManager
 QosFrameExchangeManager ()
 
virtual ~QosFrameExchangeManager ()
 
virtual bool IsWithinLimitsIfAddMpdu (Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams, Time ppduDurationLimit) const
 Check whether the given MPDU can be added to the frame being built (as described by the given TX parameters) without violating the given constraint on the PPDU transmission duration. More...
 
virtual bool IsWithinSizeAndTimeLimits (uint32_t ppduPayloadSize, Mac48Address receiver, const WifiTxParameters &txParams, Time ppduDurationLimit) const
 Check whether the transmission time of the frame being built (as described by the given TX parameters) does not exceed the given PPDU duration limit if the size of the PSDU addressed to the given receiver becomes ppduPayloadSize. More...
 
bool StartTransmission (Ptr< Txop > edca) override
 Request the FrameExchangeManager to start a frame exchange sequence. More...
 
bool TryAddMpdu (Ptr< const WifiMacQueueItem > mpdu, WifiTxParameters &txParams, Time availableTime) const
 Recompute the protection and acknowledgment methods to use if the given MPDU is added to the frame being built (as described by the given TX parameters) and check whether the duration of the frame exchange sequence (including protection and acknowledgment) does not exceed the given available time. More...
 
- Public Member Functions inherited from ns3::FrameExchangeManager
 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 PhyMacLowListener 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 PhyMacLowListener 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 MacLow. 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...
 
- 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::QosFrameExchangeManager
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::FrameExchangeManager
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 DoDispose (void)
 Destructor implementation. More...
 
- Protected Member Functions inherited from ns3::QosFrameExchangeManager
void DoDispose () override
 Destructor implementation. More...
 
void ForwardMpduDown (Ptr< WifiMacQueueItem > mpdu, WifiTxVector &txVector) override
 Forward an MPDU down to the PHY layer. More...
 
Time GetCtsToSelfDurationId (const WifiTxVector &ctsTxVector, Time txDuration, Time response) const override
 Compute how to set the Duration/ID field of a CTS-to-self frame to send to protect a frame transmitted with the given TX vector. More...
 
Time GetFrameDurationId (const WifiMacHeader &header, uint32_t size, const WifiTxParameters &txParams, Ptr< Packet > fragmentedPacket) const override
 Compute how to set the Duration/ID field of a frame being transmitted with the given TX parameters. More...
 
Time GetRtsDurationId (const WifiTxVector &rtsTxVector, Time txDuration, Time response) const override
 Compute how to set the Duration/ID field of an RTS frame to send to protect a frame transmitted with the given TX vector. More...
 
void PifsRecovery (void)
 Perform a PIFS recovery as a response to transmission failure within a TXOP. More...
 
void PreProcessFrame (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) override
 Perform actions that are possibly needed when receiving any frame, independently of whether the frame is addressed to this station (e.g., setting the NAV or the TXOP holder). More...
 
void ReceiveMpdu (Ptr< WifiMacQueueItem > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu) override
 This method handles the reception of an MPDU (possibly included in an A-MPDU) More...
 
virtual bool SendCfEndIfNeeded (void)
 Send a CF-End frame to indicate the completion of the TXOP, provided that the remaining duration is long enough to transmit this frame. More...
 
virtual void SetTxopHolder (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 Set the TXOP holder, if needed, based on the received frame. More...
 
virtual bool StartFrameExchange (Ptr< QosTxop > edca, Time availableTime, bool initialFrame)
 Start a frame exchange (including protection frames and acknowledgment frames as needed) that fits within the given availableTime (if different than Time::Min()). More...
 
virtual bool StartTransmission (Ptr< QosTxop > edca, Time txopDuration)
 Request the FrameExchangeManager to start a frame exchange sequence. More...
 
void TransmissionFailed (void) override
 Take necessary actions upon a transmission failure. More...
 
void TransmissionSucceeded (void) override
 Take necessary actions upon a transmission success. More...
 
- Protected Member Functions inherited from ns3::FrameExchangeManager
virtual void CtsTimeout (Ptr< WifiMacQueueItem > rts, const WifiTxVector &txVector)
 Called when the CTS timeout expires. More...
 
virtual void DequeueMpdu (Ptr< WifiMacQueueItem > mpdu)
 Dequeue the given MPDU from the queue in which it is stored. 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...
 
Ptr< WifiMacQueueItemGetFirstFragmentIfNeeded (Ptr< WifiMacQueueItem > mpdu)
 Fragment the given MPDU if needed. More...
 
Ptr< WifiMacQueueItemGetNextFragment (void)
 Get the next fragment of the current MSDU. 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 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 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 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...
 

Private Member Functions

virtual WifiTxVector GetDataTxVector (Ptr< const WifiMacQueueItem > item) const
 Return a TXVECTOR for the DATA frame given the destination. More...
 

Private Attributes

Ptr< ChannelCoordinatorm_coordinator
 the channel coordinator More...
 
Ptr< ChannelSchedulerm_scheduler
 the channel scheduler More...
 

Additional Inherited Members

- Public Types inherited from ns3::FrameExchangeManager
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...
 
- Protected Attributes inherited from ns3::QosFrameExchangeManager
Ptr< QosTxopm_edca
 the EDCAF that gained channel access More...
 
bool m_setQosQueueSize
 whether to set the Queue Size subfield of the QoS Control field of QoS data frames More...
 
Mac48Address m_txopHolder
 MAC address of the TXOP holder. More...
 
- Protected Attributes inherited from ns3::FrameExchangeManager
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...
 

Detailed Description

This class is the subclass of QosFrameExchangeManager to provide support for MAC extension (1) allows higher layer control data rate and tx power level.

Introspection did not find any typical Config paths.

If higher layer does not set, they will be determined by WifiRemoteStationManager of MAC layer; If higher layer sets tx parameters in non-adaptable mode, the data rate and tx power level will be used for transmission;. If higher layer sets tx parameters in adaptable mode, the data rate will be lower bound for the actual data rate, and the power level will be upper bound for the actual transmit power. (2) implements the feature described in Annex C : avoid transmission at scheduled guard intervals However, the feature is extended further here that the required transmit time is determined by MAC layer itself rather than PHY layer, which contains RTS/CTS, DATA and ACK time.


No Attributes are defined for this type.

Attributes defined in parent class ns3::QosFrameExchangeManager

  • PifsRecovery: Perform a PIFS recovery as a response to transmission failure within a TXOP
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • SetQueueSize: Whether to set the Queue Size subfield of the QoS Control field of QoS data frames sent by non-AP stations
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read

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

Definition at line 47 of file wave-frame-exchange-manager.h.

Constructor & Destructor Documentation

◆ WaveFrameExchangeManager()

ns3::WaveFrameExchangeManager::WaveFrameExchangeManager ( )

Definition at line 46 of file wave-frame-exchange-manager.cc.

References NS_LOG_FUNCTION.

◆ ~WaveFrameExchangeManager()

ns3::WaveFrameExchangeManager::~WaveFrameExchangeManager ( )
virtual

Definition at line 51 of file wave-frame-exchange-manager.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ DoDispose()

void ns3::WaveFrameExchangeManager::DoDispose ( void  )
protectedvirtual

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.

Definition at line 167 of file wave-frame-exchange-manager.cc.

References ns3::FrameExchangeManager::DoDispose(), m_coordinator, m_scheduler, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetDataTxVector()

WifiTxVector ns3::WaveFrameExchangeManager::GetDataTxVector ( Ptr< const WifiMacQueueItem item) const
privatevirtual

Return a TXVECTOR for the DATA frame given the destination.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
itemthe item being asked for TXVECTOR
Returns
TXVECTOR for the given item

Definition at line 65 of file wave-frame-exchange-manager.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiMode::GetDataRate(), ns3::WifiTxVector::GetMode(), ns3::WifiTxVector::GetPreambleType(), ns3::WifiTxVector::GetTxPowerLevel(), ns3::HigherLayerTxVectorTag::GetTxVector(), ns3::HigherLayerTxVectorTag::IsAdaptable(), ns3::FrameExchangeManager::m_mac, min, NS_LOG_FUNCTION, ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetPreambleType(), and ns3::WifiTxVector::SetTxPowerLevel().

Referenced by StartTransmission().

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

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 36 of file wave-frame-exchange-manager.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ SetWaveNetDevice()

void ns3::WaveFrameExchangeManager::SetWaveNetDevice ( Ptr< WaveNetDevice device)
Parameters
deviceWaveNetDevice associated with WaveFrameExchangeManager

Definition at line 57 of file wave-frame-exchange-manager.cc.

References ns3::WaveNetDevice::GetChannelCoordinator(), ns3::WaveNetDevice::GetChannelScheduler(), m_coordinator, m_scheduler, and NS_ASSERT.

+ Here is the call graph for this function:

◆ StartTransmission()

Member Data Documentation

◆ m_coordinator

Ptr<ChannelCoordinator> ns3::WaveFrameExchangeManager::m_coordinator
private

the channel coordinator

Definition at line 82 of file wave-frame-exchange-manager.h.

Referenced by DoDispose(), SetWaveNetDevice(), and StartTransmission().

◆ m_scheduler

Ptr<ChannelScheduler> ns3::WaveFrameExchangeManager::m_scheduler
private

the channel scheduler

Definition at line 81 of file wave-frame-exchange-manager.h.

Referenced by DoDispose(), SetWaveNetDevice(), and StartTransmission().


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