A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void DequeueMpdus (const std::vector< Ptr< WifiMpdu > > &mpduList)
 Dequeue a PSDU.
 
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.
 
void EstablishAgreement (const Mac48Address &recipient)
 Establish a BlockAck agreement.
 
Ptr< QosTxopGetBeQueue () const
 
- 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.
 
TestCaseGetParent () 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.
 

Protected Attributes

Ptr< StaWifiMacm_mac
 Mac.
 
Params m_params
 test parameters
 
std::vector< Ptr< WifiPhy > > m_phys
 Phys.
 

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 DoTeardown () override
 Implementation to do any local setup required for this TestCase.
 
void MpduDiscarded (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
 Fired when the MAC discards an MPDU.
 

Private Attributes

Ptr< WifiNetDevicem_device
 WifiNetDevice.
 
bool m_discarded
 whether the packet should be discarded
 
ObjectFactory m_factory
 factory
 
std::vector< Ptr< WifiRemoteStationManager > > m_managers
 remote station managers
 

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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto TAKES_FOREVER
 

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

void AmpduAggregationTest::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Reimplemented in TwoLevelAggregationTest, HeAggregationTest, and EhtAggregationTest.

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(), ns3::Time::Min(), MpduDiscarded(), NS_TEST_EXPECT_MSG_EQ, ns3::QosTxop::PeekNextMpdu(), ns3::SINGLE_LINK_OP_ID, and ns3::ObjectBase::TraceConnectWithoutContext().

+ Here is the call graph for this function:

◆ 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::ASSOCIATED, ns3::StaWifiMac::StaLinkEntity::bssid, ns3::WifiMac::ConfigureStandard(), ns3::ObjectFactory::Create(), AmpduAggregationTest::Params::dataMode, EstablishAgreement(), GetBeQueue(), ns3::Mac48Address::GetBroadcast(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetLinks(), ns3::WifiMac::GetTxopQueue(), 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::Simulator::Destroy(), 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()

void AmpduAggregationTest::EstablishAgreement ( const Mac48Address recipient)
protected

◆ 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: