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

Test release of sequence numbers upon CTS timeout in multi-link operations. More...

#include "wifi-mlo-test.h"

+ Inheritance diagram for ReleaseSeqNoAfterCtsTimeoutTest:
+ Collaboration diagram for ReleaseSeqNoAfterCtsTimeoutTest:

Public Member Functions

 ReleaseSeqNoAfterCtsTimeoutTest ()
 
 ~ReleaseSeqNoAfterCtsTimeoutTest () 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.
 
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_errorModel
 error rate model to corrupt first RTS frame
 
std::size_t m_nQosDataFrames
 counter for transmitted QoS data frames
 
bool m_rtsCorrupted
 whether the first RTS frame has been corrupted
 
PacketSocketAddress m_sockAddr
 packet socket address
 

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 release of sequence numbers upon CTS timeout in multi-link operations.

In this test, an AP MLD and a non-AP MLD setup 3 links. Usage of RTS/CTS protection is enabled for frames whose length is at least 1000 bytes. The AP MLD receives a first set of 4 packets from the upper layer and sends an RTS frame, which is corrupted at the receiver, on a first link. When the RTS frame is transmitted, the AP MLD receives another set of 4 packets, which are transmitted after a successful RTS/CTS exchange on a second link. In the meantime, a new RTS/CTS exchange is successfully carried out (on the first link or on the third link) to transmit the first set of 4 packets. When the transmission of the first set of 4 packets starts, the AP MLD receives the third set of 4 packets from the upper layer, which are transmitted after a successful RTS/CTS exchange.

This test checks that sequence numbers are correctly assigned to all the MPDUs carrying data.

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

Constructor & Destructor Documentation

◆ ReleaseSeqNoAfterCtsTimeoutTest()

ReleaseSeqNoAfterCtsTimeoutTest::ReleaseSeqNoAfterCtsTimeoutTest ( )

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

◆ ~ReleaseSeqNoAfterCtsTimeoutTest()

ReleaseSeqNoAfterCtsTimeoutTest::~ReleaseSeqNoAfterCtsTimeoutTest ( )
overridedefault

Member Function Documentation

◆ DoRun()

void ReleaseSeqNoAfterCtsTimeoutTest::DoRun ( )
overrideprotectedvirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References ns3::Simulator::Destroy(), MultiLinkOperationsTestBase::m_duration, m_nQosDataFrames, MultiLinkOperationsTestBase::m_txPsdus, NS_TEST_EXPECT_MSG_EQ, ns3::PeekPointer(), ns3::Simulator::Run(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ DoSetup()

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

References MultiLinkOperationsTestBase::DoSetup(), m_errorModel, MultiLinkOperationsTestBase::m_staMacs, and ns3::Config::SetDefault().

+ Here is the call graph for this function:

◆ StartTraffic()

void ReleaseSeqNoAfterCtsTimeoutTest::StartTraffic ( )
overrideprivatevirtual

Start the generation of traffic (needs to be overridden)

Reimplemented from MultiLinkOperationsTestBase.

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

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

+ Here is the call graph for this function:

◆ Transmit()

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

References MultiLinkOperationsTestBase::GetApplication(), MultiLinkOperationsTestBase::m_apMac, m_errorModel, m_nQosDataFrames, m_rtsCorrupted, m_sockAddr, ns3::ListErrorModel::SetList(), and MultiLinkOperationsTestBase::Transmit().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_errorModel

Ptr<ListErrorModel> ReleaseSeqNoAfterCtsTimeoutTest::m_errorModel
private

error rate model to corrupt first RTS frame

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

Referenced by DoSetup(), and Transmit().

◆ m_nQosDataFrames

std::size_t ReleaseSeqNoAfterCtsTimeoutTest::m_nQosDataFrames
private

counter for transmitted QoS data frames

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

Referenced by DoRun(), and Transmit().

◆ m_rtsCorrupted

bool ReleaseSeqNoAfterCtsTimeoutTest::m_rtsCorrupted
private

whether the first RTS frame has been corrupted

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

Referenced by Transmit().

◆ m_sockAddr

PacketSocketAddress ReleaseSeqNoAfterCtsTimeoutTest::m_sockAddr
private

packet socket address

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

Referenced by StartTraffic(), and Transmit().


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