6#include "ns3/attribute.h"
10#include "ns3/nstime.h"
11#include "ns3/rtt-estimator.h"
29 void DoRun()
override;
84 ok = rtt->GetAttributeFailSafe(
"InitialEstimation", timeval);
87 ok = rtt->GetAttributeFailSafe(
"Alpha", doubleval);
90 ok = rtt->GetAttributeFailSafe(
"Beta", doubleval);
97 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0.125));
99 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0.25));
126 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0.1));
128 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0.1));
142 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(0));
144 ok = rtt->SetAttributeFailSafe(
"Beta",
DoubleValue(0));
150 ok = rtt->SetAttributeFailSafe(
"Alpha",
DoubleValue(1));
152 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, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
Simulation virtual time values and global simulation resolution.
static Time From(const int64x64_t &value)
Create a Time in the current unit.
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.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static RttEstimatorTestSuite g_rttEstimatorTestSuite
Static variable for test initialization.