diff --git a/src/wifi/model/wifi-tx-vector.cc b/src/wifi/model/wifi-tx-vector.cc index 556181af8..a856b589d 100644 --- a/src/wifi/model/wifi-tx-vector.cc +++ b/src/wifi/model/wifi-tx-vector.cc @@ -44,7 +44,8 @@ WifiTxVector::WifiTxVector() m_length(0), m_modeInitialized(false), m_inactiveSubchannels(), - m_ruAllocation() + m_ruAllocation(), + m_ehtPpduType(1) // SU transmission by default { } @@ -76,7 +77,8 @@ WifiTxVector::WifiTxVector(WifiMode mode, m_length(length), m_modeInitialized(true), m_inactiveSubchannels(), - m_ruAllocation() + m_ruAllocation(), + m_ehtPpduType(1) // SU transmission by default { } @@ -97,7 +99,8 @@ WifiTxVector::WifiTxVector(const WifiTxVector& txVector) m_modeInitialized(txVector.m_modeInitialized), m_inactiveSubchannels(txVector.m_inactiveSubchannels), m_sigBMcs(txVector.m_sigBMcs), - m_ruAllocation(txVector.m_ruAllocation) + m_ruAllocation(txVector.m_ruAllocation), + m_ehtPpduType(txVector.m_ehtPpduType) { m_muUserInfos.clear(); if (!txVector.m_muUserInfos.empty()) // avoids crashing for loop @@ -374,6 +377,19 @@ WifiTxVector::GetRuAllocation() const return m_ruAllocation; } +void +WifiTxVector::SetEhtPpduType(uint8_t type) +{ + NS_ASSERT(IsEht(m_preamble)); + m_ehtPpduType = type; +} + +uint8_t +WifiTxVector::GetEhtPpduType() const +{ + return m_ehtPpduType; +} + bool WifiTxVector::IsValid() const { @@ -585,6 +601,10 @@ operator<<(std::ostream& os, const WifiTxVector& v) puncturedSubchannels.cend(), std::ostream_iterator(os, ", ")); } + if (IsEht(v.GetPreambleType())) + { + os << " EHT PPDU type: " << +v.GetEhtPpduType(); + } return os; } diff --git a/src/wifi/model/wifi-tx-vector.h b/src/wifi/model/wifi-tx-vector.h index 6d35bda5e..75787e612 100644 --- a/src/wifi/model/wifi-tx-vector.h +++ b/src/wifi/model/wifi-tx-vector.h @@ -452,6 +452,17 @@ class WifiTxVector */ ContentChannelAllocation GetContentChannelAllocation() const; + /** + * Set the EHT_PPDU_TYPE parameter + * \param type the EHT_PPDU_TYPE parameter + */ + void SetEhtPpduType(uint8_t type); + /** + * Get the EHT_PPDU_TYPE parameter + * \return the EHT_PPDU_TYPE parameter + */ + uint8_t GetEhtPpduType() const; + private: /** * Derive the RU allocation from the TXVECTOR for which its RU allocation has not been set yet. @@ -493,6 +504,7 @@ class WifiTxVector mutable RuAllocation m_ruAllocation; /**< RU allocations that are going to be carried in SIG-B common field per Table 27-1 IEEE */ + uint8_t m_ehtPpduType; /**< EHT_PPDU_TYPE per Table 36-1 IEEE 802.11be D2.3 */ }; /**