22 #include "ns3/tcp-congestion-ops.h"
23 #include "ns3/tcp-socket-base.h"
24 #include "ns3/tcp-hybla.h"
37 uint32_t segmentSize,
const Time& rtt,
38 const std::string &name);
41 virtual void DoRun (
void);
42 void RhoUpdated (
double oldVal,
double newVal);
53 uint32_t segmentSize,
const Time &rtt,
54 const std::string &name)
57 m_ssThresh (ssThresh),
58 m_segmentSize (segmentSize),
73 m_state = CreateObject<TcpSocketState> ();
81 cong->TraceConnectWithoutContext (
"Rho",
88 cong->GetAttribute (
"RRTT", rRtt);
94 "Rho never updated by implementation");
96 "Different rho values between implementation and test");
98 cong->IncreaseWindow (
m_state, 1);
103 double inc = std::pow (2, calcRho) - 1.0;
106 "Congestion window has gone too far");
108 "Congestion window different than expected");
114 double inc = std::pow (
m_rho, 2) / ((double) segCwnd);
121 "Congestion window different than expected");
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
Ptr< TcpSocketState > m_state
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Testing the congestion avoidance increment on TcpHybla.
This test suite implements a Unit Test.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
AttributeValue implementation for Time.
#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.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
#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...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void RhoUpdated(double oldVal, double newVal)
virtual void DoRun(void)
Implementation to actually run this TestCase.
#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...
TcpHyblaIncrementTest(uint32_t cWnd, uint32_t ssThresh, uint32_t segmentSize, const Time &rtt, const std::string &name)
Time Seconds(double value)
Construct a Time in the indicated unit.
#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...
ns3::TcpHyblaTestSuite g_tcpHyblaTest