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...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 

Detailed Description

Ampdu Aggregation Test.

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

Constructor & Destructor Documentation

◆ AmpduAggregationTest() [1/2]

AmpduAggregationTest::AmpduAggregationTest ( )

Definition at line 130 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 142 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 342 of file wifi-aggregation-test.cc.

References ns3::AC_BE, and m_mac.

Referenced by DoRun(), EhtAggregationTest::DoRun(), HeAggregationTest::DoRun(), and TwoLevelAggregationTest::DoRun().

+ 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 EhtAggregationTest, HeAggregationTest, and TwoLevelAggregationTest.

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

References ns3::WifiTxParameters::Clear(), ns3::Create(), DequeueMpdus(), ns3::DynamicCast(), EnqueuePkts(), GetBeQueue(), ns3::QosTxop::GetNextMpdu(), ns3::Txop::GetWifiMacQueue(), m_discarded, m_mac, m_managers, m_phys, ns3::WifiTxParameters::m_txVector, ns3::MakeCallback(), ns3::Time::Min(), MpduDiscarded(), NS_TEST_EXPECT_MSG_EQ, ns3::QosTxop::PeekNextMpdu(), and ns3::SINGLE_LINK_OP_ID.

+ Here is the call graph for this function:

◆ DoSetup()

◆ 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 495 of file wifi-aggregation-test.cc.

References ns3::Simulator::Destroy(), 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 372 of file wifi-aggregation-test.cc.

References ns3::Create(), GetBeQueue(), ns3::Txop::GetWifiMacQueue(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_QOSDATA.

Referenced by DoRun(), EhtAggregationTest::DoRun(), HeAggregationTest::DoRun(), and TwoLevelAggregationTest::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 336 of file wifi-aggregation-test.cc.

References m_mac.

Referenced by DoRun(), EhtAggregationTest::DoRun(), HeAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), DoSetup(), EnqueuePkts(), and EstablishAgreement().

+ 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 150 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 124 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 127 of file wifi-aggregation-test.cc.

Referenced by DoRun(), and MpduDiscarded().

◆ m_factory

ObjectFactory AmpduAggregationTest::m_factory
private

factory

Definition at line 126 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 125 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: