wifi: Rename SpectrumWifiPhy::SetChannel to SpectrumWifiPhy::AddChannel

This commit is contained in:
Sébastien Deronne
2022-09-04 10:37:02 +02:00
committed by Sebastien Deronne
parent 8d5137d2e7
commit f16877ee06
11 changed files with 63 additions and 46 deletions

View File

@@ -263,9 +263,9 @@ InterferenceExperiment::Run(struct InterferenceExperiment::Input input)
rx->SetInterferenceHelper(interferenceRx);
Ptr<ErrorRateModel> errorRx = CreateObject<NistErrorRateModel>();
rx->SetErrorRateModel(errorRx);
m_txA->SetChannel(channel);
m_txB->SetChannel(channel);
rx->SetChannel(channel);
m_txA->AddChannel(channel);
m_txB->AddChannel(channel);
rx->AddChannel(channel);
m_txA->SetMobility(posTxA);
m_txB->SetMobility(posTxB);
rx->SetMobility(posRx);

View File

@@ -104,7 +104,7 @@ SpectrumWifiPhyHelper::Create(Ptr<Node> node, Ptr<WifiNetDevice> device) const
m_preambleDetectionModel.at(i).Create<PreambleDetectionModel>();
phy->SetPreambleDetectionModel(preambleDetection);
}
phy->SetChannel(m_channels.at(i));
phy->AddChannel(m_channels.at(i));
phy->SetDevice(device);
phy->SetMobility(node->GetObject<MobilityModel>());
ret.emplace_back(phy);

View File

@@ -196,9 +196,24 @@ SpectrumWifiPhy::GetChannel() const
}
void
SpectrumWifiPhy::SetChannel(const Ptr<SpectrumChannel> channel)
SpectrumWifiPhy::AddChannel(const Ptr<SpectrumChannel> channel, const FrequencyRange& freqRange)
{
NS_LOG_FUNCTION(this << channel);
NS_LOG_FUNCTION(this << channel << freqRange);
const auto foundOverlappingChannel =
std::any_of(m_spectrumPhyInterfaces.cbegin(),
m_spectrumPhyInterfaces.cend(),
[freqRange, channel](const auto& item) {
const auto spectrumRange = item.first;
const auto noOverlap =
((freqRange.minFrequency >= spectrumRange.maxFrequency) ||
(freqRange.maxFrequency <= spectrumRange.minFrequency));
return (!noOverlap);
});
NS_ABORT_MSG_IF(foundOverlappingChannel,
"Added a wifi spectrum channel that overlaps with another existing wifi "
"spectrum channel");
auto wifiSpectrumPhyInterface = CreateObject<WifiSpectrumPhyInterface>();
wifiSpectrumPhyInterface->SetSpectrumWifiPhy(this);
wifiSpectrumPhyInterface->SetChannel(channel);
@@ -206,7 +221,7 @@ SpectrumWifiPhy::SetChannel(const Ptr<SpectrumChannel> channel)
{
wifiSpectrumPhyInterface->SetDevice(GetDevice());
}
m_spectrumPhyInterfaces.insert({WHOLE_WIFI_SPECTRUM, wifiSpectrumPhyInterface});
m_spectrumPhyInterfaces.emplace(freqRange, wifiSpectrumPhyInterface);
}
void

View File

@@ -76,11 +76,13 @@ class SpectrumWifiPhy : public WifiPhy
std::tuple<double, double, double> GetTxMaskRejectionParams() const override;
/**
* Set the SpectrumChannel this SpectrumWifiPhy is to be connected to.
* Attach a SpectrumChannel to use for a given frequency range.
*
* \param channel the SpectrumChannel this SpectrumWifiPhy is to be connected to
* \param channel the SpectrumChannel to attach
* \param freqRange the frequency range, bounded by a minFrequency and a maxFrequency in MHz
*/
void SetChannel(const Ptr<SpectrumChannel> channel);
void AddChannel(const Ptr<SpectrumChannel> channel,
const FrequencyRange& freqRange = WHOLE_WIFI_SPECTRUM);
/**
* Input method for delivering a signal from the spectrum channel

View File

@@ -623,7 +623,7 @@ ChannelAccessManagerTest<TxopType>::StartTest(uint64_t slotTime,
// to initialize
m_phy = CreateObject<SpectrumWifiPhy>();
m_phy->SetInterferenceHelper(CreateObject<InterferenceHelper>());
m_phy->SetChannel(CreateObject<MultiModelSpectrumChannel>());
m_phy->AddChannel(CreateObject<MultiModelSpectrumChannel>());
m_phy->SetOperatingChannel(WifiPhy::ChannelTuple{0, chWidth, WIFI_PHY_BAND_UNSPECIFIED, 0});
m_phy->ConfigureStandard(WIFI_STANDARD_80211ac); // required to use 160 MHz channels
m_ChannelAccessManager->SetupPhyListener(m_phy);
@@ -1500,7 +1500,7 @@ LargestIdlePrimaryChannelTest::DoRun()
// create a new PHY operating on a channel of the current width
m_phy = CreateObject<SpectrumWifiPhy>();
m_phy->SetInterferenceHelper(CreateObject<InterferenceHelper>());
m_phy->SetChannel(CreateObject<MultiModelSpectrumChannel>());
m_phy->AddChannel(CreateObject<MultiModelSpectrumChannel>());
m_phy->SetOperatingChannel(
WifiPhy::ChannelTuple{0, chWidth, WIFI_PHY_BAND_5GHZ, 0});
m_phy->ConfigureStandard(WIFI_STANDARD_80211ax);

View File

@@ -202,7 +202,7 @@ SpectrumWifiPhyBasicTest::DoSetup()
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel>();
m_phy->SetErrorRateModel(error);
m_phy->SetDevice(dev);
m_phy->SetChannel(spectrumChannel);
m_phy->AddChannel(spectrumChannel);
m_phy->SetOperatingChannel(WifiPhy::ChannelTuple{CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
m_phy->ConfigureStandard(WIFI_STANDARD_80211n);
m_phy->SetReceiveOkCallback(
@@ -550,7 +550,7 @@ SpectrumWifiPhyFilterTest::DoSetup()
Ptr<ErrorRateModel> txErrorModel = CreateObject<NistErrorRateModel>();
m_txPhy->SetErrorRateModel(txErrorModel);
m_txPhy->SetDevice(txDev);
m_txPhy->SetChannel(spectrumChannel);
m_txPhy->AddChannel(spectrumChannel);
m_txPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
Ptr<ConstantPositionMobilityModel> apMobility = CreateObject<ConstantPositionMobilityModel>();
m_txPhy->SetMobility(apMobility);
@@ -565,7 +565,7 @@ SpectrumWifiPhyFilterTest::DoSetup()
m_rxPhy->SetInterferenceHelper(rxInterferenceHelper);
Ptr<ErrorRateModel> rxErrorModel = CreateObject<NistErrorRateModel>();
m_rxPhy->SetErrorRateModel(rxErrorModel);
m_rxPhy->SetChannel(spectrumChannel);
m_rxPhy->AddChannel(spectrumChannel);
m_rxPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
Ptr<ConstantPositionMobilityModel> sta1Mobility = CreateObject<ConstantPositionMobilityModel>();
m_rxPhy->SetMobility(sta1Mobility);

View File

@@ -430,7 +430,7 @@ TestNonHtDuplicatePhyReception::DoSetup()
auto apErrorModel = CreateObject<NistErrorRateModel>();
m_phyAp->SetErrorRateModel(apErrorModel);
m_phyAp->SetDevice(apDev);
m_phyAp->SetChannel(spectrumChannel);
m_phyAp->AddChannel(spectrumChannel);
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
auto apMobility = CreateObject<ConstantPositionMobilityModel>();
m_phyAp->SetMobility(apMobility);
@@ -448,7 +448,7 @@ TestNonHtDuplicatePhyReception::DoSetup()
auto sta1ErrorModel = CreateObject<NistErrorRateModel>();
staPhy->SetErrorRateModel(sta1ErrorModel);
staPhy->SetDevice(staDev);
staPhy->SetChannel(spectrumChannel);
staPhy->AddChannel(spectrumChannel);
staPhy->ConfigureStandard(std::get<0>(staParams));
staPhy->SetReceiveOkCallback(
MakeCallback(&TestNonHtDuplicatePhyReception::RxSuccess, this).Bind(m_phyStas.size()));
@@ -803,7 +803,7 @@ TestMultipleCtsResponsesFromMuRts::DoSetup()
auto apErrorModel = CreateObject<NistErrorRateModel>();
m_phyAp->SetErrorRateModel(apErrorModel);
m_phyAp->SetDevice(apDev);
m_phyAp->SetChannel(spectrumChannel);
m_phyAp->AddChannel(spectrumChannel);
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phyAp->AssignStreams(streamNumber);
@@ -837,7 +837,7 @@ TestMultipleCtsResponsesFromMuRts::DoSetup()
auto staErrorModel = CreateObject<NistErrorRateModel>();
phySta->SetErrorRateModel(staErrorModel);
phySta->SetDevice(staDev);
phySta->SetChannel(spectrumChannel);
phySta->AddChannel(spectrumChannel);
phySta->ConfigureStandard(WIFI_STANDARD_80211ax);
phySta->AssignStreams(streamNumber);
phySta->SetTxPowerStart(m_stasTxPowerDbm);

View File

@@ -244,7 +244,7 @@ WifiPhyCcaThresholdsTest::DoSetup()
m_phy->SetDevice(m_device);
m_device->SetPhy(m_phy);
m_phy->SetInterferenceHelper(CreateObject<InterferenceHelper>());
m_phy->SetChannel(CreateObject<MultiModelSpectrumChannel>());
m_phy->AddChannel(CreateObject<MultiModelSpectrumChannel>());
auto channelNum = std::get<0>(
*WifiPhyOperatingChannel::FindFirst(0, 0, 160, WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ));
@@ -1026,7 +1026,7 @@ WifiPhyCcaIndicationTest::DoSetup()
Ptr<ThresholdPreambleDetectionModel> preambleDetectionModel =
CreateObject<ThresholdPreambleDetectionModel>();
m_rxPhy->SetPreambleDetectionModel(preambleDetectionModel);
m_rxPhy->SetChannel(spectrumChannel);
m_rxPhy->AddChannel(spectrumChannel);
m_rxPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
m_rxPhy->SetDevice(rxDev);
rxDev->SetPhy(m_rxPhy);
@@ -1040,7 +1040,7 @@ WifiPhyCcaIndicationTest::DoSetup()
m_txPhy->SetInterferenceHelper(txInterferenceHelper);
Ptr<ErrorRateModel> txErrorModel = CreateObject<NistErrorRateModel>();
m_txPhy->SetErrorRateModel(txErrorModel);
m_txPhy->SetChannel(spectrumChannel);
m_txPhy->AddChannel(spectrumChannel);
m_txPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
m_txPhy->SetDevice(txDev);
txDev->SetPhy(m_txPhy);

View File

@@ -714,7 +714,7 @@ TestDlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> apErrorModel = CreateObject<NistErrorRateModel>();
m_phyAp->SetErrorRateModel(apErrorModel);
m_phyAp->SetDevice(apDev);
m_phyAp->SetChannel(spectrumChannel);
m_phyAp->AddChannel(spectrumChannel);
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
Ptr<ConstantPositionMobilityModel> apMobility = CreateObject<ConstantPositionMobilityModel>();
m_phyAp->SetMobility(apMobility);
@@ -730,7 +730,7 @@ TestDlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> sta1ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta1->SetErrorRateModel(sta1ErrorModel);
m_phySta1->SetDevice(sta1Dev);
m_phySta1->SetChannel(spectrumChannel);
m_phySta1->AddChannel(spectrumChannel);
m_phySta1->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta1->SetReceiveOkCallback(MakeCallback(&TestDlOfdmaPhyTransmission::RxSuccessSta1, this));
m_phySta1->SetReceiveErrorCallback(
@@ -749,7 +749,7 @@ TestDlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> sta2ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta2->SetErrorRateModel(sta2ErrorModel);
m_phySta2->SetDevice(sta2Dev);
m_phySta2->SetChannel(spectrumChannel);
m_phySta2->AddChannel(spectrumChannel);
m_phySta2->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta2->SetReceiveOkCallback(MakeCallback(&TestDlOfdmaPhyTransmission::RxSuccessSta2, this));
m_phySta2->SetReceiveErrorCallback(
@@ -768,7 +768,7 @@ TestDlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> sta3ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta3->SetErrorRateModel(sta3ErrorModel);
m_phySta3->SetDevice(sta3Dev);
m_phySta3->SetChannel(spectrumChannel);
m_phySta3->AddChannel(spectrumChannel);
m_phySta3->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta3->SetReceiveOkCallback(MakeCallback(&TestDlOfdmaPhyTransmission::RxSuccessSta3, this));
m_phySta3->SetReceiveErrorCallback(
@@ -1556,7 +1556,7 @@ TestDlOfdmaPhyPuncturing::DoSetup()
Ptr<ErrorRateModel> apErrorModel = CreateObject<NistErrorRateModel>();
m_phyAp->SetErrorRateModel(apErrorModel);
m_phyAp->SetDevice(apDev);
m_phyAp->SetChannel(spectrumChannel);
m_phyAp->AddChannel(spectrumChannel);
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
Ptr<ConstantPositionMobilityModel> apMobility = CreateObject<ConstantPositionMobilityModel>();
m_phyAp->SetMobility(apMobility);
@@ -1572,7 +1572,7 @@ TestDlOfdmaPhyPuncturing::DoSetup()
Ptr<ErrorRateModel> sta1ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta1->SetErrorRateModel(sta1ErrorModel);
m_phySta1->SetDevice(sta1Dev);
m_phySta1->SetChannel(spectrumChannel);
m_phySta1->AddChannel(spectrumChannel);
m_phySta1->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta1->SetReceiveOkCallback(MakeCallback(&TestDlOfdmaPhyPuncturing::RxSuccessSta1, this));
m_phySta1->SetReceiveErrorCallback(
@@ -1591,7 +1591,7 @@ TestDlOfdmaPhyPuncturing::DoSetup()
Ptr<ErrorRateModel> sta2ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta2->SetErrorRateModel(sta2ErrorModel);
m_phySta2->SetDevice(sta2Dev);
m_phySta2->SetChannel(spectrumChannel);
m_phySta2->AddChannel(spectrumChannel);
m_phySta2->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta2->SetReceiveOkCallback(MakeCallback(&TestDlOfdmaPhyPuncturing::RxSuccessSta2, this));
m_phySta2->SetReceiveErrorCallback(
@@ -1913,7 +1913,7 @@ TestUlOfdmaPpduUid::DoSetup()
m_phyAp->SetInterferenceHelper(apInterferenceHelper);
Ptr<ErrorRateModel> apErrorModel = CreateObject<NistErrorRateModel>();
m_phyAp->SetErrorRateModel(apErrorModel);
m_phyAp->SetChannel(spectrumChannel);
m_phyAp->AddChannel(spectrumChannel);
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
DEFAULT_FREQUENCY,
@@ -1940,7 +1940,7 @@ TestUlOfdmaPpduUid::DoSetup()
m_phySta1->SetInterferenceHelper(sta1InterferenceHelper);
Ptr<ErrorRateModel> sta1ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta1->SetErrorRateModel(sta1ErrorModel);
m_phySta1->SetChannel(spectrumChannel);
m_phySta1->AddChannel(spectrumChannel);
m_phySta1->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta1->SetOperatingChannel(
WifiPhy::ChannelTuple{channelNum, DEFAULT_CHANNEL_WIDTH, (int)(WIFI_PHY_BAND_5GHZ), 0});
@@ -1960,7 +1960,7 @@ TestUlOfdmaPpduUid::DoSetup()
m_phySta2->SetInterferenceHelper(sta2InterferenceHelper);
Ptr<ErrorRateModel> sta2ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta2->SetErrorRateModel(sta2ErrorModel);
m_phySta2->SetChannel(spectrumChannel);
m_phySta2->AddChannel(spectrumChannel);
m_phySta2->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta2->SetOperatingChannel(
WifiPhy::ChannelTuple{channelNum, DEFAULT_CHANNEL_WIDTH, (int)(WIFI_PHY_BAND_5GHZ), 0});
@@ -2508,7 +2508,7 @@ TestMultipleHeTbPreambles::DoSetup()
dev->SetMac(mac);
m_phy->SetInterferenceHelper(interferenceHelper);
m_phy->SetErrorRateModel(error);
m_phy->SetChannel(spectrumChannel);
m_phy->AddChannel(spectrumChannel);
m_phy->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phy->SetOperatingChannel(WifiPhy::ChannelTuple{DEFAULT_CHANNEL_NUMBER,
DEFAULT_CHANNEL_WIDTH,
@@ -3729,7 +3729,7 @@ TestUlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> apErrorModel = CreateObject<NistErrorRateModel>();
m_phyAp->SetErrorRateModel(apErrorModel);
m_phyAp->SetDevice(apDev);
m_phyAp->SetChannel(spectrumChannel);
m_phyAp->AddChannel(spectrumChannel);
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phyAp->SetReceiveOkCallback(MakeCallback(&TestUlOfdmaPhyTransmission::RxSuccess, this));
m_phyAp->SetReceiveErrorCallback(MakeCallback(&TestUlOfdmaPhyTransmission::RxFailure, this));
@@ -3753,7 +3753,7 @@ TestUlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> sta1ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta1->SetErrorRateModel(sta1ErrorModel);
m_phySta1->SetDevice(sta1Dev);
m_phySta1->SetChannel(spectrumChannel);
m_phySta1->AddChannel(spectrumChannel);
m_phySta1->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta1->SetPreambleDetectionModel(preambleDetectionModel);
Ptr<ConstantPositionMobilityModel> sta1Mobility = CreateObject<ConstantPositionMobilityModel>();
@@ -3772,7 +3772,7 @@ TestUlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> sta2ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta2->SetErrorRateModel(sta2ErrorModel);
m_phySta2->SetDevice(sta2Dev);
m_phySta2->SetChannel(spectrumChannel);
m_phySta2->AddChannel(spectrumChannel);
m_phySta2->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta2->SetPreambleDetectionModel(preambleDetectionModel);
Ptr<ConstantPositionMobilityModel> sta2Mobility = CreateObject<ConstantPositionMobilityModel>();
@@ -3791,7 +3791,7 @@ TestUlOfdmaPhyTransmission::DoSetup()
Ptr<ErrorRateModel> sta3ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta3->SetErrorRateModel(sta3ErrorModel);
m_phySta3->SetDevice(sta3Dev);
m_phySta3->SetChannel(spectrumChannel);
m_phySta3->AddChannel(spectrumChannel);
m_phySta3->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta3->SetPreambleDetectionModel(preambleDetectionModel);
Ptr<ConstantPositionMobilityModel> sta3Mobility = CreateObject<ConstantPositionMobilityModel>();
@@ -5087,7 +5087,7 @@ TestPhyPaddingExclusion::DoSetup()
Ptr<ErrorRateModel> apErrorModel = CreateObject<NistErrorRateModel>();
m_phyAp->SetErrorRateModel(apErrorModel);
m_phyAp->SetDevice(apDev);
m_phyAp->SetChannel(spectrumChannel);
m_phyAp->AddChannel(spectrumChannel);
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phyAp->AssignStreams(streamNumber);
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
@@ -5117,7 +5117,7 @@ TestPhyPaddingExclusion::DoSetup()
Ptr<ErrorRateModel> sta1ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta1->SetErrorRateModel(sta1ErrorModel);
m_phySta1->SetDevice(sta1Dev);
m_phySta1->SetChannel(spectrumChannel);
m_phySta1->AddChannel(spectrumChannel);
m_phySta1->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta1->AssignStreams(streamNumber);
m_phySta1->SetOperatingChannel(
@@ -5138,7 +5138,7 @@ TestPhyPaddingExclusion::DoSetup()
Ptr<ErrorRateModel> sta2ErrorModel = CreateObject<NistErrorRateModel>();
m_phySta2->SetErrorRateModel(sta2ErrorModel);
m_phySta2->SetDevice(sta2Dev);
m_phySta2->SetChannel(spectrumChannel);
m_phySta2->AddChannel(spectrumChannel);
m_phySta2->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phySta2->AssignStreams(streamNumber);
m_phySta2->SetOperatingChannel(

View File

@@ -182,7 +182,7 @@ WifiPhyReceptionTest::DoSetup()
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel>();
m_phy->SetErrorRateModel(error);
m_phy->SetDevice(dev);
m_phy->SetChannel(spectrumChannel);
m_phy->AddChannel(spectrumChannel);
m_phy->SetOperatingChannel(WifiPhy::ChannelTuple{CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
m_phy->ConfigureStandard(WIFI_STANDARD_80211ax);
dev->SetPhy(m_phy);
@@ -4418,7 +4418,7 @@ TestUnsupportedBandwidthReception::DoSetup()
auto rxErrorRateModel = CreateObject<NistErrorRateModel>();
m_rxPhy->SetErrorRateModel(rxErrorRateModel);
m_rxPhy->SetDevice(dev);
m_rxPhy->SetChannel(spectrumChannel);
m_rxPhy->AddChannel(spectrumChannel);
m_rxPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
dev->SetPhy(m_rxPhy);
node->AddDevice(dev);
@@ -4436,7 +4436,7 @@ TestUnsupportedBandwidthReception::DoSetup()
m_txPhy->SetInterferenceHelper(txInterferenceHelper);
auto txErrorRateModel = CreateObject<NistErrorRateModel>();
m_txPhy->SetErrorRateModel(txErrorRateModel);
m_txPhy->SetChannel(spectrumChannel);
m_txPhy->AddChannel(spectrumChannel);
m_txPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
}
@@ -4570,7 +4570,7 @@ TestPrimary20CoveredByPpdu::DoSetup()
m_rxPhy->SetInterferenceHelper(rxInterferenceHelper);
auto rxErrorRateModel = CreateObject<NistErrorRateModel>();
m_rxPhy->SetErrorRateModel(rxErrorRateModel);
m_rxPhy->SetChannel(CreateObject<MultiModelSpectrumChannel>());
m_rxPhy->AddChannel(CreateObject<MultiModelSpectrumChannel>());
m_rxPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
m_txPhy = CreateObject<SpectrumWifiPhy>();
@@ -4578,7 +4578,7 @@ TestPrimary20CoveredByPpdu::DoSetup()
m_txPhy->SetInterferenceHelper(txInterferenceHelper);
auto txErrorRateModel = CreateObject<NistErrorRateModel>();
m_txPhy->SetErrorRateModel(txErrorRateModel);
m_txPhy->SetChannel(CreateObject<MultiModelSpectrumChannel>());
m_txPhy->AddChannel(CreateObject<MultiModelSpectrumChannel>());
m_txPhy->ConfigureStandard(WIFI_STANDARD_80211ax);
}

View File

@@ -265,7 +265,7 @@ WifiPhyThresholdsTest::DoSetup()
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel>();
m_phy->SetErrorRateModel(error);
m_phy->SetDevice(dev);
m_phy->SetChannel(spectrumChannel);
m_phy->AddChannel(spectrumChannel);
m_phy->SetOperatingChannel(WifiPhy::ChannelTuple{CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
m_phy->ConfigureStandard(WIFI_STANDARD_80211ax);
m_phy->SetReceiveOkCallback(MakeCallback(&WifiPhyThresholdsTest::RxSuccess, this));