19 #include "ns3/string.h"
101 std::string name =
"ns3::Ns3NscStack<";
116 tid =
TypeId (name.c_str ());
126 Create<NscStackStringAccessor> (buf),
127 MakeStringChecker ());
142 return std::string (buf);
151 NS_FATAL_ERROR (
"setting " << name <<
" to " << value <<
"failed (retval " << ret <<
")");
159 Ns3NscStack::Ns3NscStack::GetTypeId (
void)
virtual bool HasGetter(void) const
std::string Get(void) const
hold variables of type string
void Set(const std::string &value)
Hold a value for an Attribute.
This object represent the underlying nsc stack attributes and provide a ns-3-like system to access th...
This object represents the underlying nsc stack, which is aggregated to a Node object, and which provides access to the sysctls of the nsc stack through attributes.
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
virtual TypeId GetInstanceTypeId(void) const
static bool LookupByNameFailSafe(std::string name, TypeId *tid)
implement the ns-3 type and attribute system
#define NS_FATAL_ERROR(msg)
fatal error handling
virtual const char * get_name()=0
Return a short one-word name of the stack.
allow setting and getting the value of an attribute.
NscStackStringAccessor(std::string name)
Constructor.
virtual bool Get(const ObjectBase *object, AttributeValue &val) const
virtual int sysctl_set(const char *name, const char *value)
Set system parameters using sysctl.
TypeId AddAttribute(std::string name, std::string help, const AttributeValue &initialValue, Ptr< const AttributeAccessor > accessor, Ptr< const AttributeChecker > checker)
static TypeId GetTypeId(void)
Get the type ID.
virtual bool HasSetter(void) const
std::string m_name
name of the attribute
virtual bool Set(ObjectBase *object, const AttributeValue &val) const
virtual int sysctl_getnum(size_t idx, char *name, size_t len)
Tell the cradle code to put the name of sysctl number 'idx' into name[].
void Set(std::string name, std::string value)
Set an attribute.
std::string Get(std::string name) const
Get an attribute.
a base class which provides memory management and object aggregation
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
INetStack * m_stack
the underlying stack
virtual int sysctl_get(const char *name, char *value, size_t len)
Get system parameters using sysctl.