21 #include "ns3/sequence-number.h" 
   23 #include "ns3/object.h" 
   24 #include "ns3/traced-value.h" 
   25 #include "ns3/trace-source-accessor.h" 
   43     static TypeId tid = 
TypeId (
"ns3::SequenceNumberTestObj")
 
   45       .AddTraceSource (
"TestTracedSequenceNumber",
 
   46                        "A traceable sequence number",
 
   48                        "ns3::SequenceNumber32TracedValueCallback")
 
   49       .AddConstructor<SequenceNumberTestObj> ()
 
   61     m_testTracedSequenceNumber += 1;
 
   78   virtual void DoRun (
void);
 
   82   : 
TestCase (
"Sequence number test case")
 
  101 #define NS_TEST_ASSERT_EQUAL(a,b) NS_TEST_ASSERT_MSG_EQ (a,b, "foo") 
  102 #define NS_TEST_ASSERT(a) NS_TEST_ASSERT_MSG_EQ (bool(a), true, "foo") 
  108     value = (num1 + num2).GetValue ();
 
void Dispose(void)
Dispose of this Object. 
 
Smart pointer class similar to boost::intrusive_ptr. 
 
NUMERIC_TYPE GetValue() const 
Extracts the numeric value of the sequence number. 
 
virtual ~SequenceNumberTestCase()
 
TypeId GetInstanceTypeId(void) const 
Implement the GetInstanceTypeId method defined in ObjectBase. 
 
SequenceNumber32 m_oldval
 
This test suite implements a Unit Test. 
 
SequenceNumberTestSuite()
 
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source. 
 
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite. 
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
#define NS_TEST_ASSERT(a)
 
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
static TypeId GetTypeId(void)
 
TracedValue< SequenceNumber32 > m_testTracedSequenceNumber
 
void SequenceNumberTracer(SequenceNumber32 oldval, SequenceNumber32 newval)
 
SequenceNumberTestSuite g_seqNumTests
 
A base class which provides memory management and object aggregation. 
 
#define NS_TEST_ASSERT_EQUAL(a, b)
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number. 
 
SequenceNumber32 m_newval