wifi: Rename WifiPpdu::CanBeReceived to WifiPpdu::DoesCoverChannel
This commit is contained in:
@@ -1349,7 +1349,7 @@ PhyEntity::CanStartRx(Ptr<const WifiPpdu> ppdu) const
|
||||
const auto p20MinFreq = p20CenterFreq - (primaryWidth / 2);
|
||||
const auto p20MaxFreq = p20CenterFreq + (primaryWidth / 2);
|
||||
|
||||
return ppdu->CanBeReceived(p20MinFreq, p20MaxFreq);
|
||||
return ppdu->DoesCoverChannel(p20MinFreq, p20MaxFreq);
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -174,7 +174,7 @@ WifiPpdu::DoesOverlapChannel(uint16_t minFreq, uint16_t maxFreq) const
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPpdu::CanBeReceived(uint16_t p20MinFreq, uint16_t p20MaxFreq) const
|
||||
WifiPpdu::DoesCoverChannel(uint16_t p20MinFreq, uint16_t p20MaxFreq) const
|
||||
{
|
||||
NS_LOG_FUNCTION(this << p20MinFreq << p20MaxFreq);
|
||||
uint16_t txChannelWidth = GetTxVector().GetChannelWidth();
|
||||
@@ -182,7 +182,6 @@ WifiPpdu::CanBeReceived(uint16_t p20MinFreq, uint16_t p20MaxFreq) const
|
||||
uint16_t maxTxFreq = m_txCenterFreq + txChannelWidth / 2;
|
||||
if (p20MinFreq < minTxFreq || p20MaxFreq > maxTxFreq)
|
||||
{
|
||||
NS_LOG_INFO("Received PPDU does not cover the whole primary20 channel");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -137,15 +137,13 @@ class WifiPpdu : public SimpleRefCount<WifiPpdu>
|
||||
bool DoesOverlapChannel(uint16_t minFreq, uint16_t maxFreq) const;
|
||||
|
||||
/**
|
||||
* Check whether the given PPDU can be received on the specified primary
|
||||
* channel. Normally, a PPDU can be received if it is transmitted over a
|
||||
* channel that overlaps the primary20 channel of a PHY entity.
|
||||
* Check whether the given PPDU covers the whole channel.
|
||||
*
|
||||
* \param p20MinFreq the minimum frequency (MHz) of the primary channel
|
||||
* \param p20MaxFreq the maximum frequency (MHz) of the primary channel
|
||||
* \return true if this PPDU can be received, false otherwise
|
||||
* \return true if this PPDU covers the whole channel, false otherwise
|
||||
*/
|
||||
bool CanBeReceived(uint16_t p20MinFreq, uint16_t p20MaxFreq) const;
|
||||
bool DoesCoverChannel(uint16_t p20MinFreq, uint16_t p20MaxFreq) const;
|
||||
|
||||
/**
|
||||
* Get the modulation used for the PPDU.
|
||||
|
||||
@@ -4567,7 +4567,7 @@ TestUnsupportedBandwidthReception::DoRun()
|
||||
*
|
||||
* \brief Primary 20 MHz Covered By Ppdu Test
|
||||
* This test checks whether the functions WifiPpdu::DoesOverlapChannel and
|
||||
* WifiPpdu::CanBeReceived are returning the expected results.
|
||||
* WifiPpdu::DoesCoverChannel are returning the expected results.
|
||||
*/
|
||||
class TestPrimary20CoveredByPpdu : public TestCase
|
||||
{
|
||||
@@ -4675,7 +4675,7 @@ TestPrimary20CoveredByPpdu::RunOne(WifiPhyBand band,
|
||||
expectedP20Overlap,
|
||||
"PPDU is not expected to overlap with the P20");
|
||||
|
||||
auto p20Covered = ppdu->CanBeReceived(p20MinFreq, p20MaxFreq);
|
||||
auto p20Covered = ppdu->DoesCoverChannel(p20MinFreq, p20MaxFreq);
|
||||
NS_ASSERT(p20Covered == expectedP20Covered);
|
||||
NS_TEST_ASSERT_MSG_EQ(p20Covered,
|
||||
expectedP20Covered,
|
||||
|
||||
Reference in New Issue
Block a user