TcpIllinois C-AIMD algorithm tests. More...
Inheritance diagram for TcpIllinoisTest:
Collaboration diagram for 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) | |
| Constructor. | |
Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | CalculateAlpha (Ptr< TcpIllinois > cong, double da, double dm) |
| Calculate the TCP Illinois alpha param. | |
| Time | CalculateAvgDelay () |
| Calculate the average delay. | |
| void | CalculateBeta (Ptr< TcpIllinois > cong, double da, double dm) |
| Calculate the TCP Illinois beta param. | |
| Time | CalculateMaxDelay () |
| Calculate the maximum delay. | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
| void | GetSsThresh () |
| brief Get and check the SSH threshold. | |
| void | IncreaseWindow (Ptr< TcpIllinois > cong) |
| Increases the TCP window. | |
| void | RecalcParam (Ptr< TcpIllinois > cong) |
| Recalculate the internal TCP Illinois params. | |
Private Attributes | |
| uint32_t | m_ackCnt |
| ACK counter. | |
| double | m_alpha |
| TCP Illinois alpha parameter. | |
| Time | m_baseRtt |
| Base RTT. | |
| double | m_beta |
| TCP Illinois beta parameter. | |
| uint32_t | m_cntRtt |
| RTT counter. | |
| uint32_t | m_cWnd |
| Congestion window. | |
| SequenceNumber32 | m_lastAckedSeq |
| Last ACKed sequence number. | |
| Time | m_maxRtt |
| Max RTT. | |
| SequenceNumber32 | m_nextTxSeq |
| Next Tx sequence number. | |
| bool | m_rttAbove |
| RTT above threshold. | |
| uint8_t | m_rttLow |
| RTT low counter. | |
| uint32_t | m_segmentsAcked |
| Number of segments ACKed. | |
| uint32_t | m_segmentSize |
| Segment size. | |
| uint32_t | m_ssThresh |
| Slow Start Threshold. | |
| Time | m_sumRtt |
| Sum of all the RTTs. | |
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... | |
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. | |
| TestCase * | GetParent () 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. | |
TcpIllinois C-AIMD algorithm tests.
Definition at line 30 of file tcp-illinois-test.cc.
| 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 ) |
Constructor.
| cWnd | Congestion window. |
| ssThresh | Slow Start Threshold. |
| segmentSize | Segment size. |
| cntRtt | RTT counter. |
| maxRtt | Max RTT. |
| segmentsAcked | Number of segments ACKed. |
| nextTxSeq | Next Tx sequence number. |
| lastAckedSeq | Last ACKed sequence number. |
| name | Test description. |
Definition at line 113 of file tcp-illinois-test.cc.
References ns3::TestCase::TestCase(), m_ackCnt, m_alpha, m_baseRtt, m_beta, m_cntRtt, m_cWnd, m_lastAckedSeq, m_maxRtt, m_nextTxSeq, m_rttAbove, m_rttLow, m_segmentsAcked, m_segmentSize, m_ssThresh, m_sumRtt, ns3::MilliSeconds(), and segmentSize.
Here is the call graph for this function:
|
private |
Calculate the TCP Illinois alpha param.
| cong | The congestion control. |
| da | Average delay (in milliseconds). |
| dm | Maximum delay (in milliseconds). |
Definition at line 259 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:
|
private |
Calculate the average delay.
Definition at line 253 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:
|
private |
Calculate the TCP Illinois beta param.
| cong | The congestion control. |
| da | Average delay (in milliseconds). |
| dm | Maximum delay (in milliseconds). |
Definition at line 295 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:
|
private |
Calculate the maximum delay.
Definition at line 247 of file tcp-illinois-test.cc.
References m_baseRtt, and m_maxRtt.
Referenced by RecalcParam().
Here is the caller graph for this function:
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 142 of file tcp-illinois-test.cc.
References ns3::CreateObject(), 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:
|
private |
brief Get and check the SSH threshold.
Definition at line 325 of file tcp-illinois-test.cc.
References m_beta, m_cWnd, m_segmentSize, m_ssThresh, and NS_LOG_DEBUG.
Referenced by DoRun().
Here is the caller graph for this function:
|
private |
Increases the TCP window.
| cong | The congestion control. |
Definition at line 181 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:
|
private |
Recalculate the internal TCP Illinois params.
| cong | The congestion control. |
Definition at line 222 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:
|
private |
ACK counter.
Definition at line 110 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), and IncreaseWindow().
|
private |
TCP Illinois alpha parameter.
Definition at line 104 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), CalculateAlpha(), IncreaseWindow(), and RecalcParam().
|
private |
Base RTT.
Definition at line 99 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), CalculateAvgDelay(), CalculateMaxDelay(), and DoRun().
|
private |
TCP Illinois beta parameter.
Definition at line 105 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), CalculateBeta(), and GetSsThresh().
|
private |
RTT counter.
Definition at line 106 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), CalculateAvgDelay(), DoRun(), and RecalcParam().
|
private |
Congestion window.
Definition at line 96 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), DoRun(), GetSsThresh(), IncreaseWindow(), and RecalcParam().
|
private |
Last ACKed sequence number.
Definition at line 103 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), DoRun(), and IncreaseWindow().
|
private |
Max RTT.
Definition at line 100 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), CalculateMaxDelay(), and DoRun().
|
private |
Next Tx sequence number.
Definition at line 102 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), DoRun(), and IncreaseWindow().
|
private |
RTT above threshold.
Definition at line 108 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), and CalculateAlpha().
|
private |
RTT low counter.
Definition at line 109 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), and CalculateAlpha().
|
private |
Number of segments ACKed.
Definition at line 101 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), DoRun(), and IncreaseWindow().
|
private |
Segment size.
Definition at line 98 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), DoRun(), GetSsThresh(), and IncreaseWindow().
|
private |
Slow Start Threshold.
Definition at line 97 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), DoRun(), GetSsThresh(), and IncreaseWindow().
|
private |
Sum of all the RTTs.
Definition at line 107 of file tcp-illinois-test.cc.
Referenced by TcpIllinoisTest(), CalculateAvgDelay(), and DoRun().