QosFrameExchangeManager handles the frame exchange sequences for QoS stations. More...
#include "qos-frame-exchange-manager.h"
Public Member Functions | |
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< WifiAckManager > | GetAckManager (void) const |
Get the Acknowledgment Manager used by this node. More... | |
Ptr< WifiProtectionManager > | GetProtectionManager (void) const |
Get the Protection Manager used by this node. More... | |
const WifiTxTimer & | GetWifiTxTimer (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... | |
virtual 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< WifiMac > 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< Object > | GetObject () 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< Object > | GetObject (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[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= ([[maybe_unused]] 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::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 | |
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< const WifiMacQueueItem > mpdu) |
Dequeue the given MPDU from the queue in which it is stored. More... | |
void | DoCtsTimeout (Ptr< WifiPsdu > psdu) |
Take required actions when the CTS timer fired after sending an RTS to protect the given PSDU expires. 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< WifiMacQueueItem > | GetFirstFragmentIfNeeded (Ptr< WifiMacQueueItem > mpdu) |
Fragment the given MPDU if needed. More... | |
Ptr< WifiMacQueueItem > | GetNextFragment (void) |
Get the next fragment of the current MSDU. More... | |
virtual uint32_t | GetPsduSize (Ptr< const WifiMacQueueItem > mpdu, const WifiTxVector &txVector) const |
Get the size in bytes of the given MPDU, which is to be transmitted with the given TXVECTOR. 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... | |
virtual 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 | ReleaseSequenceNumber (Ptr< WifiMacQueueItem > mpdu) const |
Make the sequence number of the given MPDU available again if the MPDU has never been transmitted. More... | |
virtual void | RetransmitMpduAfterMissedAck (Ptr< WifiMacQueueItem > mpdu) const |
Retransmit an MPDU that was not acknowledged. 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... | |
Protected Attributes | |
Ptr< QosTxop > | m_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< ChannelAccessManager > | m_channelAccessManager |
the channel access manager More... | |
Ptr< Txop > | m_dcf |
the DCF/EDCAF that gained channel access More... | |
DroppedMpdu | m_droppedMpduCallback |
the dropped MPDU callback More... | |
Ptr< WifiMac > | m_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< WifiPhy > | m_phy |
the PHY layer on this station More... | |
bool | m_promisc |
Flag if the device is operating in promiscuous mode. More... | |
Ptr< MacRxMiddle > | m_rxMiddle |
the MAC RX Middle on this station More... | |
Mac48Address | m_self |
the MAC address of this device More... | |
Ptr< MacTxMiddle > | m_txMiddle |
the MAC TX Middle on this station More... | |
WifiTxTimer | m_txTimer |
the timer set upon frame transmission More... | |
Private Member Functions | |
void | CancelPifsRecovery (void) |
Cancel the PIFS recovery event and have the EDCAF attempting PIFS recovery release the channel. More... | |
Private Attributes | |
Ptr< Txop > | m_edcaBackingOff |
channel access function that invoked backoff during TXOP More... | |
bool | m_initialFrame |
true if transmitting the initial frame of a TXOP More... | |
bool | m_pifsRecovery |
true if performing a PIFS recovery after failure More... | |
EventId | m_pifsRecoveryEvent |
event associated with an attempt of PIFS recovery 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... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
QosFrameExchangeManager handles the frame exchange sequences for QoS stations.
Introspection did not find any typical Config paths.
Note that Basic Block Ack is not supported.
No TraceSources are defined for this type.
Size of this type is 480 bytes (on a 64-bit architecture).
Definition at line 36 of file qos-frame-exchange-manager.h.
ns3::QosFrameExchangeManager::QosFrameExchangeManager | ( | ) |
Definition at line 60 of file qos-frame-exchange-manager.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 66 of file qos-frame-exchange-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
private |
Cancel the PIFS recovery event and have the EDCAF attempting PIFS recovery release the channel.
Definition at line 139 of file qos-frame-exchange-manager.cc.
References ns3::EventId::Cancel(), ns3::EventId::IsRunning(), m_edca, m_pifsRecoveryEvent, ns3::QosTxop::NotifyChannelReleased(), NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by StartTransmission().
|
overrideprotectedvirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::FrameExchangeManager.
Definition at line 72 of file qos-frame-exchange-manager.cc.
References ns3::EventId::Cancel(), ns3::FrameExchangeManager::DoDispose(), m_edca, m_edcaBackingOff, m_pifsRecoveryEvent, and NS_LOG_FUNCTION.
Referenced by ns3::HtFrameExchangeManager::DoDispose().
|
overrideprotectedvirtual |
Forward an MPDU down to the PHY layer.
mpdu | the MPDU to forward down |
txVector | the TXVECTOR used to transmit the MPDU |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 521 of file qos-frame-exchange-manager.cc.
References ns3::FrameExchangeManager::ForwardMpduDown(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsQosEosp(), ns3::FrameExchangeManager::m_mac, m_setQosQueueSize, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetQosEosp(), ns3::WifiMacHeader::SetQosQueueSize(), and ns3::STA.
|
overrideprotectedvirtual |
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.
ctsTxVector | the TX vector used to send the CTS-to-self frame |
txDuration | the TX duration of the data frame |
response | the time taken by the response (acknowledgment) to the data frame |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 495 of file qos-frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::GetCtsSize(), ns3::FrameExchangeManager::GetCtsToSelfDurationId(), ns3::WifiPhy::GetPhyBand(), ns3::QosTxop::GetRemainingTxop(), ns3::Txop::GetTxopLimit(), ns3::Time::IsZero(), m_edca, ns3::FrameExchangeManager::m_phy, max, NS_LOG_FUNCTION, and ns3::Seconds().
|
overrideprotectedvirtual |
Compute how to set the Duration/ID field of a frame being transmitted with the given TX parameters.
header | the MAC header of the frame |
size | the size of the frame in bytes |
txParams | the TX parameters used to send the frame |
fragmentedPacket | the packet that originated the frame to transmit, in case the latter is a fragment |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 441 of file qos-frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::WifiPhy::GetPhyBand(), ns3::QosTxop::GetRemainingTxop(), ns3::Txop::GetTxopLimit(), ns3::Time::IsZero(), ns3::WifiTxParameters::m_acknowledgment, m_edca, ns3::FrameExchangeManager::m_phy, ns3::WifiTxParameters::m_txVector, max, ns3::Time::Min(), NS_ASSERT, and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Compute how to set the Duration/ID field of an RTS frame to send to protect a frame transmitted with the given TX vector.
rtsTxVector | the TX vector used to send the RTS frame |
txDuration | the TX duration of the data frame |
response | the time taken by the response (acknowledgment) to the data frame |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 470 of file qos-frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiPhy::GetPhyBand(), ns3::QosTxop::GetRemainingTxop(), ns3::FrameExchangeManager::GetRtsDurationId(), ns3::GetRtsSize(), ns3::Txop::GetTxopLimit(), ns3::Time::IsZero(), m_edca, ns3::FrameExchangeManager::m_phy, max, NS_LOG_FUNCTION, and ns3::Seconds().
|
static |
Get the type ID.
Definition at line 38 of file qos-frame-exchange-manager.cc.
References m_pifsRecovery, m_setQosQueueSize, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), and ns3::TypeId::SetParent().
|
virtual |
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.
mpdu | the MPDU to add to the frame being built |
txParams | the TX parameters describing the frame being built |
ppduDurationLimit | the time limit on the PPDU transmission duration |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 392 of file qos-frame-exchange-manager.cc.
References IsWithinSizeAndTimeLimits(), NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by TryAddMpdu().
|
virtual |
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.
Also check that the PSDU size does not exceed the max PSDU size for the modulation class being used.
ppduPayloadSize | the new PSDU size |
receiver | the MAC address of the receiver of the PSDU |
txParams | the TX parameters describing the frame being built |
ppduDurationLimit | the limit on the PPDU duration |
Definition at line 406 of file qos-frame-exchange-manager.cc.
References ns3::Time::As(), ns3::WifiPhy::GetMaxPsduSize(), ns3::WifiTxVector::GetModulationClass(), ns3::GetPpduMaxTime(), ns3::WifiTxVector::GetPreambleType(), ns3::FrameExchangeManager::GetTxDuration(), ns3::Time::IsNegative(), ns3::Time::IsStrictlyPositive(), ns3::WifiTxParameters::m_txVector, ns3::Time::Min(), ns3::Time::MS, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by IsWithinLimitsIfAddMpdu(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAddMpdu(), and ns3::HtFrameExchangeManager::IsWithinLimitsIfAggregateMsdu().
|
protected |
Perform a PIFS recovery as a response to transmission failure within a TXOP.
If the carrier sense indicates that the medium is idle, continue the TXOP. Otherwise, release the channel.
Definition at line 118 of file qos-frame-exchange-manager.cc.
References ns3::WifiPhy::GetPifs(), ns3::WifiPhy::GetSifs(), ns3::QosTxop::IsTxopStarted(), ns3::FrameExchangeManager::m_channelAccessManager, m_edca, ns3::FrameExchangeManager::m_phy, ns3::QosTxop::NotifyChannelReleased(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Seconds(), and StartTransmission().
Referenced by TransmissionFailed().
|
overrideprotectedvirtual |
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).
psdu | the received PSDU |
txVector | TX vector of the received PSDU |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 617 of file qos-frame-exchange-manager.cc.
References ns3::AP, ns3::WifiPsdu::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetQosQueueSize(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsQosEosp(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_self, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::PeekPointer(), ns3::FrameExchangeManager::PreProcessFrame(), and SetTxopHolder().
|
overrideprotectedvirtual |
This method handles the reception of an MPDU (possibly included in an A-MPDU)
mpdu | the received MPDU |
rxSignalInfo | the info on the received signal ( |
txVector | TxVector of the received PSDU |
inAmpdu | true if the MPDU is part of an A-MPDU |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 660 of file qos-frame-exchange-manager.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiTxVector::GetMode(), ns3::WifiMacHeader::GetQosAckPolicy(), ns3::WifiPhy::GetSifs(), ns3::WifiMacHeader::GetTypeString(), ns3::WifiMacHeader::HasData(), ns3::WifiMacHeader::IsCfEnd(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRts(), ns3::FrameExchangeManager::m_navEnd, ns3::FrameExchangeManager::m_phy, ns3::FrameExchangeManager::m_rxMiddle, ns3::FrameExchangeManager::m_self, m_txopHolder, ns3::FrameExchangeManager::NavResetTimeout(), ns3::WifiMacHeader::NORMAL_ACK, ns3::Simulator::Now(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, ns3::FrameExchangeManager::ReceiveMpdu(), ns3::Simulator::Schedule(), ns3::FrameExchangeManager::SendCtsAfterRts(), ns3::FrameExchangeManager::SendNormalAck(), and ns3::RxSignalInfo::snr.
Referenced by ns3::HtFrameExchangeManager::ReceiveMpdu().
|
protectedvirtual |
Send a CF-End frame to indicate the completion of the TXOP, provided that the remaining duration is long enough to transmit this frame.
Definition at line 82 of file qos-frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiMacHeader::GetAddr1(), ns3::Mac48Address::GetBroadcast(), ns3::WifiPhy::GetPhyBand(), ns3::QosTxop::GetRemainingTxop(), ns3::WifiMacHeader::GetSize(), ns3::Txop::GetTxopLimit(), ns3::Time::IsStrictlyPositive(), m_edca, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, ns3::FrameExchangeManager::m_self, ns3::Txop::NotifyChannelReleased(), ns3::QosTxop::NotifyChannelReleased(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::Seconds(), ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_CTL_END, and ns3::WIFI_MAC_FCS_LENGTH.
Referenced by StartTransmission().
|
protectedvirtual |
Set the TXOP holder, if needed, based on the received frame.
psdu | the received PSDU |
txVector | TX vector of the received PSDU |
Reimplemented in ns3::HeFrameExchangeManager.
Definition at line 643 of file qos-frame-exchange-manager.cc.
References ns3::WifiPsdu::GetAddr1(), ns3::WifiPsdu::GetAddr2(), ns3::WifiPsdu::GetHeader(), ns3::WifiMacHeader::IsAck(), ns3::WifiMacHeader::IsCts(), ns3::WifiMacHeader::IsMgt(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRts(), m_txopHolder, and NS_LOG_FUNCTION.
Referenced by PreProcessFrame().
|
protectedvirtual |
Start a frame exchange (including protection frames and acknowledgment frames as needed) that fits within the given availableTime (if different than Time::Min()).
edca | the EDCAF which has been granted the opportunity to transmit |
availableTime | the amount of time allowed for the frame exchange. Pass Time::Min() in case the TXOP limit is null |
initialFrame | true if the frame being transmitted is the initial frame of the TXOP. This is used to determine whether the TXOP limit can be exceeded |
Reimplemented in ns3::HtFrameExchangeManager, and ns3::HeFrameExchangeManager.
Definition at line 262 of file qos-frame-exchange-manager.cc.
References ns3::FrameExchangeManager::GetFirstFragmentIfNeeded(), ns3::QosTxop::GetNextMpdu(), ns3::FrameExchangeManager::GetProtectionManager(), ns3::FrameExchangeManager::m_mac, ns3::WifiTxParameters::m_protection, ns3::WifiTxParameters::m_txVector, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosTxop::PeekNextMpdu(), and ns3::FrameExchangeManager::SendMpduWithProtection().
Referenced by ns3::HtFrameExchangeManager::StartFrameExchange(), and StartTransmission().
|
protectedvirtual |
Request the FrameExchangeManager to start a frame exchange sequence.
edca | the EDCA that gained channel access |
txopDuration | the duration of a TXOP. This value is only used when a new TXOP is started (and hence the TXOP limit for the given EDCAF is non-zero) |
Definition at line 174 of file qos-frame-exchange-manager.cc.
References ns3::WifiTxTimer::Cancel(), CancelPifsRecovery(), ns3::QosTxop::GetRemainingTxop(), ns3::Txop::GetTxopLimit(), ns3::EventId::IsRunning(), ns3::WifiTxTimer::IsRunning(), ns3::Time::IsStrictlyPositive(), ns3::QosTxop::IsTxopStarted(), ns3::Time::IsZero(), ns3::FrameExchangeManager::m_dcf, m_edca, m_edcaBackingOff, m_initialFrame, m_pifsRecovery, m_pifsRecoveryEvent, ns3::FrameExchangeManager::m_txTimer, ns3::Time::Min(), ns3::QosTxop::NotifyChannelAccessed(), ns3::QosTxop::NotifyChannelReleased(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Seconds(), SendCfEndIfNeeded(), and StartFrameExchange().
Request the FrameExchangeManager to start a frame exchange sequence.
dcf | the channel access function that gained channel access. It is the DCF on non-QoS stations and an EDCA on QoS stations. |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 151 of file qos-frame-exchange-manager.cc.
References CancelPifsRecovery(), ns3::Txop::GetTxopLimit(), ns3::Txop::IsQosTxop(), ns3::EventId::IsRunning(), m_edca, m_pifsRecoveryEvent, NS_LOG_FUNCTION, and ns3::FrameExchangeManager::StartTransmission().
Referenced by PifsRecovery(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), and TransmissionSucceeded().
|
overrideprotectedvirtual |
Take necessary actions upon a transmission failure.
A non-QoS station releases the channel when this method is called.
Reimplemented from ns3::FrameExchangeManager.
Definition at line 567 of file qos-frame-exchange-manager.cc.
References ns3::WifiPhy::GetPifs(), ns3::Txop::GetTxopLimit(), ns3::EventId::IsRunning(), ns3::Time::IsStrictlyPositive(), m_edca, m_edcaBackingOff, m_initialFrame, ns3::FrameExchangeManager::m_phy, m_pifsRecovery, m_pifsRecoveryEvent, ns3::QosTxop::NotifyChannelReleased(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, PifsRecovery(), ns3::Simulator::Schedule(), and ns3::FrameExchangeManager::TransmissionFailed().
Referenced by ns3::HtFrameExchangeManager::BlockAckTimeout().
|
overrideprotectedvirtual |
Take necessary actions upon a transmission success.
A non-QoS station transmits the next fragment, if any, or releases the channel, otherwise.
Reimplemented from ns3::FrameExchangeManager.
Definition at line 538 of file qos-frame-exchange-manager.cc.
References ns3::QosTxop::GetRemainingTxop(), ns3::WifiPhy::GetSifs(), ns3::Txop::GetTxopLimit(), ns3::Time::IsStrictlyPositive(), m_edca, m_initialFrame, ns3::FrameExchangeManager::m_phy, ns3::QosTxop::NotifyChannelReleased(), NS_LOG_DEBUG, ns3::Simulator::Schedule(), ns3::Seconds(), StartTransmission(), and ns3::FrameExchangeManager::TransmissionSucceeded().
Referenced by ns3::HtFrameExchangeManager::TransmissionSucceeded().
bool ns3::QosFrameExchangeManager::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.
The protection and acknowledgment methods held by the given TX parameters are only updated if the given MPDU can be added.
mpdu | the MPDU to add to the frame being built |
txParams | the TX parameters describing the frame being built |
availableTime | the time limit on the frame exchange sequence |
Definition at line 309 of file qos-frame-exchange-manager.cc.
References ns3::WifiTxParameters::AddMpdu(), ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::FrameExchangeManager::GetAckManager(), ns3::FrameExchangeManager::GetProtectionManager(), IsWithinLimitsIfAddMpdu(), ns3::WifiTxParameters::m_acknowledgment, ns3::WifiTxParameters::m_protection, ns3::Time::Min(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::FrameExchangeManager::UpdateTxDuration().
Referenced by ns3::WaveFrameExchangeManager::StartTransmission().
the EDCAF that gained channel access
Definition at line 159 of file qos-frame-exchange-manager.h.
Referenced by ns3::HtFrameExchangeManager::BlockAckTimeout(), CancelPifsRecovery(), DoDispose(), GetCtsToSelfDurationId(), GetFrameDurationId(), ns3::HtFrameExchangeManager::GetPsduDurationId(), GetRtsDurationId(), PifsRecovery(), ns3::HtFrameExchangeManager::ReceiveMpdu(), SendCfEndIfNeeded(), ns3::HeFrameExchangeManager::SendPsduMap(), StartTransmission(), TransmissionFailed(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), and TransmissionSucceeded().
channel access function that invoked backoff during TXOP
Definition at line 175 of file qos-frame-exchange-manager.h.
Referenced by DoDispose(), StartTransmission(), and TransmissionFailed().
|
private |
true if transmitting the initial frame of a TXOP
Definition at line 172 of file qos-frame-exchange-manager.h.
Referenced by StartTransmission(), TransmissionFailed(), and TransmissionSucceeded().
|
private |
true if performing a PIFS recovery after failure
Definition at line 173 of file qos-frame-exchange-manager.h.
Referenced by GetTypeId(), StartTransmission(), and TransmissionFailed().
|
private |
event associated with an attempt of PIFS recovery
Definition at line 174 of file qos-frame-exchange-manager.h.
Referenced by CancelPifsRecovery(), DoDispose(), StartTransmission(), and TransmissionFailed().
|
protected |
whether to set the Queue Size subfield of the QoS Control field of QoS data frames
Definition at line 161 of file qos-frame-exchange-manager.h.
Referenced by ForwardMpduDown(), GetTypeId(), and ns3::HtFrameExchangeManager::NotifyTxToEdca().
|
protected |
MAC address of the TXOP holder.
Definition at line 160 of file qos-frame-exchange-manager.h.
Referenced by ReceiveMpdu(), and SetTxopHolder().