WifiDefaultAckManager is the default ack manager. More...
#include "wifi-default-ack-manager.h"
Public Member Functions | |
WifiDefaultAckManager () | |
virtual | ~WifiDefaultAckManager () |
uint16_t | GetMaxDistFromStartingSeq (Ptr< const WifiMacQueueItem > 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... | |
virtual std::unique_ptr< WifiAcknowledgment > | TryAddMpdu (Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams) override |
Determine the acknowledgment method to use if the given MPDU is added to the current frame. More... | |
virtual std::unique_ptr< WifiAcknowledgment > | TryAggregateMsdu (Ptr< const WifiMacQueueItem > 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 | |
virtual | ~WifiAckManager () |
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... | |
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::WifiAckManager | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
static void | SetQosAckPolicy (Ptr< WifiMacQueueItem > 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 (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 | |
bool | IsResponseNeeded (Ptr< const WifiMacQueueItem > 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 (void) override |
Destructor implementation. More... | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Private Member Functions | |
virtual std::unique_ptr< WifiAcknowledgment > | GetAckInfoIfAggregatedMuBar (Ptr< const WifiMacQueueItem > 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 WifiMacQueueItem > 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 WifiMacQueueItem > 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 WifiMacQueueItem > 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 | |
Ptr< WifiMac > | m_mac |
MAC which is using this Acknowledgment Manager. 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... | |
WifiDefaultAckManager is the default ack manager.
Introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Size of this type is 64 bytes (on a 64-bit architecture).
Definition at line 37 of file wifi-default-ack-manager.h.
ns3::WifiDefaultAckManager::WifiDefaultAckManager | ( | ) |
Definition at line 80 of file wifi-default-ack-manager.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 85 of file wifi-default-ack-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
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 555 of file wifi-default-ack-manager.cc.
References ns3::WifiAcknowledgment::DL_MU_AGGREGATE_TF, ns3::WifiMacHeader::GetAddr1(), ns3::QosTxop::GetBaManager(), ns3::QosTxop::GetBlockAckReqType(), ns3::QosTxop::GetBlockAckType(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::HePhy::GetHeMcs(), ns3::WifiTxVector::GetHeMuUserInfo(), ns3::GetMuBarSize(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiTxVector::IsDlMu(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, 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, 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 342 of file wifi-default-ack-manager.cc.
References ns3::WifiMacHeader::BLOCK_ACK, ns3::WifiAcknowledgment::DL_MU_BAR_BA_SEQUENCE, ns3::WifiMacHeader::GetAddr1(), ns3::QosTxop::GetBaManager(), ns3::QosTxop::GetBlockAckReqType(), ns3::QosTxop::GetBlockAckType(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiTxVector::IsDlMu(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, 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 471 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::QosTxop::GetBaManager(), ns3::QosTxop::GetBlockAckReqType(), ns3::QosTxop::GetBlockAckType(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::HePhy::GetHeMcs(), ns3::WifiTxVector::GetHeMuUserInfo(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiTxVector::IsDlMu(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, 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, and ns3::WIFI_PREAMBLE_HE_TB.
Referenced by TryAddMpdu().
uint16_t ns3::WifiDefaultAckManager::GetMaxDistFromStartingSeq | ( | Ptr< const WifiMacQueueItem > | 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 91 of file wifi-default-ack-manager.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::QosTxop::GetBaAgreementEstablished(), ns3::QosTxop::GetBaStartingSequence(), ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiMacHeader::GetQosTid(), 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::MakeEnumAccessor(), 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 135 of file wifi-default-ack-manager.cc.
References ns3::QosTxop::GetBaBufferSize(), ns3::QosTxop::GetBaManager(), GetMaxDistFromStartingSeq(), ns3::QosTxop::GetRemainingTxop(), ns3::Txop::GetTxopLimit(), ns3::Txop::GetWifiMacQueue(), ns3::Time::IsStrictlyPositive(), m_baThreshold, ns3::WifiAckManager::m_mac, ns3::WifiTxParameters::m_protection, NS_LOG_FUNCTION, and ns3::WifiProtection::RTS_CTS.
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 167 of file wifi-default-ack-manager.cc.
References ns3::WifiAcknowledgment::ACK_AFTER_TB_PPDU, ns3::WifiNormalAck::ackTxVector, ns3::WifiAcknowledgment::BAR_BLOCK_ACK, ns3::WifiBarBlockAck::barType, ns3::WifiBlockAck::baType, ns3::WifiBarBlockAck::baType, ns3::WifiAcknowledgment::BLOCK_ACK, ns3::WifiMacHeader::BLOCK_ACK, ns3::WifiBarBlockAck::blockAckReqTxVector, ns3::WifiBlockAck::blockAckTxVector, ns3::WifiBarBlockAck::blockAckTxVector, ns3::WifiAcknowledgment::DL_MU_AGGREGATE_TF, ns3::WifiAcknowledgment::DL_MU_BAR_BA_SEQUENCE, ns3::WifiAcknowledgment::DL_MU_TF_MU_BAR, GetAckInfoIfAggregatedMuBar(), GetAckInfoIfBarBaSequence(), GetAckInfoIfTfMuBar(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::WifiTxParameters::GetSize(), ns3::GetTid(), 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, ns3::WifiAcknowledgment::SetQosAckPolicy(), 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 332 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 638 of file wifi-default-ack-manager.cc.
References ns3::WifiUlMuMultiStaBa::baType, ns3::CtrlTriggerHeader::IsBasic(), ns3::CtrlTriggerHeader::IsBsrp(), ns3::BlockAckType::m_bitmapLen, ns3::WifiAckManager::m_mac, ns3::WifiUlMuMultiStaBa::multiStaBaTxVector, NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, ns3::WifiUlMuMultiStaBa::stationsReceivingMultiStaBa, and ns3::WifiUlMuMultiStaBa::tbPpduTxVector.
Referenced by TryAddMpdu().
|
private |
Threshold to determine when a BlockAck must be requested.
Definition at line 142 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 143 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 144 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 141 of file wifi-default-ack-manager.h.
Referenced by GetTypeId(), and TryAddMpdu().