A configurable number of non-AP STAs associate with an AP. More...
Classes | |
| struct | ExpectedResults |
| Expected results. More... | |
| struct | InputParams |
| Input parameters. More... | |
Public Member Functions | |
| WifiQueueSchedulerTest (const InputParams ¶ms, const ExpectedResults &results) | |
| Constructor. | |
| Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| Caller graph was not generated because of its size. | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
| void | DoSetup () override |
| Implementation to do any local setup required for this TestCase. | |
| void | EnqueuePackets () |
| Enqueue packets according to input parameters. | |
| Ptr< PacketSocketClient > | GetApplication (std::size_t staId, std::size_t count, std::size_t pktSize) const |
| Get an application generating packets according to given parameters. | |
| void | Transmit (Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, Watt_u txPower) |
| Callback invoked when a FEM passes PSDUs to the PHY. | |
Private Attributes | |
| Ptr< ApWifiMac > | m_apMac |
| the AP wifi MAC | |
| std::vector< PacketSocketAddress > | m_dlSockets |
| packet socket addresses for DL traffic | |
| const Time | m_duration {MilliSeconds(100)} |
| simulation duration | |
| ExpectedResults | m_expectedResults |
| expected results | |
| InputParams | m_params |
| input parameters | |
| std::list< std::size_t > | m_servedStas |
| IDs of STAs in the order they are actually served. | |
| std::vector< Ptr< StaWifiMac > > | m_staMacs |
| the STA wifi MACs | |
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... | |
| 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. | |
| 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. | |
A configurable number of non-AP STAs associate with an AP.
All devices have the same number of links (1 or 2). The MAC queue scheduler to be installed on the devices is configurable, too. The test input is represented by a list of DL packets addressed to the non-AP STAs, along with the interval between the generation of consecutive packets. A-MPDU aggregation is disabled, so that one packet at a time is transmitted by the AP. The sequence of packets transmitted by the AP is compared to the expected sequence of packets based on the configured MAC queue scheduler.
Definition at line 48 of file wifi-queue-scheduler-test.cc.
| WifiQueueSchedulerTest::WifiQueueSchedulerTest | ( | const InputParams & | params, |
| const ExpectedResults & | results ) |
Constructor.
| params | the input parameters |
| results | the expected parameters |
Definition at line 137 of file wifi-queue-scheduler-test.cc.
References ns3::TestCase::TestCase(), m_expectedResults, m_params, and NS_TEST_ASSERT_MSG_EQ.
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 357 of file wifi-queue-scheduler-test.cc.
References ns3::Simulator::Destroy(), EnqueuePackets(), m_duration, m_expectedResults, m_servedStas, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Run(), and ns3::Simulator::Stop().
|
overrideprivatevirtual |
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 151 of file wifi-queue-scheduler-test.cc.
References ns3::AC_BE, ns3::WifiHelper::AssignStreams(), ns3::NodeList::Begin(), ns3::CreateObject(), ns3::DynamicCast(), ns3::NodeList::End(), ns3::PacketSocketHelper::Install(), m_apMac, m_dlSockets, m_duration, m_params, m_staMacs, ns3::MakeCallback(), NS_ASSERT, NS_TEST_ASSERT_MSG_NE, ns3::PacketSocketAddress::SetProtocol(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::WifiStaticSetupHelper::SetStaticAssociation(), ns3::WifiStaticSetupHelper::SetStaticBlockAck(), ns3::StaticCast(), Transmit(), and ns3::WIFI_STANDARD_80211be.
|
private |
Enqueue packets according to input parameters.
Definition at line 344 of file wifi-queue-scheduler-test.cc.
References ns3::Node::AddApplication(), GetApplication(), m_apMac, m_params, and ns3::Simulator::Schedule().
Referenced by DoRun().
|
private |
Get an application generating packets according to given parameters.
| staId | the ID of the STA the packets are addressed to |
| count | the number of packets to generate |
| pktSize | the size of the packets to generate |
Definition at line 328 of file wifi-queue-scheduler-test.cc.
References ns3::CreateObject(), m_dlSockets, m_duration, and ns3::Simulator::Now().
Referenced by EnqueuePackets().
|
private |
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 |
| txPower | the tx power |
Definition at line 265 of file wifi-queue-scheduler-test.cc.
References m_apMac, m_expectedResults, m_servedStas, m_staMacs, ns3::Simulator::Now(), NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_LT, NS_TEST_ASSERT_MSG_NE, and NS_TEST_EXPECT_MSG_EQ.
Referenced by DoSetup().
the AP wifi MAC
Definition at line 118 of file wifi-queue-scheduler-test.cc.
Referenced by DoSetup(), EnqueuePackets(), and Transmit().
|
private |
packet socket addresses for DL traffic
Definition at line 120 of file wifi-queue-scheduler-test.cc.
Referenced by DoSetup(), and GetApplication().
|
private |
simulation duration
Definition at line 121 of file wifi-queue-scheduler-test.cc.
Referenced by DoRun(), DoSetup(), and GetApplication().
|
private |
expected results
Definition at line 116 of file wifi-queue-scheduler-test.cc.
Referenced by WifiQueueSchedulerTest(), DoRun(), and Transmit().
|
private |
input parameters
Definition at line 115 of file wifi-queue-scheduler-test.cc.
Referenced by WifiQueueSchedulerTest(), DoSetup(), and EnqueuePackets().
|
private |
IDs of STAs in the order they are actually served.
Definition at line 117 of file wifi-queue-scheduler-test.cc.
Referenced by DoRun(), and Transmit().
|
private |
the STA wifi MACs
Definition at line 119 of file wifi-queue-scheduler-test.cc.
Referenced by DoSetup(), and Transmit().