A Discrete-Event Network Simulator
API
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:

  • A way to associate an ns3::TypeId to each object instance.
  • A way to set and get the attributes registered in the ns3::TypeId.


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::EpsBearer::EpsBearer(), ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), ns3::PointToPointEpcHelper::PointToPointEpcHelper(), and ns3::RttEstimator::RttEstimator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the caller graph for this function:

◆ 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(), LteRadioLinkFailureTestCase::CheckConnected(), LteRrcConnectionEstablishmentTestCase::CheckConnected(), LteX2HandoverMeasuresTestCase::CheckConnected(), TestAmpduReception::CheckPhyState(), TestThresholdPreambleDetectionWithoutFrameCapture::DoCheckPhyState(), TestThresholdPreambleDetectionWithFrameCapture::DoCheckPhyState(), TestPhyHeadersReception::DoCheckPhyState(), TcpHyblaIncrementTest::DoRun(), TcpScalableIncrementTest::DoRun(), WifiAcMappingTest::DoRun(), TcpVenoTest::DoRun(), TcpScalableDecrementTest::DoRun(), AttributeContainerSetGetTestCase::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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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::SixLowPanMesh, ns3::Icmpv6ParameterError, ns3::SocketIpTosTag, ns3::dsr::DsrOptionAckHeader, ns3::MgtDelBaHeader, ns3::SixLowPanBc0, ns3::SocketSetDontFragmentTag, ns3::Icmpv6TimeExceeded, ns3::SocketIpv6HopLimitTag, ns3::dsr::DsrOptionAckReqHeader, ns3::SocketIpTtlTag, ns3::Icmpv6TooBig, ns3::MgtAddBaResponseHeader, ns3::SixLowPanUdpNhcExtension, ns3::Icmpv6DestinationUnreachable, ns3::dsr::DsrOptionRerrUnsupportHeader, ns3::MgtAddBaRequestHeader, ns3::SixLowPanNhcExtension, ns3::WifiActionHeader, ns3::Icmpv6Echo, ns3::CtrlTriggerHeader, 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::IdealHandoverCommandHeader, ns3::MgtProbeRequestHeader, ns3::EpcX2ResourceStatusUpdateHeader, ns3::Icmpv6RA, ns3::DlMap, ns3::dsr::DsrOptionSRHeader, ns3::aodv::RerrHeader, ns3::SixLowPanIpv6, ns3::dsr::DsrOptionAck, ns3::EpcX2LoadInformationHeader, ns3::Ipv6ExtensionLooseRoutingHeader, ns3::DsaRsp, ns3::dsr::DsrOptionAckReq, ns3::aodv::RrepAckHeader, ns3::UanHeaderRcAck, ns3::FragmentationSubheader, ns3::MgtAssocResponseHeader, ns3::EpcX2UeContextReleaseHeader, ns3::IdealHandoverPreparationInfoHeader, ns3::SixLowPanFragN, ns3::dsr::DsrOptionRerr, ns3::dsr::DsrOptionRrepHeader, ns3::Icmpv6NA, ns3::Ipv6ExtensionRoutingHeader, ns3::GtpcDeleteBearerResponseMessage, ns3::UanHeaderRcCts, ns3::dsr::DsrOptionSR, ns3::DsaReq, ns3::GtpcDeleteBearerRequestMessage, ns3::GrantManagementSubheader, ns3::Ucd, ns3::Dcd, ns3::EpcX2SnStatusTransferHeader, ns3::GtpcDeleteBearerCommandMessage, ns3::LrWpanMacHeader, ns3::dsr::DsrOptionRrep, ns3::SixLowPanFrag1, ns3::GtpcModifyBearerResponseMessage, ns3::Ipv6OptionRouterAlertHeader, ns3::Icmpv6NS, ns3::aodv::RrepHeader, anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >, ns3::Ipv6ExtensionFragmentHeader, ns3::dsr::DsrOptionRreq, ns3::BandwidthRequestHeader, ns3::EpcX2HandoverPreparationFailureHeader, ns3::GtpcModifyBearerRequestMessage, ns3::UanHeaderRcCtsGlobal, ns3::TcpHeader, ns3::MgtReassocRequestHeader, ns3::Ipv6ExtensionDestinationHeader, ns3::olsr::MessageHeader, ns3::dsr::DsrRoutingHeader, ns3::Icmpv4TimeExceeded, ns3::DhcpHeader, ns3::GtpcCreateSessionResponseMessage, ns3::DeviceNameTag, ns3::dsr::DsrOptionRreqHeader, ns3::Ipv6OptionJumbogramHeader, ns3::RngRsp, anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >, ns3::LteRlcAmHeader, ns3::PacketSocketTag, ns3::Icmpv6OptionHeader, ns3::EpcX2HandoverRequestAckHeader, anonymous_namespace{packet-metadata-test.cc}::HistoryTrailer< N >, ns3::GtpcCreateSessionRequestMessage, ns3::Ipv4Header, ns3::Ipv6ExtensionHopByHopHeader, ns3::TcpSocketBase, ns3::Icmpv4DestinationUnreachable, ns3::Ipv6OptionPadnHeader, ns3::UanHeaderRcRts, ns3::dot11s::PeerLinkConfirmStart, ns3::CtrlBAckResponseHeader, ns3::dsr::DsrOptionPadnHeader, ns3::GenericMacHeader, ns3::VendorSpecificActionHeader, anonymous_namespace{packet-test-suite.cc}::ALargeTestTag, ns3::SixLowPanHc1, BenchTag< N >, ns3::RipHeader, ns3::Ipv6OptionPad1Header, ns3::dsr::DsrOptionPad1Header, ns3::RipNgHeader, ns3::MgtAssocRequestHeader, ns3::aodv::RreqHeader, ns3::Icmpv4Echo, ns3::Object, ns3::FlowMonitor, ns3::dot11s::PeerLinkCloseStart, ns3::UanHeaderCommon, ns3::CommandPayloadHeader, ns3::RttMeanDeviation, ns3::TcpOptionUnknown, ns3::Icmpv6Header, ns3::LteRlcHeader, ns3::olsr::PacketHeader, ns3::EpcX2HandoverRequestHeader, ns3::WifiMacHeader, ns3::UdpHeader, ns3::Ipv6PacketInfoTag, ns3::EthernetHeader, ns3::Tlv, ns3::Ipv6Header, ns3::SllHeader, TimestampTag, anonymous_namespace{packet-metadata-test.cc}::HistoryHeader< N >, anonymous_namespace{packet-test-suite.cc}::ATestTag< N >, ns3::TrafficControlLayer, ns3::UanHeaderRcData, ns3::ArpHeader, ns3::dot11s::HwmpTag, ns3::EpsBearer, ns3::Ipv4PacketInfoTag, ns3::EthernetTrailer, ns3::TcpOptionMSS, ns3::dsr::DsrFsHeader, ns3::Icmpv4Header, ns3::aodv::DeferredRouteOutputTag, ns3::ManagementMessageType, ns3::LtePdcpHeader, ns3::ConfigStore, ns3::dsdv::DeferredRouteOutputTag, IPv6TestTag, ns3::SeqTsEchoHeader, ns3::MacHeaderType, IPv4TestTag, ns3::flame::FlameTag, ns3::dsdv::DsdvHeader, ns3::dot11s::PeerLinkOpenStart, ns3::PppHeader, ns3::PyVizPacketTag, ns3::aodv::TypeHeader, ns3::dsr::DsrOptionHeader, anonymous_namespace{sequence-number-test-suite.cc}::SequenceNumberTestObj, ns3::SeqTsHeader, ns3::ThreeGppHttpHeader, ns3::TcpOptionNOP, ns3::OfdmPpdu::LSigHeader, ns3::NoBackhaulEpcHelper, ns3::DsssPpdu::DsssSigHeader, ns3::SeqTsSizeHeader, ns3::HtPpdu::HtSigHeader, ns3::VhtPpdu::VhtSigHeader, ns3::Ipv6OptionHeader, ns3::RrcAsn1Header, ns3::LlcSnapHeader, ns3::HePpdu::HeSigHeader, ns3::Icmpv6L4Protocol, ns3::RttEstimator, ns3::EmuEpcHelper, ns3::LrWpanMacTrailer, ns3::CtrlBAckRequestHeader, BenchHeader< N >, ns3::TcpOptionWinScale, ns3::Ipv6FlowProbeTag, ns3::TcpOptionSack, ns3::PointToPointEpcHelper, ns3::LteRlcSduStatusTag, ns3::Ipv4FlowProbeTag, ns3::HigherLayerTxVectorTag, ns3::Ipv6ExtensionHeader, ns3::RipNgRte, ns3::RipRte, ns3::WimaxMacToMacHeader, ns3::GtpuHeader, ns3::WifiInformationElementVector, ns3::TcpOptionSackPermitted, ns3::flame::FlameHeader, ns3::BeaconPayloadHeader, ns3::WifiMacTrailer, ns3::TcpOption, ns3::GtpcHeader, ns3::SimpleTag, ns3::SnrTag, ns3::Asn1Header, ns3::dot11s::MeshHeader, ns3::TcpOptionTS, ns3::RadiotapHeader, ns3::PdcpTag, ns3::AmpduTag, ns3::AmsduSubframeHeader, ns3::EpcX2Header, ns3::EpsBearerTag, ns3::RlcTag, ns3::AlohaNoackMacHeader, ns3::AmpduSubframeHeader, ns3::WifiPhyTag, ns3::Ns3NscStack, ns3::TcpOptionEnd, ns3::DelayJitterEstimationTimestampTag, ns3::MuSnrTag, ns3::LteRadioBearerTag, ns3::MeshInformationElementVector, 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().

+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the caller graph for this function:

◆ 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::FqCoDelQueueDisc::DoEnqueue(), ns3::FqPieQueueDisc::DoEnqueue(), ns3::FqCobaltQueueDisc::DoEnqueue(), ns3::dot11s::HwmpProtocol::DoInitialize(), ns3::dot11s::PeerManagementProtocol::DoInitialize(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::SteadyStateRandomWaypointMobilityModel::DoInitializePrivate(), ItuR1411LosPropagationLossModelTestCase::DoRun(), ItuR1411NlosOverRooftopPropagationLossModelTestCase::DoRun(), OkumuraHataPropagationLossModelTestCase::DoRun(), PacketSocketAppsTest::DoRun(), BuildingsPathlossTestCase::DoRun(), CosineAntennaModelTestCase::DoRun(), ParabolicAntennaModelTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), BufferTest::DoRun(), LenaMimoTestCase::DoRun(), ThreeGppChannelConditionModelTestCase::DoRun(), OutdoorRandomWalkTestCase::DoRun(), LenaHarqTestCase::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LteRlcUmE2eTestCase::DoRun(), V2vUrbanProbChCondModelTestCase::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(), AmpduAggregationTest::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LteLinkAdaptationTestCase::DoRun(), Ipv6ForwardingTest::DoRun(), Ipv4ForwardingTest::DoRun(), SixlowpanIphcImplTest::DoRun(), SpectrumIdealPhyTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), UniformPlanarArrayTestCase::DoRun(), ProbeTestCase1::DoRun(), Ipv6RawSocketImplTest::DoRun(), WifiTxopTest::DoRun(), CarrierAggregationTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteInterferenceTestCase::DoRun(), Ipv6PacketInfoTagTest::DoRun(), ErrorModelSimple::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LteUeMeasurementsTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), EpcS1uDlTestCase::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), LteCellSelectionTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), IcmpEchoReplyTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), Ipv4DeduplicationTest::DoRun(), BurstErrorModelSimple::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), ThreeGppV2vUrbanLosNlosvChCondModelTestCase::DoRun(), IcmpTimeExceedTestCase::DoRun(), TcpYeahDecrementTest::DoRun(), V2vHighwayProbChCondModelTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), AttributeContainerSetGetTestCase::DoRun(), TwoLevelAggregationTest::DoRun(), RngParetoTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), ThreeGppV2vHighwayLosNlosvChCondModelTestCase::DoRun(), OfdmaAckSequenceTest::DoRun(), IcmpV6EchoReplyTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), Ns3TcpCwndTestCase2::DoRun(), LteUeMeasurementsPiecewiseTestCase3::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), ns3::test::RandomVariable::ConstantTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), ns3::test::RandomVariable::SequentialTestCase::DoRun(), Bug730TestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), ThreeGppV2vUrbanPropagationLossModelTestCase::DoRun(), QosFragmentationTestCase::DoRun(), PreservePacketsInAmpdus::DoRun(), ThreeGppV2vHighwayPropagationLossModelTestCase::DoRun(), SetChannelFrequencyTest::DoRun(), Bug2222TestCase::DoRun(), BlockAckAggregationDisabledTest::DoRun(), Ipv4RawSocketImplTest::DoSendData_IpHdr(), Ipv4HeaderTest::DoSendData_IpHdr_Dscp(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestAmpduReception::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TcpLedbatIncrementTest::ExecuteTest(), TcpBicDecrementTest::ExecuteTest(), TcpLedbatDecrementTest::ExecuteTest(), FemtocellBlockAllocator::FemtocellBlockAllocator(), GetRandomStream(), LteAggregationThroughputScaleTestCase::GetThroughput(), ns3::LteHelper::InstallSingleEnbDevice(), ns3::JakesPropagationLossModel::JakesPropagationLossModel(), ns3::LrWpanMac::LrWpanMac(), ns3::LrWpanPhy::LrWpanPhy(), ns3::LteSpectrumPhy::LteSpectrumPhy(), ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), ns3::dsdv::RoutingProtocol::NotifyInterfaceUp(), ns3::ThreeGppHttpClient::OpenConnection(), ns3::UanMacRc::RtsTimeout(), NetAnimExperiment::Run(), Experiment::Run(), TestUlOfdmaPowerControl::RunOne(), ThreeGppShadowingTestCase::RunTest(), 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::V4TraceRoute::StartApplication(), 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::ThreeGppChannelConditionModel::ThreeGppChannelConditionModel(), ns3::AnimationInterface::UpdatePosition(), and NetAnimExperiment::UpdatePositions().

+ Here is the call graph for this function:

◆ SetAttributeFailSafe()

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

Set a single attribute without raising errors.

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

Parameters
[in]nameThe name of the attribute to set.
[in]valueThe value to set it to.
Returns
true if the requested attribute exists and could be set, false otherwise.

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

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

Referenced by RttEstimatorTestCase::DoRun(), CobaltQueueDiscBasicEnqueueDequeue::DoRun(), CoDelQueueDiscBasicEnqueueDequeue::DoRun(), WaypointLazyNotifyTrue::DoRun(), PrioQueueDiscTestCase::DoRun(), WaypointInitialPositionIsWaypoint::DoRun(), CoDelQueueDiscBasicOverflow::DoRun(), CobaltQueueDiscMarkTest::DoRun(), AttributeTestCase< T >::DoRun(), CoDelQueueDiscBasicDrop::DoRun(), CoDelQueueDiscBasicMark::DoRun(), CobaltQueueDiscCeThresholdTest::DoRun(), CobaltQueueDiscEnhancedBlueTest::DoRun(), RandomVariableStreamAttributeTestCase::DoRun(), IntegerTraceSourceAttributeTestCase::DoRun(), IntegerTraceSourceTestCase::DoRun(), PointerAttributeTestCase::DoRun(), CallbackValueTestCase::DoRun(), ns3::LteHelper::InstallSingleEnbDevice(), AredQueueDiscTestCase::RunAredDiscTest(), CobaltQueueDiscDropTest::RunDropTest(), FifoQueueDiscTestCase::RunFifoTest(), PieQueueDiscTestCase::RunPieTest(), RedQueueDiscTestCase::RunRedTest(), TbfQueueDiscTestCase::RunTbfTest(), and ns3::Config::MatchContainer::SetFailSafe().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 on success, false if TraceSource was not found.

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 on success, false if TraceSource was not found.

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::DoubleProbe::ConnectByObject(), ns3::BooleanProbe::ConnectByObject(), ns3::TimeProbe::ConnectByObject(), ns3::Ipv4PacketProbe::ConnectByObject(), ns3::ApplicationPacketProbe::ConnectByObject(), ns3::Ipv6PacketProbe::ConnectByObject(), TestCounter::ConnectTraces(), ns3::Config::MatchContainer::ConnectWithoutContextFailSafe(), ThreeGppHttpObjectTestCase::CreateSimpleInternetNode(), CobaltQueueDiscMarkTest::Dequeue(), CoDelQueueDiscBasicDrop::Dequeue(), FqCobaltQueueDiscEcnMarking::Dequeue(), CoDelQueueDiscBasicMark::Dequeue(), ns3::ApWifiMac::DoInitialize(), WaveformGeneratorTestCase::DoRun(), PacketSocketAppsTest::DoRun(), TcpHyblaIncrementTest::DoRun(), BulkSendBasicTestCase::DoRun(), WifiAcMappingTest::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), AmpduAggregationTest::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), BulkSendSeqTsSizeTestCase::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(), WifiPhyThresholdsTest::DoSetup(), SpectrumWifiPhyFilterTest::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestAmpduReception::DoSetup(), ns3::InternetStackHelper::EnableAsciiIpv4Internal(), ns3::HierarchicalMobilityModel::SetChild(), ns3::HierarchicalMobilityModel::SetParent(), ns3::FrameExchangeManager::SetWifiPhy(), TcpRateLinuxWithBufferTest::TcpRateLinuxWithBufferTest(), and ns3::TcpSocketBase::TcpSocketBase().

+ Here is the call graph for this function:

◆ 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 on success, false if TraceSource was not found.

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

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

+ Here is the call graph for this 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 on success, false if TraceSource was not found.

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

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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