30 #include "ns3/tcp-congestion-ops.h"
31 #include "ns3/tcp-socket-base.h"
32 #include "ns3/tcp-htcp.h"
59 uint32_t segmentsAcked,
Time lastCongestion,
Time firstAck,
60 Time secondAck, uint32_t expectedCwnd,
const std::string &name);
63 virtual void DoRun (
void);
76 uint32_t segmentsAcked,
Time lastCongestion,
Time firstAck,
77 Time secondAck, uint32_t expectedCwnd,
const std::string &name)
81 m_segmentsAcked (segmentsAcked),
82 m_lastCongestion (lastCongestion),
83 m_firstAck (firstAck),
84 m_secondAck (secondAck),
85 m_expectedCwnd (expectedCwnd)
99 m_state = CreateObject<TcpSocketState> ();
118 NS_LOG_DEBUG (
"Simulation ran for the scheduled events");
124 "CWnd has not updated correctly");
126 Simulator::Destroy ();
156 20383,
"TcpHtcp increment test on cWnd "), TestCase::QUICK);
160 40,
"TcpHtcp increment test on cWnd "), TestCase::QUICK);
164 76671,
"TcpHtcp increment test on cWnd "), TestCase::QUICK);
Testing the congestion avoidance increment on TcpHtcp.
virtual void DoRun(void)
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.
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(void) 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.