20 #include "ns3/object.h" 
   21 #include "ns3/boolean.h" 
   22 #include "ns3/integer.h" 
   23 #include "ns3/uinteger.h" 
   24 #include "ns3/config.h" 
   26 #include "ns3/string.h" 
   27 #include "ns3/random-variable-stream.h" 
   28 #include "ns3/double.h" 
   29 #include "ns3/object-vector.h" 
   30 #include "ns3/object-map.h" 
   31 #include "ns3/traced-value.h" 
   32 #include "ns3/callback.h" 
   33 #include "ns3/trace-source-accessor.h" 
   34 #include "ns3/pointer.h" 
   35 #include "ns3/object-factory.h" 
   36 #include "ns3/nstime.h" 
  105       .SetParent<Object> ()
 
  106       .HideFromDocumentation ()
 
  107       .AddAttribute (
"TestBoolName", 
"help text",
 
  111       .AddAttribute (
"TestBoolA", 
"help text",
 
  116       .AddAttribute (
"TestInt16", 
"help text",
 
  119                      MakeIntegerChecker<int16_t> ())
 
  120       .AddAttribute (
"TestInt16WithBounds", 
"help text",
 
  123                      MakeIntegerChecker<int16_t> (-5, 10))
 
  124       .AddAttribute (
"TestInt16SetGet", 
"help text",
 
  128                      MakeIntegerChecker<int16_t> ())
 
  129       .AddAttribute (
"TestUint8", 
"help text",
 
  132                      MakeUintegerChecker<uint8_t> ())
 
  133       .AddAttribute (
"TestEnum", 
"help text",
 
  139       .AddAttribute (
"TestEnumSetGet", 
"help text",
 
  146       .AddAttribute (
"TestRandom", 
"help text",
 
  147                      StringValue (
"ns3::ConstantRandomVariable[Constant=1.0]"),
 
  149                      MakePointerChecker <RandomVariableStream>())
 
  150       .AddAttribute (
"TestFloat", 
"help text",
 
  153                      MakeDoubleChecker<float> ())
 
  154       .AddAttribute (
"TestVector1", 
"help text",
 
  157                      MakeObjectVectorChecker<Derived> ())
 
  158       .AddAttribute (
"TestVector2", 
"help text",
 
  162                      MakeObjectVectorChecker<Derived> ())
 
  163       .AddAttribute (
"TestMap1", 
"help text",
 
  166                      MakeObjectMapChecker<Derived> ())
 
  167       .AddAttribute (
"IntegerTraceSource1", 
"help text",
 
  170                      MakeIntegerChecker<int8_t> ())
 
  171       .AddAttribute (
"IntegerTraceSource2", 
"help text",
 
  175                      MakeIntegerChecker<int8_t> ())
 
  176       .AddAttribute (
"UIntegerTraceSource", 
"help text",
 
  179                      MakeIntegerChecker<uint8_t> ())
 
  180       .AddAttribute (
"DoubleTraceSource", 
"help text",
 
  183                      MakeDoubleChecker<double> ())
 
  184       .AddAttribute (
"BoolTraceSource", 
"help text",
 
  188       .AddAttribute (
"EnumTraceSource", 
"help text",
 
  192       .AddAttribute (
"ValueClassSource", 
"help text",
 
  196       .AddTraceSource (
"Source1", 
"help test",
 
  198                        "ns3::TracedValueCallback::Int8")
 
  199       .AddTraceSource (
"Source2", 
"help text",
 
  201                        "ns3::AttributeObjectTest::NumericTracedCallback")
 
  202       .AddTraceSource (
"ValueSource", 
"help text",
 
  204                        "ns3::ValueClassTest::TracedValueCallback")
 
  205       .AddAttribute (
"Pointer", 
"help text",
 
  208                      MakePointerChecker<Derived> ())
 
  209       .AddAttribute (
"PointerInitialized", 
"help text",
 
  212                      MakePointerChecker<Derived> ())
 
  213       .AddAttribute (
"PointerInitialized2", 
"help text",
 
  216                      MakePointerChecker<Derived> ())
 
  217       .AddAttribute (
"Callback", 
"help text",
 
  221       .AddAttribute (
"TestTimeWithBounds", 
"help text",
 
  243   void AddToVector1 (
void) { m_vector1.push_back (CreateObject<Derived> ()); }
 
  244   void AddToVector2 (
void) { m_vector2.push_back (CreateObject<Derived> ()); }
 
  248   void InvokeCb (
double a, 
int b, 
float c) { m_cb (a,b,c); }
 
  252     if (!m_cbValue.IsNull ()) {
 
  281   std::map <uint32_t, Ptr<Derived> > 
m_map1;
 
  286   typedef void (* NumericTracedCallback) (double, int, float);
 
  305 template <
typename T>
 
  313   virtual void DoRun (
void);
 
  315   bool CheckGetCodePaths (
Ptr<Object> p, std::string attributeName, std::string expectedString, T expectedValue);
 
  318 template <
typename T>
 
  324 template <
typename T>
 
  329 template <
typename T> 
bool 
  332   std::string attributeName,
 
  333   std::string expectedString,
 
  343   bool ok2 = stringValue.
Get () == expectedString;
 
  349   bool ok4 = expectedValue.Get () == actualValue.Get ();
 
  351   return ok1 && ok2 && ok3 && ok4;
 
  363   p = CreateObject<AttributeObjectTest> ();
 
  371   p = CreateObject<AttributeObjectTest> ();
 
  374   ok = CheckGetCodePaths (p, 
"TestBoolName", 
"true", 
BooleanValue (
true));
 
  383   p = CreateObject<AttributeObjectTest> ();
 
  386   ok = CheckGetCodePaths (p, 
"TestBoolName", 
"false", 
BooleanValue (
false));
 
  395   ok = CheckGetCodePaths (p, 
"TestBoolName", 
"true", 
BooleanValue (
true));
 
  396   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
 
  404   ok = CheckGetCodePaths (p, 
"TestBoolName", 
"false", 
BooleanValue (
false));
 
  405   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
 
  410   p = CreateObject<AttributeObjectTest> ();
 
  422   ok = CheckGetCodePaths (p, 
"TestBoolA", 
"true", 
BooleanValue (
true));
 
  423   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() (getter/setter) via StringValue");
 
  431   ok = CheckGetCodePaths (p, 
"TestBoolA", 
"false", 
BooleanValue (
false));
 
  432   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() (getter/setter) via StringValue");
 
  441   p = CreateObject<AttributeObjectTest> ();
 
  448   ok = CheckGetCodePaths (p, 
"TestInt16", 
"-2", 
IntegerValue (-2));
 
  457   ok = CheckGetCodePaths (p, 
"TestInt16", 
"-5", 
IntegerValue (-5));
 
  458   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
 
  466   ok = CheckGetCodePaths (p, 
"TestInt16", 
"2", 
IntegerValue (2));
 
  467   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
 
  475   ok = CheckGetCodePaths (p, 
"TestInt16", 
"-32768", 
IntegerValue (-32768));
 
  476   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() (most negative) via StringValue");
 
  483   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via StringValue to -32769");
 
  485   ok = CheckGetCodePaths (p, 
"TestInt16", 
"-32768", 
IntegerValue (-32768));
 
  494   ok = CheckGetCodePaths (p, 
"TestInt16", 
"32767", 
IntegerValue (32767));
 
  495   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() (most positive) via StringValue");
 
  502   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via StringValue to 32768");
 
  504   ok = CheckGetCodePaths (p, 
"TestInt16", 
"32767", 
IntegerValue (32767));
 
  514   ok = CheckGetCodePaths (p, 
"TestInt16WithBounds", 
"10", 
IntegerValue (10));
 
  515   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() (positive limit) via StringValue");
 
  521   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to 11");
 
  523   ok = CheckGetCodePaths (p, 
"TestInt16WithBounds", 
"10", 
IntegerValue (10));
 
  532   ok = CheckGetCodePaths (p, 
"TestInt16WithBounds", 
"-5", 
IntegerValue (-5));
 
  533   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() (negative limit) via StringValue");
 
  539   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to -6");
 
  541   ok = CheckGetCodePaths (p, 
"TestInt16WithBounds", 
"-5", 
IntegerValue (-5));
 
  551   p = CreateObject<AttributeObjectTest> ();
 
  558   ok = CheckGetCodePaths (p, 
"TestUint8", 
"1", 
UintegerValue (1));
 
  567   ok = CheckGetCodePaths (p, 
"TestUint8", 
"0", 
UintegerValue (0));
 
  568   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
 
  576   ok = CheckGetCodePaths (p, 
"TestUint8", 
"255", 
UintegerValue (255));
 
  577   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() (positive limit) via UintegerValue");
 
  586   ok = CheckGetCodePaths (p, 
"TestUint8", 
"255", 
UintegerValue (255));
 
  596   ok = CheckGetCodePaths (p, 
"TestUint8", 
"255", 
UintegerValue (255));
 
  597   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
 
  604   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via StringValue to 256");
 
  606   ok = CheckGetCodePaths (p, 
"TestUint8", 
"255", 
UintegerValue (255));
 
  613   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via StringValue to -1");
 
  622   p = CreateObject<AttributeObjectTest> ();
 
  629   ok = CheckGetCodePaths (p, 
"TestFloat", 
"-1.1", 
DoubleValue ((
float)-1.1));
 
  638   ok = CheckGetCodePaths (p, 
"TestFloat", 
"2.3", 
DoubleValue ((
float)2.3));
 
  639   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via DoubleValue");
 
  648   p = CreateObject<AttributeObjectTest> ();
 
  665   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via EnumValue");
 
  681   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via EnumValue");
 
  690   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
 
  719   p = CreateObject<AttributeObjectTest> ();
 
  723   Time::SetResolution (Time::NS);
 
  731   ok = CheckGetCodePaths (p, 
"TestTimeWithBounds", 
"+5000000000.0ns", 
TimeValue (
Seconds (5)));
 
  732   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe(5s) via TimeValue");
 
  737   ok = CheckGetCodePaths (p, 
"TestTimeWithBounds", 
"+3000000000.0ns", 
TimeValue (
Seconds (3)));
 
  738   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe(3s) via StringValue");
 
  752   ok = CheckGetCodePaths (p, 
"TestTimeWithBounds", 
"+10000000000.0ns", 
TimeValue (
Seconds (10)));
 
  753   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe(10s [positive limit]) via StringValue");
 
  759   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via TimeValue to 11s [greater than positive limit]");
 
  761   ok = CheckGetCodePaths (p, 
"TestTimeWithBounds", 
"+10000000000.0ns", 
TimeValue (
Seconds (10)));
 
  770   ok = CheckGetCodePaths (p, 
"TestTimeWithBounds", 
"-5000000000.0ns", 
TimeValue (
Seconds (-5)));
 
  771   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Attribute not set properly by SetAttributeFailSafe(-5s [negative limit]) via StringValue");
 
  779   ok = CheckGetCodePaths (p, 
"TestTimeWithBounds", 
"-5000000000.0ns", 
TimeValue (
Seconds (-5)));
 
  800   virtual void DoRun (
void);
 
  820   p = CreateObject<AttributeObjectTest> ();
 
  847   virtual void DoRun (
void);
 
  861   p = CreateObject<AttributeObjectTest> ();
 
  912   virtual void DoRun (
void);
 
  926   p = CreateObject<AttributeObjectTest> ();
 
  978   virtual void DoRun (
void);
 
  993   p = CreateObject<AttributeObjectTest> ();
 
 1019   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to 128");
 
 1025   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to -129");
 
 1050   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to 128");
 
 1056   NS_TEST_ASSERT_MSG_EQ (ok, 
false, 
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to -129");
 
 1070   virtual void DoRun (
void);
 
 1087   p = CreateObject<AttributeObjectTest> ();
 
 1106   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Could not TraceConnectWithoutContext() \"Source1\" to NodifySource1()");
 
 1123   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Could not TraceConnectWithoutContext() \"Source1\" to NodifySource1()");
 
 1142   virtual void DoRun (
void);
 
 1160   p = CreateObject<AttributeObjectTest> ();
 
 1216   virtual void DoRun (
void);
 
 1234   p = CreateObject<AttributeObjectTest> ();
 
 1245   NS_TEST_ASSERT_MSG_EQ (derived, 0, 
"Unexpectedly found non-null pointer in newly initialized PointerValue Attribute");
 
 1251   derived = Create<Derived> ();
 
 1253   NS_TEST_ASSERT_MSG_EQ (ok, 
true, 
"Could not SetAttributeFailSafe() a PointerValue of the correct type");
 
 1271   NS_TEST_ASSERT_MSG_EQ (storedBase, stored, 
"Retreived Ptr<Object> does not match stored Ptr<Derived>");
 
 1279   NS_TEST_ASSERT_MSG_EQ (x, 0, 
"Unexpectedly retreived unrelated Ptr<type> from stored Ptr<Derived>");
 
 1289   p2->GetAttribute (
"PointerInitialized", ptr2);
 
 1291   NS_TEST_ASSERT_MSG_NE (storedPtr, storedPtr2, 
"ptr and ptr2 both have PointerInitialized pointing to the same object");
 
 1293   p2->GetAttribute (
"PointerInitialized", ptr3);
 
 1295   NS_TEST_ASSERT_MSG_NE (storedPtr, storedPtr3, 
"ptr and ptr3 both have PointerInitialized pointing to the same object");
 
 1301   factory.
SetTypeId (
"ns3::AttributeObjectTest");
 
 1302   factory.
Set (
"PointerInitialized", 
StringValue (
"ns3::Derived"));
 
 1314   NS_TEST_ASSERT_MSG_NE (storedPtr4, storedPtr5, 
"aotPtr and aotPtr2 are unique, but their Derived member is not");
 
 1334   virtual void DoRun (
void);
 
 1354   p = CreateObject<AttributeObjectTest> ();
 
void InvokeCbValue(int8_t a)
int16_t m_int16WithBounds
TracedValue< enum Test_e > m_enumSrc
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input 
Simulation virtual time values and global simulation resolution. 
virtual ~RandomVariableStreamAttributeTestCase()
bool SetDefaultFailSafe(std::string fullName, const AttributeValue &value)
std::string Get(void) const 
Ptr< Derived > m_ptrInitialized2
Ptr< const AttributeAccessor > MakeValueClassTestAccessor(T1 a1)
TypeId AddConstructor(void)
Record in this TypeId the fact that the default constructor is accessible. 
AttributeValue implementation for Boolean. 
TracedValue< uint8_t > m_uintSrc
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
bool CheckGetCodePaths(Ptr< Object > p, std::string attributeName, std::string expectedString, T expectedValue)
virtual ~AttributeObjectTest(void)
Ptr< Derived > m_ptrInitialized
Ptr< T > GetObject(void) const 
Get a pointer to the requested aggregated Object. 
Hold variables of type string. 
Ptr< Derived > DoGetVector(uint32_t i) const 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
void NotifySource2(double a, int b, float c)
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
std::vector< Ptr< Derived > > m_vector2
bool IsNull(void) const 
Check for null implementation. 
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector. 
Hold a signed integer type. 
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory. 
#define NS_UNUSED(x)
Mark a local variable as unused. 
bool SetAttributeFailSafe(std::string name, const AttributeValue &value)
Set a single attribute without raising errors. 
bool DoGetTestB(void) const 
Callback< void, int8_t > m_cbValue
ObjectMapAttributeTestCase(std::string description)
RandomVariableStreamAttributeTestCase(std::string description)
std::map< uint32_t, Ptr< Derived > > m_map1
bool GetAttributeFailSafe(std::string name, AttributeValue &value) const 
Get the value of an attribute without raising erros. 
IntegerTraceSourceAttributeTestCase(std::string description)
void NotifyCallbackValue(int8_t a)
virtual ~CallbackValueTestCase()
AttributeValue implementation for Callback. 
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source. 
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. 
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void DoRun(void)
Implementation to actually run this TestCase. 
std::vector< Ptr< Derived > > m_vector1
AttributeValue implementation for ValueClassTest. 
Ptr< Object > Get(uint32_t i) const 
Get a specific Object. 
TracedCallbackTestCase(std::string description)
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Hold variables of type enum. 
TracedValue< int8_t > m_intSrc2
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite. 
AttributeValue implementation for Time. 
Ptr< Object > Create(void) const 
Create an Object instance of the configured TypeId. 
int16_t DoGetInt16(void) const 
Hold an unsigned integer type. 
void NotifySource2(double a, int b, float c)
virtual void DoRun(void)
Implementation to actually run this TestCase. 
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not. 
IntegerTraceSourceTestCase(std::string description)
Ptr< const AttributeAccessor > MakeCallbackAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void DoRun(void)
Implementation to actually run this TestCase. 
void NotifySource1(int8_t old, int8_t n)
bool TraceDisconnectWithoutContext(std::string name, const CallbackBase &cb)
Disconnect from a TraceSource a Callback previously connected without a context. 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
TracedValue< int8_t > m_intSrc1
virtual ~PointerAttributeTestCase()
void AddToMap1(uint32_t i)
TracedCallback< double, int, float > m_cb
void DoSetInt16(int16_t v)
AttributeObjectTest(void)
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output 
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context. 
TracedValue< ValueClassTest > m_valueSrc
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
Callback< void, int8_t > m_cbValue
Hold objects of type Ptr. 
Ptr< const AttributeChecker > MakeBooleanChecker(void)
virtual ~AttributeTestCase()
ObjectVectorAttributeTestCase(std::string description)
virtual void DoRun(void)
Implementation to actually run this TestCase. 
void Set(std::string name, const AttributeValue &value)
Set an attribute to be set during construction. 
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual ~ObjectMapAttributeTestCase()
void GetAttribute(std::string name, AttributeValue &value) const 
Get the value of an attribute, raising fatal errors if unsuccessful. 
static AttributesTestSuite attributesTestSuite
Ptr< const AttributeChecker > MakeCallbackChecker(void)
void InvokeCb(double a, int b, float c)
int8_t DoGetIntSrc(void) const 
TracedValue< double > m_doubleSrc
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name. 
Instantiate subclasses of ns3::Object. 
AttributeTestCase(std::string description)
virtual void DoRun(void)
Implementation to actually run this TestCase. 
static TypeId GetTypeId(void)
uint32_t DoGetVectorN(void) const 
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not...
bool DoSetIntSrc(int8_t v)
Time Seconds(double value)
Construct a Time in the indicated unit. 
void SetDefault(std::string name, const AttributeValue &value)
void NotifyCallbackValue(int8_t a)
virtual ~ObjectVectorAttributeTestCase()
virtual ~TracedCallbackTestCase()
static TypeId GetTypeId(void)
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector. 
Test_e DoGetEnum(void) const 
Ptr< RandomVariableStream > m_random
Test class for TracedValue callbacks. 
uint32_t GetN(void) const 
Get the number of Objects. 
A base class which provides memory management and object aggregation. 
void InvokeCbValue(int8_t a)
Container for a set of ns3::Object pointers. 
TracedValue< bool > m_boolSrc
PointerAttributeTestCase(std::string description)
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface. 
Ptr< const AttributeChecker > MakeValueClassTestChecker(void)
CallbackValueTestCase(std::string description)
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type. 
virtual ~IntegerTraceSourceAttributeTestCase()
virtual ~IntegerTraceSourceTestCase()
Callback< void, int8_t > m_cbValue
virtual void DoRun(void)
Implementation to actually run this TestCase. 
void InvokeCbValue(int8_t a)
virtual void DoRun(void)
Implementation to actually run this TestCase.