DL-OFDMA PHY test. More...
Public Member Functions | |
TestDlOfdmaPhyTransmission () | |
virtual | ~TestDlOfdmaPhyTransmission () |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
void | CheckPhyState (Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState) |
Schedule now to check the PHY state. More... | |
void | CheckResultsSta1 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes) |
Check the results for STA 1. More... | |
void | CheckResultsSta2 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes) |
Check the results for STA 2. More... | |
void | CheckResultsSta3 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes) |
Check the results for STA 3. More... | |
void | DoCheckPhyState (Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState) |
Check the PHY state now. More... | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
virtual void | DoSetup (void) |
Implementation to do any local setup required for this TestCase. More... | |
void | GenerateInterference (Ptr< SpectrumValue > interferencePsd, Time duration) |
Generate interference function. More... | |
void | ResetResults () |
Reset the results. More... | |
void | RunOne () |
Run one function. More... | |
void | RxFailureSta1 (Ptr< WifiPsdu > psdu) |
Receive failure function for STA 1. More... | |
void | RxFailureSta2 (Ptr< WifiPsdu > psdu) |
Receive failure function for STA 2. More... | |
void | RxFailureSta3 (Ptr< WifiPsdu > psdu) |
Receive failure function for STA 3. More... | |
void | RxSuccessSta1 (Ptr< WifiPsdu > psdu, double snr, WifiTxVector txVector, std::vector< bool > statusPerMpdu) |
Receive success function for STA 1. More... | |
void | RxSuccessSta2 (Ptr< WifiPsdu > psdu, double snr, WifiTxVector txVector, std::vector< bool > statusPerMpdu) |
Receive success function for STA 2. More... | |
void | RxSuccessSta3 (Ptr< WifiPsdu > psdu, double snr, WifiTxVector txVector, std::vector< bool > statusPerMpdu) |
Receive success function for STA 3. More... | |
void | SendMuPpdu (uint16_t rxStaId1, uint16_t rxStaId2) |
Send MU-PPDU function. More... | |
void | StopInterference (void) |
Stop interference function. More... | |
Private Attributes | |
uint16_t | m_channelWidth |
channel width in MHz More... | |
uint32_t | m_countRxBytesSta1 |
count RX bytes for STA 1 More... | |
uint32_t | m_countRxBytesSta2 |
count RX bytes for STA 2 More... | |
uint32_t | m_countRxBytesSta3 |
count RX bytes for STA 3 More... | |
uint32_t | m_countRxFailureSta1 |
count RX failure for STA 1 More... | |
uint32_t | m_countRxFailureSta2 |
count RX failure for STA 2 More... | |
uint32_t | m_countRxFailureSta3 |
count RX failure for STA 3 More... | |
uint32_t | m_countRxSuccessSta1 |
count RX success for STA 1 More... | |
uint32_t | m_countRxSuccessSta2 |
count RX success for STA 2 More... | |
uint32_t | m_countRxSuccessSta3 |
count RX success for STA 3 More... | |
Time | m_expectedPpduDuration |
expected duration to send MU PPDU More... | |
uint16_t | m_frequency |
frequency in MHz More... | |
Ptr< SpectrumWifiPhy > | m_phyAp |
PHY of AP. More... | |
Ptr< WaveformGenerator > | m_phyInterferer |
PHY of interferer. More... | |
Ptr< OfdmaSpectrumWifiPhy > | m_phySta1 |
PHY of STA 1. More... | |
Ptr< OfdmaSpectrumWifiPhy > | m_phySta2 |
PHY of STA 2. More... | |
Ptr< OfdmaSpectrumWifiPhy > | m_phySta3 |
PHY of STA 3. More... | |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCsse. More... | |
bool | IsStatusFailure (void) const |
Check if any tests failed. More... | |
bool | IsStatusSuccess (void) const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
Log the failure of this TestCase. More... | |
bool | MustAssertOnFailure (void) const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure (void) const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
DL-OFDMA PHY test.
Definition at line 92 of file wifi-phy-ofdma-test.cc.
TestDlOfdmaPhyTransmission::TestDlOfdmaPhyTransmission | ( | ) |
Definition at line 227 of file wifi-phy-ofdma-test.cc.
|
virtual |
Definition at line 338 of file wifi-phy-ofdma-test.cc.
References m_phyAp, m_phyInterferer, m_phySta1, m_phySta2, and m_phySta3.
|
private |
Schedule now to check the PHY state.
phy | the PHY |
expectedState | the expected state of the PHY |
Definition at line 417 of file wifi-phy-ofdma-test.cc.
References DoCheckPhyState(), and third::phy.
Referenced by RunOne().
|
private |
Check the results for STA 1.
expectedRxSuccess | the expected number of RX success |
expectedRxFailure | the expected number of RX failures |
expectedRxBytes | the expected number of RX bytes |
Definition at line 393 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta1, m_countRxFailureSta1, m_countRxSuccessSta1, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
|
private |
Check the results for STA 2.
expectedRxSuccess | the expected number of RX success |
expectedRxFailure | the expected number of RX failures |
expectedRxBytes | the expected number of RX bytes |
Definition at line 401 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta2, m_countRxFailureSta2, m_countRxSuccessSta2, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
|
private |
Check the results for STA 3.
expectedRxSuccess | the expected number of RX success |
expectedRxFailure | the expected number of RX failures |
expectedRxBytes | the expected number of RX bytes |
Definition at line 409 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta3, m_countRxFailureSta3, m_countRxSuccessSta3, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
|
private |
Check the PHY state now.
phy | the PHY |
expectedState | the expected state of the PHY |
Definition at line 424 of file wifi-phy-ofdma-test.cc.
References ns3::PointerValue::Get(), ns3::WifiPhyStateHelper::GetState(), ns3::Now(), NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and third::phy.
Referenced by CheckPhyState().
|
privatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 700 of file wifi-phy-ofdma-test.cc.
References m_channelWidth, m_expectedPpduDuration, m_frequency, ns3::NanoSeconds(), and RunOne().
|
privatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.
Reimplemented from ns3::TestCase.
Definition at line 436 of file wifi-phy-ofdma-test.cc.
References ns3::Node::AddDevice(), ns3::SpectrumChannel::AddPropagationLossModel(), ns3::Object::AggregateObject(), ns3::SpectrumWifiPhy::ConfigureStandardAndBand(), ns3::SpectrumWifiPhy::CreateWifiSpectrumPhyInterface(), m_frequency, m_phyAp, m_phyInterferer, m_phySta1, m_phySta2, m_phySta3, ns3::MakeCallback(), RxFailureSta1(), RxFailureSta2(), RxFailureSta3(), RxSuccessSta1(), RxSuccessSta2(), RxSuccessSta3(), ns3::WaveformGenerator::SetChannel(), ns3::SpectrumWifiPhy::SetChannel(), ns3::WaveformGenerator::SetDevice(), ns3::WifiPhy::SetDevice(), ns3::WaveformGenerator::SetDutyCycle(), ns3::WifiPhy::SetErrorRateModel(), ns3::WifiPhy::SetMobility(), ns3::SpectrumChannel::SetPropagationDelayModel(), ns3::WifiPhy::SetReceiveErrorCallback(), ns3::WifiPhy::SetReceiveOkCallback(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PHY_STANDARD_80211ax.
|
private |
Generate interference function.
interferencePsd | the PSD of the interference to be generated |
duration | the duration of the interference |
Definition at line 324 of file wifi-phy-ofdma-test.cc.
References m_phyInterferer, ns3::WaveformGenerator::SetPeriod(), ns3::WaveformGenerator::SetTxPowerSpectralDensity(), ns3::WaveformGenerator::Start(), and StopInterference().
Referenced by RunOne().
|
private |
Reset the results.
Definition at line 245 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta1, m_countRxBytesSta2, m_countRxBytesSta3, m_countRxFailureSta1, m_countRxFailureSta2, m_countRxFailureSta3, m_countRxSuccessSta1, m_countRxSuccessSta2, and m_countRxSuccessSta3.
Referenced by RunOne().
|
private |
Run one function.
Definition at line 518 of file wifi-phy-ofdma-test.cc.
References ns3::WifiPhy::AssignStreams(), CCA_BUSY, CheckPhyState(), CheckResultsSta1(), CheckResultsSta2(), CheckResultsSta3(), ns3::BandInfo::fc, ns3::BandInfo::fh, ns3::BandInfo::fl, GenerateInterference(), IDLE, m_channelWidth, m_expectedPpduDuration, m_frequency, m_phyAp, m_phySta1, m_phySta2, m_phySta3, ns3::MicroSeconds(), ns3::MilliSeconds(), ns3::NanoSeconds(), ResetResults(), RX, ns3::Seconds(), SendMuPpdu(), ns3::SpectrumWifiPhy::SetChannelWidth(), and ns3::SpectrumWifiPhy::SetFrequency().
Referenced by DoRun().
Receive failure function for STA 1.
psdu | the PSDU |
Definition at line 372 of file wifi-phy-ofdma-test.cc.
References m_countRxFailureSta1, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Receive failure function for STA 2.
psdu | the PSDU |
Definition at line 379 of file wifi-phy-ofdma-test.cc.
References m_countRxFailureSta2, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Receive failure function for STA 3.
psdu | the PSDU |
Definition at line 386 of file wifi-phy-ofdma-test.cc.
References m_countRxFailureSta3, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Receive success function for STA 1.
psdu | the PSDU |
snr | the SNR |
txVector | the transmit vector |
statusPerMpdu | reception status per MPDU |
Definition at line 348 of file wifi-phy-ofdma-test.cc.
References ns3::WifiPsdu::GetSize(), m_countRxBytesSta1, m_countRxSuccessSta1, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Receive success function for STA 2.
psdu | the PSDU |
snr | the SNR |
txVector | the transmit vector |
statusPerMpdu | reception status per MPDU |
Definition at line 356 of file wifi-phy-ofdma-test.cc.
References ns3::WifiPsdu::GetSize(), m_countRxBytesSta2, m_countRxSuccessSta2, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Receive success function for STA 3.
psdu | the PSDU |
snr | the SNR |
txVector | the transmit vector |
statusPerMpdu | reception status per MPDU |
Definition at line 364 of file wifi-phy-ofdma-test.cc.
References ns3::WifiPsdu::GetSize(), m_countRxBytesSta3, m_countRxSuccessSta3, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Send MU-PPDU function.
rxStaId1 | the ID of the recipient STA for the first PSDU |
rxStaId2 | the ID of the recipient STA for the second PSDU |
Definition at line 259 of file wifi-phy-ofdma-test.cc.
References ns3::HeRu::RuSpec::index, m_channelWidth, m_phyAp, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::HeRu::RuSpec::primary80MHz, ns3::HeRu::RuSpec::ruType, ns3::WifiPhy::Send(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiTxVector::SetRu(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_MU.
Referenced by RunOne().
|
private |
Stop interference function.
Definition at line 333 of file wifi-phy-ofdma-test.cc.
References m_phyInterferer, and ns3::WaveformGenerator::Stop().
Referenced by GenerateInterference().
|
private |
channel width in MHz
Definition at line 223 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), RunOne(), and SendMuPpdu().
|
private |
count RX bytes for STA 1
Definition at line 212 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta1(), ResetResults(), and RxSuccessSta1().
|
private |
count RX bytes for STA 2
Definition at line 213 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta2(), ResetResults(), and RxSuccessSta2().
|
private |
count RX bytes for STA 3
Definition at line 214 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta3(), ResetResults(), and RxSuccessSta3().
|
private |
count RX failure for STA 1
Definition at line 209 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta1(), ResetResults(), and RxFailureSta1().
|
private |
count RX failure for STA 2
Definition at line 210 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta2(), ResetResults(), and RxFailureSta2().
|
private |
count RX failure for STA 3
Definition at line 211 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta3(), ResetResults(), and RxFailureSta3().
|
private |
count RX success for STA 1
Definition at line 206 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta1(), ResetResults(), and RxSuccessSta1().
|
private |
count RX success for STA 2
Definition at line 207 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta2(), ResetResults(), and RxSuccessSta2().
|
private |
count RX success for STA 3
Definition at line 208 of file wifi-phy-ofdma-test.cc.
Referenced by CheckResultsSta3(), ResetResults(), and RxSuccessSta3().
|
private |
expected duration to send MU PPDU
Definition at line 224 of file wifi-phy-ofdma-test.cc.
|
private |
frequency in MHz
Definition at line 222 of file wifi-phy-ofdma-test.cc.
|
private |
PHY of AP.
Definition at line 216 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), RunOne(), SendMuPpdu(), and ~TestDlOfdmaPhyTransmission().
|
private |
PHY of interferer.
Definition at line 220 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), GenerateInterference(), StopInterference(), and ~TestDlOfdmaPhyTransmission().
|
private |
PHY of STA 1.
Definition at line 217 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), RunOne(), and ~TestDlOfdmaPhyTransmission().
|
private |
PHY of STA 2.
Definition at line 218 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), RunOne(), and ~TestDlOfdmaPhyTransmission().
|
private |
PHY of STA 3.
Definition at line 219 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), RunOne(), and ~TestDlOfdmaPhyTransmission().