Test for Block Ack Policy with non-null BA threshold and TX window blocked. More...
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 |
TestCase & | operator= (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< ListErrorModel > | m_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< WifiNetDevice > | m_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. | |
TestCase * | GetParent () 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. | |
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:
Definition at line 2029 of file block-ack-test-suite.cc.
OrigBlockAckWindowStalled::OrigBlockAckWindowStalled | ( | bool | mld | ) |
mld | whether the non-AP device is a multi-link device |
Definition at line 2059 of file block-ack-test-suite.cc.
|
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().
|
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.
void OrigBlockAckWindowStalled::Transmit | ( | WifiConstPsduMap | psduMap, |
WifiTxVector | txVector, | ||
double | txPowerW ) |
Callback invoked when a FEM passes PSDUs to the PHY.
psduMap | the PSDU map |
txVector | the TX vector |
txPowerW | the 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().
|
private |
counter for transmitted BlockAck frames
Definition at line 2056 of file block-ack-test-suite.cc.
Referenced by DoRun(), and Transmit().
|
private |
BA threshold used by ack manager.
Definition at line 2051 of file block-ack-test-suite.cc.
Referenced by DoSetup().
|
private |
error rate model to corrupt packets
Definition at line 2053 of file block-ack-test-suite.cc.
Referenced by DoSetup(), and Transmit().
|
private |
|
private |
number of generated packets
Definition at line 2052 of file block-ack-test-suite.cc.
Referenced by DoSetup().
|
private |
counter for transmitted QoS data frames
Definition at line 2055 of file block-ack-test-suite.cc.
Referenced by DoRun(), and Transmit().
|
private |
station WifiNetDevice
Definition at line 2054 of file block-ack-test-suite.cc.