A Discrete-Event Network Simulator
API
MultiLinkMuTxTest Class Reference

Test data transmission between MLDs using OFDMA MU transmissions. More...

+ Inheritance diagram for MultiLinkMuTxTest:
+ Collaboration diagram for MultiLinkMuTxTest:

Public Member Functions

 MultiLinkMuTxTest (const BaseParams &baseParams, WifiMuTrafficPattern muTrafficPattern, WifiUseBarAfterMissedBa useBarAfterMissedBa, uint8_t nMaxInflight)
 Constructor. More...
 
 ~MultiLinkMuTxTest () override=default
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void CheckBlockAck (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint8_t linkId)
 Check the content of a received BlockAck frame when the max number of links on which an MPDU can be inflight is one. More...
 
void DoRun () override
 Implementation to actually run this TestCase. More...
 
void DoSetup () override
 Implementation to do any local setup required for this TestCase. More...
 
void Transmit (Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override
 Callback invoked when a FEM passes PSDUs to the PHY. More...
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor. More...
 
void AddTestCase (TestCase *testCase, TestDuration duration=QUICK)
 Add an individual child TestCase to this test suite. More...
 
TestCaseGetParent () const
 Get the parent of this TestCase. 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...
 

Private Types

using AddrSeqNoPair = std::pair< Mac48Address, uint16_t >
 A pair of a MAC address (the address of the receiver for DL frames and the address of the sender for UL frames) and a sequence number identifying a transmitted QoS data frame. More...
 
using RxErrorModelMap = std::unordered_map< Mac48Address, Ptr< ListErrorModel >, WifiAddressHash >
 Receiver address-indexed map of list error models. More...
 

Private Member Functions

void StartTraffic () override
 Start the generation of traffic (needs to be overridden) More...
 

Private Attributes

std::size_t m_blockAckCount {0}
 transmitted BlockAck counter More...
 
std::optional< Mac48Addressm_dataCorruptedSta
 MAC address of the station that received MPDU with SeqNo=2 corrupted. More...
 
RxErrorModelMap m_errorModels
 error rate models to corrupt packets More...
 
std::map< AddrSeqNoPair, std::size_t > m_inflightCount
 max number of simultaneous transmissions of each data frame More...
 
WifiMuTrafficPattern m_muTrafficPattern
 the pattern of traffic to generate More...
 
std::size_t m_nMaxInflight
 max number of links on which an MPDU can be inflight More...
 
std::size_t m_nPackets
 number of application packets to generate More...
 
std::vector< PacketSocketAddressm_sockets
 packet socket addresses for STAs More...
 
Ptr< WifiMacm_sourceMac
 MAC of the node sending application packets. More...
 
std::size_t m_tfCount {0}
 transmitted Trigger Frame counter More...
 
std::list< uint64_t > m_uidList
 list of UIDs of packets to corrupt More...
 
bool m_useBarAfterMissedBa
 whether to send BAR after missed BlockAck More...
 
bool m_waitFirstTf {true}
 whether we are waiting for the first Basic Trigger Frame More...
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum  TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
 Uplink or Downlink direction. More...

Detailed Description

Test data transmission between MLDs using OFDMA MU transmissions.

This test sets up an AP MLD and two non-AP MLDs 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). This test aims at veryfing the successful transmission of both DL MU and UL MU frames. In the DL MU scenarios, the client applications installed on the AP generate 8 packets addressed to each of the stations (plus 3 packets to trigger the establishment of BlockAck agreements). In the UL MU scenario, client applications installed on the stations generate 4 packets each (plus 3 packets to trigger the establishment of BlockAck agreements).

The maximum A-MSDU size is set such that two packets can be aggregated in an A-MSDU. The MPDU with sequence number equal to 3 is corrupted (by using a post reception error model) once and for a single station, to test its successful re-transmission.

Also, we enable the concurrent transmission of data frames over two links and check that at least one MPDU is concurrently transmitted over two links.

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

Member Typedef Documentation

◆ AddrSeqNoPair

using MultiLinkMuTxTest::AddrSeqNoPair = std::pair<Mac48Address, uint16_t>
private

A pair of a MAC address (the address of the receiver for DL frames and the address of the sender for UL frames) and a sequence number identifying a transmitted QoS data frame.

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

◆ RxErrorModelMap

Receiver address-indexed map of list error models.

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

Constructor & Destructor Documentation

◆ MultiLinkMuTxTest()

MultiLinkMuTxTest::MultiLinkMuTxTest ( const BaseParams baseParams,
WifiMuTrafficPattern  muTrafficPattern,
WifiUseBarAfterMissedBa  useBarAfterMissedBa,
uint8_t  nMaxInflight 
)

Constructor.

Parameters
baseParamscommon configuration parameters
muTrafficPatternthe pattern of traffic to generate
useBarAfterMissedBawhether a BAR or Data frames are sent after missed BlockAck
nMaxInflightthe max number of links on which an MPDU can be simultaneously inflight (unused if Block Ack agreements are not established)

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

References UL_MU, and YES.

◆ ~MultiLinkMuTxTest()

MultiLinkMuTxTest::~MultiLinkMuTxTest ( )
overridedefault

Member Function Documentation

◆ CheckBlockAck()

void MultiLinkMuTxTest::CheckBlockAck ( Ptr< const WifiPsdu psdu,
const WifiTxVector txVector,
uint8_t  linkId 
)
protected

Check the content of a received BlockAck frame when the max number of links on which an MPDU can be inflight is one.

Parameters
psduthe PSDU containing the BlockAck
txVectorthe TXVECTOR used to transmit the BlockAck
linkIdthe ID of the link on which the BlockAck was transmitted

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

References ns3::AC_BE, ns3::WifiPsdu::begin(), ns3::CtrlBAckResponseHeader::FindPerAidTidInfoWithAid(), ns3::WifiMac::GetAddress(), ns3::WifiMac::GetLinkIdByAddress(), ns3::WifiPhy::GetPhyBand(), ns3::ApWifiMac::GetTxopQueue(), ns3::WifiMac::GetWifiPhy(), ns3::CtrlBAckResponseHeader::IsMultiSta(), ns3::CtrlBAckResponseHeader::IsPacketReceived(), MultiLinkOperationsTestBase::m_apMac, m_blockAckCount, m_dataCorruptedSta, m_muTrafficPattern, m_nPackets, MultiLinkOperationsTestBase::m_nStations, MultiLinkOperationsTestBase::m_staMacs, ns3::MicroSeconds(), NS_ABORT_MSG, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and UL_MU.

Referenced by Transmit().

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

◆ DoRun()

void MultiLinkMuTxTest::DoRun ( )
overrideprotectedvirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References DL_MU_AGGR_MU_BAR, DL_MU_BAR_BA_SEQUENCE, DL_MU_MU_BAR, m_inflightCount, m_muTrafficPattern, m_nMaxInflight, m_nPackets, MultiLinkOperationsTestBase::m_rxPkts, MultiLinkOperationsTestBase::m_staMacs, max, min, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_LT_OR_EQ, and UL_MU.

◆ DoSetup()

void MultiLinkMuTxTest::DoSetup ( )
overrideprotectedvirtual

◆ StartTraffic()

◆ Transmit()

Member Data Documentation

◆ m_blockAckCount

std::size_t MultiLinkMuTxTest::m_blockAckCount {0}
private

transmitted BlockAck counter

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

Referenced by CheckBlockAck(), and Transmit().

◆ m_dataCorruptedSta

std::optional<Mac48Address> MultiLinkMuTxTest::m_dataCorruptedSta
private

MAC address of the station that received MPDU with SeqNo=2 corrupted.

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

Referenced by CheckBlockAck(), and Transmit().

◆ m_errorModels

RxErrorModelMap MultiLinkMuTxTest::m_errorModels
private

error rate models to corrupt packets

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

Referenced by DoSetup(), and Transmit().

◆ m_inflightCount

std::map<AddrSeqNoPair, std::size_t> MultiLinkMuTxTest::m_inflightCount
private

max number of simultaneous transmissions of each data frame

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

Referenced by DoRun(), and Transmit().

◆ m_muTrafficPattern

WifiMuTrafficPattern MultiLinkMuTxTest::m_muTrafficPattern
private

the pattern of traffic to generate

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

Referenced by CheckBlockAck(), DoRun(), DoSetup(), StartTraffic(), and Transmit().

◆ m_nMaxInflight

std::size_t MultiLinkMuTxTest::m_nMaxInflight
private

max number of links on which an MPDU can be inflight

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

Referenced by DoRun(), DoSetup(), and Transmit().

◆ m_nPackets

std::size_t MultiLinkMuTxTest::m_nPackets
private

number of application packets to generate

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

Referenced by CheckBlockAck(), DoRun(), StartTraffic(), and Transmit().

◆ m_sockets

std::vector<PacketSocketAddress> MultiLinkMuTxTest::m_sockets
private

packet socket addresses for STAs

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

Referenced by StartTraffic(), and Transmit().

◆ m_sourceMac

Ptr<WifiMac> MultiLinkMuTxTest::m_sourceMac
private

MAC of the node sending application packets.

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

◆ m_tfCount

std::size_t MultiLinkMuTxTest::m_tfCount {0}
private

transmitted Trigger Frame counter

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

Referenced by Transmit().

◆ m_uidList

std::list<uint64_t> MultiLinkMuTxTest::m_uidList
private

list of UIDs of packets to corrupt

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

Referenced by Transmit().

◆ m_useBarAfterMissedBa

bool MultiLinkMuTxTest::m_useBarAfterMissedBa
private

whether to send BAR after missed BlockAck

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

Referenced by DoSetup().

◆ m_waitFirstTf

bool MultiLinkMuTxTest::m_waitFirstTf {true}
private

whether we are waiting for the first Basic Trigger Frame

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

Referenced by Transmit().


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