Test release of sequence numbers upon CTS timeout in multi-link operations. More...
Public Member Functions | |
ReleaseSeqNoAfterCtsTimeoutTest () | |
~ReleaseSeqNoAfterCtsTimeoutTest () override=default | |
Public Member Functions inherited from MultiLinkOperationsTestBase | |
MultiLinkOperationsTestBase (const std::string &name, uint8_t nStations, const BaseParams &baseParams) | |
Constructor. More... | |
~MultiLinkOperationsTestBase () override=default | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
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 MultiLinkOperationsTestBase | |
void | CheckAddresses (Ptr< const WifiPsdu > psdu, std::optional< Direction > direction=std::nullopt) |
Check that the Address 1 and Address 2 fields of the given PSDU contain device MAC addresses. More... | |
Ptr< PacketSocketClient > | GetApplication (const PacketSocketAddress &sockAddr, std::size_t count, std::size_t pktSize, Time delay=Seconds(0), uint8_t priority=0) const |
virtual void | L7Receive (uint8_t nodeId, Ptr< const Packet > p, const Address &addr) |
Function to trace packets received by the server application. 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... | |
TestCase * | GetParent () 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 Member Functions | |
void | StartTraffic () override |
Start the generation of traffic (needs to be overridden) More... | |
Private Attributes | |
Ptr< ListErrorModel > | m_errorModel |
error rate model to corrupt first RTS frame More... | |
std::size_t | m_nQosDataFrames |
counter for transmitted QoS data frames More... | |
bool | m_rtsCorrupted |
whether the first RTS frame has been corrupted More... | |
PacketSocketAddress | m_sockAddr |
packet socket address 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... | |
Protected Types inherited from MultiLinkOperationsTestBase | |
using | ChannelMap = std::map< FrequencyRange, Ptr< MultiModelSpectrumChannel > > |
PHY band-indexed map of spectrum channels. More... | |
enum | Direction { DL = 0 , UL } |
Uplink or Downlink direction. More... | |
Protected Attributes inherited from MultiLinkOperationsTestBase | |
const std::vector< std::string > | m_apChannels |
strings specifying channels for AP More... | |
Ptr< ApWifiMac > | m_apMac |
AP wifi MAC. More... | |
Time | m_duration {Seconds(1)} |
simulation duration More... | |
const std::vector< uint8_t > | m_fixedPhyBands |
links on non-AP MLD with fixed PHY band More... | |
uint16_t | m_lastAid |
AID of last associated station. More... | |
uint8_t | m_nStations |
number of stations to create More... | |
std::vector< std::size_t > | m_rxPkts |
number of packets received at application layer by each node (index is node ID) More... | |
const std::vector< std::string > | m_staChannels |
strings specifying channels for STA More... | |
std::vector< Ptr< StaWifiMac > > | m_staMacs |
STA wifi MACs. More... | |
std::vector< FrameInfo > | m_txPsdus |
transmitted PSDUs More... | |
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 2963 of file wifi-mlo-test.cc.
ReleaseSeqNoAfterCtsTimeoutTest::ReleaseSeqNoAfterCtsTimeoutTest | ( | ) |
Definition at line 2987 of file wifi-mlo-test.cc.
|
overridedefault |
|
overrideprotectedvirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 3057 of file wifi-mlo-test.cc.
References MultiLinkOperationsTestBase::m_duration, m_nQosDataFrames, MultiLinkOperationsTestBase::m_txPsdus, NS_TEST_EXPECT_MSG_EQ, and ns3::PeekPointer().
|
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 3001 of file wifi-mlo-test.cc.
References MultiLinkOperationsTestBase::DoSetup(), m_errorModel, MultiLinkOperationsTestBase::m_staMacs, and ns3::Config::SetDefault().
|
overrideprivatevirtual |
Start the generation of traffic (needs to be overridden)
Reimplemented from MultiLinkOperationsTestBase.
Definition at line 3016 of file wifi-mlo-test.cc.
References ns3::Node::AddApplication(), MultiLinkOperationsTestBase::GetApplication(), ns3::WifiMac::GetDevice(), ns3::WifiNetDevice::GetIfIndex(), ns3::WifiNetDevice::GetNode(), MultiLinkOperationsTestBase::m_apMac, m_sockAddr, MultiLinkOperationsTestBase::m_staMacs, ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), and ns3::PacketSocketAddress::SetSingleDevice().
|
overrideprotectedvirtual |
Callback invoked when a FEM passes PSDUs to the PHY.
mac | the MAC transmitting the PSDUs |
phyId | the ID of the PHY transmitting the PSDUs |
psduMap | the PSDU map |
txVector | the TX vector |
txPowerW | the tx power in Watts |
Reimplemented from MultiLinkOperationsTestBase.
Definition at line 3027 of file wifi-mlo-test.cc.
References ns3::Node::AddApplication(), MultiLinkOperationsTestBase::GetApplication(), ns3::WifiMac::GetDevice(), ns3::WifiNetDevice::GetNode(), MultiLinkOperationsTestBase::m_apMac, m_errorModel, m_nQosDataFrames, m_rtsCorrupted, m_sockAddr, third::mac, ns3::ListErrorModel::SetList(), and MultiLinkOperationsTestBase::Transmit().
|
private |
error rate model to corrupt first RTS frame
Definition at line 2983 of file wifi-mlo-test.cc.
Referenced by DoSetup(), and Transmit().
|
private |
counter for transmitted QoS data frames
Definition at line 2982 of file wifi-mlo-test.cc.
Referenced by DoRun(), and Transmit().
|
private |
whether the first RTS frame has been corrupted
Definition at line 2984 of file wifi-mlo-test.cc.
Referenced by Transmit().
|
private |
packet socket address
Definition at line 2981 of file wifi-mlo-test.cc.
Referenced by StartTraffic(), and Transmit().