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

Unsupported Modulation Reception Test This test creates a mixed network, in which an HE STA and a VHT STA are associated to an HE AP and send uplink traffic. More...

+ Inheritance diagram for TestUnsupportedModulationReception:
+ Collaboration diagram for TestUnsupportedModulationReception:

Public Member Functions

 TestUnsupportedModulationReception ()
 
 ~TestUnsupportedModulationReception () override=default
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void CheckResults ()
 Check correctness of transmitted frames.
 
void DoRun () override
 Implementation to actually run this TestCase.
 
void Dropped (std::string context, Ptr< const Packet > packet, WifiPhyRxfailureReason reason)
 Callback invoked when PHY drops an incoming packet.
 

Private Attributes

uint16_t m_dropped {0}
 number of packets dropped by the AP because it was already receiving
 

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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto TAKES_FOREVER
 
- 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.
 

Detailed Description

Unsupported Modulation Reception Test This test creates a mixed network, in which an HE STA and a VHT STA are associated to an HE AP and send uplink traffic.

In the simulated deployment the VHT STA's backoff will expire while the HE STA is sending a packet, and the VHT STA will access the channel anyway. This happens because the HE STA is using an HeMcs that the VHT STA is not able to demodulate: the VHT STA will correctly stop listening to the HE packet, but it will not update its InterferenceHelper with the HE packet. Later on, this leads to the STA wrongly assuming the medium is available when its back-off expires in the middle of the HE packet. We detect that this is happening by looking at the reason why the AP is failing to decode the preamble from the VHT STA's transmission: if the reason is that it's in RX already, the test fails. The test is based on wifi-txop-test.cc.

Definition at line 4020 of file wifi-phy-reception-test.cc.

Constructor & Destructor Documentation

◆ TestUnsupportedModulationReception()

TestUnsupportedModulationReception::TestUnsupportedModulationReception ( )

Definition at line 4044 of file wifi-phy-reception-test.cc.

◆ ~TestUnsupportedModulationReception()

TestUnsupportedModulationReception::~TestUnsupportedModulationReception ( )
overridedefault

Member Function Documentation

◆ CheckResults()

void TestUnsupportedModulationReception::CheckResults ( )
private

Check correctness of transmitted frames.

Definition at line 4199 of file wifi-phy-reception-test.cc.

References m_dropped, and NS_TEST_EXPECT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void TestUnsupportedModulationReception::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

< number of stations

< container for stations' NetDevices

< container for AP's NetDevice

Implements ns3::TestCase.

Definition at line 4064 of file wifi-phy-reception-test.cc.

References ns3::NetDeviceContainer::Add(), CheckResults(), ns3::Config::Connect(), ns3::Simulator::Destroy(), Dropped(), ns3::NetDeviceContainer::Get(), ns3::PacketSocketHelper::Install(), ns3::MakeCallback(), ns3::MicroSeconds(), ns3::MilliSeconds(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::Config::SetDefault(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::WifiMac::SetSsid(), ns3::Simulator::Stop(), ns3::WIFI_STANDARD_80211ac, and ns3::WIFI_STANDARD_80211ax.

+ Here is the call graph for this function:

◆ Dropped()

void TestUnsupportedModulationReception::Dropped ( std::string  context,
Ptr< const Packet packet,
WifiPhyRxfailureReason  reason 
)
private

Callback invoked when PHY drops an incoming packet.

Parameters
contextthe context
packetthe packet that was dropped
reasonthe reason the packet was dropped

Definition at line 4051 of file wifi-phy-reception-test.cc.

References m_dropped, and ns3::RXING.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_dropped

uint16_t TestUnsupportedModulationReception::m_dropped {0}
private

number of packets dropped by the AP because it was already receiving

Definition at line 4041 of file wifi-phy-reception-test.cc.

Referenced by CheckResults(), and Dropped().


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