19 #include "ns3/core-module.h"
20 #include "ns3/internet-module.h"
21 #include "ns3/rtt-estimator.h"
36 virtual void DoRun (
void);
37 virtual void DoTeardown (
void);
50 m_variance (variance),
73 for (uint32_t i = 0; i < 10000; ++i)
75 int measurement = nv->GetInteger ();
76 rtt->
Measurement (Time::FromInteger (measurement, Time::MS));
77 double err = (measurement - a);
79 v = v + g * (std::abs (err) - v);
83 double tolerance =
m_mean * .05;
87 int expectedTimeout = (int)a + 4 * (
int)v;
smart pointer class similar to boost::intrusive_ptr
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
#define NS_LOG_COMPONENT_DEFINE(name)
RttTestCase(double mean, double variance, double gain)
virtual void DoRun(void)
Implementation to actually run this TestCase.
hold objects of type ns3::Time
Time GetCurrentEstimate(void) const
gets the current RTT estimate.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
void SetDefault(std::string name, const AttributeValue &value)
Time RetransmitTimeout()
Returns the estimated RTO.
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
RttTestSuite g_tcpTestSuite
void Measurement(Time measure)
Add a new measurement to the estimator.
This test suite implements a Unit Test.
Hold an floating point type.
int64_t GetMilliSeconds(void) const
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.