7#include "ns3/core-module.h"
63 TypeId(
"ns3::FormattingTestObject")
66 .AddAttribute(
"OnTime",
67 "A RandomVariableStream used to pick the duration of the 'On' state.",
68 StringValue(
"ns3::ConstantRandomVariable[Constant=1.0]"),
81 return m_testVariable;
118 m_factory.Set(name,
value);
124 return m_factory.Create();
134 obj->SetAttribute(
"OnTime",
StringValue(
"ns3::UniformRandomVariable"));
135 obj->SetAttribute(
"OnTime",
StringValue(
"ns3::UniformRandomVariable[Min=0.]"));
136 obj->SetAttribute(
"OnTime",
StringValue(
"ns3::UniformRandomVariable[Min=0.|Max=1.]"));
137 obj->SetAttribute(
"OnTime",
StringValue(
"ns3::UniformRandomVariable[Min=50.|Max=100.]"));
168 StringValue(
"ns3::UniformRandomVariable[Min=30.|Max=60.0]"));
Hold a value for an Attribute.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Instantiate subclasses of ns3::Object.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
Hold variables of type string.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
static unsigned int value(char c)