diff --git a/src/wifi/model/wifi-ppdu.cc b/src/wifi/model/wifi-ppdu.cc index aaa56c39f..7bc8dafc7 100644 --- a/src/wifi/model/wifi-ppdu.cc +++ b/src/wifi/model/wifi-ppdu.cc @@ -51,6 +51,10 @@ WifiPpdu::WifiPpdu (const WifiConstPsduMap & psdus, WifiTxVector txVector, Time m_channelWidth (txVector.GetChannelWidth ()) { NS_LOG_FUNCTION (this << psdus << txVector << ppduDuration << band); + if (m_preamble == WIFI_PREAMBLE_HE_MU) + { + m_muUserInfos = txVector.GetHeMuUserInfoMap (); + } SetPhyHeaders (txVector, ppduDuration, band); } @@ -158,8 +162,8 @@ WifiPpdu::SetPhyHeaders (WifiTxVector txVector, Time ppduDuration, WifiPhyBand b break; } default: - NS_FATAL_ERROR ("unsupported modulation class"); - break; + NS_FATAL_ERROR ("unsupported modulation class"); + break; } } @@ -357,6 +361,10 @@ WifiPpdu::GetTxVector (void) const } txVector.SetTxPowerLevel (m_txPowerLevel); txVector.SetAggregation (m_psdus.size () > 1 || m_psdus.begin ()->second->IsAggregate ()); + for (auto const& muUserInfo : m_muUserInfos) + { + txVector.SetMode (muUserInfo.second.mcs, muUserInfo.first); + } return txVector; } diff --git a/src/wifi/model/wifi-ppdu.h b/src/wifi/model/wifi-ppdu.h index a922e7989..f04b295ac 100644 --- a/src/wifi/model/wifi-ppdu.h +++ b/src/wifi/model/wifi-ppdu.h @@ -125,18 +125,19 @@ private: */ void SetPhyHeaders (WifiTxVector txVector, Time ppduDuration, WifiPhyBand band); - DsssSigHeader m_dsssSig; //!< the DSSS SIG PHY header - LSigHeader m_lSig; //!< the L-SIG PHY header - HtSigHeader m_htSig; //!< the HT-SIG PHY header - VhtSigHeader m_vhtSig; //!< the VHT-SIG PHY header - HeSigHeader m_heSig; //!< the HE-SIG PHY header - WifiPreamble m_preamble; //!< the PHY preamble - WifiModulationClass m_modulation; //!< the modulation used for the transmission of this PPDU - WifiConstPsduMap m_psdus; //!< the PSDUs contained in this PPDU - bool m_truncatedTx; //!< flag indicating whether the frame's transmission was aborted due to transmitter switch off - WifiPhyBand m_band; //!< the WifiPhyBand used to transmit that PPDU - uint16_t m_channelWidth; //!< the channel width used to transmit that PPDU in MHz - uint8_t m_txPowerLevel; //!< the transmission power level (used only for TX and initializing the returned WifiTxVector) + DsssSigHeader m_dsssSig; //!< the DSSS SIG PHY header + LSigHeader m_lSig; //!< the L-SIG PHY header + HtSigHeader m_htSig; //!< the HT-SIG PHY header + VhtSigHeader m_vhtSig; //!< the VHT-SIG PHY header + HeSigHeader m_heSig; //!< the HE-SIG PHY header + WifiPreamble m_preamble; //!< the PHY preamble + WifiModulationClass m_modulation; //!< the modulation used for the transmission of this PPDU + WifiConstPsduMap m_psdus; //!< the PSDUs contained in this PPDU + bool m_truncatedTx; //!< flag indicating whether the frame's transmission was aborted due to transmitter switch off + WifiPhyBand m_band; //!< the WifiPhyBand used to transmit that PPDU + uint16_t m_channelWidth; //!< the channel width used to transmit that PPDU in MHz + uint8_t m_txPowerLevel; //!< the transmission power level (used only for TX and initializing the returned WifiTxVector) + WifiTxVector::HeMuUserInfoMap m_muUserInfos; //!< the HE MU specific per-user information (to be removed once HE-SIG-B headers are implemented) }; /**