A Discrete-Event Network Simulator
API
ns3::TcpIllinoisTest Class Reference

Testing TcpIllinois C-AIMD algorithm. More...

+ Inheritance diagram for ns3::TcpIllinoisTest:
+ Collaboration diagram for ns3::TcpIllinoisTest:

Public Member Functions

 TcpIllinoisTest (uint32_t cWnd, uint32_t ssThresh, uint32_t segmentSize, uint32_t cntRtt, Time maxRtt, uint32_t segmentsAcked, SequenceNumber32 nextTxSeq, SequenceNumber32 lastAckedSeq, const std::string &name)
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Member Functions

void CalculateAlpha (Ptr< TcpIllinois > cong, double da, double dm)
 
Time CalculateAvgDelay ()
 
void CalculateBeta (Ptr< TcpIllinois > cong, double da, double dm)
 
Time CalculateMaxDelay ()
 
virtual void DoRun ()
 Implementation to actually run this TestCase. More...
 
void GetSsThresh ()
 
void IncreaseWindow (Ptr< TcpIllinois > cong)
 
void RecalcParam (Ptr< TcpIllinois > cong)
 

Private Attributes

uint32_t m_ackCnt
 
double m_alpha
 
Time m_baseRtt
 
double m_beta
 
uint32_t m_cntRtt
 
uint32_t m_cWnd
 
SequenceNumber32 m_lastAckedSeq
 
Time m_maxRtt
 
SequenceNumber32 m_nextTxSeq
 
bool m_rttAbove
 
uint8_t m_rttLow
 
uint32_t m_segmentsAcked
 
uint32_t m_segmentSize
 
uint32_t m_ssThresh
 
Time m_sumRtt
 

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, enum TestDuration duration)
 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

Testing TcpIllinois C-AIMD algorithm.

Definition at line 40 of file tcp-illinois-test.cc.

Constructor & Destructor Documentation

ns3::TcpIllinoisTest::TcpIllinoisTest ( uint32_t  cWnd,
uint32_t  ssThresh,
uint32_t  segmentSize,
uint32_t  cntRtt,
Time  maxRtt,
uint32_t  segmentsAcked,
SequenceNumber32  nextTxSeq,
SequenceNumber32  lastAckedSeq,
const std::string &  name 
)

Definition at line 80 of file tcp-illinois-test.cc.

Member Function Documentation

void ns3::TcpIllinoisTest::CalculateAlpha ( Ptr< TcpIllinois cong,
double  da,
double  dm 
)
private

Definition at line 233 of file tcp-illinois-test.cc.

References ns3::DoubleValue::Get(), ns3::UintegerValue::Get(), m_alpha, m_rttAbove, m_rttLow, and NS_LOG_INFO.

Referenced by RecalcParam().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::TcpIllinoisTest::CalculateAvgDelay ( )
private

Definition at line 227 of file tcp-illinois-test.cc.

References m_baseRtt, m_cntRtt, and m_sumRtt.

Referenced by RecalcParam().

+ Here is the caller graph for this function:

void ns3::TcpIllinoisTest::CalculateBeta ( Ptr< TcpIllinois cong,
double  da,
double  dm 
)
private

Definition at line 268 of file tcp-illinois-test.cc.

References ns3::DoubleValue::Get(), m_beta, and NS_LOG_INFO.

Referenced by RecalcParam().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::TcpIllinoisTest::CalculateMaxDelay ( )
private

Definition at line 221 of file tcp-illinois-test.cc.

References m_baseRtt, and m_maxRtt.

Referenced by RecalcParam().

+ Here is the caller graph for this function:

void ns3::TcpIllinoisTest::DoRun ( )
privatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 109 of file tcp-illinois-test.cc.

References GetSsThresh(), IncreaseWindow(), m_baseRtt, m_cntRtt, m_cWnd, m_lastAckedSeq, m_maxRtt, m_nextTxSeq, m_segmentsAcked, m_segmentSize, m_ssThresh, m_sumRtt, and NS_TEST_ASSERT_MSG_EQ.

+ Here is the call graph for this function:

void ns3::TcpIllinoisTest::GetSsThresh ( )
private

Definition at line 296 of file tcp-illinois-test.cc.

References m_beta, m_cWnd, m_segmentSize, m_ssThresh, max, and NS_LOG_DEBUG.

Referenced by DoRun().

+ Here is the caller graph for this function:

void ns3::TcpIllinoisTest::IncreaseWindow ( Ptr< TcpIllinois cong)
private

Definition at line 152 of file tcp-illinois-test.cc.

References m_ackCnt, m_alpha, m_cWnd, m_lastAckedSeq, m_nextTxSeq, m_segmentsAcked, m_segmentSize, m_ssThresh, NS_LOG_INFO, and RecalcParam().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::TcpIllinoisTest::RecalcParam ( Ptr< TcpIllinois cong)
private

Definition at line 196 of file tcp-illinois-test.cc.

References CalculateAlpha(), CalculateAvgDelay(), CalculateBeta(), CalculateMaxDelay(), ns3::DoubleValue::Get(), ns3::UintegerValue::Get(), ns3::Time::GetMilliSeconds(), m_alpha, m_cntRtt, m_cWnd, and NS_LOG_INFO.

Referenced by IncreaseWindow().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t ns3::TcpIllinoisTest::m_ackCnt
private

Definition at line 77 of file tcp-illinois-test.cc.

Referenced by IncreaseWindow().

double ns3::TcpIllinoisTest::m_alpha
private

Definition at line 71 of file tcp-illinois-test.cc.

Referenced by CalculateAlpha(), IncreaseWindow(), and RecalcParam().

Time ns3::TcpIllinoisTest::m_baseRtt
private

Definition at line 66 of file tcp-illinois-test.cc.

Referenced by CalculateAvgDelay(), CalculateMaxDelay(), and DoRun().

double ns3::TcpIllinoisTest::m_beta
private

Definition at line 72 of file tcp-illinois-test.cc.

Referenced by CalculateBeta(), and GetSsThresh().

uint32_t ns3::TcpIllinoisTest::m_cntRtt
private

Definition at line 73 of file tcp-illinois-test.cc.

Referenced by CalculateAvgDelay(), DoRun(), and RecalcParam().

uint32_t ns3::TcpIllinoisTest::m_cWnd
private

Definition at line 63 of file tcp-illinois-test.cc.

Referenced by DoRun(), GetSsThresh(), IncreaseWindow(), and RecalcParam().

SequenceNumber32 ns3::TcpIllinoisTest::m_lastAckedSeq
private

Definition at line 70 of file tcp-illinois-test.cc.

Referenced by DoRun(), and IncreaseWindow().

Time ns3::TcpIllinoisTest::m_maxRtt
private

Definition at line 67 of file tcp-illinois-test.cc.

Referenced by CalculateMaxDelay(), and DoRun().

SequenceNumber32 ns3::TcpIllinoisTest::m_nextTxSeq
private

Definition at line 69 of file tcp-illinois-test.cc.

Referenced by DoRun(), and IncreaseWindow().

bool ns3::TcpIllinoisTest::m_rttAbove
private

Definition at line 75 of file tcp-illinois-test.cc.

Referenced by CalculateAlpha().

uint8_t ns3::TcpIllinoisTest::m_rttLow
private

Definition at line 76 of file tcp-illinois-test.cc.

Referenced by CalculateAlpha().

uint32_t ns3::TcpIllinoisTest::m_segmentsAcked
private

Definition at line 68 of file tcp-illinois-test.cc.

Referenced by DoRun(), and IncreaseWindow().

uint32_t ns3::TcpIllinoisTest::m_segmentSize
private

Definition at line 65 of file tcp-illinois-test.cc.

Referenced by DoRun(), GetSsThresh(), and IncreaseWindow().

uint32_t ns3::TcpIllinoisTest::m_ssThresh
private

Definition at line 64 of file tcp-illinois-test.cc.

Referenced by DoRun(), GetSsThresh(), and IncreaseWindow().

Time ns3::TcpIllinoisTest::m_sumRtt
private

Definition at line 74 of file tcp-illinois-test.cc.

Referenced by CalculateAvgDelay(), and DoRun().


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