Test Multi-Link Discovery & Setup. More...
Classes | |
struct | FrameInfo |
Information about transmitted frames. More... | |
Public Member Functions | |
MultiLinkSetupTest (std::initializer_list< std::string > staChannels, std::initializer_list< std::string > apChannels, std::initializer_list< std::pair< uint8_t, uint8_t > > setupLinks, std::initializer_list< uint8_t > fixedPhyBands={}) | |
Constructor. More... | |
~MultiLinkSetupTest () override | |
![]() | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | CheckAssocRequest (Ptr< WifiMpdu > mpdu, uint8_t linkId) |
Check correctness of the given Association Request frame. More... | |
void | CheckAssocResponse (Ptr< WifiMpdu > mpdu, uint8_t linkId) |
Check correctness of the given Association Response frame. More... | |
void | CheckBeacon (Ptr< WifiMpdu > mpdu, uint8_t linkId) |
Check correctness of the given Beacon frame. More... | |
void | CheckDisabledLinks () |
Check that links that are not setup on the non-AP MLD are disabled. More... | |
void | CheckMlSetup () |
Check correctness of Multi-Link Setup procedure. More... | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
WifiPhyBand | GetPhyBandFromChannelStr (const std::string &str) |
void | SetChannels (SpectrumWifiPhyHelper &helper, const std::vector< std::string > &channels, const std::map< WifiPhyBand, Ptr< MultiModelSpectrumChannel > > &channelMap) |
Reset the given PHY helper, use the given strings to set the ChannelSettings attribute of the PHY objects to create, and attach them to the given spectrum channels appropriately. More... | |
void | Transmit (uint8_t linkId, std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) |
Callback invoked when a FEM passes PSDUs to the PHY. More... | |
Private Attributes | |
std::vector< std::string > | m_apChannels |
strings specifying channels for AP More... | |
Ptr< ApWifiMac > | m_apMac |
AP wifi MAC. More... | |
std::vector< uint8_t > | m_fixedPhyBands |
links on non-AP MLD with fixed PHY band More... | |
std::vector< std::pair< uint8_t, uint8_t > > | m_setupLinks |
expected links to setup (STA link ID, AP link ID) More... | |
std::vector< std::string > | m_staChannels |
strings specifying channels for STA More... | |
Ptr< StaWifiMac > | m_staMac |
STA wifi MAC. More... | |
std::vector< FrameInfo > | m_txPsdus |
transmitted PSDUs 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 () 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... | |
Test Multi-Link Discovery & Setup.
Three spectrum channels are created, one for each band (2.4 GHz, 5 GHz and 6 GHz). Each PHY object is attached to the spectrum channel corresponding to the PHY band in which it is operating.
Definition at line 195 of file wifi-mlo-test.cc.
MultiLinkSetupTest::MultiLinkSetupTest | ( | std::initializer_list< std::string > | staChannels, |
std::initializer_list< std::string > | apChannels, | ||
std::initializer_list< std::pair< uint8_t, uint8_t > > | setupLinks, | ||
std::initializer_list< uint8_t > | fixedPhyBands = {} |
||
) |
Constructor.
staChannels | the strings specifying the operating channels for the STA |
apChannels | the strings specifying the operating channels for the AP |
setupLinks | a list of links (STA link ID, AP link ID) that are expected to be setup |
fixedPhyBands | list of IDs of STA links that cannot switch PHY band |
Definition at line 301 of file wifi-mlo-test.cc.
|
override |
Definition at line 314 of file wifi-mlo-test.cc.
Check correctness of the given Association Request frame.
mpdu | the given Association Request frame |
linkId | the ID of the link on which the Association Request frame was transmitted |
Definition at line 557 of file wifi-mlo-test.cc.
References ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetLinkIdByAddress(), ns3::MgtAssocRequestHeader::GetMultiLinkElement(), ns3::WifiMac::GetNLinks(), m_apMac, m_setupLinks, m_staMac, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_NE, and ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST.
Referenced by DoRun().
Check correctness of the given Association Response frame.
mpdu | the given Association Response frame |
linkId | the ID of the link on which the Association Response frame was transmitted |
Definition at line 617 of file wifi-mlo-test.cc.
References ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetLinkIdByAddress(), ns3::MgtAssocResponseHeader::GetMultiLinkElement(), ns3::WifiMac::GetNLinks(), m_apMac, m_setupLinks, m_staMac, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_NE, and ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE.
Referenced by DoRun().
Check correctness of the given Beacon frame.
mpdu | the given Beacon frame |
linkId | the ID of the link on which the Beacon frame was transmitted |
Definition at line 501 of file wifi-mlo-test.cc.
References ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::MgtProbeResponseHeader::GetMultiLinkElement(), ns3::WifiMac::GetNLinks(), ns3::MgtProbeResponseHeader::GetReducedNeighborReport(), m_apMac, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, and ns3::WIFI_MAC_MGT_BEACON.
Referenced by DoRun().
|
private |
Check that links that are not setup on the non-AP MLD are disabled.
Definition at line 750 of file wifi-mlo-test.cc.
References GetPhyBandFromChannelStr(), ns3::WifiPhy::GetState(), ns3::WifiMac::GetWifiPhy(), m_apChannels, m_setupLinks, m_staChannels, m_staMac, and NS_TEST_EXPECT_MSG_EQ.
Referenced by DoRun().
|
private |
Check correctness of Multi-Link Setup procedure.
Check outcome of Multi-Link Setup
Definition at line 677 of file wifi-mlo-test.cc.
References ns3::WifiMac::GetAddress(), ns3::ApWifiMac::GetAssociationId(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiPhyOperatingChannel::GetFrequency(), ns3::WifiMac::GetNLinks(), ns3::WifiPhyOperatingChannel::GetNumber(), ns3::WifiPhy::GetOperatingChannel(), ns3::WifiPhyOperatingChannel::GetPhyBand(), ns3::WifiPhyOperatingChannel::GetPrimaryChannelIndex(), ns3::ApWifiMac::GetStaList(), ns3::WifiPhyOperatingChannel::GetWidth(), ns3::WifiMac::GetWifiPhy(), ns3::WifiMac::GetWifiRemoteStationManager(), ns3::StaWifiMac::IsAssociated(), m_apMac, m_setupLinks, m_staMac, and NS_TEST_EXPECT_MSG_EQ.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Check content of management frames
Implements ns3::TestCase.
Definition at line 381 of file wifi-mlo-test.cc.
References third::apDevices, CheckAssocRequest(), CheckAssocResponse(), CheckBeacon(), CheckDisabledLinks(), CheckMlSetup(), ns3::Config::Connect(), ns3::NodeContainer::Create(), m_apChannels, m_apMac, m_fixedPhyBands, m_staChannels, m_staMac, m_txPsdus, third::mac, ns3::MakeCallback(), ns3::MilliSeconds(), third::mobility, ns3::Seconds(), ns3::WifiPhyHelper::Set(), SetChannels(), third::ssid, third::staDevices, Transmit(), third::wifi, ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE, ns3::WIFI_MAC_MGT_BEACON, ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_PHY_BAND_6GHZ, ns3::WIFI_STANDARD_80211be, and third::wifiApNode.
|
private |
str | the given channel string |
Definition at line 362 of file wifi-mlo-test.cc.
References NS_ABORT_MSG, ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_PHY_BAND_6GHZ, and ns3::WIFI_PHY_BAND_UNSPECIFIED.
Referenced by CheckDisabledLinks(), and SetChannels().
|
private |
Reset the given PHY helper, use the given strings to set the ChannelSettings attribute of the PHY objects to create, and attach them to the given spectrum channels appropriately.
helper | the given PHY helper |
channels | the strings specifying the operating channels to configure |
channelMap | the created spectrum channels |
Definition at line 343 of file wifi-mlo-test.cc.
References GetPhyBandFromChannelStr(), ns3::WifiPhyHelper::Set(), ns3::SpectrumWifiPhyHelper::SetChannel(), and ns3::WifiPhyHelper::SetPcapDataLinkType().
Referenced by DoRun().
|
private |
Callback invoked when a FEM passes PSDUs to the PHY.
linkId | the ID of the link transmitting the PSDUs |
context | the context |
psduMap | the PSDU map |
txVector | the TX vector |
txPowerW | the tx power in Watts |
Definition at line 319 of file wifi-mlo-test.cc.
References m_txPsdus, ns3::Now(), and NS_LOG_INFO.
Referenced by DoRun().
|
private |
strings specifying channels for AP
Definition at line 293 of file wifi-mlo-test.cc.
Referenced by CheckDisabledLinks(), and DoRun().
AP wifi MAC.
Definition at line 297 of file wifi-mlo-test.cc.
Referenced by CheckAssocRequest(), CheckAssocResponse(), CheckBeacon(), CheckMlSetup(), and DoRun().
|
private |
links on non-AP MLD with fixed PHY band
Definition at line 296 of file wifi-mlo-test.cc.
Referenced by DoRun().
|
private |
expected links to setup (STA link ID, AP link ID)
Definition at line 295 of file wifi-mlo-test.cc.
Referenced by CheckAssocRequest(), CheckAssocResponse(), CheckDisabledLinks(), and CheckMlSetup().
|
private |
strings specifying channels for STA
Definition at line 292 of file wifi-mlo-test.cc.
Referenced by CheckDisabledLinks(), and DoRun().
|
private |
STA wifi MAC.
Definition at line 298 of file wifi-mlo-test.cc.
Referenced by CheckAssocRequest(), CheckAssocResponse(), CheckDisabledLinks(), CheckMlSetup(), and DoRun().
|
private |
transmitted PSDUs
Definition at line 291 of file wifi-mlo-test.cc.
Referenced by DoRun(), and Transmit().