20#include "ns3/tcp-congestion-ops.h"
21#include "ns3/tcp-hybla.h"
22#include "ns3/tcp-socket-base.h"
49 const std::string& name);
52 void DoRun()
override;
73 const std::string& name)
92 m_state = CreateObject<TcpSocketState>();
107 cong->GetAttribute(
"RRTT", rRtt);
116 "Different rho values between implementation and test");
118 cong->IncreaseWindow(
m_state, 1);
123 double inc = std::pow(2, calcRho) - 1.0;
127 "Congestion window has gone too far");
130 "Congestion window different than expected");
136 double inc = std::pow(
m_rho, 2) / ((
double)segCwnd);
144 "Congestion window different than expected");
164 "Rho=1.1, slow start"),
165 TestCase::Duration::QUICK);
170 "Rho=2, slow start"),
171 TestCase::Duration::QUICK);
176 "Rho=30, slow start"),
177 TestCase::Duration::QUICK);
179 TestCase::Duration::QUICK);
181 TestCase::Duration::QUICK);
183 TestCase::Duration::QUICK);
Testing the congestion avoidance increment on TcpHybla.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window.
uint32_t m_segmentSize
Segment size.
uint32_t m_ssThresh
Slow Start Threshold.
Ptr< TcpSocketState > m_state
TCP socket state.
void RhoUpdated(double oldVal, double newVal)
Tracks TCP Hybla rho parameter changes.
Time m_rtt
Round trip time.
double m_rho
TCP Hybla rho parameter.
TcpHyblaIncrementTest(uint32_t cWnd, uint32_t ssThresh, uint32_t segmentSize, const Time &rtt, const std::string &name)
Constructor.
Smart pointer class similar to boost::intrusive_ptr.
uint32_t m_segmentSize
Segment size.
Time m_minRtt
Minimum RTT observed throughout the connection.
TracedValue< uint32_t > m_cWnd
Congestion window.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
Simulation virtual time values and global simulation resolution.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
T Get() const
Get the underlying value.
#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.
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
#define NS_TEST_ASSERT_MSG_LT_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report and abort if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
static TcpHyblaTestSuite g_tcpHyblaTest
Static variable for test initialization.