A Discrete-Event Network Simulator
API
TcpRateLinuxWithBufferTest Class Reference

The TcpRateLinuxWithBufferTest tests rate sample functionality with arbitary SACK scenario. More...

+ Inheritance diagram for TcpRateLinuxWithBufferTest:
+ Collaboration diagram for TcpRateLinuxWithBufferTest:

Public Member Functions

 TcpRateLinuxWithBufferTest (uint32_t segmentSize, std::string desc)
 Constructor. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
virtual void DoTeardown (void)
 Implementation to do any local setup required for this TestCase. More...
 
virtual void RateSampleUpdatedTrace (const TcpRateLinux::TcpRateSample &sample)
 Track the rate sample value of TcpRateLinux. More...
 
virtual void RateUpdatedTrace (const TcpRateLinux::TcpRateConnection &rate)
 Track the rate value of TcpRateLinux. More...
 
void TestWithSackBlocks ()
 Test with arbitary SACK scenario. More...
 
void TestWithStraightAcks ()
 Test with acks without drop. More...
 

Private Attributes

uint32_t m_expectedAckedSacked {0}
 Amount of expected acked sacked data. More...
 
uint32_t m_expectedDelivered {0}
 Amount of expected delivered data. More...
 
Ptr< TcpRateOpsm_rateOps
 Rate operations. More...
 
uint32_t m_segmentSize
 Segment size. More...
 
TcpTxBuffer m_txBuf
 Tcp Tx buffer. 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...
 
TestCaseGetParent () const
 Get the parent of this TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) 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 (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) 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...
 

Detailed Description

The TcpRateLinuxWithBufferTest tests rate sample functionality with arbitary SACK scenario.

Check the value of delivered against a home-made guess

Definition at line 413 of file tcp-rate-ops-test.cc.

Constructor & Destructor Documentation

◆ TcpRateLinuxWithBufferTest()

TcpRateLinuxWithBufferTest::TcpRateLinuxWithBufferTest ( uint32_t  segmentSize,
std::string  desc 
)

Constructor.

Parameters
segmentSizeSegment size to use.
descDescription.

Definition at line 452 of file tcp-rate-ops-test.cc.

References m_rateOps, ns3::MakeCallback(), RateSampleUpdatedTrace(), RateUpdatedTrace(), and ns3::ObjectBase::TraceConnectWithoutContext().

+ Here is the call graph for this function:

Member Function Documentation

◆ DoRun()

void TcpRateLinuxWithBufferTest::DoRun ( void  )
privatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 465 of file tcp-rate-ops-test.cc.

References ns3::Seconds(), and TestWithSackBlocks().

+ Here is the call graph for this function:

◆ DoTeardown()

void TcpRateLinuxWithBufferTest::DoTeardown ( void  )
privatevirtual

Implementation to do any local setup required for this TestCase.

Subclasses should override this method to perform any costly per-test teardown

Reimplemented from ns3::TestCase.

Definition at line 549 of file tcp-rate-ops-test.cc.

◆ RateSampleUpdatedTrace()

void TcpRateLinuxWithBufferTest::RateSampleUpdatedTrace ( const TcpRateLinux::TcpRateSample &  sample)
privatevirtual

Track the rate sample value of TcpRateLinux.

Parameters
sampleupdated value of TcpRateSample.

Definition at line 480 of file tcp-rate-ops-test.cc.

References m_expectedAckedSacked, NS_LOG_DEBUG, and NS_TEST_ASSERT_MSG_EQ.

Referenced by TcpRateLinuxWithBufferTest().

+ Here is the caller graph for this function:

◆ RateUpdatedTrace()

void TcpRateLinuxWithBufferTest::RateUpdatedTrace ( const TcpRateLinux::TcpRateConnection &  rate)
privatevirtual

Track the rate value of TcpRateLinux.

Parameters
rateupdated value of TcpRate.

Definition at line 473 of file tcp-rate-ops-test.cc.

References m_expectedDelivered, NS_LOG_DEBUG, and NS_TEST_ASSERT_MSG_EQ.

Referenced by TcpRateLinuxWithBufferTest().

+ Here is the caller graph for this function:

◆ TestWithSackBlocks()

◆ TestWithStraightAcks()

void TcpRateLinuxWithBufferTest::TestWithStraightAcks ( )
private

Test with acks without drop.

Member Data Documentation

◆ m_expectedAckedSacked

uint32_t TcpRateLinuxWithBufferTest::m_expectedAckedSacked {0}
private

Amount of expected acked sacked data.

Definition at line 446 of file tcp-rate-ops-test.cc.

Referenced by RateSampleUpdatedTrace(), and TestWithSackBlocks().

◆ m_expectedDelivered

uint32_t TcpRateLinuxWithBufferTest::m_expectedDelivered {0}
private

Amount of expected delivered data.

Definition at line 445 of file tcp-rate-ops-test.cc.

Referenced by RateUpdatedTrace(), and TestWithSackBlocks().

◆ m_rateOps

Ptr<TcpRateOps> TcpRateLinuxWithBufferTest::m_rateOps
private

Rate operations.

Definition at line 449 of file tcp-rate-ops-test.cc.

Referenced by TcpRateLinuxWithBufferTest(), and TestWithSackBlocks().

◆ m_segmentSize

uint32_t TcpRateLinuxWithBufferTest::m_segmentSize
private

Segment size.

Definition at line 447 of file tcp-rate-ops-test.cc.

Referenced by TestWithSackBlocks().

◆ m_txBuf

TcpTxBuffer TcpRateLinuxWithBufferTest::m_txBuf
private

Tcp Tx buffer.

Definition at line 448 of file tcp-rate-ops-test.cc.

Referenced by TestWithSackBlocks().


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