Test for issue 211 (https://gitlab.com/nsnam/ns-3-dev/-/issues/211) More...
Public Member Functions | |
Issue211Test () | |
Constructor. | |
~Issue211Test () override | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
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 | CalcThroughput (Ptr< UdpServer > server) |
Compute the average throughput since the last check-point. | |
Private Attributes | |
Time | m_lastCheckPointTime |
time of last check-point | |
uint64_t | m_lastRxBytes |
RX bytes at last check-point. | |
uint32_t | m_payloadSize |
payload size in bytes | |
std::vector< double > | m_tputValues |
throughput in sub-intervals | |
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 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 47 of file wifi-issue-211-test-suite.cc.
Issue211Test::Issue211Test | ( | ) |
Constructor.
Definition at line 71 of file wifi-issue-211-test-suite.cc.
|
override |
Definition at line 79 of file wifi-issue-211-test-suite.cc.
Compute the average throughput since the last check-point.
server | the UDP server |
Definition at line 84 of file wifi-issue-211-test-suite.cc.
References m_lastCheckPointTime, m_lastRxBytes, m_payloadSize, m_tputValues, ns3::Simulator::Now(), and ns3::Time::US.
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 95 of file wifi-issue-211-test-suite.cc.
References ns3::WifiHelper::AssignStreams(), CalcThroughput(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::DynamicCast(), ns3::ApplicationContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Object::GetObject(), m_payloadSize, m_tputValues, ns3::MilliSeconds(), NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT, port, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::Config::SetDefault(), ns3::MobilityModel::SetPosition(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), ns3::Simulator::Stop(), and ns3::WIFI_STANDARD_80211n.
|
private |
time of last check-point
Definition at line 67 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput().
|
private |
RX bytes at last check-point.
Definition at line 66 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput().
|
private |
payload size in bytes
Definition at line 68 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput(), and DoRun().
|
private |
throughput in sub-intervals
Definition at line 65 of file wifi-issue-211-test-suite.cc.
Referenced by CalcThroughput(), and DoRun().