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...
Public Member Functions | |
TestUnsupportedModulationReception () | |
Constructor. More... | |
virtual | ~TestUnsupportedModulationReception () |
void | CheckResults (void) |
Check correctness of transmitted frames. More... | |
void | Dropped (std::string context, Ptr< const Packet > packet, WifiPhyRxfailureReason reason) |
Callback invoked when PHY drops an incoming packet. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoRun (void) override |
Implementation to actually run this TestCase. More... | |
Private Attributes | |
uint16_t | m_dropped |
number of packets dropped by the AP because it was already receiving 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 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 TestCsse. More... | |
bool | IsStatusFailure (void) const |
Check if any tests failed. More... | |
bool | IsStatusSuccess (void) 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 (void) const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure (void) 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... | |
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 2380 of file wifi-phy-reception-test.cc.
TestUnsupportedModulationReception::TestUnsupportedModulationReception | ( | ) |
Constructor.
Definition at line 2406 of file wifi-phy-reception-test.cc.
|
virtual |
Definition at line 2412 of file wifi-phy-reception-test.cc.
void TestUnsupportedModulationReception::CheckResults | ( | void | ) |
Check correctness of transmitted frames.
Definition at line 2555 of file wifi-phy-reception-test.cc.
References m_dropped, and NS_TEST_EXPECT_MSG_EQ.
Referenced by 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 2429 of file wifi-phy-reception-test.cc.
References ns3::NetDeviceContainer::Add(), CheckResults(), ns3::Config::Connect(), Dropped(), ns3::NetDeviceContainer::Get(), ns3::NetDevice::GetAddress(), ns3::NetDevice::GetIfIndex(), ns3::WifiNetDevice::GetMac(), ns3::PacketSocketHelper::Install(), third::mac, ns3::MakeCallback(), ns3::MicroSeconds(), ns3::MilliSeconds(), third::mobility, third::phy, ns3::Seconds(), ns3::Config::SetDefault(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), third::wifi, ns3::WIFI_STANDARD_80211ac, ns3::WIFI_STANDARD_80211ax, third::wifiApNode, and third::wifiStaNodes.
void TestUnsupportedModulationReception::Dropped | ( | std::string | context, |
Ptr< const Packet > | packet, | ||
WifiPhyRxfailureReason | reason | ||
) |
Callback invoked when PHY drops an incoming packet.
context | the context |
packet | the packet that was dropped |
reason | the reason the packet was dropped |
Definition at line 2417 of file wifi-phy-reception-test.cc.
References m_dropped, and ns3::RXING.
Referenced by DoRun().
|
private |
number of packets dropped by the AP because it was already receiving
Definition at line 2403 of file wifi-phy-reception-test.cc.
Referenced by CheckResults(), and Dropped().