A Discrete-Event Network Simulator
API
Ns3TcpCubicTestCase Class Reference

Test Cubic response. More...

+ Inheritance diagram for Ns3TcpCubicTestCase:
+ Collaboration diagram for Ns3TcpCubicTestCase:

Public Member Functions

 Ns3TcpCubicTestCase (std::string testCase, std::string prefix, bool fastConvergence, bool tcpFriendliness, Time baseRtt, bool capacityIncrease)
 Constructor. More...
 
 ~Ns3TcpCubicTestCase () override
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

bool CheckValues (Time start, Time end, double lowerBound, double upperBound)
 Check that time series values within a time range are within a value range. More...
 
void ConnectCwndTrace (uint32_t nodeId, uint32_t socketId)
 Connect TCP cwnd trace after socket is instantiated. More...
 
void DoRun () override
 Implementation to actually run this TestCase. More...
 
void IncreaseBandwidth (Ptr< PointToPointNetDevice > device)
 Increases the device bandwidth to 100 Mbps. More...
 

Private Attributes

Time m_baseRtt
 the base RTT to use More...
 
bool m_capacityIncrease
 whether to trigger a capacity increase More...
 
Gnuplot2dDataset m_cwndTimeSeries
 cwnd time series More...
 
bool m_fastConvergence
 whether to enable fast convergence More...
 
std::string m_prefix
 filename prefix if writing files More...
 
bool m_tcpFriendliness
 whether to enable TCP friendliness More...
 
std::map< Time, double > m_timeSeries
 time series to check More...
 
bool m_writeGnuplot {WRITE_GNUPLOT}
 Whether to write gnuplot files. More...
 
bool m_writeResults {WRITE_PCAP}
 Whether to write pcaps. 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 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...
 

Detailed Description

Test Cubic response.

Definition at line 106 of file ns3tcp-cubic-test-suite.cc.

Constructor & Destructor Documentation

◆ Ns3TcpCubicTestCase()

Ns3TcpCubicTestCase::Ns3TcpCubicTestCase ( std::string  testCase,
std::string  prefix,
bool  fastConvergence,
bool  tcpFriendliness,
Time  baseRtt,
bool  capacityIncrease 
)

Constructor.

Parameters
testCasetestcase name
prefixfilename prefix if writing output files
fastConvergencewhether to enable fast convergence
tcpFriendlinesswhether to enable TCP friendliness
baseRttbase RTT to use for test case
capacityIncreasewhether to trigger a sudden capacity increase

Definition at line 165 of file ns3tcp-cubic-test-suite.cc.

◆ ~Ns3TcpCubicTestCase()

Ns3TcpCubicTestCase::~Ns3TcpCubicTestCase ( )
override

Definition at line 180 of file ns3tcp-cubic-test-suite.cc.

Member Function Documentation

◆ CheckValues()

bool Ns3TcpCubicTestCase::CheckValues ( Time  start,
Time  end,
double  lowerBound,
double  upperBound 
)
private

Check that time series values within a time range are within a value range.

Parameters
startstart of time range
endend of time range
lowerBoundlower bound of acceptable values
upperBoundupper bound of acceptable values
Returns
true if values are within range

Definition at line 200 of file ns3tcp-cubic-test-suite.cc.

References m_timeSeries, NS_LOG_DEBUG, and two-ray-to-three-gpp-ch-calibration::start.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ ConnectCwndTrace()

void Ns3TcpCubicTestCase::ConnectCwndTrace ( uint32_t  nodeId,
uint32_t  socketId 
)
private

Connect TCP cwnd trace after socket is instantiated.

Parameters
nodeIdnode ID to connect to
socketIdsocket ID to connect to

Definition at line 191 of file ns3tcp-cubic-test-suite.cc.

References ns3::Config::ConnectWithoutContext(), CubicCwndTracer(), m_cwndTimeSeries, m_timeSeries, ns3::MakeBoundCallback(), and nlohmann::to_string().

Referenced by DoRun().

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

◆ DoRun()

void Ns3TcpCubicTestCase::DoRun ( )
overrideprivatevirtual

◆ IncreaseBandwidth()

void Ns3TcpCubicTestCase::IncreaseBandwidth ( Ptr< PointToPointNetDevice device)
private

Increases the device bandwidth to 100 Mbps.

Parameters
devicedevice to modify

Definition at line 185 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_baseRtt

Time Ns3TcpCubicTestCase::m_baseRtt
private

the base RTT to use

Definition at line 161 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().

◆ m_capacityIncrease

bool Ns3TcpCubicTestCase::m_capacityIncrease
private

whether to trigger a capacity increase

Definition at line 162 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().

◆ m_cwndTimeSeries

Gnuplot2dDataset Ns3TcpCubicTestCase::m_cwndTimeSeries
private

cwnd time series

Definition at line 156 of file ns3tcp-cubic-test-suite.cc.

Referenced by ConnectCwndTrace(), and DoRun().

◆ m_fastConvergence

bool Ns3TcpCubicTestCase::m_fastConvergence
private

whether to enable fast convergence

Definition at line 159 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().

◆ m_prefix

std::string Ns3TcpCubicTestCase::m_prefix
private

filename prefix if writing files

Definition at line 158 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().

◆ m_tcpFriendliness

bool Ns3TcpCubicTestCase::m_tcpFriendliness
private

whether to enable TCP friendliness

Definition at line 160 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().

◆ m_timeSeries

std::map<Time, double> Ns3TcpCubicTestCase::m_timeSeries
private

time series to check

Definition at line 157 of file ns3tcp-cubic-test-suite.cc.

Referenced by CheckValues(), and ConnectCwndTrace().

◆ m_writeGnuplot

bool Ns3TcpCubicTestCase::m_writeGnuplot {WRITE_GNUPLOT}
private

Whether to write gnuplot files.

Definition at line 155 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().

◆ m_writeResults

bool Ns3TcpCubicTestCase::m_writeResults {WRITE_PCAP}
private

Whether to write pcaps.

Definition at line 154 of file ns3tcp-cubic-test-suite.cc.

Referenced by DoRun().


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