17 #include "ns3/attribute.h"
18 #include "ns3/config.h"
19 #include "ns3/double.h"
21 #include "ns3/nstime.h"
22 #include "ns3/rtt-estimator.h"
40 void DoRun()
override;
41 void DoTeardown()
override;
95 ok = rtt->GetAttributeFailSafe(
"InitialEstimation", timeval);
98 ok = rtt->GetAttributeFailSafe(
"Alpha", doubleval);
101 ok = rtt->GetAttributeFailSafe(
"Beta", doubleval);
108 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0.125));
110 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0.25));
137 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0.1));
139 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0.1));
153 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0));
155 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0));
161 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(1));
163 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(1));
void DoRun() override
Implementation to actually run this TestCase.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void CheckValuesWithTolerance(Ptr< RttEstimator > rtt, Time m, Time e, Time v)
Check RTT values with a 1 nanosecond of tolerance.
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'.
Smart pointer class similar to boost::intrusive_ptr.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
Simulation virtual time values and global simulation resolution.
int64_t GetInteger() const
Get the raw time value, in the current resolution unit.
void SetDefault(std::string name, const AttributeValue &value)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
#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 ...
#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 MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static RttEstimatorTestSuite g_rttEstimatorTestSuite
Static variable for test initialization.