13#include "ns3/tcp-bbr.h"
14#include "ns3/tcp-congestion-ops.h"
15#include "ns3/tcp-socket-base.h"
37 void DoRun()
override;
87 void DoRun()
override;
98 const std::string& name)
118 double actualPacingGain;
119 double actualCwndGain;
126 cong->EnterStartup();
129 actualPacingGain = cong->GetPacingGain();
130 actualCwndGain = cong->GetCwndGain();
140 cong->EnterProbeBW();
147 desiredPacingGain = 1.25;
152 cong->EnterProbeRTT();
153 desiredPacingGain = 1;
161 actualPacingGain = cong->GetPacingGain();
162 actualCwndGain = cong->GetCwndGain();
166 "BBR has not updated into desired pacing gain");
169 "BBR has not updated into desired cwnd gain");
196 "BBR should enter to STARTUP phase and set cwnd and pacing gain accordingly"),
202 "BBR should enter to DRAIN phase and set cwnd and pacing gain accordingly"),
209 "BBR should enter to BBR_PROBE_BW phase and set cwnd and pacing gain accordingly"),
216 "BBR should enter to BBR_PROBE_RTT phase and set cwnd and pacing gain accordingly"),
This class can be used to hold variables of floating point type such as 'double' or 'float'.
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.
Tests whether BBR sets correct value of pacing and cwnd gain based on different state.
void DoRun() override
Implementation to actually run this TestCase.
TcpBbrCheckGainValuesTest(TcpBbr::BbrMode_t state, double highGain, const std::string &name)
constructor
TcpBbr::BbrMode_t m_mode
BBR mode under test.
double m_highGain
Value of BBR high gain.
void ExecuteTest()
Execute the test.
BbrMode_t
BBR has the following 4 modes for deciding how fast to send:
@ BBR_PROBE_RTT
Cut inflight to min to probe min_rtt.
@ BBR_DRAIN
Drain any queue created during startup.
@ BBR_STARTUP
Ramp up sending rate rapidly to fill pipe.
@ BBR_PROBE_BW
Discover, share bw: pace around estimated bw.
Testing whether BBR enables pacing.
TcpBbrPacingEnableTest(bool pacing, const std::string &name)
constructor
bool m_pacing
Initial pacing configuration.
void DoRun() override
Implementation to actually run this TestCase.
void ExecuteTest()
Execute the test.
TcpBbrTestSuite()
constructor
@ CA_OPEN
Normal state, no dubious events.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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 Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpBbrTestSuite g_tcpBbrTest
static variable for test initialization