wifi: Use more const references in WifiPhyStateHelper
This commit is contained in:
committed by
Stefano Avallone
parent
c6efabc4a1
commit
719011058b
@@ -361,7 +361,7 @@ WifiPhyStateHelper::LogPreviousIdleAndCcaBusyStates (void)
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhyStateHelper::SwitchToTx (Time txDuration, WifiConstPsduMap psdus, double txPowerDbm, WifiTxVector txVector)
|
||||
WifiPhyStateHelper::SwitchToTx (Time txDuration, WifiConstPsduMap psdus, double txPowerDbm, const WifiTxVector& txVector)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << txDuration << psdus << txPowerDbm << txVector);
|
||||
if (!m_txTrace.IsEmpty ())
|
||||
@@ -456,7 +456,7 @@ WifiPhyStateHelper::SwitchToChannelSwitching (Time switchingDuration)
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhyStateHelper::ContinueRxNextMpdu (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector)
|
||||
WifiPhyStateHelper::ContinueRxNextMpdu (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo, const WifiTxVector& txVector)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << *psdu << rxSignalInfo << txVector);
|
||||
std::vector<bool> statusPerMpdu;
|
||||
@@ -467,7 +467,9 @@ WifiPhyStateHelper::ContinueRxNextMpdu (Ptr<WifiPsdu> psdu, RxSignalInfo rxSigna
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhyStateHelper::SwitchFromRxEndOk (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, uint16_t staId, std::vector<bool> statusPerMpdu)
|
||||
WifiPhyStateHelper::SwitchFromRxEndOk (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
|
||||
const WifiTxVector& txVector, uint16_t staId,
|
||||
const std::vector<bool>& statusPerMpdu)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << *psdu << rxSignalInfo << txVector << staId << statusPerMpdu.size () <<
|
||||
std::all_of(statusPerMpdu.begin(), statusPerMpdu.end(), [](bool v) { return v; })); //returns true if all true
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
* \param txPowerDbm the nominal TX power in dBm
|
||||
* \param txVector the TX vector for the transmission
|
||||
*/
|
||||
void SwitchToTx (Time txDuration, WifiConstPsduMap psdus, double txPowerDbm, WifiTxVector txVector);
|
||||
void SwitchToTx (Time txDuration, WifiConstPsduMap psdus, double txPowerDbm, const WifiTxVector& txVector);
|
||||
/**
|
||||
* Switch state to RX for the given duration.
|
||||
*
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
* \param rxSignalInfo the info on the received signal (\see RxSignalInfo)
|
||||
* \param txVector TXVECTOR of the PSDU
|
||||
*/
|
||||
void ContinueRxNextMpdu (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector);
|
||||
void ContinueRxNextMpdu (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo, const WifiTxVector& txVector);
|
||||
/**
|
||||
* Switch from RX after the reception was successful.
|
||||
*
|
||||
@@ -203,8 +203,8 @@ public:
|
||||
* \param staId the station ID of the PSDU (only used for MU)
|
||||
* \param statusPerMpdu reception status per MPDU
|
||||
*/
|
||||
void SwitchFromRxEndOk (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector,
|
||||
uint16_t staId, std::vector<bool> statusPerMpdu);
|
||||
void SwitchFromRxEndOk (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo, const WifiTxVector& txVector,
|
||||
uint16_t staId, const std::vector<bool>& statusPerMpdu);
|
||||
/**
|
||||
* Switch from RX after the reception failed.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user