30 #include "ns3/tcp-congestion-ops.h"
31 #include "ns3/tcp-socket-base.h"
32 #include "ns3/tcp-htcp.h"
45 uint32_t segmentsAcked,
Time lastCongestion,
Time firstAck,
46 Time secondAck, uint32_t expectedCwnd,
const std::string &name);
49 virtual void DoRun (
void);
62 uint32_t segmentsAcked,
Time lastCongestion,
Time firstAck,
63 Time secondAck, uint32_t expectedCwnd,
const std::string &name)
66 m_segmentSize (segmentSize),
67 m_segmentsAcked (segmentsAcked),
68 m_lastCongestion (lastCongestion),
69 m_firstAck (firstAck),
70 m_secondAck (secondAck),
71 m_expectedCwnd (expectedCwnd)
85 m_state = CreateObject<TcpSocketState> ();
104 NS_LOG_DEBUG (
"Simulation ran for the scheduled events");
110 "CWnd has not updated correctly");
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
static void Run(void)
Run the simulation.
#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.
This test suite implements a Unit Test.
Testing the congestion avoidance increment on TcpHtcp.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
#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.
TcpHtcpIncrementTest(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, Time lastCongestion, Time firstAck, Time secondAck, uint32_t expectedCwnd, const std::string &name)
virtual void DoRun(void)
Since the calculation depends on the throughput and its associated timing, we schedule a few exact ev...
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< TcpSocketState > m_state
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get the slow start threshold after a loss event.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
ns3::TcpHtcpTestSuite g_TcpHtcpTest