A Discrete-Event Network Simulator
API
AmpduAggregationTest Class Reference

Ampdu Aggregation Test. More...

+ Inheritance diagram for AmpduAggregationTest:
+ Collaboration diagram for AmpduAggregationTest:

Classes

struct  Params
 Test parameters. More...
 

Public Member Functions

 AmpduAggregationTest ()
 
 AmpduAggregationTest (const std::string &name, const Params &params)
 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
 
TestCaseoperator= (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< QosTxopGetBeQueue () 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...
 
TestCaseGetParent () 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< StaWifiMacm_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< WifiNetDevicem_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...
 

Detailed Description

Ampdu Aggregation Test.

Definition at line 63 of file wifi-aggregation-test.cc.

Constructor & Destructor Documentation

◆ AmpduAggregationTest() [1/2]

AmpduAggregationTest::AmpduAggregationTest ( )

Definition at line 140 of file wifi-aggregation-test.cc.

◆ AmpduAggregationTest() [2/2]

AmpduAggregationTest::AmpduAggregationTest ( const std::string &  name,
const Params params 
)

Construct object with non-default test parameters.

Parameters
namethe name of the test case
paramsthe test parameters

Definition at line 152 of file wifi-aggregation-test.cc.

Member Function Documentation

◆ DequeueMpdus()

void AmpduAggregationTest::DequeueMpdus ( const std::vector< Ptr< WifiMpdu >> &  mpduList)
protected

Dequeue a PSDU.

Parameters
mpduListthe 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

◆ DoSetup()

void AmpduAggregationTest::DoSetup ( )
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.

+ Here is the call graph for this function:

◆ DoTeardown()

void AmpduAggregationTest::DoTeardown ( )
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.

+ Here is the call graph for this function:

◆ EnqueuePkts()

void AmpduAggregationTest::EnqueuePkts ( std::size_t  count,
uint32_t  size,
const Mac48Address dest 
)
protected

Enqueue the given number of packets addressed to the given station and of the given size.

Parameters
countthe number of packets
sizethe size (bytes) of each packet
destthe 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EstablishAgreement()

◆ GetBeQueue()

Ptr< QosTxop > AmpduAggregationTest::GetBeQueue ( ) const
protected
Returns
the Best Effort QosTxop

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MpduDiscarded()

void AmpduAggregationTest::MpduDiscarded ( WifiMacDropReason  reason,
Ptr< const WifiMpdu mpdu 
)
private

Fired when the MAC discards an MPDU.

Parameters
reasonthe reason why the MPDU was discarded
mpduthe discarded MPDU

Definition at line 160 of file wifi-aggregation-test.cc.

References m_discarded.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_device

Ptr<WifiNetDevice> AmpduAggregationTest::m_device
private

WifiNetDevice.

Definition at line 134 of file wifi-aggregation-test.cc.

Referenced by DoSetup(), and DoTeardown().

◆ m_discarded

bool AmpduAggregationTest::m_discarded
private

whether the packet should be discarded

Definition at line 137 of file wifi-aggregation-test.cc.

Referenced by DoRun(), and MpduDiscarded().

◆ m_factory

ObjectFactory AmpduAggregationTest::m_factory
private

factory

Definition at line 136 of file wifi-aggregation-test.cc.

Referenced by DoSetup().

◆ m_mac

◆ m_managers

std::vector<Ptr<WifiRemoteStationManager> > AmpduAggregationTest::m_managers
private

remote station managers

Definition at line 135 of file wifi-aggregation-test.cc.

Referenced by DoRun(), DoSetup(), and DoTeardown().

◆ m_params

Params AmpduAggregationTest::m_params
protected

◆ m_phys

std::vector<Ptr<WifiPhy> > AmpduAggregationTest::m_phys
protected

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