|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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);
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
void Reset()
Resets the estimator.
void CheckValuesWithTolerance(Ptr< RttEstimator > rtt, Time m, Time e, Time v)
Check RTT values with a 1 nanosecond of tolerance.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool SetAttributeFailSafe(std::string name, const AttributeValue &value)
Set a single attribute without raising errors.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
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
Get the raw time value, in the current resolution unit.
void CheckValues(Ptr< RttEstimator > rtt, Time m, Time e, Time v)
Check RTT values.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
bool GetAttributeFailSafe(std::string name, AttributeValue &value) const
Get the value of an attribute without raising erros.
Ptr< RttEstimator > Copy() const
Copy object (including current internal state)
Smart pointer class similar to boost::intrusive_ptr.
#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 ...
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
#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...
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.
Simulation virtual time values and global simulation resolution.
virtual void Measurement(Time t)=0
Add a new measurement to the estimator.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
static RttEstimatorTestSuite g_rttEstimatorTestSuite
Static variable for test initialization.
@ UNIT
This test suite implements a Unit Test.
Time Seconds(double value)
Construct a Time in the indicated unit.
AttributeValue implementation for Time.
Time GetEstimate(void) const
gets the RTT estimate.
void SetDefault(std::string name, const AttributeValue &value)
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t GetNSamples(void) const
gets the number of samples used in the estimates