HtFrameExchangeManager handles the frame exchange sequences for HT stations. More...
#include "ht-frame-exchange-manager.h"
Public Member Functions | |
HtFrameExchangeManager () | |
virtual | ~HtFrameExchangeManager () |
void | CalculateAcknowledgmentTime (WifiAcknowledgment *acknowledgment) const override |
Calculate the time required to acknowledge a frame according to the given acknowledgment method. More... | |
void | CreateBlockAckAgreement (const MgtAddBaResponseHeader *respHdr, Mac48Address originator, uint16_t startingSeq) |
void | DestroyBlockAckAgreement (Mac48Address originator, uint8_t tid) |
Destroy a Block Ack agreement. More... | |
bool | GetBaAgreementEstablished (Mac48Address originator, uint8_t tid) const |
Return true if a Block Ack agreement has been established with the given originator for the given TID. More... | |
BlockAckType | GetBlockAckType (Mac48Address originator, uint8_t tid) const |
Get the type of BlockAck frames sent to the given originator. More... | |
Ptr< MpduAggregator > | GetMpduAggregator (void) const |
Returns the aggregator used to construct A-MPDU subframes. More... | |
Ptr< MsduAggregator > | GetMsduAggregator (void) const |
Returns the aggregator used to construct A-MSDU subframes. More... | |
virtual uint16_t | GetSupportedBaBufferSize (void) const |
Get the maximum supported buffer size for a Block Ack agreement. More... | |
virtual bool | IsWithinAmpduSizeLimit (uint32_t ampduSize, Mac48Address receiver, uint8_t tid, WifiModulationClass modulation) const |
Check whether an A-MPDU of the given size meets the constraint on the maximum size for A-MPDUs sent to the given receiver, belonging to the given TID and transmitted using the given modulation class. More... | |
bool | IsWithinLimitsIfAddMpdu (Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams, Time ppduDurationLimit) const override |
Check if the PSDU obtained by aggregating the given MPDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MPDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()). More... | |
virtual bool | IsWithinLimitsIfAggregateMsdu (Ptr< const WifiMacQueueItem > msdu, const WifiTxParameters &txParams, Time ppduDurationLimit) const |
Check if the PSDU obtained by aggregating the given MSDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MSDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()). More... | |
void | SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, Mac48Address originator) |
This method can be called to accept a received ADDBA Request. More... | |
void | SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator) |
Sends DELBA frame to cancel a block ack agreement with STA addressed by addr for TID tid. More... | |
void | SetWifiMac (const Ptr< WifiMac > mac) override |
Set the MAC layer to use. More... | |
bool | StartFrameExchange (Ptr< QosTxop > edca, Time availableTime, bool initialFrame) override |
Start a frame exchange (including protection frames and acknowledgment frames as needed) that fits within the given availableTime (if different than Time::Min()). More... | |
virtual bool | TryAggregateMsdu (Ptr< const WifiMacQueueItem > msdu, WifiTxParameters &txParams, Time availableTime) const |
Check if aggregating an MSDU to the current MPDU (as specified by the given TX parameters) does not violate the size and time constraints, while taking into account the possibly updated protection and acknowledgment methods. More... | |
Public Member Functions inherited from ns3::QosFrameExchangeManager | |
QosFrameExchangeManager () | |
virtual | ~QosFrameExchangeManager () |
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 | 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 | 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::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 Types | |
typedef std::pair< Mac48Address, uint8_t > | AgreementKey |
agreement key typedef (MAC address and TID) More... | |
Protected Member Functions | |
virtual void | BlockAckTimeout (Ptr< WifiPsdu > psdu, const WifiTxVector &txVector) |
Called when the BlockAck timeout expires. More... | |
void | CtsTimeout (Ptr< WifiMacQueueItem > rts, const WifiTxVector &txVector) override |
Called when the CTS timeout expires. More... | |
void | DequeuePsdu (Ptr< const WifiPsdu > psdu) |
Dequeue the MPDUs of the given PSDU from the queue in which they are stored. More... | |
void | DoDispose () override |
Destructor implementation. More... | |
void | EndReceiveAmpdu (Ptr< const WifiPsdu > psdu, const RxSignalInfo &rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &perMpduStatus) override |
This method is called when the reception of an A-MPDU including multiple MPDUs is completed. More... | |
void | ForwardMpduDown (Ptr< WifiMacQueueItem > mpdu, WifiTxVector &txVector) override |
Forward an MPDU down to the PHY layer. More... | |
virtual void | ForwardPsduDown (Ptr< const WifiPsdu > psdu, WifiTxVector &txVector) |
Forward a PSDU down to the PHY layer. More... | |
Ptr< BlockAckManager > | GetBaManager (uint8_t tid) const |
Get the Block Ack Manager handling the given TID. More... | |
virtual Time | GetPsduDurationId (Time txDuration, const WifiTxParameters &txParams) const |
Compute how to set the Duration/ID field of PSDUs that do not include fragments. More... | |
virtual Ptr< WifiPsdu > | GetWifiPsdu (Ptr< WifiMacQueueItem > mpdu, const WifiTxVector &txVector) const |
Get a PSDU containing the given MPDU. More... | |
virtual void | MissedBlockAck (Ptr< WifiPsdu > psdu, const WifiTxVector &txVector, bool &resetCw) |
Take necessary actions when a BlockAck is missed, such as scheduling a BlockAckReq frame or the retransmission of the unacknowledged frames. More... | |
virtual bool | NeedSetupBlockAck (Mac48Address recipient, uint8_t tid) |
A Block Ack agreement needs to be established with the given recipient for the given TID if it does not already exist (or exists and is in state RESET) and: More... | |
void | NotifyPacketDiscarded (Ptr< const WifiMacQueueItem > mpdu) override |
Pass the given MPDU, discarded because of the max retry limit was reached, to the MPDU dropped callback. More... | |
void | NotifyReceivedNormalAck (Ptr< WifiMacQueueItem > mpdu) override |
Notify other components that an MPDU was acknowledged. More... | |
virtual void | NotifyTxToEdca (Ptr< const WifiPsdu > psdu) const |
Notify the transmission of the given PSDU to the EDCAF associated with the AC the PSDU belongs to. 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... | |
void | ReleaseSequenceNumber (Ptr< WifiMacQueueItem > mpdu) const override |
Make the sequence number of the given MPDU available again if the MPDU has never been transmitted. More... | |
void | RetransmitMpduAfterMissedAck (Ptr< WifiMacQueueItem > mpdu) const override |
Retransmit an MPDU that was not acknowledged. More... | |
void | SendAddBaRequest (Mac48Address recipient, uint8_t tid, uint16_t startingSeq, uint16_t timeout, bool immediateBAck) |
Sends an ADDBA Request to establish a block ack agreement with STA addressed by recipient for TID tid. More... | |
void | SendBlockAck (const RecipientBlockAckAgreement &agreement, Time durationId, WifiTxVector &blockAckTxVector, double rxSnr) |
Create a BlockAck frame with header equal to blockAck and start its transmission. More... | |
virtual bool | SendDataFrame (Ptr< const WifiMacQueueItem > peekedItem, Time availableTime, bool initialFrame) |
Given a non-broadcast QoS data frame, prepare the PSDU to transmit by attempting A-MSDU and A-MPDU aggregation (if enabled), while making sure that the frame exchange (possibly including protection and acknowledgment) is completed within the given available time. More... | |
virtual bool | SendMpduFromBaManager (Ptr< QosTxop > edca, Time availableTime, bool initialFrame) |
If the Block Ack Manager associated with the given EDCA has a BlockAckReq frame to transmit (the duration of which plus the response fits within the given available time, if the latter is not Time::Min() and this is not the initial frame of a TXOP), transmit the frame and return true. More... | |
void | SendPsduWithProtection (Ptr< WifiPsdu > psdu, WifiTxParameters &txParams) |
Send a PSDU (A-MPDU or BlockAckReq frame) requesting a BlockAck frame or a BlockAckReq frame followed by a BlockAck frame for the acknowledgment. More... | |
void | TransmissionSucceeded (void) override |
Take necessary actions upon a transmission success. 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 | 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 | 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... | |
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 | 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... | |
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 | |
std::map< AgreementKey, RecipientBlockAckAgreement > | m_agreements |
agreements More... | |
Ptr< MpduAggregator > | m_mpduAggregator |
A-MPDU aggregator. More... | |
Ptr< MsduAggregator > | m_msduAggregator |
A-MSDU aggregator. More... | |
Protected Attributes inherited from ns3::QosFrameExchangeManager | |
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 | SendPsdu (void) |
Send the current PSDU, which can be acknowledged by a BlockAck frame or followed by a BlockAckReq frame and a BlockAck frame. More... | |
Private Attributes | |
Ptr< WifiPsdu > | m_psdu |
the A-MPDU being transmitted More... | |
WifiTxParameters | m_txParams |
the TX parameters for the current frame More... | |
Friends | |
class | ::AmpduAggregationTest |
allow AmpduAggregationTest class access More... | |
class | ::HeAggregationTest |
allow HeAggregationTest class access More... | |
class | ::TwoLevelAggregationTest |
allow TwoLevelAggregationTest class access 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... | |
HtFrameExchangeManager handles the frame exchange sequences for HT 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 704 bytes (on a 64-bit architecture).
Definition at line 44 of file ht-frame-exchange-manager.h.
|
protected |
agreement key typedef (MAC address and TID)
Definition at line 377 of file ht-frame-exchange-manager.h.
ns3::HtFrameExchangeManager::HtFrameExchangeManager | ( | ) |
Definition at line 53 of file ht-frame-exchange-manager.cc.
References m_mpduAggregator, m_msduAggregator, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 60 of file ht-frame-exchange-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
protectedvirtual |
Called when the BlockAck timeout expires.
psdu | the PSDU (BlockAckReq or A-MPDU) that solicited a BlockAck response |
txVector | the TXVECTOR used to send the PSDU that solicited a BlockAck response |
Reimplemented in ns3::HeFrameExchangeManager.
Definition at line 1104 of file ht-frame-exchange-manager.cc.
References ns3::WifiPsdu::begin(), ns3::QosFrameExchangeManager::m_edca, ns3::FrameExchangeManager::m_mac, m_psdu, MissedBlockAck(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Txop::ResetCw(), ns3::QosFrameExchangeManager::TransmissionFailed(), and ns3::Txop::UpdateFailedCw().
Referenced by SendPsdu().
|
overridevirtual |
Calculate the time required to acknowledge a frame according to the given acknowledgment method.
The acknowledgment time is stored in the acknowledgment object itself.
acknowledgment | the acknowledgment method |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 488 of file ht-frame-exchange-manager.cc.
References ns3::WifiAcknowledgment::acknowledgmentTime, ns3::WifiAcknowledgment::BAR_BLOCK_ACK, ns3::WifiBarBlockAck::barType, ns3::WifiBlockAck::baType, ns3::WifiBarBlockAck::baType, ns3::WifiAcknowledgment::BLOCK_ACK, ns3::WifiBarBlockAck::blockAckReqTxVector, ns3::WifiBlockAck::blockAckTxVector, ns3::WifiBarBlockAck::blockAckTxVector, ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::WifiPhy::CalculateTxDuration(), ns3::GetBlockAckRequestSize(), ns3::GetBlockAckSize(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::FrameExchangeManager::m_phy, ns3::WifiAcknowledgment::method, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by SendMpduFromBaManager(), SendPsduWithProtection(), and TryAggregateMsdu().
void ns3::HtFrameExchangeManager::CreateBlockAckAgreement | ( | const MgtAddBaResponseHeader * | respHdr, |
Mac48Address | originator, | ||
uint16_t | startingSeq | ||
) |
respHdr | Add block ack response from originator (action frame). |
originator | Address of peer station involved in block ack mechanism. |
startingSeq | Sequence number of the first MPDU of all packets for which block ack was negotiated. |
This function is typically invoked only by ns3::WifiMac when the STA (which may be non-AP in ESS, or in an IBSS) has received an ADDBA Request frame and is transmitting an ADDBA Response frame. At this point the frame exchange manager must allocate buffers to collect all correctly received packets belonging to the category for which block ack was negotiated.
Definition at line 291 of file ht-frame-exchange-manager.cc.
References ns3::MgtAddBaResponseHeader::GetBufferSize(), ns3::MgtAddBaResponseHeader::GetTid(), ns3::BlockAckAgreement::GetTimeout(), ns3::MgtAddBaResponseHeader::GetTimeout(), ns3::MgtAddBaResponseHeader::IsAmsduSupported(), ns3::MgtAddBaResponseHeader::IsImmediateBlockAck(), m_agreements, ns3::BlockAckAgreement::m_inactivityEvent, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_rxMiddle, ns3::MicroSeconds(), NS_LOG_FUNCTION, ns3::Simulator::Schedule(), SendDelbaFrame(), ns3::BlockAckAgreement::SetDelayedBlockAck(), ns3::BlockAckAgreement::SetImmediateBlockAck(), ns3::RecipientBlockAckAgreement::SetMacRxMiddle(), and timeout.
Referenced by SendAddBaResponse().
|
overrideprotectedvirtual |
Called when the CTS timeout expires.
rts | the RTS that solicited a CTS response |
txVector | the TXVECTOR used to transmit the RTS frame |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 759 of file ht-frame-exchange-manager.cc.
References ns3::FrameExchangeManager::CtsTimeout(), ns3::FrameExchangeManager::DoCtsTimeout(), m_psdu, and NS_LOG_FUNCTION.
Referenced by ns3::HeFrameExchangeManager::CtsTimeout().
Dequeue the MPDUs of the given PSDU from the queue in which they are stored.
psdu | the given PSDU |
Definition at line 891 of file ht-frame-exchange-manager.cc.
References ns3::FrameExchangeManager::DequeueMpdu(), NS_LOG_DEBUG, and ns3::PeekPointer().
Referenced by SendPsdu().
void ns3::HtFrameExchangeManager::DestroyBlockAckAgreement | ( | Mac48Address | originator, |
uint8_t | tid | ||
) |
Destroy a Block Ack agreement.
originator | the originator MAC address |
tid | the TID associated with the Block Ack agreement |
Definition at line 324 of file ht-frame-exchange-manager.cc.
References m_agreements, and NS_LOG_FUNCTION.
Referenced by NotifyReceivedNormalAck(), and SendDelbaFrame().
|
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 66 of file ht-frame-exchange-manager.cc.
References ns3::WifiTxParameters::Clear(), ns3::QosFrameExchangeManager::DoDispose(), m_agreements, m_mpduAggregator, m_msduAggregator, m_psdu, m_txParams, and NS_LOG_FUNCTION.
Referenced by ns3::HeFrameExchangeManager::DoDispose().
|
overrideprotectedvirtual |
This method is called when the reception of an A-MPDU including multiple MPDUs is completed.
psdu | the received PSDU |
rxSignalInfo | the info on the received signal ( |
txVector | TxVector of the received PSDU |
perMpduStatus | per MPDU reception status |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 1398 of file ht-frame-exchange-manager.cc.
References ns3::WifiPsdu::GetAckPolicyForTid(), ns3::WifiPsdu::GetAddr2(), ns3::WifiPsdu::GetDuration(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiPhy::GetSifs(), ns3::WifiPsdu::GetTids(), m_agreements, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, ns3::WifiMacHeader::NORMAL_ACK, NS_ASSERT, NS_LOG_DEBUG, ns3::Simulator::Schedule(), SendBlockAck(), and ns3::RxSignalInfo::snr.
|
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 519 of file ht-frame-exchange-manager.cc.
References ForwardPsduDown(), and GetWifiPsdu().
Referenced by SendPsdu().
|
protectedvirtual |
Forward a PSDU down to the PHY layer.
Also, notify the Block Ack Manager of the transmission of the constituent MPDUs.
psdu | the PSDU to forward down |
txVector | the TXVECTOR used to transmit the MPDU |
Definition at line 902 of file ht-frame-exchange-manager.cc.
References ns3::WifiPsdu::IsAggregate(), ns3::FrameExchangeManager::m_phy, NotifyTxToEdca(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhy::Send(), and ns3::WifiTxVector::SetAggregation().
Referenced by ForwardMpduDown(), SendBlockAck(), SendPsdu(), and ns3::HeFrameExchangeManager::SendPsduMap().
bool ns3::HtFrameExchangeManager::GetBaAgreementEstablished | ( | Mac48Address | originator, |
uint8_t | tid | ||
) | const |
Return true if a Block Ack agreement has been established with the given originator for the given TID.
originator | the MAC address of the given originator |
tid | the Traffic ID |
Definition at line 1259 of file ht-frame-exchange-manager.cc.
References m_agreements.
|
protected |
Get the Block Ack Manager handling the given TID.
tid | the given TID |
Definition at line 98 of file ht-frame-exchange-manager.cc.
References ns3::FrameExchangeManager::m_mac.
Referenced by MissedBlockAck(), NotifyPacketDiscarded(), NotifyReceivedNormalAck(), ReceiveMpdu(), SendAddBaRequest(), and SendDelbaFrame().
BlockAckType ns3::HtFrameExchangeManager::GetBlockAckType | ( | Mac48Address | originator, |
uint8_t | tid | ||
) | const |
Get the type of BlockAck frames sent to the given originator.
originator | the MAC address of the given originator |
tid | the Traffic ID |
Definition at line 1265 of file ht-frame-exchange-manager.cc.
References m_agreements, and NS_ABORT_MSG_IF.
Ptr< MpduAggregator > ns3::HtFrameExchangeManager::GetMpduAggregator | ( | void | ) | const |
Returns the aggregator used to construct A-MPDU subframes.
Definition at line 92 of file ht-frame-exchange-manager.cc.
References m_mpduAggregator.
Ptr< MsduAggregator > ns3::HtFrameExchangeManager::GetMsduAggregator | ( | void | ) | const |
Returns the aggregator used to construct A-MSDU subframes.
Definition at line 86 of file ht-frame-exchange-manager.cc.
References m_msduAggregator.
|
protectedvirtual |
Compute how to set the Duration/ID field of PSDUs that do not include fragments.
txDuration | the duration of the PSDU transmission |
txParams | the TX parameters used to send the PSDU |
Definition at line 689 of file ht-frame-exchange-manager.cc.
References ns3::QosTxop::GetRemainingTxop(), ns3::Txop::GetTxopLimit(), ns3::Time::IsZero(), ns3::WifiTxParameters::m_acknowledgment, ns3::QosFrameExchangeManager::m_edca, max, ns3::Time::Min(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::Seconds().
Referenced by SendPsdu(), and ns3::HeFrameExchangeManager::SendPsduMap().
|
virtual |
Get the maximum supported buffer size for a Block Ack agreement.
This value is typically included in ADDBA Response frames.
Reimplemented in ns3::HeFrameExchangeManager.
Definition at line 248 of file ht-frame-exchange-manager.cc.
Referenced by SendAddBaResponse().
|
static |
Get the type ID.
Definition at line 43 of file ht-frame-exchange-manager.cc.
References ns3::TypeId::SetParent().
|
protectedvirtual |
Get a PSDU containing the given MPDU.
mpdu | the given MPDU |
txVector | the TXVECTOR to use to send the MPDU |
Reimplemented in ns3::VhtFrameExchangeManager.
Definition at line 525 of file ht-frame-exchange-manager.cc.
Referenced by ForwardMpduDown(), SendBlockAck(), and SendMpduFromBaManager().
|
virtual |
Check whether an A-MPDU of the given size meets the constraint on the maximum size for A-MPDUs sent to the given receiver, belonging to the given TID and transmitted using the given modulation class.
ampduSize | the size in bytes of the A-MPDU. |
receiver | the address of the station that is the receiver of the A-MPDU |
tid | the TID of the A-MPDU |
modulation | the modulation class used to transmit the A-MPDU |
Definition at line 961 of file ht-frame-exchange-manager.cc.
References m_mpduAggregator, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by IsWithinLimitsIfAddMpdu(), and IsWithinLimitsIfAggregateMsdu().
|
overridevirtual |
Check if the PSDU obtained by aggregating the given MPDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MPDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()).
mpdu | the given MPDU |
txParams | the TX parameters |
ppduDurationLimit | the constraint on the PPDU transmission time |
Reimplemented from ns3::QosFrameExchangeManager.
Definition at line 918 of file ht-frame-exchange-manager.cc.
References ns3::WifiTxVector::GetModulationClass(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiTxParameters::GetSize(), ns3::WifiTxParameters::GetSizeIfAddMpdu(), IsWithinAmpduSizeLimit(), ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits(), ns3::WifiTxParameters::m_txVector, NS_ABORT_MSG, NS_ASSERT, NS_LOG_FUNCTION, and ns3::WifiTxParameters::PsduInfo::seqNumbers.
|
virtual |
Check if the PSDU obtained by aggregating the given MSDU to the PSDU specified by the given TX parameters meets the constraints on the maximum A-MSDU size and its transmission time does not exceed the given PPDU duration limit (if different than Time::Min()).
msdu | the given MSDU |
txParams | the TX parameters |
ppduDurationLimit | the constraint on the PPDU transmission time |
Definition at line 1059 of file ht-frame-exchange-manager.cc.
References ns3::WifiTxParameters::PsduInfo::ampduSize, ns3::WifiTxVector::GetModulationClass(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiTxParameters::GetSizeIfAggregateMsdu(), IsWithinAmpduSizeLimit(), ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits(), m_msduAggregator, ns3::WifiTxParameters::m_txVector, NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by TryAggregateMsdu().
|
protectedvirtual |
Take necessary actions when a BlockAck is missed, such as scheduling a BlockAckReq frame or the retransmission of the unacknowledged frames.
psdu | the PSDU (BlockAckReq or A-MPDU) that solicited a BlockAck response | |
txVector | the TXVECTOR used to send the PSDU that solicited a BlockAck response | |
[out] | resetCw | true if we shall stop retransmitting the PSDU |
Definition at line 1129 of file ht-frame-exchange-manager.cc.
References ns3::WifiPsdu::begin(), ns3::FrameExchangeManager::DequeueMpdu(), ns3::OriginatorBlockAckAgreement::ESTABLISHED, ns3::WifiPsdu::GetAddr1(), GetBaManager(), ns3::WifiPsdu::GetHeader(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiPsdu::GetPayload(), ns3::CtrlBAckRequestHeader::GetTidInfo(), ns3::WifiPsdu::GetTids(), ns3::WifiMacHeader::IsBlockAckReq(), ns3::FrameExchangeManager::m_mac, NotifyPacketDiscarded(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::PeekHeader(), ns3::PeekPointer(), ns3::QosTxop::PrepareBlockAckRequest(), ns3::QosTxop::ScheduleBar(), ns3::WifiMacHeader::SetRetry(), and ns3::QosTxop::UseExplicitBarAfterMissedBlockAck().
Referenced by BlockAckTimeout().
|
protectedvirtual |
A Block Ack agreement needs to be established with the given recipient for the given TID if it does not already exist (or exists and is in state RESET) and:
recipient | address of the recipient. |
tid | traffic ID. |
Definition at line 104 of file ht-frame-exchange-manager.cc.
References ns3::QosTxop::GetBaManager(), ns3::QosTxop::GetBlockAckThreshold(), ns3::Txop::GetWifiMacQueue(), ns3::FrameExchangeManager::m_mac, m_mpduAggregator, NS_LOG_FUNCTION, ns3::OriginatorBlockAckAgreement::RESET, and ns3::WIFI_MOD_CLASS_HT.
Referenced by StartFrameExchange().
|
overrideprotectedvirtual |
Pass the given MPDU, discarded because of the max retry limit was reached, to the MPDU dropped callback.
mpdu | the discarded MPDU |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 606 of file ht-frame-exchange-manager.cc.
References ns3::WifiActionHeader::BLOCK_ACK, GetBaManager(), ns3::WifiActionHeader::GetCategory(), ns3::QosTxop::GetFailedAddBaTimeout(), ns3::GetTid(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::NotifyPacketDiscarded(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::OriginatorBlockAckAgreement::PENDING, ns3::QosTxop::ResetBa(), and ns3::Simulator::Schedule().
Referenced by MissedBlockAck().
|
overrideprotectedvirtual |
Notify other components that an MPDU was acknowledged.
mpdu | the MPDU that was acknowledged |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 531 of file ht-frame-exchange-manager.cc.
References ns3::QosTxop::AddBaResponseTimeout(), ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::WifiActionHeader::BLOCK_ACK_DELBA, ns3::WifiActionHeader::ActionValue::blockAck, DestroyBlockAckAgreement(), ns3::WifiActionHeader::GetAction(), ns3::QosTxop::GetAddBaResponseTimeout(), ns3::QosTxop::GetBaAgreementEstablished(), GetBaManager(), ns3::QosTxop::GetBaManager(), ns3::WifiActionHeader::GetCategory(), ns3::MgtAddBaRequestHeader::GetTid(), ns3::MgtDelBaHeader::GetTid(), ns3::MgtDelBaHeader::IsByOriginator(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::NotifyReceivedNormalAck(), NS_LOG_FUNCTION, ns3::Packet::PeekHeader(), ns3::Packet::RemoveHeader(), and ns3::Simulator::Schedule().
|
protectedvirtual |
Notify the transmission of the given PSDU to the EDCAF associated with the AC the PSDU belongs to.
psdu | the PSDU to transmit |
Definition at line 853 of file ht-frame-exchange-manager.cc.
References ns3::QosTxop::CompleteMpduTx(), ns3::WifiMacHeader::GetAddr1(), ns3::QosTxop::GetQosQueueSize(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::HasData(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsQosEosp(), ns3::FrameExchangeManager::m_mac, ns3::QosFrameExchangeManager::m_setQosQueueSize, NS_LOG_FUNCTION, ns3::PeekPointer(), ns3::WifiMacHeader::SetQosEosp(), ns3::WifiMacHeader::SetQosQueueSize(), and ns3::STA.
Referenced by ForwardPsduDown().
|
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 1273 of file ht-frame-exchange-manager.cc.
References ns3::WifiTxTimer::Cancel(), ns3::SnrTag::Get(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiPsdu::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetBaManager(), ns3::WifiMacHeader::GetDuration(), ns3::WifiPsdu::GetHeader(), ns3::WifiTxVector::GetMode(), ns3::WifiMacHeader::GetQosAckPolicy(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiTxTimer::GetReason(), ns3::WifiPhy::GetSifs(), ns3::CtrlBAckRequestHeader::GetStartingSequence(), ns3::CtrlBAckResponseHeader::GetTidInfo(), ns3::CtrlBAckRequestHeader::GetTidInfo(), ns3::WifiMacHeader::HasData(), ns3::WifiMacHeader::IsBlockAck(), ns3::WifiMacHeader::IsBlockAckReq(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacHeader::IsCts(), ns3::CtrlBAckRequestHeader::IsMultiTid(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxTimer::IsRunning(), m_agreements, ns3::FrameExchangeManager::m_channelAccessManager, ns3::QosFrameExchangeManager::m_edca, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, m_psdu, ns3::FrameExchangeManager::m_self, m_txParams, ns3::FrameExchangeManager::m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::WifiMacHeader::NORMAL_ACK, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::Txop::ResetCw(), ns3::Simulator::Schedule(), SendBlockAck(), ns3::FrameExchangeManager::SendNormalAck(), SendPsdu(), ns3::RxSignalInfo::snr, TransmissionSucceeded(), ns3::WifiTxTimer::WAIT_BLOCK_ACK, and ns3::WifiTxTimer::WAIT_CTS.
|
overrideprotectedvirtual |
Make the sequence number of the given MPDU available again if the MPDU has never been transmitted.
mpdu | the given MPDU |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 656 of file ht-frame-exchange-manager.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::QosTxop::GetBaAgreementEstablished(), ns3::QosTxop::GetBaStartingSequence(), ns3::BlockAckAgreement::GetDistance(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_txMiddle, NS_LOG_FUNCTION, and ns3::FrameExchangeManager::ReleaseSequenceNumber().
|
overrideprotectedvirtual |
Retransmit an MPDU that was not acknowledged.
mpdu | the MPDU to retransmit |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 636 of file ht-frame-exchange-manager.cc.
References ns3::QosTxop::GetBaAgreementEstablished(), ns3::QosTxop::GetBaManager(), ns3::FrameExchangeManager::m_mac, NS_LOG_FUNCTION, and ns3::FrameExchangeManager::RetransmitMpduAfterMissedAck().
|
protected |
Sends an ADDBA Request to establish a block ack agreement with STA addressed by recipient for TID tid.
recipient | address of the recipient. |
tid | traffic ID. |
startingSeq | the BA agreement starting sequence number |
timeout | timeout value. |
immediateBAck | flag to indicate whether immediate BlockAck is used. |
Definition at line 131 of file ht-frame-exchange-manager.cc.
References ns3::Packet::AddHeader(), ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::WifiActionHeader::ActionValue::blockAck, ns3::FrameExchangeManager::GetAckManager(), GetBaManager(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_bssid, ns3::FrameExchangeManager::m_mac, ns3::WifiTxParameters::m_protection, ns3::FrameExchangeManager::m_self, ns3::FrameExchangeManager::m_txMiddle, ns3::WifiTxParameters::m_txVector, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::FrameExchangeManager::SendMpduWithProtection(), ns3::WifiActionHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::MgtAddBaRequestHeader::SetAmsduSupport(), ns3::MgtAddBaRequestHeader::SetBufferSize(), ns3::MgtAddBaRequestHeader::SetDelayedBlockAck(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::MgtAddBaRequestHeader::SetImmediateBlockAck(), ns3::MgtAddBaRequestHeader::SetStartingSequence(), ns3::MgtAddBaRequestHeader::SetTid(), ns3::MgtAddBaRequestHeader::SetTimeout(), ns3::WifiMacHeader::SetType(), timeout, and ns3::WIFI_MAC_MGT_ACTION.
Referenced by StartFrameExchange().
void ns3::HtFrameExchangeManager::SendAddBaResponse | ( | const MgtAddBaRequestHeader * | reqHdr, |
Mac48Address | originator | ||
) |
This method can be called to accept a received ADDBA Request.
An ADDBA Response will be constructed and queued for transmission.
reqHdr | a pointer to the received ADDBA Request header. |
originator | the MAC address of the originator. |
Definition at line 198 of file ht-frame-exchange-manager.cc.
References ns3::Packet::AddHeader(), ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE, ns3::WifiActionHeader::ActionValue::blockAck, CreateBlockAckAgreement(), ns3::MgtAddBaRequestHeader::GetStartingSequence(), GetSupportedBaBufferSize(), ns3::MgtAddBaRequestHeader::GetTid(), ns3::MgtAddBaRequestHeader::GetTimeout(), ns3::MgtAddBaRequestHeader::IsAmsduSupported(), ns3::MgtAddBaRequestHeader::IsImmediateBlockAck(), ns3::FrameExchangeManager::m_bssid, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_self, NS_LOG_FUNCTION, ns3::WifiActionHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::MgtAddBaResponseHeader::SetAmsduSupport(), ns3::MgtAddBaResponseHeader::SetBufferSize(), ns3::MgtAddBaResponseHeader::SetDelayedBlockAck(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::MgtAddBaResponseHeader::SetImmediateBlockAck(), ns3::MgtAddBaResponseHeader::SetStatusCode(), ns3::StatusCode::SetSuccess(), ns3::MgtAddBaResponseHeader::SetTid(), ns3::MgtAddBaResponseHeader::SetTimeout(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_MGT_ACTION.
|
protected |
Create a BlockAck frame with header equal to blockAck and start its transmission.
agreement | the agreement the Block Ack response belongs to |
durationId | the Duration/ID of the frame soliciting this Block Ack response |
blockAckTxVector | the transmit vector for the Block Ack response |
rxSnr | the receive SNR |
Definition at line 1215 of file ht-frame-exchange-manager.cc.
References ns3::Packet::AddHeader(), ns3::Packet::AddPacketTag(), ns3::WifiPhy::CalculateTxDuration(), ns3::RecipientBlockAckAgreement::FillBlockAckBitmap(), ForwardPsduDown(), ns3::BlockAckAgreement::GetBlockAckType(), ns3::WifiPsdu::GetHeader(), ns3::WifiPsdu::GetPayload(), ns3::BlockAckAgreement::GetPeer(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::BlockAckAgreement::GetTid(), GetWifiPsdu(), ns3::Time::IsStrictlyNegative(), ns3::FrameExchangeManager::m_phy, ns3::FrameExchangeManager::m_self, NS_LOG_FUNCTION, ns3::Seconds(), ns3::SnrTag::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::CtrlBAckResponseHeader::SetTidInfo(), ns3::CtrlBAckResponseHeader::SetType(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_BACKRESP.
Referenced by EndReceiveAmpdu(), and ReceiveMpdu().
|
protectedvirtual |
Given a non-broadcast QoS data frame, prepare the PSDU to transmit by attempting A-MSDU and A-MPDU aggregation (if enabled), while making sure that the frame exchange (possibly including protection and acknowledgment) is completed within the given available time.
peekedItem | the given non-broadcast QoS data frame |
availableTime | the amount of time allowed for the frame exchange. Equals 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 |
Definition at line 443 of file ht-frame-exchange-manager.cc.
References ns3::WifiAcknowledgment::BAR_BLOCK_ACK, ns3::QosTxop::GetNextMpdu(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_mac, m_mpduAggregator, ns3::WifiTxParameters::m_txVector, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::FrameExchangeManager::SendMpduWithProtection(), and SendPsduWithProtection().
Referenced by StartFrameExchange().
void ns3::HtFrameExchangeManager::SendDelbaFrame | ( | Mac48Address | addr, |
uint8_t | tid, | ||
bool | byOriginator | ||
) |
Sends DELBA frame to cancel a block ack agreement with STA addressed by addr for TID tid.
addr | address of the recipient. |
tid | traffic ID. |
byOriginator | flag to indicate whether this is set by the originator. |
Definition at line 254 of file ht-frame-exchange-manager.cc.
References ns3::Packet::AddHeader(), ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_DELBA, ns3::WifiActionHeader::ActionValue::blockAck, DestroyBlockAckAgreement(), GetBaManager(), ns3::FrameExchangeManager::m_bssid, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_self, NS_LOG_FUNCTION, ns3::WifiActionHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::MgtDelBaHeader::SetByOriginator(), ns3::MgtDelBaHeader::SetByRecipient(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::MgtDelBaHeader::SetTid(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_MGT_ACTION.
Referenced by CreateBlockAckAgreement(), and ns3::WifiMac::Receive().
|
protectedvirtual |
If the Block Ack Manager associated with the given EDCA has a BlockAckReq frame to transmit (the duration of which plus the response fits within the given available time, if the latter is not Time::Min() and this is not the initial frame of a TXOP), transmit the frame and return true.
Otherwise, return false.
edca | the EDCAF which has been granted the opportunity to transmit |
availableTime | the amount of time allowed for the frame exchange. Equals 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::HeFrameExchangeManager.
Definition at line 391 of file ht-frame-exchange-manager.cc.
References ns3::WifiAcknowledgment::acknowledgmentTime, ns3::WifiAcknowledgment::BLOCK_ACK, ns3::WifiBlockAck::blockAckTxVector, CalculateAcknowledgmentTime(), ns3::WifiPhy::CalculateTxDuration(), ns3::Copy(), ns3::FrameExchangeManager::GetAckManager(), ns3::QosTxop::GetBaManager(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), GetWifiPsdu(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, ns3::WifiTxParameters::m_protection, ns3::WifiTxParameters::m_txVector, ns3::Time::Min(), NS_ABORT_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and SendPsduWithProtection().
Referenced by ns3::HeFrameExchangeManager::SendMpduFromBaManager(), and StartFrameExchange().
|
private |
Send the current PSDU, which can be acknowledged by a BlockAck frame or followed by a BlockAckReq frame and a BlockAck frame.
Definition at line 776 of file ht-frame-exchange-manager.cc.
References ns3::WifiAcknowledgment::BAR_BLOCK_ACK, ns3::WifiPsdu::begin(), ns3::WifiAcknowledgment::BLOCK_ACK, BlockAckTimeout(), ns3::WifiBlockAck::blockAckTxVector, ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiPhy::CalculateTxDuration(), DequeuePsdu(), ForwardMpduDown(), ForwardPsduDown(), ns3::WifiPsdu::GetAckPolicyForTid(), ns3::WifiPsdu::GetAddr1(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiPhy::GetPhyBand(), GetPsduDurationId(), ns3::WifiPhy::GetSifs(), ns3::WifiPsdu::GetSize(), ns3::WifiPhy::GetSlot(), ns3::WifiPsdu::GetTids(), ns3::WifiTxTimer::IsRunning(), ns3::WifiTxParameters::m_acknowledgment, ns3::FrameExchangeManager::m_channelAccessManager, ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_phy, m_psdu, m_txParams, ns3::FrameExchangeManager::m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::WifiMacHeader::NO_ACK, ns3::WifiAcknowledgment::NONE, NS_ABORT_MSG, NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::QosTxop::PrepareBlockAckRequest(), ns3::Simulator::Schedule(), ns3::QosTxop::ScheduleBar(), ns3::WifiTxTimer::Set(), ns3::WifiPsdu::SetDuration(), timeout, TransmissionSucceeded(), and ns3::WifiTxTimer::WAIT_BLOCK_ACK.
Referenced by ReceiveMpdu(), and SendPsduWithProtection().
|
protected |
Send a PSDU (A-MPDU or BlockAckReq frame) requesting a BlockAck frame or a BlockAckReq frame followed by a BlockAck frame for the acknowledgment.
Note that txParams is moved to m_txParams and hence is left in an undefined state.
psdu | the PSDU to send |
txParams | the TX parameters to use to transmit the PSDU |
Definition at line 709 of file ht-frame-exchange-manager.cc.
References CalculateAcknowledgmentTime(), ns3::WifiProtection::CTS_TO_SELF, ns3::WifiTxParameters::m_acknowledgment, ns3::WifiTxParameters::m_protection, m_psdu, m_txParams, ns3::Time::Min(), ns3::WifiProtection::NONE, NS_ABORT_MSG, NS_ASSERT, NS_LOG_FUNCTION, ns3::PeekPointer(), ns3::WifiProtection::RTS_CTS, ns3::FrameExchangeManager::SendCtsToSelf(), SendPsdu(), ns3::FrameExchangeManager::SendRts(), and ns3::WifiAckManager::SetQosAckPolicy().
Referenced by SendDataFrame(), and SendMpduFromBaManager().
Set the MAC layer to use.
mac | the MAC layer to use |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 78 of file ht-frame-exchange-manager.cc.
References m_mpduAggregator, m_msduAggregator, third::mac, and ns3::FrameExchangeManager::SetWifiMac().
Referenced by ns3::HeFrameExchangeManager::SetWifiMac().
|
overridevirtual |
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 from ns3::QosFrameExchangeManager.
Definition at line 338 of file ht-frame-exchange-manager.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::QosTxop::GetBlockAckInactivityTimeout(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), ns3::FrameExchangeManager::m_mac, ns3::FrameExchangeManager::m_txMiddle, NeedSetupBlockAck(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosTxop::PeekNextMpdu(), SendAddBaRequest(), SendDataFrame(), SendMpduFromBaManager(), and ns3::QosFrameExchangeManager::StartFrameExchange().
Referenced by ns3::HeFrameExchangeManager::StartFrameExchange().
|
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 583 of file ht-frame-exchange-manager.cc.
References ns3::QosTxop::GetBaManager(), ns3::WifiPhy::GetSifs(), ns3::Txop::GetTxopLimit(), ns3::Time::IsZero(), ns3::QosFrameExchangeManager::m_edca, ns3::FrameExchangeManager::m_phy, NS_LOG_DEBUG, ns3::Simulator::Schedule(), ns3::Seconds(), ns3::QosFrameExchangeManager::StartTransmission(), and ns3::QosFrameExchangeManager::TransmissionSucceeded().
Referenced by ReceiveMpdu(), and SendPsdu().
|
virtual |
Check if aggregating an MSDU to the current MPDU (as specified by the given TX parameters) does not violate the size and time constraints, while taking into account the possibly updated protection and acknowledgment methods.
If size and time constraints are met, the TX parameters are modified with the updated protection and acknowledgment methods.
msdu | the given MSDU |
txParams | the TX parameters |
availableTime | the constraint on the TX time of the PSDU, if different than Time::Min() |
Definition at line 984 of file ht-frame-exchange-manager.cc.
References ns3::WifiTxParameters::AggregateMsdu(), CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::FrameExchangeManager::GetAckManager(), ns3::FrameExchangeManager::GetProtectionManager(), IsWithinLimitsIfAggregateMsdu(), ns3::WifiTxParameters::m_acknowledgment, ns3::WifiTxParameters::m_protection, ns3::Time::Min(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::FrameExchangeManager::UpdateTxDuration().
|
friend |
allow AmpduAggregationTest class access
Definition at line 48 of file ht-frame-exchange-manager.h.
|
friend |
allow HeAggregationTest class access
Definition at line 52 of file ht-frame-exchange-manager.h.
|
friend |
allow TwoLevelAggregationTest class access
Definition at line 50 of file ht-frame-exchange-manager.h.
|
protected |
agreements
Definition at line 379 of file ht-frame-exchange-manager.h.
Referenced by CreateBlockAckAgreement(), DestroyBlockAckAgreement(), DoDispose(), EndReceiveAmpdu(), GetBaAgreementEstablished(), GetBlockAckType(), and ReceiveMpdu().
|
protected |
A-MPDU aggregator.
Definition at line 381 of file ht-frame-exchange-manager.h.
Referenced by HtFrameExchangeManager(), DoDispose(), GetMpduAggregator(), IsWithinAmpduSizeLimit(), NeedSetupBlockAck(), SendDataFrame(), and SetWifiMac().
|
protected |
A-MSDU aggregator.
Definition at line 380 of file ht-frame-exchange-manager.h.
Referenced by HtFrameExchangeManager(), DoDispose(), GetMsduAggregator(), IsWithinLimitsIfAggregateMsdu(), and SetWifiMac().
the A-MPDU being transmitted
Definition at line 390 of file ht-frame-exchange-manager.h.
Referenced by BlockAckTimeout(), CtsTimeout(), DoDispose(), ReceiveMpdu(), SendPsdu(), and SendPsduWithProtection().
|
private |
the TX parameters for the current frame
Definition at line 391 of file ht-frame-exchange-manager.h.
Referenced by DoDispose(), ReceiveMpdu(), SendPsdu(), and SendPsduWithProtection().