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

Test BlockAckReq frame sent by a Block Ack originator after dropping QoS data frames. More...

#include "wifi-mlo-test.h"

+ Inheritance diagram for BarAfterDroppedMpduTest:
+ Collaboration diagram for BarAfterDroppedMpduTest:

Classes

struct  Events
 Actions and checks to perform upon the transmission of each frame. More...
 

Public Member Functions

 BarAfterDroppedMpduTest (WifiAssocType assocType)
 Constructor.
 
- 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.
 
void InsertEvents ()
 Insert elements in the list of expected events (transmitted frames)
 
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 Member Functions

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

Private Attributes

Ptr< ListErrorModelm_apErrorModel
 error rate model to corrupt frames at the AP MLD
 
std::list< Eventsm_events
 list of events for a test run
 
std::size_t m_processedEvents {0}
 number of processed events
 
bool m_setupDone {false}
 whether association has been completed
 
Ptr< ListErrorModelm_staErrorModel
 error rate model to corrupt frames at the non-AP STA
 

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 BlockAckReq frame sent by a Block Ack originator after dropping QoS data frames.

In this test, a non-AP STA associates with an AP MLD with 2 links using either legacy association or ML setup. A Block Ack agreement is established first in the downlink direction; the AP MLD sends 2 data frames, which are both corrupted. When a timeout occurs at the AP MLD, the 2 data frames are dropped, thus the AP MLD sends a BlockAckReq to advance the recipient window. It is checked that the BlockAckReq has the correct link addresses and that the non-AP STA replies with a BlockAck having correct link addresses. Then, a Block Ack agreement is established in the uplink direction and the same pattern of actions are repeated (in the inverse direction).

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

Constructor & Destructor Documentation

◆ BarAfterDroppedMpduTest()

BarAfterDroppedMpduTest::BarAfterDroppedMpduTest ( WifiAssocType assocType)

Constructor.

Parameters
assocTypethe association type

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

Member Function Documentation

◆ DoRun()

void BarAfterDroppedMpduTest::DoRun ( )
overrideprotectedvirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References ns3::Simulator::Destroy(), MultiLinkOperationsTestBase::m_duration, m_events, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Run(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ DoSetup()

void BarAfterDroppedMpduTest::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 3033 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::DoSetup(), m_apErrorModel, MultiLinkOperationsTestBase::m_apMac, m_staErrorModel, MultiLinkOperationsTestBase::m_staMacs, and ns3::Config::SetDefault().

+ Here is the call graph for this function:

◆ InsertEvents()

void BarAfterDroppedMpduTest::InsertEvents ( )
protected

Insert elements in the list of expected events (transmitted frames)

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

References MultiLinkOperationsTestBase::GetApplication(), m_apErrorModel, MultiLinkOperationsTestBase::m_apMac, m_events, m_staErrorModel, MultiLinkOperationsTestBase::m_staMacs, ns3::MilliSeconds(), NS_TEST_EXPECT_MSG_EQ, ns3::PeekPointer(), ns3::Simulator::Schedule(), ns3::ListErrorModel::SetList(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::WIFI_MAC_CTL_ACK, ns3::WIFI_MAC_CTL_BACKREQ, ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_MGT_ACTION, and ns3::WIFI_MAC_QOSDATA.

Referenced by StartTraffic().

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

◆ StartTraffic()

void BarAfterDroppedMpduTest::StartTraffic ( )
overrideprivatevirtual

Start the generation of traffic (needs to be overridden)

Reimplemented from MultiLinkOperationsTestBase.

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

References MultiLinkOperationsTestBase::GetApplication(), InsertEvents(), MultiLinkOperationsTestBase::m_apMac, m_setupDone, MultiLinkOperationsTestBase::m_staMacs, ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), and ns3::PacketSocketAddress::SetSingleDevice().

+ Here is the call graph for this function:

◆ Transmit()

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

Callback invoked when a FEM passes PSDUs to the PHY.

Parameters
macthe MAC transmitting the PSDUs
phyIdthe ID of the PHY transmitting the PSDUs
psduMapthe PSDU map
txVectorthe TX vector
txPowerWthe tx power in Watts

Reimplemented from MultiLinkOperationsTestBase.

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

References ns3::WifiMacHeader::GetTypeString(), m_events, m_processedEvents, m_setupDone, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and MultiLinkOperationsTestBase::Transmit().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_apErrorModel

Ptr<ListErrorModel> BarAfterDroppedMpduTest::m_apErrorModel
private

error rate model to corrupt frames at the AP MLD

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

Referenced by DoSetup(), and InsertEvents().

◆ m_events

std::list<Events> BarAfterDroppedMpduTest::m_events
private

list of events for a test run

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

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

◆ m_processedEvents

std::size_t BarAfterDroppedMpduTest::m_processedEvents {0}
private

number of processed events

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

Referenced by Transmit().

◆ m_setupDone

bool BarAfterDroppedMpduTest::m_setupDone {false}
private

whether association has been completed

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

Referenced by StartTraffic(), and Transmit().

◆ m_staErrorModel

Ptr<ListErrorModel> BarAfterDroppedMpduTest::m_staErrorModel
private

error rate model to corrupt frames at the non-AP STA

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

Referenced by DoSetup(), and InsertEvents().


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