Two BSSes, each with one AP and one non-AP STA, are configured to operate on different channels. More...
Inheritance diagram for WifiUseAvailBwTest:
Collaboration diagram for WifiUseAvailBwTest:Classes | |
| struct | FrameInfo |
| Information about transmitted frames. More... | |
Public Member Functions | |
| WifiUseAvailBwTest (std::initializer_list< std::string > channelStr, uint16_t bss0Width) | |
| Constructor. | |
| ~WifiUseAvailBwTest () override | |
| void | CheckResults () |
| Check correctness of transmitted frames. | |
| void | L7Receive (uint8_t bss, Ptr< const Packet > p, const Address &addr) |
| Function to trace packets received by the server application in the given BSS. | |
| void | Transmit (uint8_t bss, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) |
| Callback invoked when a PHY receives a PSDU to transmit. | |
Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
Private Attributes | |
| NetDeviceContainer | m_apDevices |
| container for AP's NetDevice | |
| uint16_t | m_bss0Width |
| width (MHz) of the transmission in BSS 0 started when BSS 1 is transmitting | |
| std::vector< std::string > | m_channelStr |
| channel setting strings | |
| std::array< uint8_t, 2 > | m_rcvPkts |
| number of packets received by the stations | |
| std::array< PacketSocketAddress, 2 > | m_sockets |
| packet sockets for the two BSSes | |
| NetDeviceContainer | m_staDevices |
| container for stations' NetDevices | |
| uint8_t | m_txPkts |
| TX packets per BSS (in addition to the two required to establish BA agreement) | |
| std::vector< FrameInfo > | m_txPsdus |
| transmitted PSDUs | |
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. | |
| void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
| Add an individual child TestCase to this test suite. | |
| TestCase * | GetParent () 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. | |
Two BSSes, each with one AP and one non-AP STA, are configured to operate on different channels.
Specifically, the operating channel of BSS 1 is the secondary<X> channel of BSS 0, where X is half the width of the channel used by BSS 0. This test demonstrates that, if a transmission is ongoing on BSS 1, we can have a transmission on BSS 0 on its primary<X> channel.
Definition at line 50 of file wifi-dynamic-bw-op-test.cc.
| WifiUseAvailBwTest::WifiUseAvailBwTest | ( | std::initializer_list< std::string > | channelStr, |
| uint16_t | bss0Width | ||
| ) |
Constructor.
| channelStr | channel setting strings for BSS 0 and BSS 1 |
| bss0Width | width (MHz) of the transmission in BSS 0 started when BSS 1 is transmitting |
Definition at line 108 of file wifi-dynamic-bw-op-test.cc.
|
override |
Definition at line 118 of file wifi-dynamic-bw-op-test.cc.
| void WifiUseAvailBwTest::CheckResults | ( | ) |
Check correctness of transmitted frames.
Definition at line 324 of file wifi-dynamic-bw-op-test.cc.
References ns3::NetDeviceContainer::Get(), m_apDevices, m_bss0Width, m_rcvPkts, m_txPkts, m_txPsdus, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and NS_TEST_EXPECT_MSG_LT.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 186 of file wifi-dynamic-bw-op-test.cc.
References ns3::NetDeviceContainer::Add(), ns3::Node::AddApplication(), CheckResults(), ns3::Config::ConnectWithoutContext(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), ns3::PacketSocketHelper::Install(), L7Receive(), m_apDevices, m_channelStr, m_sockets, m_staDevices, m_txPkts, ns3::MakeCallback(), ns3::MicroSeconds(), ns3::MilliSeconds(), NS_LOG_INFO, ns3::Simulator::Run(), ns3::Seconds(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::WifiMacHelper::SetType(), ns3::Simulator::Stop(), Transmit(), and ns3::WIFI_STANDARD_80211ax.
Here is the call graph for this function:Function to trace packets received by the server application in the given BSS.
| bss | the given BSS |
| p | the packet |
| addr | the address |
Definition at line 123 of file wifi-dynamic-bw-op-test.cc.
References m_rcvPkts, and NS_LOG_INFO.
Referenced by DoRun().
Here is the caller graph for this function:| void WifiUseAvailBwTest::Transmit | ( | uint8_t | bss, |
| WifiConstPsduMap | psduMap, | ||
| WifiTxVector | txVector, | ||
| double | txPowerW | ||
| ) |
Callback invoked when a PHY receives a PSDU to transmit.
| bss | the BSS the PSDU belongs to |
| psduMap | the PSDU map |
| txVector | the TX vector |
| txPowerW | the tx power in Watts |
Definition at line 130 of file wifi-dynamic-bw-op-test.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::NetDeviceContainer::Get(), m_apDevices, m_bss0Width, m_sockets, m_txPkts, m_txPsdus, ns3::MicroSeconds(), ns3::MilliSeconds(), ns3::Simulator::Now(), NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Schedule(), ns3::Seconds(), and ns3::WIFI_PHY_BAND_5GHZ.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
container for AP's NetDevice
Definition at line 100 of file wifi-dynamic-bw-op-test.cc.
Referenced by CheckResults(), DoRun(), and Transmit().
|
private |
width (MHz) of the transmission in BSS 0 started when BSS 1 is transmitting
Definition at line 97 of file wifi-dynamic-bw-op-test.cc.
Referenced by CheckResults(), and Transmit().
|
private |
channel setting strings
Definition at line 96 of file wifi-dynamic-bw-op-test.cc.
Referenced by DoRun().
|
private |
number of packets received by the stations
Definition at line 105 of file wifi-dynamic-bw-op-test.cc.
Referenced by CheckResults(), and L7Receive().
|
private |
packet sockets for the two BSSes
Definition at line 101 of file wifi-dynamic-bw-op-test.cc.
Referenced by DoRun(), and Transmit().
|
private |
container for stations' NetDevices
Definition at line 99 of file wifi-dynamic-bw-op-test.cc.
Referenced by DoRun().
|
private |
TX packets per BSS (in addition to the two required to establish BA agreement)
Definition at line 103 of file wifi-dynamic-bw-op-test.cc.
Referenced by CheckResults(), DoRun(), and Transmit().
|
private |
transmitted PSDUs
Definition at line 102 of file wifi-dynamic-bw-op-test.cc.
Referenced by CheckResults(), and Transmit().