A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WifiTxParameters Class Reference

This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism, TX duration, ...) for a frame of different types (MPDU, A-MPDU, multi-TID A-MPDU, MU PPDU, ...). More...

#include "wifi-tx-parameters.h"

+ Collaboration diagram for ns3::WifiTxParameters:

Classes

struct  PsduInfo
 information about the frame being prepared for a specific receiver More...
 

Public Types

typedef std::map< Mac48Address, PsduInfoPsduInfoMap
 Map containing information about the PSDUs addressed to every receiver.
 

Public Member Functions

 WifiTxParameters ()
 
 WifiTxParameters (const WifiTxParameters &txParams)
 Copy constructor.
 
void AddMpdu (Ptr< const WifiMpdu > mpdu)
 Record that an MPDU is being added to the current frame.
 
void AggregateMsdu (Ptr< const WifiMpdu > msdu)
 Record that an MSDU is being aggregated to the last MPDU added to the frame that hase the same receiver.
 
void Clear ()
 Reset the TX parameters.
 
const PsduInfoGetPsduInfo (Mac48Address receiver) const
 Get a pointer to the information about the PSDU addressed to the given receiver, if present, and a null pointer otherwise.
 
const PsduInfoMapGetPsduInfoMap () const
 Get a const reference to the map containing information about PSDUs.
 
uint32_t GetSize (Mac48Address receiver) const
 Get the size in bytes of the (A-)MPDU addressed to the given receiver.
 
uint32_t GetSizeIfAddMpdu (Ptr< const WifiMpdu > mpdu) const
 Get the size in bytes of the frame in case the given MPDU is added.
 
std::pair< uint32_t, uint32_tGetSizeIfAggregateMsdu (Ptr< const WifiMpdu > msdu) const
 Get the size in bytes of the frame in case the given MSDU is aggregated.
 
WifiTxParametersoperator= (const WifiTxParameters &txParams)
 Copy assignment operator.
 
void Print (std::ostream &os) const
 Print the object contents.
 

Public Attributes

std::unique_ptr< WifiAcknowledgmentm_acknowledgment
 acknowledgment method
 
std::unique_ptr< WifiProtectionm_protection
 protection method
 
Time m_txDuration {Time::Min()}
 TX duration of the frame.
 
WifiTxVector m_txVector
 TXVECTOR of the frame being prepared.
 

Private Attributes

PsduInfoMap m_info
 information about the frame being prepared.
 

Detailed Description

This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism, TX duration, ...) for a frame of different types (MPDU, A-MPDU, multi-TID A-MPDU, MU PPDU, ...).

Definition at line 46 of file wifi-tx-parameters.h.

Member Typedef Documentation

◆ PsduInfoMap

Map containing information about the PSDUs addressed to every receiver.

Definition at line 137 of file wifi-tx-parameters.h.

Constructor & Destructor Documentation

◆ WifiTxParameters() [1/2]

ns3::WifiTxParameters::WifiTxParameters ( )

Definition at line 37 of file wifi-tx-parameters.cc.

◆ WifiTxParameters() [2/2]

ns3::WifiTxParameters::WifiTxParameters ( const WifiTxParameters txParams)

Copy constructor.

Parameters
txParamsthe WifiTxParameters to copy

Definition at line 41 of file wifi-tx-parameters.cc.

References m_acknowledgment, m_info, m_protection, m_txDuration, and m_txVector.

Member Function Documentation

◆ AddMpdu()

void ns3::WifiTxParameters::AddMpdu ( Ptr< const WifiMpdu mpdu)

Record that an MPDU is being added to the current frame.

If an MPDU addressed to the same receiver already exists in the frame, A-MPDU aggregation is considered.

Parameters
mpduthe MPDU being added

Definition at line 100 of file wifi-tx-parameters.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::MpduAggregator::GetSizeIfAggregated(), ns3::WifiMacHeader::HasData(), ns3::WifiMacHeader::IsQosData(), m_info, NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::WIFI_MAC_FCS_LENGTH.

Referenced by ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu(), ns3::FrameExchangeManager::StartTransmission(), and ns3::QosFrameExchangeManager::TryAddMpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AggregateMsdu()

void ns3::WifiTxParameters::AggregateMsdu ( Ptr< const WifiMpdu msdu)

Record that an MSDU is being aggregated to the last MPDU added to the frame that hase the same receiver.

Parameters
msduthe MSDU being aggregated

Definition at line 173 of file wifi-tx-parameters.cc.

References GetSizeIfAggregateMsdu(), m_info, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by ns3::HtFrameExchangeManager::TryAggregateMsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Clear()

◆ GetPsduInfo()

const WifiTxParameters::PsduInfo * ns3::WifiTxParameters::GetPsduInfo ( Mac48Address  receiver) const

Get a pointer to the information about the PSDU addressed to the given receiver, if present, and a null pointer otherwise.

Parameters
receiverthe MAC address of the receiver
Returns
a pointer to an entry in the PSDU information map or a null pointer

Definition at line 82 of file wifi-tx-parameters.cc.

References m_info.

Referenced by ns3::WifiDefaultAckManager::GetAckInfoIfAggregatedMuBar(), ns3::WifiDefaultAckManager::GetAckInfoIfBarBaSequence(), ns3::WifiDefaultAckManager::GetAckInfoIfTfMuBar(), ns3::WifiDefaultAckManager::GetMaxDistFromStartingSeq(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAddMpdu(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAggregateMsdu(), and ns3::WifiDefaultProtectionManager::TryAddMpduToMuPpdu().

+ Here is the caller graph for this function:

◆ GetPsduInfoMap()

const WifiTxParameters::PsduInfoMap & ns3::WifiTxParameters::GetPsduInfoMap ( ) const

Get a const reference to the map containing information about PSDUs.

Returns
a const reference to the map containing information about PSDUs

Definition at line 94 of file wifi-tx-parameters.cc.

References m_info.

Referenced by ns3::FrameExchangeManager::SendRts(), ns3::WifiDefaultProtectionManager::TryAddMpdu(), ns3::WifiDefaultProtectionManager::TryAddMpduToMuPpdu(), and ns3::WifiDefaultProtectionManager::TryAggregateMsdu().

+ Here is the caller graph for this function:

◆ GetSize()

uint32_t ns3::WifiTxParameters::GetSize ( Mac48Address  receiver) const

Get the size in bytes of the (A-)MPDU addressed to the given receiver.

Parameters
receiverthe MAC address of the given receiver
Returns
the size in bytes of the (A-)MPDU addressed to the given receiver

Definition at line 230 of file wifi-tx-parameters.cc.

References ns3::WifiTxVector::GetModulationClass(), ns3::MpduAggregator::GetSizeIfAggregated(), m_info, m_txVector, NS_LOG_FUNCTION, ns3::WIFI_MAC_FCS_LENGTH, and ns3::WIFI_MOD_CLASS_VHT.

Referenced by ns3::MpduAggregator::GetNextAmpdu(), ns3::QosTxop::GetNextMpdu(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAddMpdu(), ns3::WifiDefaultAckManager::TryAddMpdu(), and ns3::FrameExchangeManager::UpdateTxDuration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSizeIfAddMpdu()

uint32_t ns3::WifiTxParameters::GetSizeIfAddMpdu ( Ptr< const WifiMpdu mpdu) const

Get the size in bytes of the frame in case the given MPDU is added.

Parameters
mpduthe given MPDU
Returns
the size in bytes of the frame in case the given MPDU is added

Definition at line 147 of file wifi-tx-parameters.cc.

References ns3::WifiTxVector::GetModulationClass(), ns3::MpduAggregator::GetSizeIfAggregated(), m_info, m_txVector, NS_LOG_FUNCTION, ns3::WIFI_MAC_FCS_LENGTH, and ns3::WIFI_MOD_CLASS_VHT.

Referenced by ns3::HtFrameExchangeManager::IsWithinLimitsIfAddMpdu(), ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu(), and ns3::WifiDefaultProtectionManager::TryAddMpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSizeIfAggregateMsdu()

std::pair< uint32_t, uint32_t > ns3::WifiTxParameters::GetSizeIfAggregateMsdu ( Ptr< const WifiMpdu msdu) const

Get the size in bytes of the frame in case the given MSDU is aggregated.

Parameters
msduthe given MSDU
Returns
a pair (size in bytes of the current A-MSDU, size in bytes of the frame) in case the given MSDU is aggregated

Definition at line 186 of file wifi-tx-parameters.cc.

References ns3::WifiTxVector::GetModulationClass(), ns3::MsduAggregator::GetSizeIfAggregated(), ns3::MpduAggregator::GetSizeIfAggregated(), m_info, m_txVector, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::WIFI_MAC_FCS_LENGTH, and ns3::WIFI_MOD_CLASS_VHT.

Referenced by AggregateMsdu(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAggregateMsdu(), and ns3::WifiDefaultProtectionManager::TryAggregateMsdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

WifiTxParameters & ns3::WifiTxParameters::operator= ( const WifiTxParameters txParams)

Copy assignment operator.

Parameters
txParamsthe TX parameters to assign to this object
Returns
the reference to this object

Definition at line 51 of file wifi-tx-parameters.cc.

References m_acknowledgment, m_info, m_protection, m_txDuration, and m_txVector.

◆ Print()

void ns3::WifiTxParameters::Print ( std::ostream &  os) const

Print the object contents.

Parameters
osoutput stream in which the data should be printed.

Definition at line 253 of file wifi-tx-parameters.cc.

References m_acknowledgment, m_info, m_protection, and m_txVector.

Referenced by ns3::operator<<().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_acknowledgment

◆ m_info

PsduInfoMap ns3::WifiTxParameters::m_info
private

information about the frame being prepared.

Handles multi-TID A-MPDUs, MU PPDUs, etc.

Definition at line 153 of file wifi-tx-parameters.h.

Referenced by WifiTxParameters(), AddMpdu(), AggregateMsdu(), Clear(), GetPsduInfo(), GetPsduInfoMap(), GetSize(), GetSizeIfAddMpdu(), GetSizeIfAggregateMsdu(), operator=(), and Print().

◆ m_protection

◆ m_txDuration

◆ m_txVector

WifiTxVector ns3::WifiTxParameters::m_txVector

TXVECTOR of the frame being prepared.

Definition at line 64 of file wifi-tx-parameters.h.

Referenced by WifiTxParameters(), Clear(), ns3::RrMultiUserScheduler::ComputeDlMuInfo(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRunSubTest(), ns3::WifiDefaultAckManager::GetAckInfoIfAggregatedMuBar(), ns3::WifiDefaultAckManager::GetAckInfoIfBarBaSequence(), ns3::WifiDefaultAckManager::GetAckInfoIfTfMuBar(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), ns3::MpduAggregator::GetNextAmpdu(), ns3::MsduAggregator::GetNextAmsdu(), GetSize(), GetSizeIfAddMpdu(), GetSizeIfAggregateMsdu(), ns3::FrameExchangeManager::GetTxDuration(), ns3::HeFrameExchangeManager::GetTxDuration(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAddMpdu(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAggregateMsdu(), ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits(), operator=(), Print(), ns3::HeFrameExchangeManager::ReceiveBasicTrigger(), ns3::FrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), TestMultiUserScheduler::SelectTxFormat(), ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::FrameExchangeManager::SendMpdu(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMapWithProtection(), ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::FrameExchangeManager::StartTransmission(), ns3::WifiDefaultAckManager::TryAddMpdu(), ns3::WifiDefaultProtectionManager::TryAddMpdu(), ns3::WifiDefaultProtectionManager::TryAddMpduToMuPpdu(), ns3::WifiDefaultProtectionManager::TryAggregateMsdu(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().


The documentation for this class was generated from the following files: