28 #include "ns3/tcp-congestion-ops.h"
29 #include "ns3/tcp-scalable.h"
30 #include "ns3/tcp-socket-base.h"
54 uint32_t segmentsAcked,
55 const std::string& name);
58 void DoRun()
override;
68 uint32_t segmentsAcked,
69 const std::string& name)
73 m_segmentsAcked(segmentsAcked)
80 m_state = CreateObject<TcpSocketState>();
91 cong->GetAttribute(
"AIFactor", aiFactor);
96 uint32_t w =
std::min(segCwnd, (uint32_t)aiFactor.
Get());
103 "CWnd has not increased");
123 void DoRun()
override;
132 const std::string& name)
142 m_state = CreateObject<TcpSocketState>();
153 cong->GetAttribute(
"MDFactor", mdFactor);
155 double b = 1.0 - mdFactor.
Get();
157 uint32_t ssThresh =
std::max(2.0, segCwnd * b);
180 "Scalable increment test on cWnd = 38 segments and segmentSize = 536 bytes"),
186 "Scalable increment test on cWnd = 38 segments and segmentSize = 1 byte"),
193 "Scalable increment test on cWnd = 53 segments and segmentSize = 1446 bytes"),
199 "Scalable decrement test on cWnd = 38 segments and segmentSize = 1 byte"),
205 "Scalable decrement test on cWnd = 100 segments and segmentSize = 536 bytes"),
211 "Scalable decrement test on cWnd = 40 segments and segmentSize = 1446 bytes"),
Testing the multiplicative decrease on TcpScalable.
uint32_t m_segmentSize
Segment size.
Ptr< TcpSocketState > m_state
TCP socket state.
TcpScalableDecrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
uint32_t m_cWnd
Congestion window.
void DoRun() override
Implementation to actually run this TestCase.
Testing the congestion avoidance increment on TcpScalable.
TcpScalableIncrementTest(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_segmentsAcked
Segments ACKed.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
T Get() const
Get the underlying value.
Hold an unsigned integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpScalableTestSuite g_tcpScalableTest
Static variable for test initialization.