UL-OFDMA PPDU UID attribution test. More...
Public Member Functions | |
TestUlOfdmaPpduUid () | |
~TestUlOfdmaPpduUid () override | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | CheckUid (uint16_t staId, uint64_t expectedUid) |
Check the UID of the transmitted PPDU. More... | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. More... | |
void | DoTeardown () override |
Implementation to do any local setup required for this TestCase. More... | |
void | ResetPpduUid () |
Reset the global PPDU UID counter in WifiPhy. More... | |
void | SendMuPpdu () |
Send MU-PPDU toward both STAs. More... | |
void | SendSuPpdu (uint16_t txStaId) |
Send SU-PPDU function. More... | |
void | SendTbPpdu () |
Send TB-PPDU from both STAs. More... | |
void | TxPpduAp (uint64_t uid) |
Transmitted PPDU information function for AP. More... | |
void | TxPpduSta1 (uint64_t uid) |
Transmitted PPDU information function for STA 1. More... | |
void | TxPpduSta2 (uint64_t uid) |
Transmitted PPDU information function for STA 2. More... | |
Private Attributes | |
Ptr< OfdmaSpectrumWifiPhy > | m_phyAp |
PHY of AP. More... | |
Ptr< OfdmaSpectrumWifiPhy > | m_phySta1 |
PHY of STA 1. More... | |
Ptr< OfdmaSpectrumWifiPhy > | m_phySta2 |
PHY of STA 2. More... | |
uint64_t | m_ppduUidAp |
UID of PPDU transmitted by AP. More... | |
uint64_t | m_ppduUidSta1 |
UID of PPDU transmitted by STA1. More... | |
uint64_t | m_ppduUidSta2 |
UID of PPDU transmitted by STA2. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
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 TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () 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 () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () 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... | |
UL-OFDMA PPDU UID attribution test.
Definition at line 1826 of file wifi-phy-ofdma-test.cc.
TestUlOfdmaPpduUid::TestUlOfdmaPpduUid | ( | ) |
Definition at line 1887 of file wifi-phy-ofdma-test.cc.
|
override |
Definition at line 1895 of file wifi-phy-ofdma-test.cc.
|
private |
Check the UID of the transmitted PPDU.
staId | the STA-ID of the PHY (0 for AP) |
expectedUid | the expected UID |
Definition at line 1990 of file wifi-phy-ofdma-test.cc.
References m_ppduUidAp, m_ppduUidSta1, m_ppduUidSta2, ns3::Now(), NS_ABORT_MSG, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 2215 of file wifi-phy-ofdma-test.cc.
References ns3::WifiPhy::AssignStreams(), CheckUid(), m_phyAp, m_phySta1, m_phySta2, ResetPpduUid(), ns3::Seconds(), SendMuPpdu(), SendSuPpdu(), and SendTbPpdu().
|
overrideprivatevirtual |
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 1900 of file wifi-phy-ofdma-test.cc.
References ns3::SpectrumWifiPhy::AddChannel(), ns3::Node::AddDevice(), ns3::Object::AggregateObject(), ns3::WifiPhy::ConfigureStandard(), DEFAULT_CHANNEL_WIDTH, DEFAULT_FREQUENCY, m_phyAp, m_phySta1, m_phySta2, ns3::MakeCallback(), ns3::SpectrumWifiPhy::SetDevice(), ns3::WifiPhy::SetErrorRateModel(), ns3::WifiNetDevice::SetHeConfiguration(), ns3::WifiPhy::SetInterferenceHelper(), ns3::WifiPhy::SetMobility(), ns3::WifiPhy::SetOperatingChannel(), ns3::WifiNetDevice::SetPhy(), ns3::WifiNetDevice::SetStandard(), ns3::ObjectBase::TraceConnectWithoutContext(), TxPpduAp(), TxPpduSta1(), TxPpduSta2(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_STANDARD_80211ax.
|
overrideprivatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test teardown
Reimplemented from ns3::TestCase.
Definition at line 1979 of file wifi-phy-ofdma-test.cc.
References ns3::Object::Dispose(), m_phyAp, m_phySta1, and m_phySta2.
|
private |
Reset the global PPDU UID counter in WifiPhy.
Definition at line 2039 of file wifi-phy-ofdma-test.cc.
References m_phyAp, NS_LOG_FUNCTION, and OfdmaSpectrumWifiPhy::SetPpduUid().
Referenced by DoRun().
|
private |
Send MU-PPDU toward both STAs.
Definition at line 2046 of file wifi-phy-ofdma-test.cc.
References DEFAULT_CHANNEL_WIDTH, m_phyAp, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiTxVector::SetRu(), ns3::WifiTxVector::SetRuAllocation(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiTxVector::SetSigBMode(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_MU.
Referenced by DoRun().
|
private |
Send SU-PPDU function.
txStaId | the ID of the sending STA |
Definition at line 2175 of file wifi-phy-ofdma-test.cc.
References DEFAULT_CHANNEL_WIDTH, m_phyAp, m_phySta1, m_phySta2, NS_ABORT_MSG, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::SU_STA_ID, ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_SU.
Referenced by DoRun().
|
private |
Send TB-PPDU from both STAs.
Definition at line 2096 of file wifi-phy-ofdma-test.cc.
References ns3::WifiPhy::CalculateTxDuration(), DEFAULT_CHANNEL_WIDTH, ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetPhyEntity(), ns3::WifiPsdu::GetSize(), m_phyAp, m_phySta1, m_phySta2, max, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiTxVector::SetLength(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiTxVector::SetRu(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, ns3::WIFI_MOD_CLASS_HE, and ns3::WIFI_PREAMBLE_HE_TB.
Referenced by DoRun().
|
private |
Transmitted PPDU information function for AP.
uid | the UID of the transmitted PPDU |
Definition at line 2018 of file wifi-phy-ofdma-test.cc.
References m_ppduUidAp, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Transmitted PPDU information function for STA 1.
uid | the UID of the transmitted PPDU |
Definition at line 2025 of file wifi-phy-ofdma-test.cc.
References m_ppduUidSta1, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Transmitted PPDU information function for STA 2.
uid | the UID of the transmitted PPDU |
Definition at line 2032 of file wifi-phy-ofdma-test.cc.
References m_ppduUidSta2, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
PHY of AP.
Definition at line 1878 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), ResetPpduUid(), SendMuPpdu(), SendSuPpdu(), and SendTbPpdu().
|
private |
PHY of STA 1.
Definition at line 1879 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), SendSuPpdu(), and SendTbPpdu().
|
private |
PHY of STA 2.
Definition at line 1880 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), SendSuPpdu(), and SendTbPpdu().
|
private |
UID of PPDU transmitted by AP.
Definition at line 1882 of file wifi-phy-ofdma-test.cc.
Referenced by CheckUid(), and TxPpduAp().
|
private |
UID of PPDU transmitted by STA1.
Definition at line 1883 of file wifi-phy-ofdma-test.cc.
Referenced by CheckUid(), and TxPpduSta1().
|
private |
UID of PPDU transmitted by STA2.
Definition at line 1884 of file wifi-phy-ofdma-test.cc.
Referenced by CheckUid(), and TxPpduSta2().