28#include "ns3/tcp-congestion-ops.h"
29#include "ns3/tcp-htcp.h"
30#include "ns3/tcp-socket-base.h"
63 const std::string& name);
66 void DoRun()
override;
85 const std::string& name)
89 m_segmentsAcked(segmentsAcked),
90 m_lastCongestion(lastCongestion),
92 m_secondAck(secondAck),
93 m_expectedCwnd(expectedCwnd)
107 m_state = CreateObject<TcpSocketState>();
137 NS_LOG_DEBUG(
"Simulation ran for the scheduled events");
177 "TcpHtcp increment test on cWnd "),
186 "TcpHtcp increment test on cWnd "),
195 "TcpHtcp increment test on cWnd "),
Testing the congestion avoidance increment on TcpHtcp.
void DoRun() override
Since the calculation depends on the throughput and its associated timing, we schedule a few exact ev...
Time m_secondAck
Second ACK time.
Time m_lastCongestion
Last congestion time.
uint32_t m_segmentsAcked
Segments already ACKed.
uint32_t m_cWnd
Congestion window.
uint32_t m_expectedCwnd
Expected cWnd.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_segmentSize
Segment size.
TcpHtcpIncrementTest(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, Time lastCongestion, Time firstAck, Time secondAck, uint32_t expectedCwnd, const std::string &name)
Constructor.
Time m_firstAck
First ACK time.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get the slow start threshold after a loss event.
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
Simulation virtual time values and global simulation resolution.
T Get() const
Get the underlying value.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#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.
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.
static TcpHtcpTestSuite g_TcpHtcpTest
Static variable for test initialization.