ns-3
ns3::Config Namespace Reference

Configuration of simulation parameters and tracing. More...

Classes

class  MatchContainer
 hold a set of objects which match a specific search string. More...

Functions

void Reset (void)
void Set (std::string path, const AttributeValue &value)
void SetDefault (std::string name, const AttributeValue &value)
bool SetDefaultFailSafe (std::string fullName, const AttributeValue &value)
void SetGlobal (std::string name, const AttributeValue &value)
bool SetGlobalFailSafe (std::string name, const AttributeValue &value)
void ConnectWithoutContext (std::string path, const CallbackBase &cb)
void DisconnectWithoutContext (std::string path, const CallbackBase &cb)
void Connect (std::string path, const CallbackBase &cb)
void Disconnect (std::string path, const CallbackBase &cb)
Config::MatchContainer LookupMatches (std::string path)
void RegisterRootNamespaceObject (Ptr< Object > obj)
void UnregisterRootNamespaceObject (Ptr< Object > obj)
uint32_t GetRootNamespaceObjectN (void)
Ptr< ObjectGetRootNamespaceObject (uint32_t i)

Detailed Description

Configuration of simulation parameters and tracing.


Function Documentation

void ns3::Config::Connect ( std::string  path,
const CallbackBase &  cb 
)
Parameters:
patha path to match trace sources.
cbthe callback to connect to the matching trace sources.

This function will attempt to find all trace sources which match the input path and will then connect the input callback to them in such a way that the callback will receive an extra context string upon trace event notification.

Referenced by ns3::UanHelper::EnableAscii(), ns3::WimaxHelper::EnableAsciiForConnection(), ns3::LteHelper::EnableDlMacTraces(), ns3::LteHelper::EnableDlPdcpTraces(), ns3::LteHelper::EnableDlRlcTraces(), ns3::LteHelper::EnableUlMacTraces(), ns3::LteHelper::EnableUlPdcpTraces(), and ns3::LteHelper::EnableUlRlcTraces().

void ns3::Config::ConnectWithoutContext ( std::string  path,
const CallbackBase &  cb 
)
Parameters:
patha path to match trace sources.
cbthe callback to connect to the matching trace sources.

This function will attempt to find all trace sources which match the input path and will then connect the input callback to them.

Referenced by ns3::MobilityHelper::EnableAscii(), and ns3::SpectrumAnalyzerHelper::Install().

void ns3::Config::Disconnect ( std::string  path,
const CallbackBase &  cb 
)
Parameters:
patha path to match trace sources.
cbthe callback to connect to the matching trace sources.

This function undoes the work of Config::ConnectWithContext.

void ns3::Config::DisconnectWithoutContext ( std::string  path,
const CallbackBase &  cb 
)
Parameters:
patha path to match trace sources.
cbthe callback to disconnect to the matching trace sources.

This function undoes the work of Config::Connect.

Ptr< Object > ns3::Config::GetRootNamespaceObject ( uint32_t  i)
Parameters:
ithe index of the requested object.
Returns:
the requested root namespace object
uint32_t ns3::Config::GetRootNamespaceObjectN ( void  )
Returns:
the number of registered root namespace objects.
MatchContainer ns3::Config::LookupMatches ( std::string  path)
Parameters:
paththe path to perform a match against
Returns:
a container which contains all the objects which match the input path.

Referenced by ns3::RadioEnvironmentMapHelper::Install().

void ns3::Config::RegisterRootNamespaceObject ( Ptr< Object >  obj)
Parameters:
obja new root object

Each root object is used during path matching as the root of the path by Config::Connect, and Config::Set.

void ns3::Config::Reset ( void  )

Reset the initial value of every attribute as well as the value of every global to what they were before any call to SetDefault and SetGlobal.

References ns3::GlobalValue::Begin(), ns3::GlobalValue::End(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), and ns3::TypeId::SetAttributeInitialValue().

void ns3::Config::Set ( std::string  path,
const AttributeValue &  value 
)
Parameters:
patha path to match attributes.
valuethe value to set in all matching attributes.

This function will attempt to find attributes which match the input path and will then set their value to the input value.

void ns3::Config::SetDefault ( std::string  name,
const AttributeValue &  value 
)
Parameters:
namethe full name of the attribute
valuethe value to set.

This method overrides the initial value of the matching attribute. This method cannot fail: it will crash if the input attribute name or value is invalid.

References NS_FATAL_ERROR, and SetDefaultFailSafe().

bool ns3::Config::SetDefaultFailSafe ( std::string  name,
const AttributeValue &  value 
)
Parameters:
namethe full name of the attribute
valuethe value to set.
Returns:
true if the value was set successfully, false otherwise.

This method overrides the initial value of the matching attribute.

References ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::LookupByNameFailSafe(), and ns3::TypeId::SetAttributeInitialValue().

Referenced by ns3::cell_edited_callback_config_default(), and SetDefault().

void ns3::Config::SetGlobal ( std::string  name,
const AttributeValue &  value 
)
Parameters:
namethe name of the requested GlobalValue.
valuethe value to set

This method is equivalent to GlobalValue::Bind

References ns3::GlobalValue::Bind().

bool ns3::Config::SetGlobalFailSafe ( std::string  name,
const AttributeValue &  value 
)
Parameters:
namethe name of the requested GlobalValue.
valuethe value to set

This method is equivalent to GlobalValue::BindFailSafe

References ns3::GlobalValue::BindFailSafe().

void ns3::Config::UnregisterRootNamespaceObject ( Ptr< Object >  obj)
Parameters:
obja new root object

This function undoes the work of Config::RegisterRootNamespaceObject.