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

Test for issue 211 (https://gitlab.com/nsnam/ns-3-dev/-/issues/211) More...

+ Inheritance diagram for Issue211Test:
+ Collaboration diagram for Issue211Test:

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
 
TestCaseoperator= (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< doublem_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.
 
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 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.

Constructor & Destructor Documentation

◆ Issue211Test()

Issue211Test::Issue211Test ( )

Constructor.

Definition at line 71 of file wifi-issue-211-test-suite.cc.

◆ ~Issue211Test()

Issue211Test::~Issue211Test ( )
override

Definition at line 79 of file wifi-issue-211-test-suite.cc.

Member Function Documentation

◆ CalcThroughput()

void Issue211Test::CalcThroughput ( Ptr< UdpServer > server)
private

Compute the average throughput since the last check-point.

Parameters
serverthe 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().

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

◆ DoRun()

Member Data Documentation

◆ m_lastCheckPointTime

Time Issue211Test::m_lastCheckPointTime
private

time of last check-point

Definition at line 67 of file wifi-issue-211-test-suite.cc.

Referenced by CalcThroughput().

◆ m_lastRxBytes

uint64_t Issue211Test::m_lastRxBytes
private

RX bytes at last check-point.

Definition at line 66 of file wifi-issue-211-test-suite.cc.

Referenced by CalcThroughput().

◆ m_payloadSize

uint32_t Issue211Test::m_payloadSize
private

payload size in bytes

Definition at line 68 of file wifi-issue-211-test-suite.cc.

Referenced by CalcThroughput(), and DoRun().

◆ m_tputValues

std::vector<double> Issue211Test::m_tputValues
private

throughput in sub-intervals

Definition at line 65 of file wifi-issue-211-test-suite.cc.

Referenced by CalcThroughput(), and DoRun().


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