Configuration of simulation parameters and tracing. More...
Files | |
file | config.cc |
Imlementation of the various ns3::Config functions and classes. | |
file | config.h |
Declaration of the various ns3::Config functions and classes. | |
file | names.cc |
Implementation of class ns3::Names, and declaration of classes ns3::NamesNode and ns3::NamePriv. | |
file | names.h |
Declaration of class ns3::Names. | |
Namespaces | |
ns3::Config | |
Namespace for the various functions implementing the Config system. | |
Classes | |
class | ns3::Config::MatchContainer |
hold a set of objects which match a specific search string. More... | |
class | ns3::NameNode |
Node in the naming tree. More... | |
class | ns3::Names |
A directory of name and Ptr<Object> associations that allows us to give any ns3 Object a name. More... | |
class | ns3::NamesPriv |
The singleton root Names object. More... | |
Functions | |
void | ns3::Config::Connect (std::string path, const CallbackBase &cb) |
void | ns3::Config::ConnectWithoutContext (std::string path, const CallbackBase &cb) |
void | ns3::Config::Disconnect (std::string path, const CallbackBase &cb) |
void | ns3::Config::DisconnectWithoutContext (std::string path, const CallbackBase &cb) |
Ptr< Object > | ns3::Config::GetRootNamespaceObject (uint32_t i) |
uint32_t | ns3::Config::GetRootNamespaceObjectN (void) |
Config::MatchContainer | ns3::Config::LookupMatches (std::string path) |
void | ns3::Config::RegisterRootNamespaceObject (Ptr< Object > obj) |
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. More... | |
void | ns3::Config::Set (std::string path, const AttributeValue &value) |
void | ns3::Config::SetDefault (std::string name, const AttributeValue &value) |
bool | ns3::Config::SetDefaultFailSafe (std::string name, const AttributeValue &value) |
void | ns3::Config::SetGlobal (std::string name, const AttributeValue &value) |
bool | ns3::Config::SetGlobalFailSafe (std::string name, const AttributeValue &value) |
void | ns3::Config::UnregisterRootNamespaceObject (Ptr< Object > obj) |
Configuration of simulation parameters and tracing.
void ns3::Config::Connect | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | 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 835 of file config.cc.
References ns3::ConfigImpl::Connect(), ns3::Singleton< ConfigImpl >::Get(), and NS_LOG_FUNCTION.
Referenced by ns3::LteHelper::ActivateDataRadioBearer(), VanetRoutingExperiment::ConfigureApplications(), VanetRoutingExperiment::ConfigureDevices(), ns3::dsr::DsrRouting::ConnectCallbacks(), ns3::AnimationInterface::ConnectCallbacks(), ns3::RadioBearerStatsConnector::ConnectSrb0Traces(), ns3::RadioBearerStatsConnector::ConnectSrb1TracesUe(), ns3::RadioBearerStatsConnector::ConnectTracesEnb(), ns3::RadioBearerStatsConnector::ConnectTracesUe(), ns3::DoMakeTraceSourceAccessor(), WaypointMobilityModelNotifyTest::DoRun(), LteCqiGenerationTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), Ns3TcpNoDelayTestCase::DoRun(), LteInterferenceTestCase::DoRun(), Ns3TcpSocketTestCase1::DoRun(), LteEnbAntennaTestCase::DoRun(), NscTcpLossTestCase1::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), LteUeMeasurementsTestCase::DoRun(), LteHandoverDelayTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), SpectrumIdealPhyTestCase::DoRun(), Ns3TcpInteroperabilityTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), Ns3TcpSocketTestCase2::DoRun(), NscTcpLossTestCase2::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), Ns2MobilityHelperTest::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), Bug730TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), ObjectVectorTraceConfigTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), CsmaPingTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::WimaxHelper::EnableAsciiForConnection(), ns3::YansWavePhyHelper::EnableAsciiInternal(), ns3::FdNetDeviceHelper::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(), OcbWifiMacTestCase::PostDeviceConfiguration(), ns3::PyViz::PyViz(), ns3::PyViz::RegisterCsmaLikeDevice(), ns3::PyViz::RegisterDropTracePath(), ns3::PyViz::RegisterPointToPointLikeDevice(), ns3::PyViz::RegisterWifiLikeDevice(), VanetRoutingExperiment::SetupAdhocMobilityNodes(), and WifiInterferenceTestCase::WifiSimpleInterference().
void ns3::Config::ConnectWithoutContext | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | 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 824 of file config.cc.
References ns3::ConfigImpl::ConnectWithoutContext(), ns3::Singleton< ConfigImpl >::Get(), and NS_LOG_FUNCTION.
Referenced by ns3::Uinteger16Probe::ConnectByPath(), ns3::Uinteger32Probe::ConnectByPath(), ns3::Uinteger8Probe::ConnectByPath(), ns3::PacketProbe::ConnectByPath(), ns3::BooleanProbe::ConnectByPath(), ns3::DoubleProbe::ConnectByPath(), ns3::Ipv4PacketProbe::ConnectByPath(), ns3::TimeProbe::ConnectByPath(), ns3::ApplicationPacketProbe::ConnectByPath(), ns3::Ipv6PacketProbe::ConnectByPath(), 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::YansWavePhyHelper::EnableAsciiInternal(), ns3::YansWifiPhyHelper::EnableAsciiInternal(), ns3::SpectrumAnalyzerHelper::Install(), ns3::Ipv4FlowProbe::Ipv4FlowProbe(), ns3::Ipv6FlowProbe::Ipv6FlowProbe(), TraceCwnd(), TraceDroppingState(), TraceEveryDrop(), TraceQueueLength(), TraceRto(), TraceRtt(), TraceSojourn(), and TraceSsThresh().
void ns3::Config::Disconnect | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | cb | The callback to connect to the matching trace sources. |
This function undoes the work of Config::ConnectWithContext.
Definition at line 841 of file config.cc.
References ns3::ConfigImpl::Disconnect(), ns3::Singleton< ConfigImpl >::Get(), and NS_LOG_FUNCTION.
Referenced by ns3::RadioBearerStatsConnector::ConnectSrb0Traces(), and ns3::DoMakeTraceSourceAccessor().
void ns3::Config::DisconnectWithoutContext | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | cb | The callback to disconnect to the matching trace sources. |
This function undoes the work of Config::Connect.
Definition at line 829 of file config.cc.
References ns3::ConfigImpl::DisconnectWithoutContext(), ns3::Singleton< ConfigImpl >::Get(), and NS_LOG_FUNCTION.
Referenced by ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Disconnect(), and ns3::DoMakeTraceSourceAccessor().
Ptr< Object > ns3::Config::GetRootNamespaceObject | ( | uint32_t | i | ) |
[in] | i | The index of the requested object. |
Definition at line 870 of file config.cc.
References ns3::Singleton< ConfigImpl >::Get(), ns3::ConfigImpl::GetRootNamespaceObject(), and NS_LOG_FUNCTION.
Referenced by GetTypicalAggregations(), and ns3::AttributeIterator::Iterate().
uint32_t ns3::Config::GetRootNamespaceObjectN | ( | void | ) |
Definition at line 864 of file config.cc.
References ns3::Singleton< ConfigImpl >::Get(), ns3::ConfigImpl::GetRootNamespaceObjectN(), and NS_LOG_FUNCTION_NOARGS.
Referenced by GetTypicalAggregations(), and ns3::AttributeIterator::Iterate().
MatchContainer ns3::Config::LookupMatches | ( | std::string | path | ) |
[in] | path | The path to perform a match against |
Definition at line 846 of file config.cc.
References ns3::Singleton< ConfigImpl >::Get(), ns3::ConfigImpl::LookupMatches(), and NS_LOG_FUNCTION.
Referenced by ns3::RandomVariableStreamHelper::AssignStreams(), ns3::LteStatsCalculator::FindCellIdFromEnbRlcPath(), ns3::LteStatsCalculator::FindImsiFromEnbRlcPath(), ns3::LteStatsCalculator::FindImsiFromLteNetDevice(), ns3::LteStatsCalculator::FindImsiFromUePhy(), ns3::RadioEnvironmentMapHelper::Install(), ns3::GnuplotHelper::PlotProbe(), and ns3::FileHelper::WriteProbe().
[in] | 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 852 of file config.cc.
References ns3::Singleton< ConfigImpl >::Get(), NS_LOG_FUNCTION, and ns3::ConfigImpl::RegisterRootNamespaceObject().
Referenced by ns3::BuildingListPriv::DoGet(), ns3::ChannelListPriv::DoGet(), ns3::NodeListPriv::DoGet(), RootNamespaceConfigTestCase::DoRun(), UnderRootNamespaceConfigTestCase::DoRun(), ObjectVectorConfigTestCase::DoRun(), ObjectVectorTraceConfigTestCase::DoRun(), and SearchAttributesOfParentObjectsTestCase::DoRun().
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 749 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 LteInterferenceHardFrTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::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 | ||
) |
[in] | path | A path to match attributes. |
[in] | 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 769 of file config.cc.
References ns3::Singleton< ConfigImpl >::Get(), NS_LOG_FUNCTION, and ns3::ConfigImpl::Set().
Referenced by ns3::RawTextConfigLoad::Attributes(), ns3::XmlConfigLoad::Attributes(), LteEpcE2eDataTestCase::DoRun(), RootNamespaceConfigTestCase::DoRun(), UnderRootNamespaceConfigTestCase::DoRun(), ObjectVectorConfigTestCase::DoRun(), Bug730TestCase::DoRun(), SearchAttributesOfParentObjectsTestCase::DoRun(), NetAnimExperiment::IncrementCw(), and Experiment::IncrementCw().
void ns3::Config::SetDefault | ( | std::string | name, |
const AttributeValue & | value | ||
) |
[in] | name | The full name of the attribute |
[in] | 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 774 of file config.cc.
References NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::Config::SetDefaultFailSafe().
Referenced by VanetRoutingExperiment::ConfigureDefaults(), BatteryLifetimeTest::ConstantLoadTest(), ns3::RawTextConfigLoad::Default(), ns3::XmlConfigLoad::Default(), BasicEnergyDepletionTest::DepletionTestCase(), ns3::LenaDeactivateBearerTestCase::DoRun(), RttEstimatorTestCase::DoRun(), OneUniformRandomVariableManyGetValueCallsTestCase::DoRun(), LenaMimoTestCase::DoRun(), ManyUniformRandomVariablesOneGetValueCallTestCase::DoRun(), FriisPropagationLossModelTestCase::DoRun(), LenaHarqTestCase::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LteDownlinkDataSinrTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), Ipv4DynamicGlobalRoutingTestCase::DoRun(), LteInterferenceTestCase::DoRun(), Ns3TcpNoDelayTestCase::DoRun(), LteRlcAmE2eTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteDownlinkCtrlSinrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), Ns3TcpStateTestCase::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LteUeMeasurementsTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), EpcS1uDlTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), Ipv4FragmentationTest::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), TwoRayGroundPropagationLossModelTestCase::DoRun(), Ns3TcpSocketTestCase2::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), ChainRegressionTest::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LogDistancePropagationLossModelTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), AttributeTestCase< T >::DoRun(), Bug555TestCase::DoRun(), Ns3TcpCwndTestCase2::DoRun(), RangePropagationLossModelTestCase::DoRun(), Bug730TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), CsmaPingTestCase::DoRun(), CsmaRawIpSocketTestCase::DoRun(), experiment(), ConfigStoreHelper::LoadConfig(), RoutingExperiment::Run(), InterferenceExperiment::Run(), ConfigStoreHelper::SaveConfig(), BatteryLifetimeTest::VariableLoadTest(), and WifiInterferenceTestCase::WifiSimpleInterference().
bool ns3::Config::SetDefaultFailSafe | ( | std::string | name, |
const AttributeValue & | value | ||
) |
[in] | name | The full name of the attribute |
[in] | value | The value to set. |
true
if the value was set successfully, false otherwise.This method overrides the initial value of the matching attribute.
Definition at line 782 of file config.cc.
References ns3::TypeId::AttributeInformation::checker, 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(), ns3::CommandLine::HandleAttribute(), and ns3::Config::SetDefault().
void ns3::Config::SetGlobal | ( | std::string | name, |
const AttributeValue & | value | ||
) |
[in] | name | The name of the requested GlobalValue. |
[in] | value | The value to set |
This method is equivalent to GlobalValue::Bind
Definition at line 814 of file config.cc.
References ns3::GlobalValue::Bind(), and NS_LOG_FUNCTION.
Referenced by LenaDataPhyErrorModelTestCase::DoRun(), LteRlcAmE2eTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), 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 | ||
) |
[in] | name | The name of the requested GlobalValue. |
[in] | value | The value to set |
true
if the GlobalValue could be set.This method is equivalent to GlobalValue::BindFailSafe
Definition at line 819 of file config.cc.
References ns3::GlobalValue::BindFailSafe(), and NS_LOG_FUNCTION.
Referenced by ns3::CommandLine::HandleArgument(), and ns3::CommandLine::HandleAttribute().
[in] | obj | A new root object |
This function undoes the work of Config::RegisterRootNamespaceObject.
Definition at line 858 of file config.cc.
References ns3::Singleton< ConfigImpl >::Get(), NS_LOG_FUNCTION, and ns3::ConfigImpl::UnregisterRootNamespaceObject().
Referenced by ns3::BuildingListPriv::Delete(), ns3::ChannelListPriv::Delete(), and ns3::NodeListPriv::Delete().