A Discrete-Event Network Simulator
API
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. More...
 

Public Member Functions

void AddMpdu (Ptr< const WifiMacQueueItem > mpdu)
 Record that an MPDU is being added to the current frame. More...
 
void AggregateMsdu (Ptr< const WifiMacQueueItem > msdu)
 Record that an MSDU is being aggregated to the last MPDU added to the frame that hase the same receiver. More...
 
void Clear (void)
 Reset the TX parameters. More...
 
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. More...
 
const PsduInfoMapGetPsduInfoMap (void) const
 Get a const reference to the map containing information about PSDUs. More...
 
uint32_t GetSize (Mac48Address receiver) const
 Get the size in bytes of the (A-)MPDU addressed to the given receiver. More...
 
uint32_t GetSizeIfAddMpdu (Ptr< const WifiMacQueueItem > mpdu) const
 Get the size in bytes of the frame in case the given MPDU is added. More...
 
std::pair< uint16_t, uint32_t > GetSizeIfAggregateMsdu (Ptr< const WifiMacQueueItem > msdu) const
 Get the size in bytes of the frame in case the given MSDU is aggregated. More...
 
void Print (std::ostream &os) const
 Print the object contents. More...
 

Public Attributes

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

Private Attributes

PsduInfoMap m_info
 information about the frame being prepared. More...
 

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 44 of file wifi-tx-parameters.h.

Member Typedef Documentation

◆ PsduInfoMap

Map containing information about the PSDUs addressed to every receiver.

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

Member Function Documentation

◆ AddMpdu()

void ns3::WifiTxParameters::AddMpdu ( Ptr< const WifiMacQueueItem 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 68 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::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 WifiMacQueueItem 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 144 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()

void ns3::WifiTxParameters::Clear ( void  )

Reset the TX parameters.

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

References m_acknowledgment, m_info, m_protection, m_txDuration, m_txVector, ns3::Time::Min(), and NS_LOG_FUNCTION.

Referenced by ns3::HtFrameExchangeManager::DoDispose(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), and ns3::FrameExchangeManager::Reset().

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

◆ 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 50 of file wifi-tx-parameters.cc.

References m_info.

Referenced by ns3::WifiDefaultAckManager::GetMaxDistFromStartingSeq(), ns3::HtFrameExchangeManager::IsWithinLimitsIfAddMpdu(), and ns3::HtFrameExchangeManager::IsWithinLimitsIfAggregateMsdu().

+ Here is the caller graph for this function:

◆ GetPsduInfoMap()

const WifiTxParameters::PsduInfoMap & ns3::WifiTxParameters::GetPsduInfoMap ( void  ) 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 62 of file wifi-tx-parameters.cc.

References m_info.

Referenced by ns3::FrameExchangeManager::SendRts().

+ 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 197 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 WifiMacQueueItem 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 117 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(), and ns3::WifiDefaultProtectionManager::TryAddMpdu().

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

◆ GetSizeIfAggregateMsdu()

std::pair< uint16_t, uint32_t > ns3::WifiTxParameters::GetSizeIfAggregateMsdu ( Ptr< const WifiMacQueueItem 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 157 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:

◆ 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 219 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 136 of file wifi-tx-parameters.h.

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

◆ m_protection

◆ m_txDuration

Time ns3::WifiTxParameters::m_txDuration {Time::Min ()}

◆ m_txVector


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