Test static setup of the EMLSR mode. More...
Public Member Functions | |
WifiStaticEmlsrTest (const WifiStaticEmlsrTestVector &testVec) | |
Constructor. | |
![]() | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. | |
WifiMacHelper | GetApMacHelper () const |
WifiMacHelper | GetClientMacHelper () const |
SpectrumWifiPhyHelper | GetPhyHelper (const std::vector< std::string > &settings, const WifiStaticEmlsrTestConstants::ChannelMap &channelMap) const |
Construct PHY helper based on input operating channels. | |
WifiHelper | GetWifiHelper () const |
Ptr< WifiNetDevice > | GetWifiNetDevice (bool isAp, const WifiStaticEmlsrTestConstants::ChannelMap &channelMap) |
Construct WifiNetDevice. | |
void | ValidateEmlsr () |
Validate EMLSR setup. | |
Private Attributes | |
Ptr< WifiNetDevice > | m_apDev {nullptr} |
AP WiFi device. | |
Ptr< WifiNetDevice > | m_clientDev {nullptr} |
client WiFi device | |
WifiStaticEmlsrTestVector | m_testVec |
Test vector. | |
Additional Inherited Members | |
![]() | |
enum class | Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
Constructor. | |
void | AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK) |
Add an individual child TestCase to this test suite. | |
TestCase * | GetParent () const |
Get the parent of this TestCase. | |
bool | IsStatusFailure () const |
Check if any tests failed. | |
bool | IsStatusSuccess () const |
Check if all tests passed. | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. | |
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. | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. | |
Test static setup of the EMLSR mode.
It is checked that:
Definition at line 88 of file wifi-static-emlsr-test.cc.
WifiStaticEmlsrTest::WifiStaticEmlsrTest | ( | const WifiStaticEmlsrTestVector & | testVec | ) |
Constructor.
testVec | the test vector |
Definition at line 129 of file wifi-static-emlsr-test.cc.
References ns3::TestCase::TestCase(), and m_testVec.
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 270 of file wifi-static-emlsr-test.cc.
References WifiStaticEmlsrTestConstants::DEFAULT_SIM_STOP_TIME, ns3::Simulator::Destroy(), ns3::Simulator::Run(), ns3::Simulator::Stop(), and ValidateEmlsr().
|
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 218 of file wifi-static-emlsr-test.cc.
References ns3::CreateObject(), WifiStaticEmlsrTestConstants::DEFAULT_RNG_RUN, WifiStaticEmlsrTestConstants::DEFAULT_RNG_SEED, GetWifiNetDevice(), m_apDev, m_clientDev, NS_ASSERT, ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::WifiStaticSetupHelper::SetStaticAssociation(), ns3::WifiStaticSetupHelper::SetStaticEmlsr(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PHY_BAND_6GHZ.
|
private |
Definition at line 174 of file wifi-static-emlsr-test.cc.
References WifiStaticEmlsrTestConstants::DEFAULT_BEACON_GEN, WifiStaticEmlsrTestConstants::DEFAULT_SSID, and ns3::WifiMacHelper::SetType().
Referenced by GetWifiNetDevice().
|
private |
Definition at line 188 of file wifi-static-emlsr-test.cc.
References WifiStaticEmlsrTestConstants::DEFAULT_SSID, m_testVec, ns3::WifiMacHelper::SetEmlsrManager(), and ns3::WifiMacHelper::SetType().
Referenced by GetWifiNetDevice().
|
private |
Construct PHY helper based on input operating channels.
settings | vector of strings specifying the operating channels to configure |
channelMap | created spectrum channels |
Definition at line 151 of file wifi-static-emlsr-test.cc.
References ns3::SpectrumWifiPhyHelper::AddChannel(), ns3::SpectrumWifiPhyHelper::AddPhyToFreqRangeMapping(), ns3::WifiChannelConfig::FromString(), ns3::GetFrequencyRange(), m_testVec, NS_ASSERT, and ns3::WifiPhyHelper::Set().
Referenced by GetWifiNetDevice().
|
private |
Definition at line 136 of file wifi-static-emlsr-test.cc.
References ns3::WifiHelper::ConfigEhtOptions(), WifiStaticEmlsrTestConstants::DEFAULT_CONTROL_MODE, WifiStaticEmlsrTestConstants::DEFAULT_DATA_MODE, WifiStaticEmlsrTestConstants::DEFAULT_WIFI_STANDARD, ns3::WifiHelper::SetRemoteStationManager(), and ns3::WifiHelper::SetStandard().
Referenced by GetWifiNetDevice().
|
private |
Construct WifiNetDevice.
isAp | true if AP, false otherwise |
channelMap | created spectrum channels |
Definition at line 204 of file wifi-static-emlsr-test.cc.
References ns3::WifiHelper::AssignStreams(), WifiStaticEmlsrTestConstants::DEFAULT_AP_CHS, WifiStaticEmlsrTestConstants::DEFAULT_STREAM_INDEX, ns3::DynamicCast(), GetApMacHelper(), GetClientMacHelper(), GetPhyHelper(), GetWifiHelper(), and m_testVec.
Referenced by DoSetup().
|
private |
Validate EMLSR setup.
Definition at line 238 of file wifi-static-emlsr-test.cc.
References ns3::DynamicCast(), m_apDev, m_clientDev, m_testVec, NS_ASSERT_MSG, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
private |
AP WiFi device.
Definition at line 125 of file wifi-static-emlsr-test.cc.
Referenced by DoSetup(), and ValidateEmlsr().
|
private |
client WiFi device
Definition at line 126 of file wifi-static-emlsr-test.cc.
Referenced by DoSetup(), and ValidateEmlsr().
|
private |
Test vector.
Definition at line 124 of file wifi-static-emlsr-test.cc.
Referenced by WifiStaticEmlsrTest(), GetClientMacHelper(), GetPhyHelper(), GetWifiNetDevice(), and ValidateEmlsr().