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

The TcpRateLinux Basic Test. More...

+ Inheritance diagram for TcpRateLinuxBasicTest:
+ Collaboration diagram for TcpRateLinuxBasicTest:

Public Member Functions

 TcpRateLinuxBasicTest (uint32_t cWnd, SequenceNumber32 tailSeq, SequenceNumber32 nextTx, uint32_t testCase, std::string testName)
 Constructor.
 
- 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 DoRun () override
 Implementation to actually run this TestCase.
 
void SendSkb (TcpTxItem *skb)
 Send an application packet.
 
void SkbDelivered (TcpTxItem *skb)
 Deliver an application packet.
 

Private Attributes

uint32_t m_cWnd
 Congestion window size.
 
uint32_t m_delivered
 Number of segments delivered.
 
Time m_deliveredTime
 Last time of a delivery.
 
uint32_t m_inFlight
 Number of packets in-flight.
 
SequenceNumber32 m_nextTx
 Tx next sequence number.
 
TcpRateLinux m_rateOps
 Rate information for TCP.
 
uint32_t m_segmentSize
 Segment size.
 
std::vector< TcpTxItem * > m_skbs
 Application packets.
 
SequenceNumber32 m_tailSeq
 Tail sequence number.
 
uint32_t m_testCase
 Test case type.
 

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

The TcpRateLinux Basic Test.

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

Constructor & Destructor Documentation

◆ TcpRateLinuxBasicTest()

TcpRateLinuxBasicTest::TcpRateLinuxBasicTest ( uint32_t cWnd,
SequenceNumber32 tailSeq,
SequenceNumber32 nextTx,
uint32_t testCase,
std::string testName )

Constructor.

Parameters
cWndCongestion window size
tailSeqTail sequence number
nextTxTx next sequence number
testCasetest case type
testNametest name

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

Member Function Documentation

◆ DoRun()

void TcpRateLinuxBasicTest::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References ns3::Simulator::Destroy(), m_skbs, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), SendSkb(), and SkbDelivered().

+ Here is the call graph for this function:

◆ SendSkb()

void TcpRateLinuxBasicTest::SendSkb ( TcpTxItem * skb)
private

Send an application packet.

Parameters
skbthe data to send

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

References ns3::TcpRateLinux::CalculateAppLimited(), ns3::TcpTxItem::GetRateInformation(), ns3::TcpTxItem::GetSeqSize(), m_cWnd, ns3::TcpTxItem::RateInformation::m_delivered, m_delivered, ns3::TcpTxItem::RateInformation::m_deliveredTime, m_deliveredTime, m_inFlight, m_nextTx, m_rateOps, m_segmentSize, m_tailSeq, ns3::Simulator::Now(), NS_TEST_ASSERT_MSG_EQ, and ns3::TcpRateLinux::SkbSent().

Referenced by DoRun().

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

◆ SkbDelivered()

void TcpRateLinuxBasicTest::SkbDelivered ( TcpTxItem * skb)
private

Deliver an application packet.

Parameters
skbthe data to deliver

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

References ns3::TcpTxItem::GetRateInformation(), ns3::TcpTxItem::GetSeqSize(), m_delivered, ns3::TcpTxItem::RateInformation::m_deliveredTime, m_deliveredTime, m_inFlight, ns3::TcpTxItem::RateInformation::m_isAppLimited, m_rateOps, m_testCase, ns3::Time::Max(), ns3::Simulator::Now(), NS_TEST_ASSERT_MSG_EQ, and ns3::TcpRateLinux::SkbDelivered().

Referenced by DoRun().

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

Member Data Documentation

◆ m_cWnd

uint32_t TcpRateLinuxBasicTest::m_cWnd
private

Congestion window size.

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

Referenced by SendSkb().

◆ m_delivered

uint32_t TcpRateLinuxBasicTest::m_delivered
private

Number of segments delivered.

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

Referenced by SendSkb(), and SkbDelivered().

◆ m_deliveredTime

Time TcpRateLinuxBasicTest::m_deliveredTime
private

Last time of a delivery.

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

Referenced by SendSkb(), and SkbDelivered().

◆ m_inFlight

uint32_t TcpRateLinuxBasicTest::m_inFlight
private

Number of packets in-flight.

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

Referenced by SendSkb(), and SkbDelivered().

◆ m_nextTx

SequenceNumber32 TcpRateLinuxBasicTest::m_nextTx
private

Tx next sequence number.

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

Referenced by SendSkb().

◆ m_rateOps

TcpRateLinux TcpRateLinuxBasicTest::m_rateOps
private

Rate information for TCP.

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

Referenced by SendSkb(), and SkbDelivered().

◆ m_segmentSize

uint32_t TcpRateLinuxBasicTest::m_segmentSize
private

Segment size.

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

Referenced by SendSkb().

◆ m_skbs

std::vector<TcpTxItem*> TcpRateLinuxBasicTest::m_skbs
private

Application packets.

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

Referenced by DoRun().

◆ m_tailSeq

SequenceNumber32 TcpRateLinuxBasicTest::m_tailSeq
private

Tail sequence number.

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

Referenced by SendSkb().

◆ m_testCase

uint32_t TcpRateLinuxBasicTest::m_testCase
private

Test case type.

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

Referenced by SkbDelivered().


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