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" 42 virtual void DoRun (
void);
43 virtual void DoTeardown (
void);
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
int64_t GetInteger(void) const
Get the raw time value, in the current resolution unit.
#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.
Time GetEstimate(void) const
gets the 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.
bool SetAttributeFailSafe(std::string name, const AttributeValue &value)
Set a single attribute without raising errors.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
bool GetAttributeFailSafe(std::string name, AttributeValue &value) const
Get the value of an attribute without raising erros.
static RttEstimatorTestSuite g_rttEstimatorTestSuite
Static variable for test initialization.
void CheckValues(Ptr< RttEstimator > rtt, Time m, Time e, Time v)
Check RTT values.
AttributeValue implementation for Time.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
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.
uint32_t GetNSamples(void) const
gets the number of samples used in the estimates
Time GetVariation(void) const
Note that this is not a formal statistical variance; it has the the same units as the estimate...
void Reset()
Resets the estimator.
Time Seconds(double value)
Construct a Time in the indicated unit.
void SetDefault(std::string name, const AttributeValue &value)
Ptr< RttEstimator > Copy() const
Copy object (including current internal state)
void CheckValuesWithTolerance(Ptr< RttEstimator > rtt, Time m, Time e, Time v)
Check RTT values with a 1 nanosecond of tolerance.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
This test suite implements a Unit Test.
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'...