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. | |
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. | |
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. | |
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. | |
void | SetWifiMac (Ptr< WifiMac > mac) |
Set the MAC which is using this Acknowledgment Manager. | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
Static Public Member Functions inherited from ns3::WifiAckManager | |
static TypeId | GetTypeId () |
Get the type ID. | |
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. | |
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. | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
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). | |
Protected Member Functions inherited from ns3::WifiAckManager | |
void | DoDispose () override |
Destructor implementation. | |
Ptr< WifiRemoteStationManager > | GetWifiRemoteStationManager () const |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
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. | |
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. | |
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. | |
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. | |
Private Attributes | |
double | m_baThreshold |
Threshold to determine when a BlockAck must be requested. | |
WifiAcknowledgment::Method | m_dlMuAckType |
Type of the ack sequence for DL MU PPDUs. | |
uint8_t | m_maxMcsForBlockAckInTbPpdu |
Max MCS used to send a BlockAck in a TB PPDU. | |
bool | m_useExplicitBar |
true for sending BARs, false for using Implicit BAR policy | |
Additional Inherited Members | |
Protected Attributes inherited from ns3::WifiAckManager | |
uint8_t | m_linkId |
ID of the link this Acknowledgment Manager is operating on. | |
Ptr< WifiMac > | m_mac |
MAC which is using this Acknowledgment Manager. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
WifiDefaultAckManager is the default ack manager.
Definition at line 25 of file wifi-default-ack-manager.h.
ns3::WifiDefaultAckManager::WifiDefaultAckManager | ( | ) |
Definition at line 73 of file wifi-default-ack-manager.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 78 of file wifi-default-ack-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
protected |
mpdu | the given MPDU |
Definition at line 183 of file wifi-default-ack-manager.cc.
References 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 601 of file wifi-default-ack-manager.cc.
References ns3::WifiAcknowledgment::DL_MU_AGGREGATE_TF, ns3::DynamicCast(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiTxVector::GetHeMuUserInfo(), ns3::GetMuBarSize(), ns3::WifiTxVector::GetPreambleType(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiTxVector::IsDlMu(), ns3::IsEht(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::LastAddedIsFirstMpdu(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, m_maxMcsForBlockAckInTbPpdu, ns3::WifiTxParameters::m_txVector, ns3::NanoSeconds(), 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 392 of file wifi-default-ack-manager.cc.
References ns3::WifiMacHeader::BLOCK_ACK, ns3::WifiAcknowledgment::DL_MU_BAR_BA_SEQUENCE, ns3::DynamicCast(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiAckManager::GetWifiRemoteStationManager(), ns3::WifiTxVector::IsDlMu(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::LastAddedIsFirstMpdu(), 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 513 of file wifi-default-ack-manager.cc.
References ns3::WifiDlMuTfMuBar::barTypes, ns3::WifiMacHeader::BLOCK_ACK, ns3::WifiAcknowledgment::DL_MU_TF_MU_BAR, ns3::DynamicCast(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiTxVector::GetHeMuUserInfo(), ns3::WifiTxVector::GetPreambleType(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiAckManager::GetWifiRemoteStationManager(), ns3::WifiTxVector::IsDlMu(), ns3::IsEht(), ns3::WifiMacHeader::IsQosData(), ns3::WifiTxParameters::LastAddedIsFirstMpdu(), ns3::WifiTxParameters::m_acknowledgment, m_dlMuAckType, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, m_maxMcsForBlockAckInTbPpdu, ns3::WifiTxParameters::m_txVector, ns3::WifiDlMuTfMuBar::muBarTxVector, ns3::NanoSeconds(), 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 84 of file wifi-default-ack-manager.cc.
References ns3::WifiTxParameters::GetPsduInfo(), ns3::WifiAckManager::m_mac, NS_ABORT_MSG_IF, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosUtilsIsOldPacket(), and ns3::SEQNO_SPACE_SIZE.
Referenced by IsResponseNeeded().
|
static |
Get the type ID.
Definition at line 30 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::MakeDoubleChecker(), ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), 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 127 of file wifi-default-ack-manager.cc.
References GetMaxDistFromStartingSeq(), ns3::WifiTxParameters::GetPsduInfo(), m_baThreshold, ns3::WifiAckManager::m_linkId, ns3::WifiAckManager::m_mac, ns3::WifiTxParameters::m_protection, NS_LOG_FUNCTION, ns3::WifiProtection::RTS_CTS, ns3::WifiTxParameters::PsduInfo::seqNumbers, 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 220 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::WifiMacHeader::GetQosTid(), 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::LastAddedIsFirstMpdu(), 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 383 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 687 of file wifi-default-ack-manager.cc.
References ns3::CtrlTriggerHeader::begin(), ns3::DynamicCast(), ns3::CtrlTriggerHeader::GetHeTbTxVector(), ns3::WifiAckManager::GetWifiRemoteStationManager(), ns3::CtrlTriggerHeader::IsBasic(), ns3::CtrlTriggerHeader::IsBsrp(), 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 141 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 142 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 143 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 140 of file wifi-default-ack-manager.h.
Referenced by GetTypeId(), and TryAddMpdu().