Test for issue 211 (https://gitlab.com/nsnam/ns-3-dev/-/issues/211) More...
Public Member Functions | |
Issue211Test () | |
Constructor. More... | |
~Issue211Test () override | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | CalcThroughput (Ptr< UdpServer > server) |
Compute the average throughput since the last check-point. More... | |
Private Attributes | |
Time | m_lastCheckPointTime |
time of last check-point More... | |
uint64_t | m_lastRxBytes |
RX bytes at last check-point. More... | |
uint32_t | m_payloadSize |
payload size in bytes More... | |
std::vector< double > | m_tputValues |
throughput in sub-intervals 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... | |
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... | |
TestCase * | GetParent () 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... | |
Test for issue 211 (https://gitlab.com/nsnam/ns-3-dev/-/issues/211)
This test aims to check that the transmission of data frames (under a Block Ack agreement) resumes after a period in which the connectivity between originator and recipient is interrupted (e.g., the station moves away and comes back). Issue 211 revealed that MSDUs with expired lifetime were not removed from the wifi MAC queue if the station had to transmit a Block Ack Request. If the connectivity was lost for enough time, the wifi MAC queue could become full of MSDUs with expired lifetime, thus preventing the traffic control layer to forward down new packets. At this point, the station gave up transmitting the Block Ack Request and did not request channel access anymore.
Definition at line 58 of file wifi-issue-211-test-suite.cc.
Issue211Test::Issue211Test | ( | ) |
Constructor.
Definition at line 82 of file wifi-issue-211-test-suite.cc.
|
override |
Definition at line 90 of file wifi-issue-211-test-suite.cc.
Compute the average throughput since the last check-point.
server | the UDP server |
Definition at line 95 of file wifi-issue-211-test-suite.cc.
References m_lastCheckPointTime, m_lastRxBytes, m_payloadSize, m_tputValues, ns3::Now(), and brite-generic-example::server.
Referenced by DoRun().
|
overridevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 106 of file wifi-issue-211-test-suite.cc.
References first::address, third::apDevices, CalcThroughput(), brite-generic-example::client, ns3::NodeContainer::Create(), ns3::ApplicationContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Object::GetObject(), m_payloadSize, m_tputValues, third::mac, ns3::MilliSeconds(), third::mobility, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT, third::phy, port, ns3::Seconds(), brite-generic-example::server, ns3::Config::SetDefault(), first::stack, third::staDevices, ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), third::wifi, ns3::WIFI_STANDARD_80211n, and third::wifiApNode.
|
private |
time of last check-point
Definition at line 78 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput().
|
private |
RX bytes at last check-point.
Definition at line 77 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput().
|
private |
payload size in bytes
Definition at line 79 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput(), and DoRun().
|
private |
throughput in sub-intervals
Definition at line 76 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput(), and DoRun().