A Discrete-Event Network Simulator
API
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Related Functions | List of all members
ns3::ObjectBase Class Referenceabstract

Anchor the ns-3 type and attribute system. More...

#include "object-base.h"

+ Inheritance diagram for ns3::ObjectBase:

Public Member Functions

virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
virtual TypeId GetInstanceTypeId (void) const =0
 Get the most derived TypeId for this Object. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Private Member Functions

bool DoSet (Ptr< const AttributeAccessor > spec, Ptr< const AttributeChecker > checker, const AttributeValue &value)
 Attempt to set the value referenced by the accessor spec to a valid value according to the checker, based on value. More...
 

Related Functions

(Note that these are not member functions.)

static TypeId GetObjectIid (void)
 Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More...
 

Detailed Description

Anchor the ns-3 type and attribute system.


Introspection did not find any typical Config paths.

Every class which wants to integrate in the ns-3 type and attribute system should derive from this base class. This base class provides:


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 8 bytes (on a 64-bit architecture).

Definition at line 119 of file object-base.h.

Constructor & Destructor Documentation

◆ ~ObjectBase()

ns3::ObjectBase::~ObjectBase ( )
virtual

Virtual destructor.

Definition at line 68 of file object-base.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ ConstructSelf()

void ns3::ObjectBase::ConstructSelf ( const AttributeConstructionList attributes)
protected

Complete construction of ObjectBase; invoked by derived classes.

Invoked from subclasses to initialize all of their attribute members. This method will typically be invoked automatically from ns3::CreateObject if your class derives from ns3::Object. If you derive from ns3::ObjectBase directly, you should make sure that you invoke this method from your most-derived constructor.

Parameters
[in]attributesThe attribute values used to initialize the member variables of this object's instance.

Definition at line 80 of file object-base.cc.

References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_CONSTRUCT, ns3::TypeId::AttributeInformation::checker, DoSet(), ns3::AttributeConstructionList::Find(), ns3::TypeId::AttributeInformation::flags, ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeFullName(), ns3::TypeId::GetAttributeN(), GetInstanceTypeId(), ns3::TypeId::GetName(), ns3::TypeId::GetParent(), GetTypeId(), ns3::TypeId::AttributeInformation::initialValue, ns3::TypeId::AttributeInformation::name, NotifyConstructionCompleted(), NS_FATAL_ERROR, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::ConfigStore::ConfigStore(), ns3::Object::Construct(), ns3::EmuEpcHelper::EmuEpcHelper(), ns3::PointToPointEpcHelper::PointToPointEpcHelper(), and ns3::RttEstimator::RttEstimator().

◆ DoSet()

bool ns3::ObjectBase::DoSet ( Ptr< const AttributeAccessor spec,
Ptr< const AttributeChecker checker,
const AttributeValue value 
)
private

Attempt to set the value referenced by the accessor spec to a valid value according to the checker, based on value.

Parameters
[in]specThe accessor for the storage location.
[in]checkerThe checker to use in validating the value.
[in]valueThe value to attempt to store.
Returns
true if the value could be validated by the checker and written to the storage location.

Definition at line 170 of file object-base.cc.

References NS_LOG_FUNCTION.

Referenced by ConstructSelf(), SetAttribute(), and SetAttributeFailSafe().

◆ GetAttribute()

void ns3::ObjectBase::GetAttribute ( std::string  name,
AttributeValue value 
) const

Get the value of an attribute, raising fatal errors if unsuccessful.

This will either succeed at setting the attribute or it will raise NS_FATAL_ERROR() on these conditions:

  • The attribute doesn't exist in this Object.
  • The attribute can't be read (no Getter).
  • The attribute doesn't support string formatting.
  • The attribute couldn't be serialized into the AttributeValue.
Parameters
[in]nameThe name of the attribute to read.
[out]valueWhere the result should be stored.

Definition at line 223 of file object-base.cc.

References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_GET, ns3::TypeId::AttributeInformation::checker, ns3::TypeId::AttributeInformation::flags, GetInstanceTypeId(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::PeekPointer(), and ns3::StringValue::Set().

Referenced by AssignWifiRandomStreams(), TcpIllinoisTest::CalculateAlpha(), TcpIllinoisTest::CalculateBeta(), TcpYeahDecrementTest::CalculateSsThresh(), ns3::cell_data_function_col_1(), ns3::cell_tooltip_callback(), LteX2HandoverTestCase::CheckConnected(), LteRrcConnectionEstablishmentTestCase::CheckConnected(), LteX2HandoverMeasuresTestCase::CheckConnected(), WifiAcMappingTest::DoRun(), TcpHyblaIncrementTest::DoRun(), TcpScalableIncrementTest::DoRun(), TcpVenoTest::DoRun(), TcpScalableDecrementTest::DoRun(), ObjectVectorAttributeTestCase::DoRun(), ObjectMapAttributeTestCase::DoRun(), IntegerTraceSourceAttributeTestCase::DoRun(), PointerAttributeTestCase::DoRun(), TcpBicDecrementTest::ExecuteTest(), TcpLedbatDecrementTest::ExecuteTest(), TcpVegasTest::IncreaseWindow(), TcpYeahIncrementTest::IncreaseWindow(), ns3::Packet::Print(), TcpIllinoisTest::RecalcParam(), and TcpBicIncrementTest::Update().

◆ GetAttributeFailSafe()

bool ns3::ObjectBase::GetAttributeFailSafe ( std::string  name,
AttributeValue value 
) const

Get the value of an attribute without raising erros.

If the attribute could not be read this will return false, but not raise any errors.

Parameters
[in]nameThe name of the attribute to read.
[out]valueWhere the result value should be stored.
Returns
true if the requested attribute was found, false otherwise.

Definition at line 258 of file object-base.cc.

References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_GET, ns3::TypeId::AttributeInformation::checker, ns3::TypeId::AttributeInformation::flags, GetInstanceTypeId(), NS_LOG_FUNCTION, ns3::PeekPointer(), and ns3::StringValue::Set().

Referenced by AttributeTestCase< T >::CheckGetCodePaths(), TcFlowControlTestCase::CheckPacketsInDeviceQueue(), RttEstimatorTestCase::DoRun(), and PrioQueueDiscTestCase::DoRun().

◆ GetInstanceTypeId()

virtual TypeId ns3::ObjectBase::GetInstanceTypeId ( void  ) const
pure virtual

Get the most derived TypeId for this Object.

This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.

Returns
The TypeId associated to the most-derived type of this instance.

Implemented in ns3::Icmpv6OptionRedirected, ns3::Icmpv6OptionLinkLayerAddress, ns3::AnimByteTag, ns3::Icmpv6OptionPrefixInformation, ns3::Icmpv6OptionMtu, ns3::SocketIpv6TclassTag, ns3::SocketPriorityTag, ns3::Icmpv6ParameterError, ns3::SocketIpTosTag, ns3::dsr::DsrOptionAckHeader, ns3::MgtDelBaHeader, ns3::SocketSetDontFragmentTag, ns3::Icmpv6TimeExceeded, ns3::SocketIpv6HopLimitTag, ns3::dsr::DsrOptionAckReqHeader, ns3::SocketIpTtlTag, ns3::MgtAddBaResponseHeader, ns3::Icmpv6TooBig, ns3::SixLowPanUdpNhcExtension, ns3::Icmpv6DestinationUnreachable, ns3::dsr::DsrOptionRerrUnsupportHeader, ns3::MgtAddBaRequestHeader, ns3::SixLowPanNhcExtension, ns3::WifiActionHeader, ns3::Icmpv6Echo, ns3::dsr::DsrOptionRerrUnreachHeader, ns3::Icmpv6Redirection, ns3::MgtProbeResponseHeader, ns3::Icmpv6RS, ns3::dsr::DsrOptionRerrHeader, ns3::Ipv6ExtensionAHHeader, ns3::RngReq, ns3::SixLowPanIphc, ns3::Ipv6ExtensionESPHeader, ns3::PbbPacket, ns3::UlMap, ns3::DsaAck, ns3::EpcX2ResourceStatusUpdateHeader, ns3::Icmpv6RA, ns3::MgtProbeRequestHeader, ns3::DlMap, ns3::dsr::DsrOptionSRHeader, ns3::IdealHandoverCommandHeader, ns3::aodv::RerrHeader, ns3::SixLowPanIpv6, ns3::dsr::DsrOptionAck, ns3::Ipv6ExtensionLooseRoutingHeader, ns3::EpcX2LoadInformationHeader, ns3::DsaRsp, ns3::dsr::DsrOptionAckReq, ns3::aodv::RrepAckHeader, ns3::FragmentationSubheader, ns3::EpcX2UeContextReleaseHeader, ns3::UanHeaderRcAck, ns3::MgtAssocResponseHeader, ns3::SixLowPanFragN, ns3::dsr::DsrOptionRerr, ns3::dsr::DsrOptionRrepHeader, ns3::IdealHandoverPreparationInfoHeader, ns3::Ipv6ExtensionRoutingHeader, ns3::Icmpv6NA, ns3::dsr::DsrOptionSR, ns3::DsaReq, ns3::GrantManagementSubheader, ns3::LrWpanMacHeader, ns3::Ucd, ns3::UanHeaderRcCts, ns3::Dcd, ns3::EpcX2SnStatusTransferHeader, ns3::dsr::DsrOptionRrep, ns3::SixLowPanFrag1, ns3::Ipv6OptionRouterAlertHeader, ns3::Icmpv6NS, ns3::aodv::RrepHeader, ns3::Ipv6ExtensionFragmentHeader, anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >, ns3::dsr::DsrOptionRreq, ns3::BandwidthRequestHeader, ns3::EpcX2HandoverPreparationFailureHeader, ns3::UanHeaderRcCtsGlobal, ns3::TcpHeader, ns3::MgtReassocRequestHeader, ns3::Ipv6ExtensionDestinationHeader, ns3::olsr::MessageHeader, ns3::dsr::DsrRoutingHeader, ns3::DhcpHeader, ns3::Icmpv4TimeExceeded, ns3::DeviceNameTag, ns3::dsr::DsrOptionRreqHeader, ns3::Ipv6OptionJumbogramHeader, ns3::RngRsp, anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >, ns3::LteRlcAmHeader, ns3::PacketSocketTag, ns3::Icmpv6OptionHeader, ns3::HighLatencyCtsToSelfTxVectorTag, ns3::EpcX2HandoverRequestAckHeader, anonymous_namespace{packet-metadata-test.cc}::HistoryTrailer< N >, ns3::Ipv6ExtensionHopByHopHeader, ns3::Ipv4Header, ns3::TcpSocketBase, ns3::Icmpv4DestinationUnreachable, ns3::Ipv6OptionPadnHeader, ns3::dot11s::PeerLinkConfirmStart, ns3::dsr::DsrOptionPadnHeader, ns3::UanHeaderRcRts, ns3::GenericMacHeader, ns3::CtrlBAckResponseHeader, ns3::VendorSpecificActionHeader, ns3::SixLowPanHc1, anonymous_namespace{packet-test-suite.cc}::ALargeTestTag, BenchTag< N >, ns3::RipHeader, ns3::Ipv6OptionPad1Header, ns3::dsr::DsrOptionPad1Header, ns3::RipNgHeader, ns3::HighLatencyRtsTxVectorTag, ns3::MgtAssocRequestHeader, ns3::aodv::RreqHeader, ns3::Icmpv4Echo, ns3::FlowMonitor, ns3::dot11s::PeerLinkCloseStart, ns3::Object, ns3::UanHeaderCommon, ns3::RttMeanDeviation, ns3::TcpOptionUnknown, ns3::Icmpv6Header, ns3::LteRlcHeader, ns3::olsr::PacketHeader, ns3::EpcX2HandoverRequestHeader, ns3::UdpHeader, ns3::WifiMacHeader, ns3::Ipv6PacketInfoTag, ns3::EthernetHeader, ns3::Tlv, ns3::Ipv6Header, ns3::SllHeader, ns3::Ipv4PacketInfoTag, TimestampTag, anonymous_namespace{packet-metadata-test.cc}::HistoryHeader< N >, anonymous_namespace{packet-test-suite.cc}::ATestTag< N >, ns3::TrafficControlLayer, ns3::ArpHeader, ns3::dot11s::HwmpTag, ns3::EthernetTrailer, ns3::UanHeaderRcData, ns3::TcpOptionMSS, ns3::dsr::DsrFsHeader, ns3::Icmpv4Header, ns3::aodv::DeferredRouteOutputTag, ns3::ManagementMessageType, ns3::LtePdcpHeader, ns3::ConfigStore, ns3::dsdv::DeferredRouteOutputTag, IPv6TestTag, ns3::MacHeaderType, IPv4TestTag, ns3::flame::FlameTag, ns3::dsdv::DsdvHeader, ns3::EmuEpcHelper, ns3::dot11s::PeerLinkOpenStart, ns3::PppHeader, ns3::PyVizPacketTag, ns3::PointToPointEpcHelper, ns3::aodv::TypeHeader, ns3::dsr::DsrOptionHeader, anonymous_namespace{sequence-number-test-suite.cc}::SequenceNumberTestObj, ns3::HighLatencyDataTxVectorTag, ns3::ThreeGppHttpHeader, ns3::TcpOptionNOP, ns3::Ipv6OptionHeader, ns3::RrcAsn1Header, ns3::LlcSnapHeader, ns3::SeqTsHeader, ns3::RttEstimator, ns3::LrWpanMacTrailer, BenchHeader< N >, ns3::TcpOptionWinScale, ns3::Ipv6FlowProbeTag, ns3::TcpOptionSack, ns3::LteRlcSduStatusTag, ns3::Ipv4FlowProbeTag, ns3::HigherLayerTxVectorTag, ns3::Ipv6ExtensionHeader, ns3::RipNgRte, ns3::RipRte, ns3::WimaxMacToMacHeader, ns3::GtpuHeader, ns3::CtrlBAckRequestHeader, ns3::TcpOptionSackPermitted, ns3::flame::FlameHeader, ns3::WifiInformationElementVector, ns3::WifiMacTrailer, ns3::TcpOption, ns3::SimpleTag, ns3::Asn1Header, ns3::dot11s::MeshHeader, ns3::RadiotapHeader, ns3::TcpOptionTS, ns3::PdcpTag, ns3::EpcX2Header, ns3::EpsBearerTag, ns3::RlcTag, ns3::AlohaNoackMacHeader, ns3::AmpduTag, ns3::WifiPhyTag, ns3::Ns3NscStack, ns3::TcpOptionEnd, ns3::DelayJitterEstimationTimestampTag, ns3::AmpduSubframeHeader, ns3::AmsduSubframeHeader, ns3::LteRadioBearerTag, ns3::MeshInformationElementVector, ns3::SnrTag, ns3::LtePhyTag, MyTag, ns3::LrWpanLqiTag, MyHeader, and ns3::FlowIdTag.

Referenced by ns3::PacketTagList::Add(), ns3::Packet::AddByteTag(), ns3::PacketMetadata::AddHeader(), ns3::Packet::AddHeader(), ns3::Packet::AddPacketTag(), ns3::PacketMetadata::AddTrailer(), ns3::Packet::AddTrailer(), ConstructSelf(), ns3::PacketTagList::COWTraverse(), ns3::Packet::FindFirstMatchingByteTag(), GetAttribute(), GetAttributeFailSafe(), ns3::ByteTagIterator::Item::GetTag(), ns3::PacketTagIterator::Item::GetTag(), ns3::PacketTagList::Peek(), ns3::Packet::PeekHeader(), ns3::Packet::PeekTrailer(), ns3::PacketMetadata::RemoveHeader(), ns3::Packet::RemoveHeader(), ns3::Packet::RemovePacketTag(), ns3::PacketMetadata::RemoveTrailer(), ns3::Packet::RemoveTrailer(), ns3::Packet::ReplacePacketTag(), ns3::PacketTagList::ReplaceWriter(), SetAttribute(), SetAttributeFailSafe(), TraceConnect(), TraceConnectWithoutContext(), TraceDisconnect(), and TraceDisconnectWithoutContext().

◆ GetTypeId()

TypeId ns3::ObjectBase::GetTypeId ( void  )
static

Get the type ID.

Returns
The object TypeId.

Definition at line 61 of file object-base.cc.

References GetObjectIid(), and NS_LOG_FUNCTION_NOARGS.

Referenced by ConstructSelf().

◆ NotifyConstructionCompleted()

void ns3::ObjectBase::NotifyConstructionCompleted ( void  )
protectedvirtual

Notifier called once the ObjectBase is fully constructed.

This method is invoked once all member attributes have been initialized. Subclasses can override this method to be notified of this event but if they do this, they must chain up to their parent's NotifyConstructionCompleted method.

Reimplemented in ns3::FlowMonitor, and ns3::VisualSimulatorImpl.

Definition at line 74 of file object-base.cc.

References NS_LOG_FUNCTION.

Referenced by ConstructSelf(), and ns3::FlowMonitor::NotifyConstructionCompleted().

◆ SetAttribute()

void ns3::ObjectBase::SetAttribute ( std::string  name,
const AttributeValue value 
)

Set a single attribute, raising fatal errors if unsuccessful.

This will either succeed at setting the attribute or it will raise NS_FATAL_ERROR() on these conditions:

  • The attribute doesn't exist in this Object.
  • The attribute can't be set (no Setter).
  • The attribute couldn't be deserialized from the AttributeValue.
Parameters
[in]nameThe name of the attribute to set.
[in]valueThe name of the attribute to set.

Definition at line 185 of file object-base.cc.

References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_SET, ns3::TypeId::AttributeInformation::checker, DoSet(), ns3::TypeId::AttributeInformation::flags, GetInstanceTypeId(), NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by ns3::UanMacRc::Associate(), ns3::UanMacRc::AssociateTimeout(), ns3::cell_edited_callback(), FemtocellBlockAllocator::Create(), ns3::TcpGeneralTest::CreateChannel(), ChainRegressionTest::CreateDevices(), ns3::olsr::Bug780Test::CreateNodes(), TcpZeroWindowTest::CreateReceiverSocket(), TcpRttEstimationTest::CreateReceiverSocket(), SackPermittedTestCase::CreateReceiverSocket(), TimestampTestCase::CreateReceiverSocket(), WScalingTestCase::CreateReceiverSocket(), TcpRttEstimationTest::CreateSenderSocket(), TcpFastRetrTest::CreateSenderSocket(), SackPermittedTestCase::CreateSenderSocket(), TcpRtoTest::CreateSenderSocket(), TimestampTestCase::CreateSenderSocket(), WScalingTestCase::CreateSenderSocket(), TcpSsThreshRtoTest::CreateSenderSocket(), TcpTimeRtoTest::CreateSenderSocket(), ThreeGppHttpObjectTestCase::CreateSimpleInternetNode(), ns3::TraceFadingLossModel::DoCalcRxPowerSpectralDensity(), ns3::EmuEpcHelper::DoInitialize(), ns3::dot11s::HwmpProtocol::DoInitialize(), ns3::dot11s::PeerManagementProtocol::DoInitialize(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::SteadyStateRandomWaypointMobilityModel::DoInitializePrivate(), ItuR1411NlosOverRooftopPropagationLossModelTestCase::DoRun(), OkumuraHataPropagationLossModelTestCase::DoRun(), ItuR1411LosPropagationLossModelTestCase::DoRun(), BuildingsPathlossTestCase::DoRun(), PacketSocketAppsTest::DoRun(), CosineAntennaModelTestCase::DoRun(), ParabolicAntennaModelTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), BufferTest::DoRun(), LenaMimoTestCase::DoRun(), LenaHarqTestCase::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LteRlcUmE2eTestCase::DoRun(), PrrRecoveryTest::DoRun(), LteRlcAmE2eTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), SixlowpanFragmentationTest::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), SixlowpanHc1ImplTest::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LteLinkAdaptationTestCase::DoRun(), Ipv6ForwardingTest::DoRun(), LteFadingTestCase::DoRun(), Ipv4ForwardingTest::DoRun(), SixlowpanIphcImplTest::DoRun(), SpectrumIdealPhyTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), ProbeTestCase1::DoRun(), Ipv6RawSocketImplTest::DoRun(), ErrorModelSimple::DoRun(), CarrierAggregationTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteInterferenceTestCase::DoRun(), Ipv6PacketInfoTagTest::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LteUeMeasurementsTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), EpcS1uDlTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), BurstErrorModelSimple::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), TcpYeahDecrementTest::DoRun(), RandomVariableStreamUniformAntitheticTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), RngParetoTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), RandomVariableStreamConstantTestCase::DoRun(), Ns3TcpCwndTestCase2::DoRun(), RandomVariableStreamSequentialTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), Bug730TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), SetChannelFrequencyTest::DoRun(), RandomVariableStreamExponentialAntitheticTestCase::DoRun(), Bug2222TestCase::DoRun(), RandomVariableStreamParetoAntitheticTestCase::DoRun(), RandomVariableStreamWeibullAntitheticTestCase::DoRun(), Ipv4RawSocketImplTest::DoSendData_IpHdr(), Ipv4HeaderTest::DoSendData_IpHdr_Dscp(), TcpLedbatIncrementTest::ExecuteTest(), TcpBicDecrementTest::ExecuteTest(), TcpLedbatDecrementTest::ExecuteTest(), FemtocellBlockAllocator::FemtocellBlockAllocator(), GetRandomStream(), LteAggregationThroughputScaleTestCase::GetThroughput(), ns3::LteHelper::InstallSingleEnbDevice(), ns3::JakesPropagationLossModel::JakesPropagationLossModel(), ns3::LrWpanMac::LrWpanMac(), ns3::LrWpanPhy::LrWpanPhy(), LteFadingTestSuite::LteFadingTestSuite(), ns3::LteSpectrumPhy::LteSpectrumPhy(), ns3::dsdv::RoutingProtocol::NotifyInterfaceUp(), ns3::ThreeGppHttpClient::OpenConnection(), ns3::PointToPointEpcHelper::PointToPointEpcHelper(), ns3::UanMacRc::RtsTimeout(), NetAnimExperiment::Run(), ns3::UanMacRc::ScheduleData(), Experiment::SelectSrcDest(), ns3::Ping6::Send(), Experiment::SendMultiDestinations(), ns3::UanMacRc::SendRts(), ns3::Config::MatchContainer::Set(), ns3::ThreeGppHttpVariables::SetEmbeddedObjectGenerationDelay(), ns3::ThreeGppHttpVariables::SetMainObjectGenerationDelay(), ns3::ThreeGppHttpVariables::SetParsingTimeMean(), ns3::ThreeGppHttpVariables::SetReadingTimeMean(), ns3::ThreeGppHttpVariables::SetRequestSize(), ns3::V4Ping::StartApplication(), ns3::Ping6::StartApplication(), ns3::Radvd::StartApplication(), ns3::ThreeGppHttpServer::StartApplication(), SixlowpanFragmentationTest::StartClient(), Ipv4FragmentationTest::StartClient(), Ipv6FragmentationTest::StartClient(), PowerRateAdaptationTest::TestAparf(), PowerRateAdaptationTest::TestParf(), PowerRateAdaptationTest::TestRrpaa(), ns3::AnimationInterface::UpdatePosition(), and NetAnimExperiment::UpdatePositions().

◆ SetAttributeFailSafe()

bool ns3::ObjectBase::SetAttributeFailSafe ( std::string  name,
const AttributeValue value 
)

◆ TraceConnect()

bool ns3::ObjectBase::TraceConnect ( std::string  name,
std::string  context,
const CallbackBase cb 
)

Connect a TraceSource to a Callback with a context.

The target trace source should be registered with TypeId::AddTraceSource.

Parameters
[in]nameThe name of the target trace source.
[in]contextThe trace context associated to the callback.
[in]cbThe callback to connect to the trace source.
Returns
true.

Definition at line 306 of file object-base.cc.

References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.

Referenced by DhcpTestCase::DoRun(), ProbeTestCase1::DoRun(), and ns3::TcpGeneralTest::DoRun().

◆ TraceConnectWithoutContext()

bool ns3::ObjectBase::TraceConnectWithoutContext ( std::string  name,
const CallbackBase cb 
)

Connect a TraceSource to a Callback without a context.

The target trace source should be registered with TypeId::AddTraceSource.

Parameters
[in]nameThe name of the target trace source.
[in]cbThe callback to connect to the trace source.
Returns
true.

Definition at line 293 of file object-base.cc.

References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.

Referenced by ns3::Uinteger16Probe::ConnectByObject(), ns3::Uinteger32Probe::ConnectByObject(), ns3::Uinteger8Probe::ConnectByObject(), ns3::PacketProbe::ConnectByObject(), ns3::BooleanProbe::ConnectByObject(), ns3::DoubleProbe::ConnectByObject(), ns3::TimeProbe::ConnectByObject(), ns3::ApplicationPacketProbe::ConnectByObject(), ns3::Ipv4PacketProbe::ConnectByObject(), ns3::Ipv6PacketProbe::ConnectByObject(), TestCounter::ConnectTraces(), ns3::Config::MatchContainer::ConnectWithoutContext(), ThreeGppHttpObjectTestCase::CreateSimpleInternetNode(), CoDelQueueDiscBasicDrop::Dequeue(), WaveformGeneratorTestCase::DoRun(), PacketSocketAppsTest::DoRun(), WifiAcMappingTest::DoRun(), TcpHyblaIncrementTest::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), WaypointMobilityModelAddWaypointTest::DoRun(), Ns3TcpCwndTestCase1::DoRun(), UdpSocketImplTest::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), Ns3TcpCwndTestCase2::DoRun(), IntegerTraceSourceTestCase::DoRun(), TracedCallbackTestCase::DoRun(), ns3::InternetStackHelper::EnableAsciiIpv4Internal(), InterferenceExperiment::Run(), ns3::HierarchicalMobilityModel::SetChild(), ns3::HierarchicalMobilityModel::SetParent(), and ns3::TcpSocketBase::TcpSocketBase().

◆ TraceDisconnect()

bool ns3::ObjectBase::TraceDisconnect ( std::string  name,
std::string  context,
const CallbackBase cb 
)

Disconnect from a TraceSource a Callback previously connected with a context.

The target trace source should be registered with TypeId::AddTraceSource.

Parameters
[in]nameThe name of the target trace source.
[in]contextThe trace context associated to the callback.
[in]cbThe callback to disconnect from the trace source.
Returns
true.

Definition at line 332 of file object-base.cc.

References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.

◆ TraceDisconnectWithoutContext()

bool ns3::ObjectBase::TraceDisconnectWithoutContext ( std::string  name,
const CallbackBase cb 
)

Disconnect from a TraceSource a Callback previously connected without a context.

The target trace source should be registered with TypeId::AddTraceSource.

Parameters
[in]nameThe name of the target trace source.
[in]cbThe callback to disconnect from the trace source.
Returns
true.

Definition at line 319 of file object-base.cc.

References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.

Referenced by ns3::Config::MatchContainer::DisconnectWithoutContext(), IntegerTraceSourceTestCase::DoRun(), TracedCallbackTestCase::DoRun(), ns3::HierarchicalMobilityModel::SetChild(), and ns3::HierarchicalMobilityModel::SetParent().

Friends And Related Function Documentation

◆ GetObjectIid()

static TypeId GetObjectIid ( void  )
related

Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly.

Returns
The TypeId for ObjectBase.

Definition at line 51 of file object-base.cc.

References NS_LOG_FUNCTION_NOARGS, ns3::TypeId::SetGroupName(), and ns3::TypeId::SetParent().

Referenced by GetTypeId().


The documentation for this class was generated from the following files: