|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/tcp-congestion-ops.h"
23 #include "ns3/tcp-socket-base.h"
24 #include "ns3/tcp-hybla.h"
49 const std::string &name);
52 virtual void DoRun (
void);
59 void RhoUpdated (
double oldVal,
double newVal);
71 const std::string &name)
74 m_ssThresh (ssThresh),
91 m_state = CreateObject<TcpSocketState> ();
113 "Rho never updated by implementation");
115 "Different rho values between implementation and test");
122 double inc = std::pow (2, calcRho) - 1.0;
125 "Congestion window has gone too far");
127 "Congestion window different than expected");
133 double inc = std::pow (
m_rho, 2) / ((double) segCwnd);
140 "Congestion window different than expected");
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
T Get(void) const
Get the underlying value.
Testing the congestion avoidance increment on TcpHybla.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t m_segmentSize
Segment size.
Ptr< TcpSocketState > m_state
TCP socket state.
TcpHyblaIncrementTest(uint32_t cWnd, uint32_t ssThresh, uint32_t segmentSize, const Time &rtt, const std::string &name)
Constructor.
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.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
#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...
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time m_rtt
Round trip time.
#define NS_UNUSED(x)
Mark a local variable as unused.
static TcpHyblaTestSuite g_tcpHyblaTest
Static variable for test initialization.
uint32_t m_ssThresh
Slow Start Threshold.
Simulation virtual time values and global simulation resolution.
double m_rho
TCP Hybla rho parameter.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
#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.
@ UNIT
This test suite implements a Unit Test.
Time Seconds(double value)
Construct a Time in the indicated unit.
AttributeValue implementation for Time.
TracedValue< uint32_t > m_cWnd
Congestion window.
uint32_t m_segmentSize
Segment size.
void RhoUpdated(double oldVal, double newVal)
Tracks TCP Hybla rho parameter changes.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
uint32_t m_cWnd
Congestion window.
Time m_minRtt
Minimum RTT observed throughout the connection.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
virtual void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Try to increase the cWnd following the NewReno specification.