Ampdu Aggregation Test. More...
Classes | |
struct | Params |
Test parameters. More... | |
Public Member Functions | |
AmpduAggregationTest () | |
AmpduAggregationTest (const std::string &name, const Params ¶ms) | |
Construct object with non-default test parameters. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
void | DequeueMpdus (const std::vector< Ptr< WifiMpdu >> &mpduList) |
Dequeue a PSDU. More... | |
void | EnqueuePkts (std::size_t count, uint32_t size, const Mac48Address &dest) |
Enqueue the given number of packets addressed to the given station and of the given size. More... | |
void | EstablishAgreement (const Mac48Address &recipient) |
Establish a BlockAck agreement. More... | |
Ptr< QosTxop > | GetBeQueue () const |
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 TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () 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 () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () 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... | |
Protected Attributes | |
Ptr< StaWifiMac > | m_mac |
Mac. More... | |
Params | m_params |
test parameters More... | |
std::vector< Ptr< WifiPhy > > | m_phys |
Phys. More... | |
Private Member Functions | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. More... | |
void | DoTeardown () override |
Implementation to do any local setup required for this TestCase. More... | |
void | MpduDiscarded (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu) |
Fired when the MAC discards an MPDU. More... | |
Private Attributes | |
Ptr< WifiNetDevice > | m_device |
WifiNetDevice. More... | |
bool | m_discarded |
whether the packet should be discarded More... | |
ObjectFactory | m_factory |
factory More... | |
std::vector< Ptr< WifiRemoteStationManager > > | m_managers |
remote station managers 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... | |
Ampdu Aggregation Test.
Definition at line 63 of file wifi-aggregation-test.cc.
AmpduAggregationTest::AmpduAggregationTest | ( | ) |
Definition at line 140 of file wifi-aggregation-test.cc.
AmpduAggregationTest::AmpduAggregationTest | ( | const std::string & | name, |
const Params & | params | ||
) |
Construct object with non-default test parameters.
name | the name of the test case |
params | the test parameters |
Definition at line 152 of file wifi-aggregation-test.cc.
Dequeue a PSDU.
mpduList | the MPDUs contained in the PSDU |
Definition at line 331 of file wifi-aggregation-test.cc.
References ns3::AC_BE, ns3::WifiMac::GetTxopQueue(), and m_mac.
Referenced by DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRun(), and EhtAggregationTest::DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Reimplemented in EhtAggregationTest, HeAggregationTest, and TwoLevelAggregationTest.
Definition at line 378 of file wifi-aggregation-test.cc.
References ns3::WifiTxParameters::Clear(), DequeueMpdus(), EnqueuePkts(), GetBeQueue(), ns3::WifiMac::GetFrameExchangeManager(), ns3::QosTxop::GetNextMpdu(), ns3::Txop::GetWifiMacQueue(), ns3::WifiMac::GetWifiRemoteStationManager(), m_discarded, m_mac, m_managers, m_phys, ns3::WifiMac::m_txMiddle, ns3::WifiTxParameters::m_txVector, ns3::MakeCallback(), Min, MpduDiscarded(), NS_TEST_EXPECT_MSG_EQ, ns3::QosTxop::PeekNextMpdu(), ns3::SINGLE_LINK_OP_ID, and ns3::ObjectBase::TraceConnectWithoutContext().
|
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 166 of file wifi-aggregation-test.cc.
References ns3::AC_BE, ns3::StaWifiMac::StaLinkEntity::bssid, ns3::WifiMac::ConfigureStandard(), ns3::ObjectFactory::Create(), AmpduAggregationTest::Params::dataMode, EstablishAgreement(), GetBeQueue(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetLinks(), ns3::WifiMac::GetTxopQueue(), openflow-switch::link, m_device, m_factory, m_mac, m_managers, m_params, m_phys, AmpduAggregationTest::Params::maxAmpduSize, AmpduAggregationTest::Params::maxAmsduSize, AmpduAggregationTest::Params::nLinks, ns3::ObjectFactory::Set(), ns3::WifiMac::SetAddress(), ns3::ObjectBase::SetAttribute(), ns3::WifiMac::SetDevice(), ns3::WifiNetDevice::SetEhtConfiguration(), ns3::WifiNetDevice::SetHeConfiguration(), ns3::WifiNetDevice::SetHtConfiguration(), ns3::WifiNetDevice::SetMac(), ns3::WifiMac::SetMacQueueScheduler(), ns3::EhtCapabilities::SetMaxAmpduLength(), ns3::HeCapabilities::SetMaxAmpduLength(), ns3::HtCapabilities::SetMaxAmpduLength(), ns3::HtCapabilities::SetMaxAmsduLength(), ns3::EhtCapabilities::SetMaxMpduLength(), ns3::VhtCapabilities::SetMaxMpduLength(), ns3::WifiNetDevice::SetPhys(), ns3::WifiNetDevice::SetRemoteStationManagers(), ns3::WifiNetDevice::SetStandard(), ns3::StaWifiMac::SetState(), ns3::ObjectFactory::SetTypeId(), ns3::WifiNetDevice::SetVhtConfiguration(), ns3::StaWifiMac::SetWifiPhys(), ns3::WifiMac::SetWifiRemoteStationManagers(), AmpduAggregationTest::Params::standard, AmpduAggregationTest::Params::txopLimit, ns3::WIFI_STANDARD_80211ac, ns3::WIFI_STANDARD_80211ax, and ns3::WIFI_STANDARD_80211be.
|
overrideprivatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test teardown
Reimplemented from ns3::TestCase.
Definition at line 484 of file wifi-aggregation-test.cc.
References ns3::Object::Dispose(), m_device, and m_managers.
|
protected |
Enqueue the given number of packets addressed to the given station and of the given size.
count | the number of packets |
size | the size (bytes) of each packet |
dest | the destination address |
Definition at line 361 of file wifi-aggregation-test.cc.
References GetBeQueue(), ns3::Txop::GetWifiMacQueue(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_QOSDATA.
Referenced by DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRun(), and EhtAggregationTest::DoRun().
|
protected |
Establish a BlockAck agreement.
recipient | the recipient MAC address |
Definition at line 338 of file wifi-aggregation-test.cc.
References AmpduAggregationTest::Params::bufferSize, ns3::QosTxop::GetBaManager(), GetBeQueue(), ns3::MgtAddBaRequestHeader::GetTid(), ns3::MgtAddBaRequestHeader::GetTimeout(), ns3::MgtAddBaRequestHeader::IsAmsduSupported(), m_params, ns3::MgtAddBaResponseHeader::SetAmsduSupport(), ns3::MgtAddBaRequestHeader::SetBufferSize(), ns3::MgtAddBaResponseHeader::SetBufferSize(), ns3::MgtAddBaRequestHeader::SetImmediateBlockAck(), ns3::MgtAddBaResponseHeader::SetImmediateBlockAck(), ns3::MgtAddBaRequestHeader::SetStartingSequence(), ns3::MgtAddBaResponseHeader::SetStatusCode(), ns3::StatusCode::SetSuccess(), ns3::MgtAddBaRequestHeader::SetTid(), ns3::MgtAddBaResponseHeader::SetTid(), ns3::MgtAddBaRequestHeader::SetTimeout(), and ns3::MgtAddBaResponseHeader::SetTimeout().
Referenced by DoSetup().
Definition at line 325 of file wifi-aggregation-test.cc.
References ns3::WifiMac::GetBEQueue(), and m_mac.
Referenced by DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRun(), EhtAggregationTest::DoRun(), DoSetup(), EnqueuePkts(), and EstablishAgreement().
|
private |
Fired when the MAC discards an MPDU.
reason | the reason why the MPDU was discarded |
mpdu | the discarded MPDU |
Definition at line 160 of file wifi-aggregation-test.cc.
References m_discarded.
Referenced by DoRun().
|
private |
WifiNetDevice.
Definition at line 134 of file wifi-aggregation-test.cc.
Referenced by DoSetup(), and DoTeardown().
|
private |
whether the packet should be discarded
Definition at line 137 of file wifi-aggregation-test.cc.
Referenced by DoRun(), and MpduDiscarded().
|
private |
|
protected |
Mac.
Definition at line 117 of file wifi-aggregation-test.cc.
Referenced by DequeueMpdus(), DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRun(), EhtAggregationTest::DoRun(), DoSetup(), and GetBeQueue().
|
private |
remote station managers
Definition at line 135 of file wifi-aggregation-test.cc.
Referenced by DoRun(), DoSetup(), and DoTeardown().
|
protected |
test parameters
Definition at line 119 of file wifi-aggregation-test.cc.
Referenced by TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRun(), EhtAggregationTest::DoRun(), DoSetup(), and EstablishAgreement().
Phys.
Definition at line 118 of file wifi-aggregation-test.cc.
Referenced by DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRun(), EhtAggregationTest::DoRun(), and DoSetup().