diff --git a/src/wifi/model/he/he-phy.cc b/src/wifi/model/he/he-phy.cc index 040bf4d3c..5a0fe4611 100644 --- a/src/wifi/model/he/he-phy.cc +++ b/src/wifi/model/he/he-phy.cc @@ -347,12 +347,12 @@ HePhy::BuildPpdu (const WifiConstPsduMap & psdus, const WifiTxVector& txVector, } void -HePhy::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, +HePhy::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, Time rxDuration) { NS_LOG_FUNCTION (this << ppdu << rxDuration); const WifiTxVector& txVector = ppdu->GetTxVector (); - auto hePpdu = DynamicCast (ppdu); + auto hePpdu = DynamicCast (ppdu); NS_ASSERT (hePpdu); HePpdu::TxPsdFlag psdFlag = hePpdu->GetTxPsdFlag (); if (txVector.IsUlMu () && psdFlag == HePpdu::PSD_HE_TB_OFDMA_PORTION) @@ -1033,7 +1033,7 @@ HePhy::GetCenterFrequencyForNonOfdmaPart (const WifiTxVector& txVector, uint16_t } void -HePhy::StartTx (Ptr ppdu) +HePhy::StartTx (Ptr ppdu) { NS_LOG_FUNCTION (this << ppdu); if (ppdu->GetType () == WIFI_PPDU_TYPE_UL_MU) diff --git a/src/wifi/model/he/he-phy.h b/src/wifi/model/he/he-phy.h index 07c15375b..77904d77d 100644 --- a/src/wifi/model/he/he-phy.h +++ b/src/wifi/model/he/he-phy.h @@ -93,13 +93,13 @@ public: const WifiTxVector& txVector, Time ppduDuration) override; Ptr GetAddressedPsduInPpdu (Ptr ppdu) const override; - void StartReceivePreamble (Ptr ppdu, + void StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, Time rxDuration) override; void CancelAllEvents (void) override; uint16_t GetStaId (const Ptr ppdu) const override; uint16_t GetMeasurementChannelWidth (const Ptr ppdu) const override; - void StartTx (Ptr ppdu) override; + void StartTx (Ptr ppdu) override; Time CalculateTxDuration (WifiConstPsduMap psduMap, const WifiTxVector& txVector, WifiPhyBand band) const override; /** diff --git a/src/wifi/model/phy-entity.cc b/src/wifi/model/phy-entity.cc index 32abad45b..ae9e8e773 100644 --- a/src/wifi/model/phy-entity.cc +++ b/src/wifi/model/phy-entity.cc @@ -361,7 +361,7 @@ PhyEntity::DoEndReceiveField (WifiPpduField field, Ptr event) } void -PhyEntity::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, +PhyEntity::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, Time rxDuration) { //The total RX power corresponds to the maximum over all the bands @@ -1062,14 +1062,14 @@ PhyEntity::NotifyPayloadBegin (const WifiTxVector& txVector, const Time& payload } void -PhyEntity::StartTx (Ptr ppdu) +PhyEntity::StartTx (Ptr ppdu) { NS_LOG_FUNCTION (this << ppdu); Transmit (ppdu->GetTxDuration (), ppdu, "transmission"); } void -PhyEntity::Transmit (Time txDuration, Ptr ppdu, std::string type) +PhyEntity::Transmit (Time txDuration, Ptr ppdu, std::string type) { NS_LOG_FUNCTION (this << txDuration << ppdu << type); double txPowerWatts = DbmToW (m_wifiPhy->GetTxPowerForTransmission (ppdu) + m_wifiPhy->GetTxGain ()); diff --git a/src/wifi/model/phy-entity.h b/src/wifi/model/phy-entity.h index 2008e635a..3ea9552c4 100644 --- a/src/wifi/model/phy-entity.h +++ b/src/wifi/model/phy-entity.h @@ -358,8 +358,8 @@ public: * \param rxPowersW the receive power in W per band * \param rxDuration the duration of the PPDU */ - virtual void StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, - Time rxDuration); + virtual void StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, + Time rxDuration); /** * Start receiving a given field. * @@ -447,7 +447,7 @@ public: * * \param ppdu the PPDU to send */ - virtual void StartTx (Ptr ppdu); + virtual void StartTx (Ptr ppdu); /** * This function prepares most of the WifiSpectrumSignalParameters @@ -458,7 +458,7 @@ public: * \param ppdu the PPDU to send * \param type the type of transmission (for logging) */ - void Transmit (Time txDuration, Ptr ppdu, std::string type); + void Transmit (Time txDuration, Ptr ppdu, std::string type); /** * \param psduMap the PSDU(s) to transmit indexed by STA-ID diff --git a/src/wifi/model/spectrum-wifi-phy.cc b/src/wifi/model/spectrum-wifi-phy.cc index 54ba3cd94..8da9162a8 100644 --- a/src/wifi/model/spectrum-wifi-phy.cc +++ b/src/wifi/model/spectrum-wifi-phy.cc @@ -402,7 +402,7 @@ SpectrumWifiPhy::CreateWifiSpectrumPhyInterface (Ptr device) } void -SpectrumWifiPhy::StartTx (Ptr ppdu) +SpectrumWifiPhy::StartTx (Ptr ppdu) { NS_LOG_FUNCTION (this << ppdu); GetPhyEntity (ppdu->GetModulation ())->StartTx (ppdu); diff --git a/src/wifi/model/spectrum-wifi-phy.h b/src/wifi/model/spectrum-wifi-phy.h index cc1706147..41fe8e866 100644 --- a/src/wifi/model/spectrum-wifi-phy.h +++ b/src/wifi/model/spectrum-wifi-phy.h @@ -67,7 +67,7 @@ public: virtual ~SpectrumWifiPhy (); // Implementation of pure virtual method. - void StartTx (Ptr ppdu) override; + void StartTx (Ptr ppdu) override; Ptr GetChannel (void) const override; uint16_t GetGuardBandwidth (uint16_t currentChannelWidth) const override; std::tuple GetTxMaskRejectionParams (void) const override; diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 467b419b0..2dbff45c5 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1634,7 +1634,7 @@ WifiPhy::Reset (void) } void -WifiPhy::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, Time rxDuration) +WifiPhy::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, Time rxDuration) { WifiModulationClass modulation = ppdu->GetTxVector ().GetModulationClass (); auto it = m_phyEntities.find (modulation); diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index 3b3324829..0e0b3f4c5 100644 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -104,7 +104,7 @@ public: * \param rxPowersW the receive power in W per band * \param rxDuration the duration of the PPDU */ - void StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, Time rxDuration); + void StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, Time rxDuration); /** * Reset PHY at the end of the packet under reception after it has failed the PHY header. @@ -153,7 +153,7 @@ public: /** * \param ppdu the PPDU to send */ - virtual void StartTx (Ptr ppdu) = 0; + virtual void StartTx (Ptr ppdu) = 0; /** * Put in sleep mode. diff --git a/src/wifi/model/wifi-spectrum-signal-parameters.h b/src/wifi/model/wifi-spectrum-signal-parameters.h index 9ea767cca..80ae0cb3d 100644 --- a/src/wifi/model/wifi-spectrum-signal-parameters.h +++ b/src/wifi/model/wifi-spectrum-signal-parameters.h @@ -50,7 +50,7 @@ struct WifiSpectrumSignalParameters : public SpectrumSignalParameters */ WifiSpectrumSignalParameters (const WifiSpectrumSignalParameters& p); - Ptr ppdu; ///< The PPDU being transmitted + Ptr ppdu; ///< The PPDU being transmitted uint16_t txCenterFreq; ///< the center frequency of the transmitted signal in MHz }; diff --git a/src/wifi/model/yans-wifi-channel.cc b/src/wifi/model/yans-wifi-channel.cc index d45cfa2b3..6cbbad859 100644 --- a/src/wifi/model/yans-wifi-channel.cc +++ b/src/wifi/model/yans-wifi-channel.cc @@ -103,7 +103,6 @@ YansWifiChannel::Send (Ptr sender, Ptr ppdu, double double rxPowerDbm = m_loss->CalcRxPower (txPowerDbm, senderMobility, receiverMobility); NS_LOG_DEBUG ("propagation: txPower=" << txPowerDbm << "dbm, rxPower=" << rxPowerDbm << "dbm, " << "distance=" << senderMobility->GetDistanceFrom (receiverMobility) << "m, delay=" << delay); - Ptr copy = ppdu->Copy (); Ptr dstNetDevice = (*i)->GetDevice (); uint32_t dstNode; if (dstNetDevice == 0) @@ -117,13 +116,13 @@ YansWifiChannel::Send (Ptr sender, Ptr ppdu, double Simulator::ScheduleWithContext (dstNode, delay, &YansWifiChannel::Receive, - (*i), copy, rxPowerDbm); + (*i), ppdu, rxPowerDbm); } } } void -YansWifiChannel::Receive (Ptr phy, Ptr ppdu, double rxPowerDbm) +YansWifiChannel::Receive (Ptr phy, Ptr ppdu, double rxPowerDbm) { NS_LOG_FUNCTION (phy << ppdu << rxPowerDbm); // Do no further processing if signal is too weak diff --git a/src/wifi/model/yans-wifi-channel.h b/src/wifi/model/yans-wifi-channel.h index b0cb07b8e..fe7aefd69 100644 --- a/src/wifi/model/yans-wifi-channel.h +++ b/src/wifi/model/yans-wifi-channel.h @@ -112,7 +112,7 @@ private: * \param ppdu the PPDU being sent * \param txPowerDbm the TX power associated to the packet being sent (dBm) */ - static void Receive (Ptr receiver, Ptr ppdu, double txPowerDbm); + static void Receive (Ptr receiver, Ptr ppdu, double txPowerDbm); PhyList m_phyList; //!< List of YansWifiPhys connected to this YansWifiChannel Ptr m_loss; //!< Propagation loss model diff --git a/src/wifi/model/yans-wifi-phy.cc b/src/wifi/model/yans-wifi-phy.cc index b373ce746..2060dd990 100644 --- a/src/wifi/model/yans-wifi-phy.cc +++ b/src/wifi/model/yans-wifi-phy.cc @@ -86,7 +86,7 @@ YansWifiPhy::SetChannel (const Ptr channel) } void -YansWifiPhy::StartTx (Ptr ppdu) +YansWifiPhy::StartTx (Ptr ppdu) { NS_LOG_FUNCTION (this << ppdu); NS_LOG_DEBUG ("Start transmission: signal power before antenna gain=" << GetPowerDbm (ppdu->GetTxVector ().GetTxPowerLevel ()) << "dBm"); diff --git a/src/wifi/model/yans-wifi-phy.h b/src/wifi/model/yans-wifi-phy.h index eb9182c44..94207f9f7 100644 --- a/src/wifi/model/yans-wifi-phy.h +++ b/src/wifi/model/yans-wifi-phy.h @@ -57,7 +57,7 @@ public: virtual ~YansWifiPhy (); void SetInterferenceHelper (const Ptr helper) override; - void StartTx (Ptr ppdu) override; + void StartTx (Ptr ppdu) override; Ptr GetChannel (void) const override; uint16_t GetGuardBandwidth (uint16_t currentChannelWidth) const override; std::tuple GetTxMaskRejectionParams (void) const override; diff --git a/src/wifi/test/wifi-phy-ofdma-test.cc b/src/wifi/test/wifi-phy-ofdma-test.cc index 13aae19a8..d7ae8e07e 100644 --- a/src/wifi/test/wifi-phy-ofdma-test.cc +++ b/src/wifi/test/wifi-phy-ofdma-test.cc @@ -157,7 +157,7 @@ public: /** * \param ppdu the PPDU to send */ - void StartTx (Ptr ppdu) override; + void StartTx (Ptr ppdu) override; /** * \param currentChannelWidth channel width of the current transmission (MHz) * \return the width of the guard band (MHz) set to 2 @@ -263,7 +263,7 @@ OfdmaSpectrumWifiPhy::SetTriggerFrameUid (uint64_t uid) } void -OfdmaSpectrumWifiPhy::StartTx (Ptr ppdu) +OfdmaSpectrumWifiPhy::StartTx (Ptr ppdu) { m_phyTxPpduUidTrace (ppdu->GetUid ()); SpectrumWifiPhy::StartTx (ppdu);