wifi: RxPowerWattPerChannelBand objects are moved to Event objects

This commit is contained in:
Stefano Avallone
2021-07-13 12:49:06 +02:00
committed by Stefano Avallone
parent 5d10cbdc91
commit 4048708fa1
2 changed files with 6 additions and 5 deletions

View File

@@ -38,12 +38,12 @@ NS_LOG_COMPONENT_DEFINE ("InterferenceHelper");
* PHY event class
****************************************************************/
Event::Event (Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand& rxPower)
Event::Event (Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand&& rxPower)
: m_ppdu (ppdu),
m_txVector (txVector),
m_startTime (Simulator::Now ()),
m_endTime (m_startTime + duration),
m_rxPowerW (rxPower)
m_rxPowerW (std::move (rxPower))
{
}
@@ -189,7 +189,7 @@ InterferenceHelper::~InterferenceHelper ()
Ptr<Event>
InterferenceHelper::Add (Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand& rxPowerW, bool isStartOfdmaRxing)
{
Ptr<Event> event = Create<Event> (ppdu, txVector, duration, rxPowerW);
Ptr<Event> event = Create<Event> (ppdu, txVector, duration, std::move (rxPowerW));
AppendEvent (event, isStartOfdmaRxing);
return event;
}

View File

@@ -38,14 +38,15 @@ class Event : public SimpleRefCount<Event>
{
public:
/**
* Create an Event with the given parameters.
* Create an Event with the given parameters. Note that <i>rxPower</i> will
* be moved into this object.
*
* \param ppdu the PPDU
* \param txVector the TXVECTOR
* \param duration duration of the PPDU
* \param rxPower the received power per band (W)
*/
Event (Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand& rxPower);
Event (Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand&& rxPower);
~Event ();
/**