9#include "ns3/tcp-congestion-ops.h"
10#include "ns3/tcp-hybla.h"
11#include "ns3/tcp-socket-base.h"
38 const std::string& name);
41 void DoRun()
override;
62 const std::string& name)
96 cong->GetAttribute(
"RRTT", rRtt);
105 "Different rho values between implementation and test");
107 cong->IncreaseWindow(
m_state, 1);
112 double inc = std::pow(2, calcRho) - 1.0;
116 "Congestion window has gone too far");
119 "Congestion window different than expected");
125 double inc = std::pow(
m_rho, 2) / ((
double)segCwnd);
133 "Congestion window different than expected");
153 "Rho=1.1, slow start"),
154 TestCase::Duration::QUICK);
159 "Rho=2, slow start"),
160 TestCase::Duration::QUICK);
165 "Rho=30, slow start"),
166 TestCase::Duration::QUICK);
168 TestCase::Duration::QUICK);
170 TestCase::Duration::QUICK);
172 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.
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.
AttributeValue implementation for Time.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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.