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"
Classes | |
struct | PsduInfo |
information about the frame being prepared for a specific receiver More... | |
Public Types | |
typedef std::map< Mac48Address, PsduInfo > | PsduInfoMap |
Map containing information about the PSDUs addressed to every receiver. More... | |
Public Member Functions | |
WifiTxParameters () | |
WifiTxParameters (const WifiTxParameters &txParams) | |
Copy constructor. More... | |
void | AddMpdu (Ptr< const WifiMpdu > mpdu) |
Record that an MPDU is being added to the current frame. More... | |
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. More... | |
void | Clear () |
Reset the TX parameters. More... | |
const PsduInfo * | 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. More... | |
const PsduInfoMap & | GetPsduInfoMap () 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 WifiMpdu > mpdu) const |
Get the size in bytes of the frame in case the given MPDU is added. More... | |
std::pair< uint32_t, uint32_t > | GetSizeIfAggregateMsdu (Ptr< const WifiMpdu > msdu) const |
Get the size in bytes of the frame in case the given MSDU is aggregated. More... | |
WifiTxParameters & | operator= (const WifiTxParameters &txParams) |
Copy assignment operator. More... | |
void | Print (std::ostream &os) const |
Print the object contents. More... | |
Public Attributes | |
std::unique_ptr< WifiAcknowledgment > | m_acknowledgment |
acknowledgment method More... | |
std::unique_ptr< WifiProtection > | m_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... | |
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.
typedef std::map<Mac48Address, PsduInfo> ns3::WifiTxParameters::PsduInfoMap |
Map containing information about the PSDUs addressed to every receiver.
Definition at line 137 of file wifi-tx-parameters.h.
ns3::WifiTxParameters::WifiTxParameters | ( | ) |
Definition at line 37 of file wifi-tx-parameters.cc.
ns3::WifiTxParameters::WifiTxParameters | ( | const WifiTxParameters & | txParams | ) |
Copy constructor.
txParams | the 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.
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.
mpdu | the 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().
Record that an MSDU is being aggregated to the last MPDU added to the frame that hase the same receiver.
msdu | the 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().
void ns3::WifiTxParameters::Clear | ( | ) |
Reset the TX parameters.
Definition at line 69 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::HeFrameExchangeManager::DoDispose(), ns3::RrMultiUserScheduler::DoDispose(), ns3::HtFrameExchangeManager::DoDispose(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), ns3::HeFrameExchangeManager::ReceiveBasicTrigger(), ns3::FrameExchangeManager::Reset(), TestMultiUserScheduler::SelectTxFormat(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
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.
receiver | the MAC address of the receiver |
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().
const WifiTxParameters::PsduInfoMap & ns3::WifiTxParameters::GetPsduInfoMap | ( | ) | const |
Get 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().
uint32_t ns3::WifiTxParameters::GetSize | ( | Mac48Address | receiver | ) | const |
Get the size in bytes of the (A-)MPDU addressed to the given receiver.
receiver | the MAC address of 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().
Get the size in bytes of the frame in case the given MPDU is added.
mpdu | the given MPDU |
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().
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.
msdu | the given MSDU |
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().
WifiTxParameters & ns3::WifiTxParameters::operator= | ( | const WifiTxParameters & | txParams | ) |
Copy assignment operator.
txParams | the TX parameters to assign 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.
void ns3::WifiTxParameters::Print | ( | std::ostream & | os | ) | const |
Print the object contents.
os | output 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<<().
std::unique_ptr<WifiAcknowledgment> ns3::WifiTxParameters::m_acknowledgment |
acknowledgment method
Definition at line 66 of file wifi-tx-parameters.h.
Referenced by WifiTxParameters(), Clear(), ns3::WifiDefaultAckManager::GetAckInfoIfAggregatedMuBar(), ns3::WifiDefaultAckManager::GetAckInfoIfBarBaSequence(), ns3::WifiDefaultAckManager::GetAckInfoIfTfMuBar(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), ns3::HtFrameExchangeManager::GetPsduDurationId(), ns3::HeFrameExchangeManager::GetTxDuration(), operator=(), Print(), TestMultiUserScheduler::SelectTxFormat(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::FrameExchangeManager::SendMpdu(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), ns3::FrameExchangeManager::SendMpduWithProtection(), ns3::HeFrameExchangeManager::SendMultiStaBlockAck(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::HeFrameExchangeManager::SendPsduMapWithProtection(), ns3::HtFrameExchangeManager::SendPsduWithProtection(), ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu(), ns3::FrameExchangeManager::SendRts(), ns3::FrameExchangeManager::StartTransmission(), ns3::WifiDefaultAckManager::TryAddMpdu(), ns3::QosFrameExchangeManager::TryAddMpdu(), ns3::HtFrameExchangeManager::TryAggregateMsdu(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().
|
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().
std::unique_ptr<WifiProtection> ns3::WifiTxParameters::m_protection |
protection method
Definition at line 65 of file wifi-tx-parameters.h.
Referenced by WifiTxParameters(), Clear(), ns3::WifiDefaultAckManager::IsResponseNeeded(), operator=(), Print(), ns3::HeFrameExchangeManager::RecordSentMuRtsTo(), TestMultiUserScheduler::SelectTxFormat(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::FrameExchangeManager::SendMpduWithProtection(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::EhtFrameExchangeManager::SendMuRts(), ns3::HtFrameExchangeManager::SendPsduWithProtection(), ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu(), ns3::FrameExchangeManager::SendRts(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::FrameExchangeManager::StartProtection(), ns3::HeFrameExchangeManager::StartProtection(), ns3::FrameExchangeManager::StartTransmission(), ns3::WifiDefaultProtectionManager::TryAddMpdu(), ns3::QosFrameExchangeManager::TryAddMpdu(), ns3::WifiDefaultProtectionManager::TryAddMpduToMuPpdu(), ns3::WifiDefaultProtectionManager::TryAggregateMsdu(), ns3::HtFrameExchangeManager::TryAggregateMsdu(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().
TX duration of the frame.
Definition at line 67 of file wifi-tx-parameters.h.
Referenced by WifiTxParameters(), Clear(), ns3::RrMultiUserScheduler::ComputeDlMuInfo(), ns3::HeFrameExchangeManager::GetTxDuration(), operator=(), TestMultiUserScheduler::SelectTxFormat(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::FrameExchangeManager::SendRts(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::FrameExchangeManager::UpdateTxDuration().
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::DoRun(), EhtAggregationTest::DoRun(), 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().