A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
OrigBlockAckWindowStalled Class Reference

Test for Block Ack Policy with non-null BA threshold and TX window blocked. More...

+ Inheritance diagram for OrigBlockAckWindowStalled:
+ Collaboration diagram for OrigBlockAckWindowStalled:

Public Member Functions

 OrigBlockAckWindowStalled (bool mld)
 
void Transmit (WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
 Callback invoked when a FEM passes PSDUs to the PHY.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (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.
 

Private Attributes

std::size_t m_baCount {0}
 counter for transmitted BlockAck frames
 
const double m_baThreshold {0.125}
 BA threshold used by ack manager.
 
Ptr< ListErrorModelm_errorModel
 error rate model to corrupt packets
 
const uint8_t m_nLinks
 number of links
 
const std::size_t m_nPkts {70}
 number of generated packets
 
std::size_t m_qosCount {0}
 counter for transmitted QoS data frames
 
Ptr< WifiNetDevicem_staDevice
 station WifiNetDevice
 

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

Detailed Description

Test for Block Ack Policy with non-null BA threshold and TX window blocked.

An EHT device establishes a Block Ack agreement (for TID 0) with the AP and uses a Block Ack threshold of 0.125 (i.e., Block Ack is requested if there are at least 64 * 0.125 = 8 MPDUs to be acknowledged, where 64 is the Block Ack buffer size). An application installed on the non-AP node generates 70 packets, hence an A-MPDU containing the first 64 MPDUs is transmitted. The first 5 MPDUs in that A-MPDU are corrupted. We check that:

  • the first A-MPDU contains MPDUs with sequence numbers from 0 to 63
  • the second A-MPDU contains the 5 retransmitted MPDUs (with sequence numbers from 0 to 4) only, because the TX window is blocked
  • the third A-MPDU contains the remaining 6 MPDUs (with sequence numbers from 64 to 69)
  • 3 A-MPDUs and 3 BlockAck frames are transmitted during the simulation
  • the MAC queue is empty at the end of simulation (meaning that all MPDUs were acknowledged)

Definition at line 2029 of file block-ack-test-suite.cc.

Constructor & Destructor Documentation

◆ OrigBlockAckWindowStalled()

OrigBlockAckWindowStalled::OrigBlockAckWindowStalled ( bool mld)
Parameters
mldwhether the non-AP device is a multi-link device

Definition at line 2059 of file block-ack-test-suite.cc.

Member Function Documentation

◆ DoRun()

void OrigBlockAckWindowStalled::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 2228 of file block-ack-test-suite.cc.

References ns3::AC_BE, ns3::Simulator::Destroy(), m_baCount, m_qosCount, m_staDevice, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Run(), ns3::Seconds(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ DoSetup()

void OrigBlockAckWindowStalled::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 2144 of file block-ack-test-suite.cc.

References ns3::Node::AddApplication(), ns3::Config::ConnectWithoutContext(), ns3::CreateObject(), ns3::DynamicCast(), ns3::NodeContainer::Get(), ns3::PacketSocketHelper::Install(), m_baThreshold, m_errorModel, m_nLinks, m_nPkts, m_staDevice, ns3::MakeCallback(), ns3::Seconds(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), Transmit(), and ns3::WIFI_STANDARD_80211be.

+ Here is the call graph for this function:

◆ Transmit()

void OrigBlockAckWindowStalled::Transmit ( WifiConstPsduMap psduMap,
WifiTxVector txVector,
double txPowerW )

Callback invoked when a FEM passes PSDUs to the PHY.

Parameters
psduMapthe PSDU map
txVectorthe TX vector
txPowerWthe tx power in Watts

Definition at line 2066 of file block-ack-test-suite.cc.

References m_baCount, m_errorModel, m_qosCount, NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT_OR_EQ, NS_TEST_EXPECT_MSG_LT, ns3::PeekPointer(), and ns3::ListErrorModel::SetList().

Referenced by DoSetup().

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

Member Data Documentation

◆ m_baCount

std::size_t OrigBlockAckWindowStalled::m_baCount {0}
private

counter for transmitted BlockAck frames

Definition at line 2056 of file block-ack-test-suite.cc.

Referenced by DoRun(), and Transmit().

◆ m_baThreshold

const double OrigBlockAckWindowStalled::m_baThreshold {0.125}
private

BA threshold used by ack manager.

Definition at line 2051 of file block-ack-test-suite.cc.

Referenced by DoSetup().

◆ m_errorModel

Ptr<ListErrorModel> OrigBlockAckWindowStalled::m_errorModel
private

error rate model to corrupt packets

Definition at line 2053 of file block-ack-test-suite.cc.

Referenced by DoSetup(), and Transmit().

◆ m_nLinks

const uint8_t OrigBlockAckWindowStalled::m_nLinks
private

number of links

Definition at line 2050 of file block-ack-test-suite.cc.

Referenced by DoSetup().

◆ m_nPkts

const std::size_t OrigBlockAckWindowStalled::m_nPkts {70}
private

number of generated packets

Definition at line 2052 of file block-ack-test-suite.cc.

Referenced by DoSetup().

◆ m_qosCount

std::size_t OrigBlockAckWindowStalled::m_qosCount {0}
private

counter for transmitted QoS data frames

Definition at line 2055 of file block-ack-test-suite.cc.

Referenced by DoRun(), and Transmit().

◆ m_staDevice

Ptr<WifiNetDevice> OrigBlockAckWindowStalled::m_staDevice
private

station WifiNetDevice

Definition at line 2054 of file block-ack-test-suite.cc.

Referenced by DoRun(), and DoSetup().


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