From ef72c1248e7a46330c05200de19d2a655614baa4 Mon Sep 17 00:00:00 2001 From: Tolik Zinovyev Date: Sat, 14 Sep 2024 23:38:02 -0400 Subject: [PATCH] wifi: pass WifiConstPsduMap by const ref. --- src/wifi/model/he/he-phy.cc | 2 +- src/wifi/model/he/he-phy.h | 2 +- src/wifi/model/phy-entity.cc | 2 +- src/wifi/model/phy-entity.h | 2 +- src/wifi/model/wifi-phy.cc | 8 ++++---- src/wifi/model/wifi-phy.h | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/wifi/model/he/he-phy.cc b/src/wifi/model/he/he-phy.cc index 6d7be5972..f1fc7fd42 100644 --- a/src/wifi/model/he/he-phy.cc +++ b/src/wifi/model/he/he-phy.cc @@ -1527,7 +1527,7 @@ HePhy::StartTxHePortion(Ptr ppdu, } Time -HePhy::CalculateTxDuration(WifiConstPsduMap psduMap, +HePhy::CalculateTxDuration(const WifiConstPsduMap& psduMap, const WifiTxVector& txVector, WifiPhyBand band) const { diff --git a/src/wifi/model/he/he-phy.h b/src/wifi/model/he/he-phy.h index 42ad47e4d..01fd7ae08 100644 --- a/src/wifi/model/he/he-phy.h +++ b/src/wifi/model/he/he-phy.h @@ -97,7 +97,7 @@ class HePhy : public VhtPhy uint16_t GetStaId(const Ptr ppdu) const override; MHz_u GetMeasurementChannelWidth(const Ptr ppdu) const override; void StartTx(Ptr ppdu) override; - Time CalculateTxDuration(WifiConstPsduMap psduMap, + Time CalculateTxDuration(const WifiConstPsduMap& psduMap, const WifiTxVector& txVector, WifiPhyBand band) const override; void SwitchMaybeToCcaBusy(const Ptr ppdu) override; diff --git a/src/wifi/model/phy-entity.cc b/src/wifi/model/phy-entity.cc index 3b4876480..8d7edbc9c 100644 --- a/src/wifi/model/phy-entity.cc +++ b/src/wifi/model/phy-entity.cc @@ -1388,7 +1388,7 @@ PhyEntity::GetTxMaskRejectionParams() const } Time -PhyEntity::CalculateTxDuration(WifiConstPsduMap psduMap, +PhyEntity::CalculateTxDuration(const WifiConstPsduMap& psduMap, const WifiTxVector& txVector, WifiPhyBand band) const { diff --git a/src/wifi/model/phy-entity.h b/src/wifi/model/phy-entity.h index a2fe58521..e707fbf99 100644 --- a/src/wifi/model/phy-entity.h +++ b/src/wifi/model/phy-entity.h @@ -478,7 +478,7 @@ class PhyEntity : public SimpleRefCount * * \return the total amount of time this PHY will stay busy for the transmission of the PPDU */ - virtual Time CalculateTxDuration(WifiConstPsduMap psduMap, + virtual Time CalculateTxDuration(const WifiConstPsduMap& psduMap, const WifiTxVector& txVector, WifiPhyBand band) const; /** diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 4952e10af..9707f0506 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1582,7 +1582,7 @@ WifiPhy::CalculateTxDuration(Ptr psdu, } Time -WifiPhy::CalculateTxDuration(WifiConstPsduMap psduMap, +WifiPhy::CalculateTxDuration(const WifiConstPsduMap& psduMap, const WifiTxVector& txVector, WifiPhyBand band) { @@ -1597,7 +1597,7 @@ WifiPhy::GetMaxPsduSize(WifiModulationClass modulation) } void -WifiPhy::NotifyTxBegin(WifiConstPsduMap psdus, Watt_u txPower) +WifiPhy::NotifyTxBegin(const WifiConstPsduMap& psdus, Watt_u txPower) { if (!m_phyTxBeginTrace.IsEmpty()) { @@ -1612,7 +1612,7 @@ WifiPhy::NotifyTxBegin(WifiConstPsduMap psdus, Watt_u txPower) } void -WifiPhy::NotifyTxEnd(WifiConstPsduMap psdus) +WifiPhy::NotifyTxEnd(const WifiConstPsduMap& psdus) { if (!m_phyTxEndTrace.IsEmpty()) { @@ -1789,7 +1789,7 @@ WifiPhy::Send(Ptr psdu, const WifiTxVector& txVector) } void -WifiPhy::Send(WifiConstPsduMap psdus, const WifiTxVector& txVector) +WifiPhy::Send(const WifiConstPsduMap& psdus, const WifiTxVector& txVector) { NS_LOG_FUNCTION(this << psdus << txVector); /* Transmission can happen if: diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index 9212105f9..a11fea0f8 100644 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -156,7 +156,7 @@ class WifiPhy : public Object * real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - * txPowerMin) / nTxLevels */ - void Send(WifiConstPsduMap psdus, const WifiTxVector& txVector); + void Send(const WifiConstPsduMap& psdus, const WifiTxVector& txVector); /** * \param ppdu the PPDU to send @@ -266,7 +266,7 @@ class WifiPhy : public Object * * \return the total amount of time this PHY will stay busy for the transmission of the PPDU */ - static Time CalculateTxDuration(WifiConstPsduMap psduMap, + static Time CalculateTxDuration(const WifiConstPsduMap& psduMap, const WifiTxVector& txVector, WifiPhyBand band); @@ -564,14 +564,14 @@ class WifiPhy : public Object * \param psdus the PSDUs being transmitted (only one unless DL MU transmission) * \param txPower the transmit power */ - void NotifyTxBegin(WifiConstPsduMap psdus, Watt_u txPower); + void NotifyTxBegin(const WifiConstPsduMap& psdus, Watt_u txPower); /** * Public method used to fire a PhyTxEnd trace. * Implemented for encapsulation purposes. * * \param psdus the PSDUs being transmitted (only one unless DL MU transmission) */ - void NotifyTxEnd(WifiConstPsduMap psdus); + void NotifyTxEnd(const WifiConstPsduMap& psdus); /** * Public method used to fire a PhyTxDrop trace. * Implemented for encapsulation purposes.