26 #include "ns3/tcp-congestion-ops.h" 27 #include "ns3/tcp-socket-base.h" 28 #include "ns3/tcp-bbr.h" 48 virtual void DoRun (
void);
80 "BBR has not updated pacing value");
98 virtual void DoRun (
void);
108 double highGain,
const std::string &name)
111 m_highGain (highGain)
127 double actualPacingGain, actualCwndGain, desiredPacingGain =
m_highGain, desiredCwndGain =
m_highGain;
132 cong->EnterStartup ();
135 actualPacingGain = cong->GetPacingGain ();
136 actualCwndGain = cong->GetCwndGain ();
146 cong->EnterProbeBW ();
153 desiredPacingGain = 1.25;
158 cong->EnterProbeRTT ();
159 desiredPacingGain = 1;
167 actualPacingGain = cong->GetPacingGain ();
168 actualCwndGain = cong->GetCwndGain ();
170 NS_TEST_ASSERT_MSG_EQ (actualPacingGain, desiredPacingGain,
"BBR has not updated into desired pacing gain");
171 NS_TEST_ASSERT_MSG_EQ (actualCwndGain, desiredCwndGain,
"BBR has not updated into desired cwnd gain");
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
TcpBbr::BbrMode_t m_mode
BBR mode under test.
Normal state, no dubious events.
bool m_pacing
Pacing status.
Ramp up sending rate rapidly to fill pipe.
Tests whether BBR sets correct value of pacing and cwnd gain based on different state.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
static void Run(void)
Run the simulation.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void DoRun(void)
Implementation to actually run this TestCase.
double m_highGain
Value of BBR high gain.
void ExecuteTest(void)
Execute the test.
bool m_pacing
Initial pacing configuration.
TcpBbrCheckGainValuesTest(TcpBbr::BbrMode_t state, double highGain, const std::string &name)
constructor
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
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.
void ExecuteTest(void)
Execute the test.
Cut inflight to min to probe min_rtt.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
BbrMode_t
BBR has the following 4 modes for deciding how fast to send:
Discover, share bw: pace around estimated bw.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TcpBbrTestSuite()
constructor
Time Seconds(double value)
Construct a Time in the indicated unit.
static TcpBbrTestSuite g_tcpBbrTest
static variable for test initialization
Testing whether BBR enables pacing.
This test suite implements a Unit Test.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
TcpBbrPacingEnableTest(bool pacing, const std::string &name)
constructor
Drain any queue created during startup.