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"
41 void DoRun()
override;
96 ok = rtt->GetAttributeFailSafe(
"InitialEstimation", timeval);
99 ok = rtt->GetAttributeFailSafe(
"Alpha", doubleval);
102 ok = rtt->GetAttributeFailSafe(
"Beta", doubleval);
109 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0.125));
111 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0.25));
138 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0.1));
140 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0.1));
154 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0));
156 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0));
162 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(1));
164 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.
AttributeValue implementation for Time.
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.