Configuration of simulation parameters and tracing. More...
Classes | |
class | MatchContainer |
hold a set of objects which match a specific search string. More... |
Functions | |
void | Connect (std::string path, const CallbackBase &cb) |
void | ConnectWithoutContext (std::string path, const CallbackBase &cb) |
void | Disconnect (std::string path, const CallbackBase &cb) |
void | DisconnectWithoutContext (std::string path, const CallbackBase &cb) |
Ptr< Object > | GetRootNamespaceObject (uint32_t i) |
uint32_t | GetRootNamespaceObjectN (void) |
Config::MatchContainer | LookupMatches (std::string path) |
void | RegisterRootNamespaceObject (Ptr< Object > obj) |
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 | UnregisterRootNamespaceObject (Ptr< Object > obj) |
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.
Definition at line 728 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::LteHelper::ActivateDataRadioBearer(), ns3::dsr::DsrRouting::ConnectCallbacks(), ns3::AnimationInterface::ConnectCallbacks(), ns3::RadioBearerStatsConnector::ConnectSrb0Traces(), ns3::RadioBearerStatsConnector::ConnectSrb1TracesUe(), ns3::RadioBearerStatsConnector::ConnectTracesEnb(), ns3::RadioBearerStatsConnector::ConnectTracesUe(), ns3::DoMakeTraceSourceAccessor(), ns3::aodv::LoopbackTestCase::DoRun(), ns3::WaypointMobilityModelNotifyTest::DoRun(), ns3::LteLinkAdaptationTestCase::DoRun(), Ns3TcpNoDelayTestCase::DoRun(), ns3::LteInterferenceTestCase::DoRun(), Ns3TcpSocketTestCase1::DoRun(), DynamicGlobalRoutingTestCase::DoRun(), NscTcpLossTestCase1::DoRun(), ns3::LteEnbAntennaTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), ns3::LteHandoverDelayTestCase::DoRun(), ns3::SpectrumIdealPhyTestCase::DoRun(), Ns3TcpInteroperabilityTestCase::DoRun(), Ns3TcpSocketTestCase2::DoRun(), NscTcpLossTestCase2::DoRun(), ns3::Ns2MobilityHelperTest::DoRun(), ObjectVectorTraceConfigTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), CsmaPingTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::WimaxHelper::EnableAsciiForConnection(), ns3::FdNetDeviceHelper::EnableAsciiInternal(), ns3::EmuHelper::EnableAsciiInternal(), ns3::PointToPointHelper::EnableAsciiInternal(), ns3::CsmaHelper::EnableAsciiInternal(), ns3::YansWifiPhyHelper::EnableAsciiInternal(), ns3::WimaxHelper::EnableAsciiInternal(), ns3::InternetStackHelper::EnableAsciiIpv4Internal(), ns3::InternetStackHelper::EnableAsciiIpv6Internal(), ns3::AthstatsHelper::EnableAthstats(), ns3::LteHelper::EnableDlMacTraces(), ns3::LteHelper::EnableDlPhyTraces(), ns3::LteHelper::EnableDlRxPhyTraces(), ns3::LteHelper::EnableDlTxPhyTraces(), ns3::LteHelper::EnableUlMacTraces(), ns3::LteHelper::EnableUlPhyTraces(), ns3::LteHelper::EnableUlRxPhyTraces(), ns3::LteHelper::EnableUlTxPhyTraces(), ns3::RadioBearerStatsConnector::EnsureConnected(), main(), ns3::PyViz::PyViz(), ns3::PyViz::RegisterCsmaLikeDevice(), ns3::PyViz::RegisterDropTracePath(), ns3::PyViz::RegisterPointToPointLikeDevice(), ns3::PyViz::RegisterWifiLikeDevice(), and WifiInterferenceTestCase::WifiSimpleInterference().
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.
Definition at line 717 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::AnimationInterface::ConnectCallbacks(), ns3::DoMakeTraceSourceAccessor(), CsmaBridgeTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), CsmaBroadcastTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaOneSubnetTestCase::DoRun(), ObjectVectorTraceConfigTestCase::DoRun(), CsmaPingTestCase::DoRun(), CsmaRawIpSocketTestCase::DoRun(), CsmaStarTestCase::DoRun(), ns3::MobilityHelper::EnableAscii(), ns3::YansWifiPhyHelper::EnableAsciiInternal(), ns3::SpectrumAnalyzerHelper::Install(), ns3::Ipv4FlowProbe::Ipv4FlowProbe(), and main().
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.
Definition at line 734 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::RadioBearerStatsConnector::ConnectSrb0Traces(), and ns3::DoMakeTraceSourceAccessor().
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.
Definition at line 722 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Disconnect(), and ns3::DoMakeTraceSourceAccessor().
i | the index of the requested object. |
Definition at line 763 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::AttributeIterator::Iterate(), and main().
uint32_t ns3::Config::GetRootNamespaceObjectN | ( | void | ) |
Definition at line 757 of file config.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::AttributeIterator::Iterate(), and main().
MatchContainer ns3::Config::LookupMatches | ( | std::string | path | ) |
path | the path to perform a match against |
Definition at line 739 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::RandomVariableStreamHelper::AssignStreams(), ns3::FindCellIdFromEnbRlcPath(), ns3::FindImsiFromEnbRlcPath(), ns3::FindImsiFromLteNetDevice(), ns3::FindImsiFromUePhy(), and ns3::RadioEnvironmentMapHelper::Install().
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.
Definition at line 745 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ChannelListPriv::DoGet(), ns3::NodeListPriv::DoGet(), ns3::BuildingListPriv::DoGet(), RootNamespaceConfigTestCase::DoRun(), UnderRootNamespaceConfigTestCase::DoRun(), ObjectVectorConfigTestCase::DoRun(), ObjectVectorTraceConfigTestCase::DoRun(), and main().
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.
Definition at line 642 of file config.cc.
References ns3::GlobalValue::Begin(), ns3::GlobalValue::End(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), NS_LOG_FUNCTION_NOARGS, ns3::TypeId::AttributeInformation::originalInitialValue, and ns3::TypeId::SetAttributeInitialValue().
Referenced by ns3::LteRrcConnectionEstablishmentTestCase::DoRun(), ns3::LteLinkAdaptationTestCase::DoRun(), ns3::LteEnbAntennaTestCase::DoRun(), ns3::LteX2HandoverTestCase::DoRun(), ns3::LteEpcE2eDataTestCase::DoRun(), NetworkNumberAllocatorTestCase::DoTeardown(), NetworkNumber6AllocatorTestCase::DoTeardown(), NetworkAllocatorHelperTestCase::DoTeardown(), IpAddressHelperTestCasev6::DoTeardown(), AddressAllocator6TestCase::DoTeardown(), AddressAllocatorHelperTestCase::DoTeardown(), AddressAllocatorTestCase::DoTeardown(), ResetAllocatorHelperTestCase::DoTeardown(), NetworkAndAddress6TestCase::DoTeardown(), NetworkAndAddressTestCase::DoTeardown(), ExampleAddress6GeneratorTestCase::DoTeardown(), IpAddressHelperTestCasev4::DoTeardown(), ExampleAddressGeneratorTestCase::DoTeardown(), AddressCollision6TestCase::DoTeardown(), and AddressCollisionTestCase::DoTeardown().
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.
Definition at line 662 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::RawTextConfigLoad::Attributes(), ns3::XmlConfigLoad::Attributes(), ns3::LteEpcE2eDataTestCase::DoRun(), RootNamespaceConfigTestCase::DoRun(), UnderRootNamespaceConfigTestCase::DoRun(), ObjectVectorConfigTestCase::DoRun(), Experiment::IncrementCw(), NetAnimExperiment::IncrementCw(), and main().
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.
Definition at line 667 of file config.cc.
References NS_FATAL_ERROR, NS_LOG_FUNCTION, and SetDefaultFailSafe().
Referenced by BatteryLifetimeTest::ConstantLoadTest(), ns3::olsr::Bug780Test::CreateNodes(), ns3::RawTextConfigLoad::Default(), ns3::XmlConfigLoad::Default(), BasicEnergyDepletionTest::DepletionTestCase(), RttTestCase::DoRun(), ManyUniformRandomVariablesOneGetValueCallTestCase::DoRun(), ns3::LenaMimoTestCase::DoRun(), OneUniformRandomVariableManyGetValueCallsTestCase::DoRun(), FriisPropagationLossModelTestCase::DoRun(), ns3::LenaHarqTestCase::DoRun(), ns3::LenaDataPhyErrorModelTestCase::DoRun(), ns3::LenaRrFfMacSchedulerTestCase::DoRun(), ns3::LteRrcConnectionEstablishmentTestCase::DoRun(), ns3::LenaPfFfMacSchedulerTestCase1::DoRun(), ns3::LenaFdBetFfMacSchedulerTestCase1::DoRun(), ns3::LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), ns3::LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), ns3::LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), ns3::LenaPssFfMacSchedulerTestCase1::DoRun(), ns3::LteLinkAdaptationTestCase::DoRun(), ns3::LteDownlinkDataSinrTestCase::DoRun(), ns3::LteInterferenceTestCase::DoRun(), Ns3TcpNoDelayTestCase::DoRun(), ns3::LteEnbAntennaTestCase::DoRun(), DynamicGlobalRoutingTestCase::DoRun(), ns3::LteX2HandoverTestCase::DoRun(), ns3::LenaDlCtrlPhyErrorModelTestCase::DoRun(), ns3::LteDownlinkCtrlSinrTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), ns3::LenaPfFfMacSchedulerTestCase2::DoRun(), ns3::LenaTdBetFfMacSchedulerTestCase2::DoRun(), ns3::LenaFdBetFfMacSchedulerTestCase2::DoRun(), ns3::LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), ns3::LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), ns3::LenaPssFfMacSchedulerTestCase2::DoRun(), ns3::EpcS1uDlTestCase::DoRun(), ns3::LteEpcE2eDataTestCase::DoRun(), Ipv4FragmentationTest::DoRun(), TwoRayGroundPropagationLossModelTestCase::DoRun(), Ns3TcpSocketTestCase2::DoRun(), ns3::aodv::ChainRegressionTest::DoRun(), LogDistancePropagationLossModelTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), AttributeTestCase< T >::DoRun(), Ns3TcpCwndTestCase2::DoRun(), RangePropagationLossModelTestCase::DoRun(), CsmaPingTestCase::DoRun(), CsmaRawIpSocketTestCase::DoRun(), main(), BatteryLifetimeTest::VariableLoadTest(), and WifiInterferenceTestCase::WifiSimpleInterference().
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.
Definition at line 675 of file config.cc.
References ns3::TypeId::AttributeInformation::checker, ns3::AttributeChecker::CreateValidValue(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::LookupByNameFailSafe(), ns3::TypeId::AttributeInformation::name, NS_LOG_FUNCTION, and ns3::TypeId::SetAttributeInitialValue().
Referenced by ns3::cell_edited_callback_config_default(), AttributeTestCase< T >::DoRun(), ns3::CommandLine::HandleArgument(), 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
Definition at line 707 of file config.cc.
References ns3::GlobalValue::Bind(), and NS_LOG_FUNCTION.
Referenced by ThreadedSimulatorEventsTestCase::DoSetup(), ThreadedSimulatorEventsTestCase::DoTeardown(), ns3::RawTextConfigLoad::Global(), ns3::XmlConfigLoad::Global(), ns3::RngSeedManager::SetRun(), and ns3::RngSeedManager::SetSeed().
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
Definition at line 712 of file config.cc.
References ns3::GlobalValue::BindFailSafe(), and NS_LOG_FUNCTION.
Referenced by ns3::CommandLine::HandleArgument().
void ns3::Config::UnregisterRootNamespaceObject | ( | Ptr< Object > | obj | ) |
obj | a new root object |
This function undoes the work of Config::RegisterRootNamespaceObject.
Definition at line 751 of file config.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ChannelListPriv::Delete(), ns3::NodeListPriv::Delete(), and ns3::BuildingListPriv::Delete().