A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
WifiStaticEmlsrTest Class Reference

Test static setup of the EMLSR mode. More...

+ Inheritance diagram for WifiStaticEmlsrTest:
+ Collaboration diagram for WifiStaticEmlsrTest:

Public Member Functions

 WifiStaticEmlsrTest (const WifiStaticEmlsrTestVector &testVec)
 Constructor.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (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< WifiNetDeviceGetWifiNetDevice (bool isAp, const WifiStaticEmlsrTestConstants::ChannelMap &channelMap)
 Construct WifiNetDevice.
 
void ValidateEmlsr ()
 Validate EMLSR setup.
 

Private Attributes

Ptr< WifiNetDevicem_apDev {nullptr}
 AP WiFi device.
 
Ptr< WifiNetDevicem_clientDev {nullptr}
 client WiFi device
 
WifiStaticEmlsrTestVector m_testVec
 Test vector.
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum class  Duration { 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.
 
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
 
TestCaseGetParent () 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.
 

Detailed Description

Test static setup of the EMLSR mode.

It is checked that:

  • EMLSR mode is enabled on the expected set of links, both at client side and AP MLD side
  • the channel switch delay is configured on the client links as expected

Definition at line 88 of file wifi-static-emlsr-test.cc.

Constructor & Destructor Documentation

◆ WifiStaticEmlsrTest()

WifiStaticEmlsrTest::WifiStaticEmlsrTest ( const WifiStaticEmlsrTestVector & testVec)

Constructor.

Parameters
testVecthe test vector

Definition at line 129 of file wifi-static-emlsr-test.cc.

References ns3::TestCase::TestCase(), and m_testVec.

+ Here is the call graph for this function:

Member Function Documentation

◆ DoRun()

void WifiStaticEmlsrTest::DoRun ( )
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().

+ Here is the call graph for this function:

◆ DoSetup()

void WifiStaticEmlsrTest::DoSetup ( )
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.

+ Here is the call graph for this function:

◆ GetApMacHelper()

WifiMacHelper WifiStaticEmlsrTest::GetApMacHelper ( ) const
private
Returns
the AP MAC helper

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetClientMacHelper()

WifiMacHelper WifiStaticEmlsrTest::GetClientMacHelper ( ) const
private
Returns
the Client MAC helper

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPhyHelper()

SpectrumWifiPhyHelper WifiStaticEmlsrTest::GetPhyHelper ( const std::vector< std::string > & settings,
const WifiStaticEmlsrTestConstants::ChannelMap & channelMap ) const
private

Construct PHY helper based on input operating channels.

Parameters
settingsvector of strings specifying the operating channels to configure
channelMapcreated spectrum channels
Returns
PHY helper

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWifiHelper()

WifiHelper WifiStaticEmlsrTest::GetWifiHelper ( ) const
private
Returns
the WifiHelper

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWifiNetDevice()

Ptr< WifiNetDevice > WifiStaticEmlsrTest::GetWifiNetDevice ( bool isAp,
const WifiStaticEmlsrTestConstants::ChannelMap & channelMap )
private

Construct WifiNetDevice.

Parameters
isAptrue if AP, false otherwise
channelMapcreated spectrum channels
Returns
constructed WifiNetDevice

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValidateEmlsr()

void WifiStaticEmlsrTest::ValidateEmlsr ( )
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_apDev

Ptr<WifiNetDevice> WifiStaticEmlsrTest::m_apDev {nullptr}
private

AP WiFi device.

Definition at line 125 of file wifi-static-emlsr-test.cc.

Referenced by DoSetup(), and ValidateEmlsr().

◆ m_clientDev

Ptr<WifiNetDevice> WifiStaticEmlsrTest::m_clientDev {nullptr}
private

client WiFi device

Definition at line 126 of file wifi-static-emlsr-test.cc.

Referenced by DoSetup(), and ValidateEmlsr().

◆ m_testVec

WifiStaticEmlsrTestVector WifiStaticEmlsrTest::m_testVec
private

The documentation for this class was generated from the following file: