ns-3
|
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< Object > | GetRootNamespaceObject (uint32_t i) |
Configuration of simulation parameters and tracing.
void ns3::Config::Connect | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
path | a path to match trace sources. |
cb | the 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(), and ns3::WimaxHelper::EnableAsciiForConnection().
void ns3::Config::ConnectWithoutContext | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
path | a path to match trace sources. |
cb | the 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 | ||
) |
path | a path to match trace sources. |
cb | the 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 | ||
) |
path | a path to match trace sources. |
cb | the callback to disconnect to the matching trace sources. |
This function undoes the work of Config::Connect.
Ptr< Object > ns3::Config::GetRootNamespaceObject | ( | uint32_t | i | ) |
i | the index of the requested object. |
uint32_t ns3::Config::GetRootNamespaceObjectN | ( | void | ) |
MatchContainer ns3::Config::LookupMatches | ( | std::string | path | ) |
path | the path to perform a match against |
void ns3::Config::RegisterRootNamespaceObject | ( | Ptr< Object > | obj | ) |
obj | a 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 | ||
) |
path | a path to match attributes. |
value | the 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 | ||
) |
name | the full name of the attribute |
value | the 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 | ||
) |
name | the full name of the attribute |
value | the value to set. |
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 | ||
) |
name | the name of the requested GlobalValue. |
value | the value to set |
This method is equivalent to GlobalValue::Bind
References ns3::GlobalValue::Bind().
bool ns3::Config::SetGlobalFailSafe | ( | std::string | name, |
const AttributeValue & | value | ||
) |
name | the name of the requested GlobalValue. |
value | the value to set |
This method is equivalent to GlobalValue::BindFailSafe
References ns3::GlobalValue::BindFailSafe().
void ns3::Config::UnregisterRootNamespaceObject | ( | Ptr< Object > | obj | ) |
obj | a new root object |
This function undoes the work of Config::RegisterRootNamespaceObject.