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

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

#include "wifi-mlo-test.h"

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

Public Member Functions

 MultiLinkMuTxTest (const BaseParams &baseParams, WifiMuTrafficPattern muTrafficPattern, WifiUseBarAfterMissedBa useBarAfterMissedBa, uint8_t nMaxInflight)
 Constructor.
 
 ~MultiLinkMuTxTest () 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 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.
 
void DoRun () override
 Implementation to actually run this TestCase.
 
void DoSetup () override
 Implementation to do any local setup required for this TestCase.
 
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.
 
- 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 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.
 
using RxErrorModelMap = std::unordered_map<Mac48Address, Ptr<ListErrorModel>, WifiAddressHash>
 Receiver address-indexed map of list error models.
 

Private Member Functions

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

Private Attributes

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

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...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 
 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 616 of file wifi-mlo-test.h.

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 661 of file wifi-mlo-test.h.

◆ RxErrorModelMap

Receiver address-indexed map of list error models.

Definition at line 657 of file wifi-mlo-test.h.

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 2186 of file wifi-mlo-test.cc.

◆ ~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 2342 of file wifi-mlo-test.cc.

References ns3::AC_BE, ns3::WifiPhy::CalculateTxDuration(), ns3::CtrlBAckResponseHeader::FindPerAidTidInfoWithAid(), 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, ns3::Simulator::Schedule(), 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 2636 of file wifi-mlo-test.cc.

References ns3::Simulator::Destroy(), 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, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_LT_OR_EQ, ns3::Simulator::Run(), and UL_MU.

+ Here is the call graph for this function:

◆ DoSetup()

void MultiLinkMuTxTest::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 ns3::TestCase.

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

References ns3::AC_BE, ns3::AC_VI, ns3::CreateObject(), ns3::CreateObjectWithAttributes(), DL_MU_AGGR_MU_BAR, ns3::WifiAcknowledgment::DL_MU_AGGREGATE_TF, ns3::WifiAcknowledgment::DL_MU_BAR_BA_SEQUENCE, DL_MU_BAR_BA_SEQUENCE, DL_MU_MU_BAR, ns3::WifiAcknowledgment::DL_MU_TF_MU_BAR, MultiLinkOperationsTestBase::DoSetup(), MultiLinkOperationsTestBase::m_apMac, m_errorModels, m_muTrafficPattern, m_nMaxInflight, MultiLinkOperationsTestBase::m_staMacs, m_useBarAfterMissedBa, and ns3::Config::SetDefault().

+ Here is the call graph for this function:

◆ StartTraffic()

void MultiLinkMuTxTest::StartTraffic ( )
overrideprivatevirtual

◆ Transmit()

void MultiLinkMuTxTest::Transmit ( Ptr< WifiMac > mac,
uint8_t phyId,
WifiConstPsduMap psduMap,
WifiTxVector txVector,
double txPowerW )
overrideprotectedvirtual

Member Data Documentation

◆ m_blockAckCount

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

transmitted BlockAck counter

Definition at line 673 of file wifi-mlo-test.h.

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 665 of file wifi-mlo-test.h.

Referenced by CheckBlockAck(), and Transmit().

◆ m_errorModels

RxErrorModelMap MultiLinkMuTxTest::m_errorModels
private

error rate models to corrupt packets

Definition at line 663 of file wifi-mlo-test.h.

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 676 of file wifi-mlo-test.h.

Referenced by DoRun(), and Transmit().

◆ m_muTrafficPattern

WifiMuTrafficPattern MultiLinkMuTxTest::m_muTrafficPattern
private

the pattern of traffic to generate

Definition at line 668 of file wifi-mlo-test.h.

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 670 of file wifi-mlo-test.h.

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

◆ m_nPackets

std::size_t MultiLinkMuTxTest::m_nPackets
private

number of application packets to generate

Definition at line 672 of file wifi-mlo-test.h.

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

◆ m_sockets

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

packet socket addresses for STAs

Definition at line 671 of file wifi-mlo-test.h.

Referenced by StartTraffic(), and Transmit().

◆ m_sourceMac

Ptr<WifiMac> MultiLinkMuTxTest::m_sourceMac
private

MAC of the node sending application packets.

Definition at line 678 of file wifi-mlo-test.h.

◆ m_tfCount

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

transmitted Trigger Frame counter

Definition at line 674 of file wifi-mlo-test.h.

Referenced by Transmit().

◆ m_uidList

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

list of UIDs of packets to corrupt

Definition at line 664 of file wifi-mlo-test.h.

Referenced by Transmit().

◆ m_useBarAfterMissedBa

bool MultiLinkMuTxTest::m_useBarAfterMissedBa
private

whether to send BAR after missed BlockAck

Definition at line 669 of file wifi-mlo-test.h.

Referenced by DoSetup().

◆ m_waitFirstTf

bool MultiLinkMuTxTest::m_waitFirstTf {true}
private

whether we are waiting for the first Basic Trigger Frame

Definition at line 667 of file wifi-mlo-test.h.

Referenced by Transmit().


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