WifiDefaultAckManager is the default ack manager. More...
#include "wifi-default-ack-manager.h"
Public Member Functions | |
WifiDefaultAckManager () | |
~WifiDefaultAckManager () override | |
uint16_t | GetMaxDistFromStartingSeq (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) const |
Get the maximum distance between the starting sequence number of the Block Ack agreement which the given MPDU belongs to and each of the sequence numbers of the given MPDU and of all the QoS data frames included in the given TX parameters. More... | |
std::unique_ptr< WifiAcknowledgment > | TryAddMpdu (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) override |
Determine the acknowledgment method to use if the given MPDU is added to the current frame. More... | |
std::unique_ptr< WifiAcknowledgment > | TryAggregateMsdu (Ptr< const WifiMpdu > msdu, const WifiTxParameters &txParams) override |
Determine the acknowledgment method to use if the given MSDU is aggregated to the current frame. More... | |
Public Member Functions inherited from ns3::WifiAckManager | |
WifiAckManager () | |
~WifiAckManager () override | |
void | SetLinkId (uint8_t linkId) |
Set the ID of the link this Acknowledgment Manager is associated with. More... | |
void | SetWifiMac (Ptr< WifiMac > mac) |
Set the MAC which is using this Acknowledgment Manager. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated 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... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () 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 () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () 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 errors. 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 () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::WifiAckManager | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
static void | SetQosAckPolicy (Ptr< WifiMpdu > item, const WifiAcknowledgment *acknowledgment) |
Set the QoS Ack policy for the given MPDU, which must be a QoS data frame. More... | |
static void | SetQosAckPolicy (Ptr< WifiPsdu > psdu, const WifiAcknowledgment *acknowledgment) |
Set the QoS Ack policy for the given PSDU, which must include at least a QoS data frame. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Protected Member Functions | |
bool | ExistInflightOnSameLink (Ptr< const WifiMpdu > mpdu) const |
bool | IsResponseNeeded (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) const |
Determine whether the (A-)MPDU containing the given MPDU and the MPDUs (if any) included in the given TX parameters requires an immediate response (Normal Ack, Block Ack or Block Ack Request followed by Block Ack). More... | |
Protected Member Functions inherited from ns3::WifiAckManager | |
void | DoDispose () override |
Destructor implementation. More... | |
Ptr< WifiRemoteStationManager > | GetWifiRemoteStationManager () const |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
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 () |
Notifier called once the ObjectBase is fully constructed. More... | |
Private Member Functions | |
virtual std::unique_ptr< WifiAcknowledgment > | GetAckInfoIfAggregatedMuBar (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) |
Compute the information about the acknowledgment of the current multi-user frame (as described by the given TX parameters) if the given MPDU is added. More... | |
virtual std::unique_ptr< WifiAcknowledgment > | GetAckInfoIfBarBaSequence (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) |
Compute the information about the acknowledgment of the current multi-user frame (as described by the given TX parameters) if the given MPDU is added. More... | |
virtual std::unique_ptr< WifiAcknowledgment > | GetAckInfoIfTfMuBar (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) |
Compute the information about the acknowledgment of the current multi-user frame (as described by the given TX parameters) if the given MPDU is added. More... | |
virtual std::unique_ptr< WifiAcknowledgment > | TryUlMuTransmission (Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) |
Calculate the acknowledgment method for the TB PPDUs solicited by the given Trigger Frame. More... | |
Private Attributes | |
double | m_baThreshold |
Threshold to determine when a BlockAck must be requested. More... | |
WifiAcknowledgment::Method | m_dlMuAckType |
Type of the ack sequence for DL MU PPDUs. More... | |
uint8_t | m_maxMcsForBlockAckInTbPpdu |
Max MCS used to send a BlockAck in a TB PPDU. More... | |
bool | m_useExplicitBar |
true for sending BARs, false for using Implicit BAR policy More... | |
Additional Inherited Members | |
Protected Attributes inherited from ns3::WifiAckManager | |
uint8_t | m_linkId |
ID of the link this Acknowledgment Manager is operating on. More... | |
Ptr< WifiMac > | m_mac |
MAC which is using this Acknowledgment Manager. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
WifiDefaultAckManager is the default ack manager.
Definition at line 36 of file wifi-default-ack-manager.h.
ns3::WifiDefaultAckManager::WifiDefaultAckManager | ( | ) |
Definition at line 84 of file wifi-default-ack-manager.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 89 of file wifi-default-ack-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
protected |
mpdu | the given MPDU |
Definition at line 171 of file wifi-default-ack-manager.cc.
References ns3::WifiMac::GetBaAgreementEstablishedAsOriginator(), ns3::WifiMac::GetTxopQueue(), ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, NS_ABORT_MSG, NS_ABORT_MSG_IF, NS_ASSERT, and NS_LOG_DEBUG.
Referenced by TryAddMpdu().
|
privatevirtual |
Compute the information about the acknowledgment of the current multi-user frame (as described by the given TX parameters) if the given MPDU is added.
If the computed information is the same as the current one, a null pointer is returned. Otherwise, the computed information is returned. This method can only be called if the selected acknowledgment method for DL multi-user frames consists of MU-BAR Trigger Frames aggregated to the PSDUs of the MU PPDU.
mpdu | the given MPDU |
txParams | the TX parameters describing the current multi-user frame |
Definition at line 593 of file wifi-default-ack-manager.cc.
References ns3::WifiAcknowledgment::DL_MU_AGGREGATE_TF, ns3::WifiMacHeader::GetAddr1(), ns3::ApWifiMac::GetAssociationId(), ns3::QosTxop::GetBaManager(), ns3::WifiMac::GetBarTypeAsOriginator(), ns3::WifiMac::GetBaTypeAsOriginator(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiTxVector::GetHeMuUserInfo(), ns3::GetMuBarSize(), ns3::WifiTxVector::GetPreambleType(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMac::GetQosTxop(), ns3::WifiTxVector::IsDlMu(), ns3::IsEht(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, m_maxMcsForBlockAckInTbPpdu, ns3::WifiTxParameters::m_txVector, min, ns3::WifiMacHeader::NO_EXPLICIT_ACK, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetHeMuUserInfo(), ns3::WifiTxVector::SetPreambleType(), ns3::WifiAcknowledgment::SetQosAckPolicy(), ns3::WifiDlMuAggregateTf::stationsReplyingWithBlockAck, ns3::WIFI_PREAMBLE_EHT_TB, and ns3::WIFI_PREAMBLE_HE_TB.
Referenced by TryAddMpdu().
|
privatevirtual |
Compute the information about the acknowledgment of the current multi-user frame (as described by the given TX parameters) if the given MPDU is added.
If the computed information is the same as the current one, a null pointer is returned. Otherwise, the computed information is returned. This method can only be called if the selected acknowledgment method for DL multi-user frames consists of a sequence of BlockAckReq and BlockAck frames.
mpdu | the given MPDU |
txParams | the TX parameters describing the current multi-user frame |
Definition at line 378 of file wifi-default-ack-manager.cc.
References ns3::WifiMacHeader::BLOCK_ACK, ns3::WifiAcknowledgment::DL_MU_BAR_BA_SEQUENCE, ns3::WifiMacHeader::GetAddr1(), ns3::WifiMac::GetBarTypeAsOriginator(), ns3::WifiMac::GetBaTypeAsOriginator(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMac::GetQosTxop(), ns3::WifiAckManager::GetWifiRemoteStationManager(), ns3::WifiTxVector::IsDlMu(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, ns3::WifiTxParameters::m_txVector, ns3::WifiMacHeader::NORMAL_ACK, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::WifiAcknowledgment::SetQosAckPolicy(), ns3::WifiDlMuBarBaSequence::stationsReplyingWithBlockAck, ns3::WifiDlMuBarBaSequence::stationsReplyingWithNormalAck, and ns3::WifiDlMuBarBaSequence::stationsSendBlockAckReqTo.
Referenced by TryAddMpdu().
|
privatevirtual |
Compute the information about the acknowledgment of the current multi-user frame (as described by the given TX parameters) if the given MPDU is added.
If the computed information is the same as the current one, a null pointer is returned. Otherwise, the computed information is returned. This method can only be called if the selected acknowledgment method for DL multi-user frames consists of a MU-BAR Trigger Frame sent as single-user frame.
mpdu | the given MPDU |
txParams | the TX parameters describing the current multi-user frame |
Definition at line 503 of file wifi-default-ack-manager.cc.
References ns3::WifiDlMuTfMuBar::barTypes, ns3::WifiMacHeader::BLOCK_ACK, ns3::WifiAcknowledgment::DL_MU_TF_MU_BAR, ns3::WifiMacHeader::GetAddr1(), ns3::ApWifiMac::GetAssociationId(), ns3::QosTxop::GetBaManager(), ns3::WifiMac::GetBarTypeAsOriginator(), ns3::WifiMac::GetBaTypeAsOriginator(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiTxVector::GetHeMuUserInfo(), ns3::WifiTxVector::GetPreambleType(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMac::GetQosTxop(), ns3::WifiAckManager::GetWifiRemoteStationManager(), ns3::WifiTxVector::IsDlMu(), ns3::IsEht(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, m_maxMcsForBlockAckInTbPpdu, ns3::WifiTxParameters::m_txVector, min, ns3::WifiDlMuTfMuBar::muBarTxVector, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetHeMuUserInfo(), ns3::WifiTxVector::SetPreambleType(), ns3::WifiAcknowledgment::SetQosAckPolicy(), ns3::WifiDlMuTfMuBar::stationsReplyingWithBlockAck, ns3::WIFI_PREAMBLE_EHT_TB, and ns3::WIFI_PREAMBLE_HE_TB.
Referenced by TryAddMpdu().
uint16_t ns3::WifiDefaultAckManager::GetMaxDistFromStartingSeq | ( | Ptr< const WifiMpdu > | mpdu, |
const WifiTxParameters & | txParams | ||
) | const |
Get the maximum distance between the starting sequence number of the Block Ack agreement which the given MPDU belongs to and each of the sequence numbers of the given MPDU and of all the QoS data frames included in the given TX parameters.
mpdu | the given MPDU |
txParams | the given TX parameters |
Definition at line 95 of file wifi-default-ack-manager.cc.
References ns3::WifiMac::GetBaAgreementEstablishedAsOriginator(), ns3::QosTxop::GetBaStartingSequence(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMac::GetQosTxop(), ns3::WifiAckManager::m_mac, NS_ABORT_MSG_IF, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosUtilsIsOldPacket(), ns3::SEQNO_SPACE_HALF_SIZE, ns3::SEQNO_SPACE_SIZE, and ns3::WifiTxParameters::PsduInfo::seqNumbers.
Referenced by IsResponseNeeded().
|
static |
Get the type ID.
Definition at line 41 of file wifi-default-ack-manager.cc.
References ns3::WifiAcknowledgment::DL_MU_AGGREGATE_TF, ns3::WifiAcknowledgment::DL_MU_BAR_BA_SEQUENCE, ns3::WifiAcknowledgment::DL_MU_TF_MU_BAR, m_baThreshold, m_dlMuAckType, m_maxMcsForBlockAckInTbPpdu, m_useExplicitBar, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeEnumChecker(), ns3::MakeUintegerAccessor(), and ns3::TypeId::SetParent().
|
protected |
Determine whether the (A-)MPDU containing the given MPDU and the MPDUs (if any) included in the given TX parameters requires an immediate response (Normal Ack, Block Ack or Block Ack Request followed by Block Ack).
mpdu | the given MPDU. |
txParams | the given TX parameters. |
Definition at line 141 of file wifi-default-ack-manager.cc.
References ns3::QosTxop::GetBaBufferSize(), ns3::QosTxop::GetBaManager(), GetMaxDistFromStartingSeq(), ns3::WifiMac::GetQosTxop(), ns3::QosTxop::GetRemainingTxop(), ns3::Txop::GetTxopLimit(), ns3::Txop::GetWifiMacQueue(), ns3::Time::IsStrictlyPositive(), m_baThreshold, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, ns3::WifiTxParameters::m_protection, NS_LOG_FUNCTION, ns3::WifiProtection::RTS_CTS, ns3::WIFI_QOSDATA_QUEUE, and ns3::WIFI_UNICAST.
Referenced by TryAddMpdu().
|
overridevirtual |
Determine the acknowledgment method to use if the given MPDU is added to the current frame.
Return a null pointer if the acknowledgment method is unchanged or the new acknowledgment method otherwise.
mpdu | the MPDU to be added to the current frame |
txParams | the current TX parameters for the current frame |
Implements ns3::WifiAckManager.
Definition at line 208 of file wifi-default-ack-manager.cc.
References ns3::WifiAcknowledgment::ACK_AFTER_TB_PPDU, ns3::WifiAcknowledgment::BLOCK_ACK, ns3::WifiMacHeader::BLOCK_ACK, ns3::WifiAcknowledgment::DL_MU_AGGREGATE_TF, ns3::WifiAcknowledgment::DL_MU_BAR_BA_SEQUENCE, ns3::WifiAcknowledgment::DL_MU_TF_MU_BAR, ExistInflightOnSameLink(), GetAckInfoIfAggregatedMuBar(), GetAckInfoIfBarBaSequence(), GetAckInfoIfTfMuBar(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMac::GetBaAgreementEstablishedAsOriginator(), ns3::WifiMac::GetBarTypeAsOriginator(), ns3::WifiMac::GetBaTypeAsOriginator(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiTxParameters::GetSize(), ns3::GetTid(), ns3::WifiAckManager::GetWifiRemoteStationManager(), ns3::WifiMacHeader::HasData(), ns3::WifiMacHeader::IsBlockAckReq(), ns3::WifiTxVector::IsDlMu(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsQosData(), IsResponseNeeded(), ns3::WifiMacHeader::IsTrigger(), ns3::WifiTxVector::IsUlMu(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, ns3::WifiAckManager::m_mac, ns3::WifiTxParameters::m_txVector, m_useExplicitBar, ns3::WifiMacHeader::NO_ACK, ns3::WifiAcknowledgment::NONE, ns3::WifiMacHeader::NORMAL_ACK, NS_ABORT_MSG, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and TryUlMuTransmission().
|
overridevirtual |
Determine the acknowledgment method to use if the given MSDU is aggregated to the current frame.
Return a null pointer if the acknowledgment method is unchanged or the new acknowledgment method otherwise.
msdu | the MSDU to be aggregated to the current frame |
txParams | the current TX parameters for the current frame |
Implements ns3::WifiAckManager.
Definition at line 369 of file wifi-default-ack-manager.cc.
References NS_LOG_FUNCTION.
|
privatevirtual |
Calculate the acknowledgment method for the TB PPDUs solicited by the given Trigger Frame.
mpdu | the given Trigger Frame |
txParams | the current TX parameters (just the TXVECTOR needs to be set) |
Definition at line 681 of file wifi-default-ack-manager.cc.
References ns3::WifiMac::GetBaTypeAsRecipient(), ns3::WifiMac::GetFrameExchangeManager(), ns3::ApWifiMac::GetStaList(), ns3::WifiAckManager::GetWifiRemoteStationManager(), ns3::CtrlTriggerHeader::IsBasic(), ns3::CtrlTriggerHeader::IsBsrp(), ns3::BlockAckType::m_bitmapLen, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, ns3::NO_USER_STA_ID, NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by TryAddMpdu().
|
private |
Threshold to determine when a BlockAck must be requested.
Definition at line 152 of file wifi-default-ack-manager.h.
Referenced by GetTypeId(), and IsResponseNeeded().
|
private |
Type of the ack sequence for DL MU PPDUs.
Definition at line 153 of file wifi-default-ack-manager.h.
Referenced by GetAckInfoIfAggregatedMuBar(), GetAckInfoIfBarBaSequence(), GetAckInfoIfTfMuBar(), GetTypeId(), and TryAddMpdu().
|
private |
Max MCS used to send a BlockAck in a TB PPDU.
Definition at line 154 of file wifi-default-ack-manager.h.
Referenced by GetAckInfoIfAggregatedMuBar(), GetAckInfoIfTfMuBar(), and GetTypeId().
|
private |
true for sending BARs, false for using Implicit BAR policy
Definition at line 151 of file wifi-default-ack-manager.h.
Referenced by GetTypeId(), and TryAddMpdu().