Test static setup of an infrastructure BSS. More...
Public Member Functions | |
WifiStaticInfraBssTest (const WifiStaticInfraBssTestVector &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 StringVector &settings, const ChannelMap &channelMap) const |
Construct PHY helper based on input operating channels. | |
WifiHelper | GetWifiHelper () const |
Ptr< WifiNetDevice > | GetWifiNetDevice (bool isAp, const ChannelMap &channelMap) |
Construct WifiNetDevice. | |
void | ValidateAssoc () |
Validate Association. | |
void | ValidateAssocForLink (linkId_t clientLinkId, Ptr< ApWifiMac > apMac, Ptr< StaWifiMac > clientMac) |
Validate association state machine at AP and client for input link. | |
void | ValidateBaAgr (Ptr< ApWifiMac > apMac, Ptr< StaWifiMac > clientMac) |
Validate Block ACK Agreement at AP and client. | |
void | ValidateMuScheduler (Ptr< ApWifiMac > apMac, Ptr< StaWifiMac > clientMac) |
Validate Multi-user scheduler setup. | |
Private Attributes | |
Ptr< WifiNetDevice > | m_apDev {nullptr} |
AP WiFi device. | |
std::optional< Mac48Address > | m_apGcrGroupAddr |
GCR group address. | |
Ptr< WifiNetDevice > | m_clientDev {nullptr} |
client WiFi device | |
WifiStaticInfraBssTestVector | 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 an infrastructure BSS.
Definition at line 88 of file wifi-static-infra-bss-test.cc.
WifiStaticInfraBssTest::WifiStaticInfraBssTest | ( | const WifiStaticInfraBssTestVector & | testVec | ) |
Constructor.
testVec | the test vector |
Definition at line 148 of file wifi-static-infra-bss-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 403 of file wifi-static-infra-bss-test.cc.
References WifiStaticInfraBssTestConstants::DEFAULT_SIM_STOP_TIME, ns3::Simulator::Destroy(), ns3::Simulator::Run(), ns3::Simulator::Stop(), and ValidateAssoc().
|
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 236 of file wifi-static-infra-bss-test.cc.
References ns3::Mac48Address::ConvertFrom(), ns3::CreateObject(), WifiStaticInfraBssTestConstants::DEFAULT_RNG_RUN, WifiStaticInfraBssTestConstants::DEFAULT_RNG_SEED, WifiStaticInfraBssTestConstants::DEFAULT_TEST_TID, GetWifiNetDevice(), m_apDev, m_apGcrGroupAddr, m_clientDev, m_testVec, NS_ASSERT, NS_ASSERT_MSG, ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::WifiStaticSetupHelper::SetStaticAssociation(), ns3::WifiStaticSetupHelper::SetStaticBlockAck(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PHY_BAND_6GHZ.
|
private |
Definition at line 191 of file wifi-static-infra-bss-test.cc.
References WifiStaticInfraBssTestConstants::DEFAULT_BEACON_GEN, WifiStaticInfraBssTestConstants::DEFAULT_SSID, WifiStaticInfraBssTestConstants::DEFAULT_WIFI_UL_MU_NUM_RU, m_testVec, ns3::WifiMacHelper::SetMultiUserScheduler(), and ns3::WifiMacHelper::SetType().
Referenced by GetWifiNetDevice().
|
private |
Definition at line 210 of file wifi-static-infra-bss-test.cc.
References WifiStaticInfraBssTestConstants::DEFAULT_SSID, m_testVec, 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 168 of file wifi-static-infra-bss-test.cc.
References ns3::SpectrumWifiPhyHelper::AddChannel(), ns3::SpectrumWifiPhyHelper::AddPhyToFreqRangeMapping(), ns3::WifiChannelConfig::FromString(), ns3::GetFrequencyRange(), NS_ASSERT, and ns3::WifiPhyHelper::Set().
Referenced by GetWifiNetDevice().
|
private |
Definition at line 155 of file wifi-static-infra-bss-test.cc.
References WifiStaticInfraBssTestConstants::DEFAULT_CONTROL_MODE, WifiStaticInfraBssTestConstants::DEFAULT_DATA_MODE, WifiStaticInfraBssTestConstants::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 223 of file wifi-static-infra-bss-test.cc.
References ns3::WifiHelper::AssignStreams(), WifiStaticInfraBssTestConstants::DEFAULT_STREAM_INDEX, ns3::DynamicCast(), GetApMacHelper(), GetClientMacHelper(), GetPhyHelper(), GetWifiHelper(), and m_testVec.
Referenced by DoSetup().
|
private |
Validate Association.
Definition at line 382 of file wifi-static-infra-bss-test.cc.
References ns3::DynamicCast(), m_apDev, m_clientDev, m_testVec, NS_ASSERT, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, ValidateAssocForLink(), ValidateBaAgr(), and ValidateMuScheduler().
Referenced by DoRun().
|
private |
Validate association state machine at AP and client for input link.
clientLinkId | client local Link ID |
apMac | AP MAC |
clientMac | Client MAC |
Definition at line 265 of file wifi-static-infra-bss-test.cc.
References NS_TEST_ASSERT_MSG_EQ.
Referenced by ValidateAssoc().
|
private |
Validate Block ACK Agreement at AP and client.
apMac | AP MAC |
clientMac | Client MAC |
Definition at line 330 of file wifi-static-infra-bss-test.cc.
References WifiStaticInfraBssTestConstants::DEFAULT_TEST_TID, m_apGcrGroupAddr, m_testVec, and NS_TEST_ASSERT_MSG_EQ.
Referenced by ValidateAssoc().
|
private |
Validate Multi-user scheduler setup.
apMac | AP MAC |
clientMac | Non-AP MAC |
Definition at line 314 of file wifi-static-infra-bss-test.cc.
References m_testVec, NS_ASSERT, and NS_TEST_ASSERT_MSG_EQ.
Referenced by ValidateAssoc().
|
private |
AP WiFi device.
Definition at line 143 of file wifi-static-infra-bss-test.cc.
Referenced by DoSetup(), and ValidateAssoc().
|
private |
GCR group address.
Definition at line 145 of file wifi-static-infra-bss-test.cc.
Referenced by DoSetup(), and ValidateBaAgr().
|
private |
client WiFi device
Definition at line 144 of file wifi-static-infra-bss-test.cc.
Referenced by DoSetup(), and ValidateAssoc().
|
private |
Test vector.
Definition at line 142 of file wifi-static-infra-bss-test.cc.
Referenced by WifiStaticInfraBssTest(), DoSetup(), GetApMacHelper(), GetClientMacHelper(), GetWifiNetDevice(), ValidateAssoc(), ValidateBaAgr(), and ValidateMuScheduler().