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

Test CCA busy notifications on EMLSR clients. More...

#include "wifi-emlsr-test.h"

+ Inheritance diagram for EmlsrCcaBusyTest:
+ Collaboration diagram for EmlsrCcaBusyTest:

Public Member Functions

 EmlsrCcaBusyTest (uint16_t auxPhyMaxChWidth)
 Constructor.
 
 ~EmlsrCcaBusyTest () override=default
 
- Public Member Functions inherited from EmlsrOperationsTestBase
 EmlsrOperationsTestBase (const std::string &name)
 Constructor.
 
 ~EmlsrOperationsTestBase () 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.
 
- Protected Member Functions inherited from EmlsrOperationsTestBase
void CheckBlockedLink (Ptr< WifiMac > mac, Mac48Address dest, uint8_t linkId, WifiQueueBlockedReason reason, bool blocked, std::string description, bool testUnblockedForOtherReasons=true)
 Check whether QoS data unicast transmissions addressed to the given destination on the given link are blocked or unblocked for the given reason on the given device.
 
void DoSetup () override
 Implementation to do any local setup required for this TestCase.
 
Ptr< PacketSocketClientGetApplication (TrafficDirection dir, std::size_t staId, std::size_t count, std::size_t pktSize) const
 
virtual void Transmit (Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
 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 CheckPoint1 ()
 Perform checks after that the preamble of the first PPDU has been received.
 
void CheckPoint2 ()
 Perform checks after that the main PHY completed the link switch.
 
void CheckPoint3 ()
 Perform checks after that the aux PHY completed the link switch.
 
void StartTraffic () override
 Start the generation of traffic (needs to be overridden)
 
void TransmitPacketToAp (uint8_t linkId)
 Make the other MLD transmit a packet to the AP on the given link.
 

Private Attributes

uint16_t m_auxPhyMaxChWidth
 max channel width (MHz) supported by aux PHYs
 
Time m_channelSwitchDelay
 the PHY channel switch delay
 
uint8_t m_currMainPhyLinkId
 the ID of the link the main PHY switches from
 
uint8_t m_nextMainPhyLinkId
 the ID of the link the main PHY switches to
 

Additional Inherited Members

- Public Types inherited from EmlsrOperationsTestBase
enum  TrafficDirection : uint8_t { DOWNLINK = 0 , UPLINK }
 Enumeration for traffic directions. More...
 
- 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
 
- Protected Attributes inherited from EmlsrOperationsTestBase
Ptr< ApWifiMacm_apMac
 AP wifi MAC.
 
std::vector< PacketSocketAddressm_dlSockets
 packet socket address for DL traffic
 
Time m_duration {0}
 simulation duration
 
bool m_establishBaDl {false}
 whether BA needs to be established (for TID 0) with the AP as originator
 
bool m_establishBaUl {false}
 whether BA needs to be established (for TID 0) with the AP as recipient
 
uint16_t m_lastAid {0}
 AID of last associated station.
 
std::set< uint8_t > m_linksToEnableEmlsrOn
 IDs of the links on which EMLSR mode has to be enabled.
 
uint8_t m_mainPhyId {0}
 ID of the main PHY.
 
std::size_t m_nEmlsrStations {1}
 number of stations to create that activate EMLSR
 
std::size_t m_nNonEmlsrStations {0}
 number of stations to create that do not activate EMLSR
 
std::vector< Timem_paddingDelay
 Padding Delay advertised by the non-AP MLD.
 
std::vector< Ptr< StaWifiMac > > m_staMacs
 MACs of the non-AP MLDs.
 
std::vector< Timem_transitionDelay
 Transition Delay advertised by the non-AP MLD.
 
Time m_transitionTimeout {MicroSeconds(128)}
 Transition Timeout advertised by the AP MLD.
 
std::vector< FrameInfom_txPsdus
 transmitted PSDUs
 
std::vector< PacketSocketAddressm_ulSockets
 packet socket address for UL traffic
 

Detailed Description

Test CCA busy notifications on EMLSR clients.

SwitchAuxPhy is set to true, so that the aux PHY starts switching when the main PHY switch is completed.

  • Main PHY switches to a link on which an aux PHY is operating. Right after the start of the channel switch, the AP transmits a frame to another device on the aux PHY link. Verify that, once the main PHY is operating on the new link, the channel access manager on that link is notified of CCA busy until the end of the transmission
  • When the main PHY switch is completed, the aux PHY switches to a link on which no PHY is operating. Before the aux PHY starts switching, the AP starts transmitting a frame to another device on the link on which no PHY is operating. Verify that, once the aux PHY is operating on the new link, the channel access manager on that link is notified of CCA busy until the end of the transmission

Definition at line 809 of file wifi-emlsr-test.h.

Constructor & Destructor Documentation

◆ EmlsrCcaBusyTest()

EmlsrCcaBusyTest::EmlsrCcaBusyTest ( uint16_t auxPhyMaxChWidth)

Constructor.

Parameters
auxPhyMaxChWidthmax channel width (MHz) supported by aux PHYs

Definition at line 4064 of file wifi-emlsr-test.cc.

References EmlsrOperationsTestBase::m_duration, EmlsrOperationsTestBase::m_establishBaUl, EmlsrOperationsTestBase::m_linksToEnableEmlsrOn, EmlsrOperationsTestBase::m_mainPhyId, EmlsrOperationsTestBase::m_nEmlsrStations, EmlsrOperationsTestBase::m_nNonEmlsrStations, EmlsrOperationsTestBase::m_transitionDelay, ns3::MicroSeconds(), and ns3::Seconds().

+ Here is the call graph for this function:

◆ ~EmlsrCcaBusyTest()

EmlsrCcaBusyTest::~EmlsrCcaBusyTest ( )
overridedefault

Member Function Documentation

◆ CheckPoint1()

void EmlsrCcaBusyTest::CheckPoint1 ( )
private

Perform checks after that the preamble of the first PPDU has been received.

                          ┌───────────────┐

[link X] │ other to AP │CP3 ──────────────────────────────┴───────────────┴────────────────────────────────────────────── |---— main PHY ---—| |----------------— aux PHY ------------------— ._ _/ . _ _/ . _ _/ . _ _/ [link Y] . CP1 \/ CP2 .┌───────────────┐ .│ other to AP │ ─────────────────────────┴───────────────┴──────────────────────────────────────────────────── |---------— aux PHY -------—|-------------------— main PHY -------------------------—

Definition at line 4188 of file wifi-emlsr-test.cc.

References CheckPoint2(), EmlsrOperationsTestBase::m_mainPhyId, m_nextMainPhyLinkId, EmlsrOperationsTestBase::m_staMacs, ns3::Simulator::Now(), NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT_OR_EQ, NS_TEST_EXPECT_MSG_LT, NS_TEST_EXPECT_MSG_NE, ns3::Simulator::Schedule(), and ns3::WIFI_CHANLIST_PRIMARY.

Referenced by StartTraffic().

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

◆ CheckPoint2()

void EmlsrCcaBusyTest::CheckPoint2 ( )
private

Perform checks after that the main PHY completed the link switch.

Definition at line 4235 of file wifi-emlsr-test.cc.

References CheckPoint3(), m_channelSwitchDelay, m_nextMainPhyLinkId, EmlsrOperationsTestBase::m_staMacs, ns3::Simulator::Now(), NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_GT_OR_EQ, ns3::Simulator::Schedule(), and ns3::WIFI_CHANLIST_PRIMARY.

Referenced by CheckPoint1().

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

◆ CheckPoint3()

void EmlsrCcaBusyTest::CheckPoint3 ( )
private

Perform checks after that the aux PHY completed the link switch.

Definition at line 4259 of file wifi-emlsr-test.cc.

References m_currMainPhyLinkId, EmlsrOperationsTestBase::m_staMacs, ns3::Simulator::Now(), NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_GT_OR_EQ, and ns3::WIFI_CHANLIST_PRIMARY.

Referenced by CheckPoint2().

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

◆ DoRun()

void EmlsrCcaBusyTest::DoRun ( )
overrideprotectedvirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 4082 of file wifi-emlsr-test.cc.

References ns3::Simulator::Destroy(), EmlsrOperationsTestBase::m_duration, ns3::Simulator::Run(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ DoSetup()

void EmlsrCcaBusyTest::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 4091 of file wifi-emlsr-test.cc.

References EmlsrOperationsTestBase::DoSetup(), EmlsrOperationsTestBase::m_apMac, m_auxPhyMaxChWidth, m_channelSwitchDelay, EmlsrOperationsTestBase::m_staMacs, ns3::Config::SetDefault(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PHY_BAND_6GHZ.

+ Here is the call graph for this function:

◆ StartTraffic()

void EmlsrCcaBusyTest::StartTraffic ( )
overrideprivatevirtual

Start the generation of traffic (needs to be overridden)

Reimplemented from EmlsrOperationsTestBase.

Definition at line 4142 of file wifi-emlsr-test.cc.

References CheckPoint1(), ns3::EmlsrManager::DONT_REQUEST_ACCESS, ns3::EmlsrManager::DONT_RESET_BACKOFF, m_channelSwitchDelay, m_currMainPhyLinkId, EmlsrOperationsTestBase::m_mainPhyId, m_nextMainPhyLinkId, EmlsrOperationsTestBase::m_staMacs, ns3::MicroSeconds(), NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Schedule(), and TransmitPacketToAp().

+ Here is the call graph for this function:

◆ TransmitPacketToAp()

void EmlsrCcaBusyTest::TransmitPacketToAp ( uint8_t linkId)
private

Make the other MLD transmit a packet to the AP on the given link.

Parameters
linkIdthe ID of the given link

Definition at line 4113 of file wifi-emlsr-test.cc.

References ns3::AC_BE, EmlsrOperationsTestBase::GetApplication(), EmlsrOperationsTestBase::m_staMacs, ns3::Simulator::Now(), ns3::Time::NS, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), and EmlsrOperationsTestBase::UPLINK.

Referenced by StartTraffic().

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

Member Data Documentation

◆ m_auxPhyMaxChWidth

uint16_t EmlsrCcaBusyTest::m_auxPhyMaxChWidth
private

max channel width (MHz) supported by aux PHYs

Definition at line 850 of file wifi-emlsr-test.h.

Referenced by DoSetup().

◆ m_channelSwitchDelay

Time EmlsrCcaBusyTest::m_channelSwitchDelay
private

the PHY channel switch delay

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

Referenced by CheckPoint2(), DoSetup(), and StartTraffic().

◆ m_currMainPhyLinkId

uint8_t EmlsrCcaBusyTest::m_currMainPhyLinkId
private

the ID of the link the main PHY switches from

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

Referenced by CheckPoint3(), and StartTraffic().

◆ m_nextMainPhyLinkId

uint8_t EmlsrCcaBusyTest::m_nextMainPhyLinkId
private

the ID of the link the main PHY switches to

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

Referenced by CheckPoint1(), CheckPoint2(), and StartTraffic().


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