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

Multi-Link Discovery & Setup test. More...

+ Inheritance diagram for MultiLinkSetupTest:
+ Collaboration diagram for MultiLinkSetupTest:

Public Member Functions

 MultiLinkSetupTest (const BaseParams &baseParams, WifiScanType scanType, const std::vector< uint8_t > &setupLinks, WifiTidToLinkMappingNegSupport apNegSupport, const std::string &dlTidToLinkMapping, const std::string &ulTidToLinkMapping)
 Constructor.
 
 ~MultiLinkSetupTest () override=default
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void DoRun () override
 Implementation to actually run this TestCase.
 
void DoSetup () override
 Implementation to do any local setup required for this TestCase.
 
- 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.
 

Private Member Functions

void CheckAssocRequest (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Association Request frame.
 
void CheckAssocResponse (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Association Response frame.
 
void CheckBeacon (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Beacon frame.
 
void CheckDisabledLinks ()
 Check that links that are not setup on the non-AP MLD are disabled.
 
void CheckMlSetup ()
 Check correctness of Multi-Link Setup procedure.
 
void CheckProbeResponse (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Probe Response frame.
 
void CheckQosData (Ptr< WifiMpdu > mpdu, uint8_t linkId, std::size_t index)
 Check that QoS data frames are sent on links their TID is mapped to.
 
void StartTraffic () override
 Start the generation of traffic (needs to be overridden)
 

Private Attributes

WifiTidToLinkMappingNegSupport m_apNegSupport
 TID-to-Link Mapping negotiation supported by the AP MLD.
 
uint8_t m_dlTid1
 the TID of the first set of DL QoS data frames
 
std::optional< uint8_t > m_dlTid2
 the TID of the optional set of DL QoS data frames
 
WifiTidLinkMapping m_dlTidLinkMapping
 expected DL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD
 
std::string m_dlTidLinkMappingStr
 DL TID-to-Link Mapping for non-AP MLD EHT configuration.
 
std::size_t m_nProbeResp
 number of Probe Responses received by the non-AP MLD
 
std::vector< std::size_t > m_qosFrames1
 indices of QoS frames of the first set in the vector of TX PSDUs
 
std::vector< std::size_t > m_qosFrames2
 indices of QoS frames of the optional set in the vector of TX PSDUs
 
WifiScanType m_scanType
 the scan type (active or passive)
 
const std::vector< uint8_t > m_setupLinks
 IDs of the expected links to setup.
 
uint8_t m_ulTid1
 the TID of the first set of UL QoS data frames
 
std::optional< uint8_t > m_ulTid2
 the TID of the optional set of UL QoS data frames
 
WifiTidLinkMapping m_ulTidLinkMapping
 expected UL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD
 
std::string m_ulTidLinkMappingStr
 UL TID-to-Link Mapping for non-AP MLD EHT configuration.
 

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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto TAKES_FOREVER
 
 Uplink or Downlink direction. More...

Detailed Description

Multi-Link Discovery & Setup test.

This test sets up an AP MLD and a non-AP MLD having a variable number of links. The RF channels to set each link to are provided as input parameters through the test case constructor, along with the identifiers (starting at 0) of the links that cannot switch PHY band (if any). The links that are expected to be setup are also provided as input parameters. This test verifies that the management frames exchanged during ML discovery and ML setup contain the expected values and that the two MLDs setup the expected links.

The negotiated TID-to-link mapping is tested by verifying that generated QoS data frames of a given TID are transmitted on links which the TID is mapped to. Specifically, the following operations are performed separately for each direction (downlink and uplink). A first TID is searched such that it is not mapped on all the setup links. If no such TID is found, only QoS frames of TID 0 are generated. Otherwise, we also search for a second TID that is mapped to a link set that is disjoint with the link set to which the first TID is mapped. If such a TID is found, QoS frames of both the first TID and the second TID are generated; otherwise, only QoS frames of the first TID are generated. For each TID, a number of QoS frames equal to the number of setup links is generated. For each TID, we check that the first N QoS frames, where N is the size of the link set to which the TID is mapped, are transmitted concurrently, while the following QoS frames are sent after the first QoS frame sent on the same link. We also check that all the QoS frames are sent on a link belonging to the link set to which the TID is mapped. If QoS frames of two TIDs are generated, we also check that the first N QoS frames of a TID, where N is the size of the link set to which that TID is mapped, are sent concurrently with the first M QoS frames of the other TID, where M is the size of the link set to which the other TID is mapped.

Definition at line 813 of file wifi-mlo-test.cc.

Constructor & Destructor Documentation

◆ MultiLinkSetupTest()

MultiLinkSetupTest::MultiLinkSetupTest ( const BaseParams baseParams,
WifiScanType  scanType,
const std::vector< uint8_t > &  setupLinks,
WifiTidToLinkMappingNegSupport  apNegSupport,
const std::string &  dlTidToLinkMapping,
const std::string &  ulTidToLinkMapping 
)

Constructor.

Parameters
baseParamscommon configuration parameters
scanTypethe scan type (active or passive)
setupLinksa list of links that are expected to be setup. In case one of the two devices has a single link, the ID of the link on the MLD is indicated
apNegSupportTID-to-Link Mapping negotiation supported by the AP MLD (0, 1, or 3)
dlTidToLinkMappingDL TID-to-Link Mapping for EHT configuration of non-AP MLD
ulTidToLinkMappingUL TID-to-Link Mapping for EHT configuration of non-AP MLD

Definition at line 914 of file wifi-mlo-test.cc.

◆ ~MultiLinkSetupTest()

MultiLinkSetupTest::~MultiLinkSetupTest ( )
overridedefault

Member Function Documentation

◆ CheckAssocRequest()

void MultiLinkSetupTest::CheckAssocRequest ( Ptr< WifiMpdu mpdu,
uint8_t  linkId 
)
private

Check correctness of the given Association Request frame.

Parameters
mpduthe given Association Request frame
linkIdthe ID of the link on which the Association Request frame was transmitted

Definition at line 1279 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), dir, ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, m_apNegSupport, m_dlTidLinkMapping, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, m_ulTidLinkMapping, NS_ABORT_IF, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_NE, MultiLinkOperationsTestBase::UL, and ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST.

Referenced by DoRun().

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

◆ CheckAssocResponse()

void MultiLinkSetupTest::CheckAssocResponse ( Ptr< WifiMpdu mpdu,
uint8_t  linkId 
)
private

Check correctness of the given Association Response frame.

Parameters
mpduthe given Association Response frame
linkIdthe ID of the link on which the Association Response frame was transmitted

Definition at line 1410 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetLinkIdByAddress(), ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_NE, and ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE.

Referenced by DoRun().

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

◆ CheckBeacon()

void MultiLinkSetupTest::CheckBeacon ( Ptr< WifiMpdu mpdu,
uint8_t  linkId 
)
private

Check correctness of the given Beacon frame.

Parameters
mpduthe given Beacon frame
linkIdthe ID of the link on which the Beacon frame was transmitted

Definition at line 1162 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, and ns3::WIFI_MAC_MGT_BEACON.

Referenced by DoRun().

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

◆ CheckDisabledLinks()

void MultiLinkSetupTest::CheckDisabledLinks ( )
private

Check that links that are not setup on the non-AP MLD are disabled.

Definition at line 1584 of file wifi-mlo-test.cc.

References m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, and NS_TEST_EXPECT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckMlSetup()

void MultiLinkSetupTest::CheckMlSetup ( )
private

Check correctness of Multi-Link Setup procedure.

Check outcome of Multi-Link Setup

Definition at line 1476 of file wifi-mlo-test.cc.

References ns3::AP, dir, 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(), MultiLinkOperationsTestBase::m_apMac, m_apNegSupport, m_dlTidLinkMapping, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, m_ulTidLinkMapping, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and ns3::SINGLE_LINK_OP_ID.

Referenced by DoRun().

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

◆ CheckProbeResponse()

void MultiLinkSetupTest::CheckProbeResponse ( Ptr< WifiMpdu mpdu,
uint8_t  linkId 
)
private

Check correctness of the given Probe Response frame.

Parameters
mpduthe given Probe Response frame
linkIdthe ID of the link on which the Probe Response frame was transmitted

Definition at line 1220 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, and ns3::WIFI_MAC_MGT_PROBE_RESPONSE.

Referenced by DoRun().

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

◆ CheckQosData()

void MultiLinkSetupTest::CheckQosData ( Ptr< WifiMpdu mpdu,
uint8_t  linkId,
std::size_t  index 
)
private

Check that QoS data frames are sent on links their TID is mapped to.

Parameters
mpduthe given QoS data frame
linkIdthe ID of the link on which the QoS data frame was transmitted
indexindex of the QoS data frame in the vector of transmitted PSDUs

Definition at line 1612 of file wifi-mlo-test.cc.

References ns3::WifiPhy::CalculateTxDuration(), dir, ns3::WifiMac::GetNLinks(), ns3::WifiPhy::GetPhyBand(), ns3::WifiMac::GetTidToLinkMapping(), ns3::WifiMac::GetWifiPhy(), MultiLinkOperationsTestBase::m_apMac, m_dlTid1, m_dlTid2, m_qosFrames1, m_qosFrames2, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, MultiLinkOperationsTestBase::m_txPsdus, m_ulTid1, m_ulTid2, NS_ABORT_MSG, NS_ASSERT_MSG, NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_NE, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT, NS_TEST_EXPECT_MSG_LT, and prev.

Referenced by DoRun().

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

◆ DoRun()

◆ DoSetup()

void MultiLinkSetupTest::DoSetup ( )
overrideprotectedvirtual

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 MultiLinkOperationsTestBase.

Definition at line 931 of file wifi-mlo-test.cc.

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, MultiLinkOperationsTestBase::DoSetup(), ns3::WifiMac::GetEhtConfiguration(), MultiLinkOperationsTestBase::m_apMac, m_apNegSupport, m_dlTid1, m_dlTid2, m_dlTidLinkMapping, m_dlTidLinkMappingStr, m_scanType, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, m_ulTid1, m_ulTid2, m_ulTidLinkMapping, m_ulTidLinkMappingStr, NS_FATAL_ERROR, ns3::QosUtilsMapTidToAc(), and ns3::TidToLinkMappingValidForNegType1().

+ Here is the call graph for this function:

◆ StartTraffic()

void MultiLinkSetupTest::StartTraffic ( )
overrideprivatevirtual

Member Data Documentation

◆ m_apNegSupport

WifiTidToLinkMappingNegSupport MultiLinkSetupTest::m_apNegSupport
private

TID-to-Link Mapping negotiation supported by the AP MLD.

Definition at line 897 of file wifi-mlo-test.cc.

Referenced by CheckAssocRequest(), CheckMlSetup(), and DoSetup().

◆ m_dlTid1

uint8_t MultiLinkSetupTest::m_dlTid1
private

the TID of the first set of DL QoS data frames

Definition at line 904 of file wifi-mlo-test.cc.

Referenced by CheckQosData(), DoSetup(), and StartTraffic().

◆ m_dlTid2

std::optional<uint8_t> MultiLinkSetupTest::m_dlTid2
private

the TID of the optional set of DL QoS data frames

Definition at line 906 of file wifi-mlo-test.cc.

Referenced by CheckQosData(), DoRun(), DoSetup(), and StartTraffic().

◆ m_dlTidLinkMapping

WifiTidLinkMapping MultiLinkSetupTest::m_dlTidLinkMapping
private

expected DL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD

Definition at line 900 of file wifi-mlo-test.cc.

Referenced by CheckAssocRequest(), CheckMlSetup(), and DoSetup().

◆ m_dlTidLinkMappingStr

std::string MultiLinkSetupTest::m_dlTidLinkMappingStr
private

DL TID-to-Link Mapping for non-AP MLD EHT configuration.

Definition at line 898 of file wifi-mlo-test.cc.

Referenced by DoSetup().

◆ m_nProbeResp

std::size_t MultiLinkSetupTest::m_nProbeResp
private

number of Probe Responses received by the non-AP MLD

Definition at line 895 of file wifi-mlo-test.cc.

Referenced by DoRun().

◆ m_qosFrames1

std::vector<std::size_t> MultiLinkSetupTest::m_qosFrames1
private

indices of QoS frames of the first set in the vector of TX PSDUs

Definition at line 909 of file wifi-mlo-test.cc.

Referenced by CheckQosData().

◆ m_qosFrames2

std::vector<std::size_t> MultiLinkSetupTest::m_qosFrames2
private

indices of QoS frames of the optional set in the vector of TX PSDUs

Definition at line 911 of file wifi-mlo-test.cc.

Referenced by CheckQosData().

◆ m_scanType

WifiScanType MultiLinkSetupTest::m_scanType
private

the scan type (active or passive)

Definition at line 894 of file wifi-mlo-test.cc.

Referenced by DoRun(), and DoSetup().

◆ m_setupLinks

const std::vector<uint8_t> MultiLinkSetupTest::m_setupLinks
private

IDs of the expected links to setup.

Definition at line 893 of file wifi-mlo-test.cc.

Referenced by CheckAssocRequest(), CheckAssocResponse(), CheckDisabledLinks(), CheckMlSetup(), CheckQosData(), DoRun(), DoSetup(), and StartTraffic().

◆ m_ulTid1

uint8_t MultiLinkSetupTest::m_ulTid1
private

the TID of the first set of UL QoS data frames

Definition at line 905 of file wifi-mlo-test.cc.

Referenced by CheckQosData(), DoSetup(), and StartTraffic().

◆ m_ulTid2

std::optional<uint8_t> MultiLinkSetupTest::m_ulTid2
private

the TID of the optional set of UL QoS data frames

Definition at line 907 of file wifi-mlo-test.cc.

Referenced by CheckQosData(), DoRun(), DoSetup(), and StartTraffic().

◆ m_ulTidLinkMapping

WifiTidLinkMapping MultiLinkSetupTest::m_ulTidLinkMapping
private

expected UL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD

Definition at line 902 of file wifi-mlo-test.cc.

Referenced by CheckAssocRequest(), CheckMlSetup(), and DoSetup().

◆ m_ulTidLinkMappingStr

std::string MultiLinkSetupTest::m_ulTidLinkMappingStr
private

UL TID-to-Link Mapping for non-AP MLD EHT configuration.

Definition at line 899 of file wifi-mlo-test.cc.

Referenced by DoSetup().


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