19 #include "ns3/rtt-estimator.h"
20 #include "ns3/attribute.h"
21 #include "ns3/nstime.h"
22 #include "ns3/config.h"
24 #include "ns3/double.h"
36 virtual void DoRun (
void);
37 virtual void DoTeardown (
void);
Simulation virtual time values and global simulation resolution.
uint32_t GetNSamples(void) const
gets the number of samples used in the estimates
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
bool SetAttributeFailSafe(std::string name, const AttributeValue &value)
Set a single attribute without raising errors.
This test suite implements a Unit Test.
static RttEstimatorTestSuite g_rttEstimatorTestSuite
bool GetAttributeFailSafe(std::string name, AttributeValue &value) const
Get the value of an attribute without raising erros.
void CheckValues(Ptr< RttEstimator > rtt, Time m, Time e, Time v)
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
AttributeValue implementation for Time.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
#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_TEST_EXPECT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report if ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Measurement(Time t)=0
Add a new measurement to the estimator.
Time GetVariation(void) const
Note that this is not a formal statistical variance; it has the the same units as the estimate...
int64_t GetInteger(void) const
void Reset()
Resets the estimator.
Ptr< RttEstimator > Copy() const
Copy object (including current internal state)
Time Seconds(double value)
Construct a Time in the indicated unit.
void SetDefault(std::string name, const AttributeValue &value)
void CheckValuesWithTolerance(Ptr< RttEstimator > rtt, Time m, Time e, Time v)
Time GetEstimate(void) const
gets the RTT estimate.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class can be used to hold variables of floating point type such as 'double' or 'float'...