4 #include "ns3/double-probe.h"
6 #include "ns3/core-module.h"
13 static TypeId GetTypeId (
void);
26 m_time = m_var.GetValue ();
41 aux = m_var.GetValue ();
70 virtual void DoRun (
void);
71 void TraceSink (std::string context,
double oldValue,
double newValue);
77 :
TestCase (
"basic probe test case"),
95 if (context ==
"testProbe")
99 else if (context ==
"testProbe2")
117 Simulator::Stop (Seconds (300));
121 Names::Add (
"/Names/SampleEmitter",
s);
147 Simulator::Destroy ();
smart pointer class similar to boost::intrusive_ptr
std::string GetName(void) const
Get the object's name.
void TraceSink(std::string context, double oldValue, double newValue)
static ProbeTestSuite probeTestSuite
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
ExponentialVariable m_var
virtual void ConnectByPath(std::string path)
connect to a trace source provided by a config path
double GetSeconds(void) const
hold objects of type ns3::Time
virtual void DoRun(void)
Implementation to actually run this TestCase.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
virtual ~ProbeTestCase1()
#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...
static TypeId GetTypeId(void)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Exponentially Distributed random varThis class supports the creation of objects that return random nu...
static Time Now(void)
Return the "current simulation time".
TracedValue< double > m_trace
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
virtual bool ConnectByObject(std::string traceSource, Ptr< Object > obj)
connect to a trace source attribute provided by a given object
void SetName(std::string name)
Set the object's name. All spaces are replaced by underscores.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
bool TraceConnect(std::string name, std::string context, const CallbackBase &cb)
a base class which provides memory management and object aggregation
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report and abort if not.
void SetAttribute(std::string name, const AttributeValue &value)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
#define NS_TEST_ASSERT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report and abort if not.