Anchor the ns-3 type and attribute system. More...
#include "object-base.h"
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 errors. More... | |
virtual TypeId | GetInstanceTypeId () 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 () |
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 () |
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 () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Anchor the ns-3 type and attribute system.
Every class which wants to integrate in the ns-3 type and attribute system should derive from this base class. This base class provides:
Definition at line 172 of file object-base.h.
|
virtual |
|
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.
[in] | attributes | The attribute values used to initialize the member variables of this object's instance. |
Definition at line 85 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::EnvironmentVariable::Get(), 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::EmuEpcHelper::EmuEpcHelper(), ns3::EpsBearer::EpsBearer(), ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), ns3::PointToPointEpcHelper::PointToPointEpcHelper(), ns3::RttEstimator::RttEstimator(), and ns3::Object::Construct().
|
private |
Attempt to set the value referenced by the accessor spec to a valid value according to the checker
, based on value.
[in] | spec | The accessor for the storage location. |
[in] | checker | The checker to use in validating the value. |
[in] | value | The value to attempt to store. |
true
if the value
could be validated by the checker and written to the storage location. Definition at line 189 of file object-base.cc.
References NS_LOG_FUNCTION.
Referenced by ConstructSelf(), SetAttribute(), and SetAttributeFailSafe().
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:
[in] | name | The name of the attribute to read. |
[out] | value | Where the result should be stored. |
Definition at line 244 of file object-base.cc.
References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_GET, ns3::TypeId::AttributeInformation::checker, ns3::TypeId::AttributeInformation::flags, GetInstanceTypeId(), ns3::TypeId::GetName(), ns3::TypeId::LookupAttributeByName(), NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::PeekPointer().
Referenced by ns3::cell_data_function_col_1(), ns3::cell_tooltip_callback(), TestAmpduReception::CheckPhyState(), WifiPhyCcaIndicationTest::DoCheckPhyState(), WifiPhyReceptionTest::DoCheckPhyState(), ns3::Config::Resolver::DoResolve(), WifiAcMappingTest::DoRun(), BlockAckAggregationDisabledTest::DoRun(), TestUnsupportedModulationReception::DoRun(), QosFragmentationTestCase::DoRun(), WifiTxopTest::DoRun(), ns3::Packet::Print(), Experiment::Run(), and Issue40TestCase::RunOne().
bool ns3::ObjectBase::GetAttributeFailSafe | ( | std::string | name, |
AttributeValue & | value | ||
) | const |
Get the value of an attribute without raising errors.
If the attribute could not be read this will return false
, but not raise any errors.
[in] | name | The name of the attribute to read. |
[out] | value | Where the result value should be stored. |
true
if the requested attribute was found, false
otherwise. Definition at line 281 of file object-base.cc.
References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_GET, ns3::TypeId::AttributeInformation::checker, ns3::TypeId::AttributeInformation::flags, GetInstanceTypeId(), ns3::TypeId::LookupAttributeByName(), NS_LOG_FUNCTION, and ns3::PeekPointer().
Referenced by AttributeTestCase< T >::CheckGetCodePaths().
|
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.
Implemented in ns3::QKDKeyAssociationLinkEntry, ns3::QKDControl, ns3::QKDConnectionRegister, ns3::QKDApplicationEntry, BenchTag< N >, BenchHeader< N >, ns3::Tlv, ns3::WimaxMacToMacHeader, ns3::FragmentationSubheader, ns3::GrantManagementSubheader, ns3::BandwidthRequestHeader, ns3::GenericMacHeader, ns3::MacHeaderType, ns3::UlMap, ns3::Ucd, ns3::RngReq, ns3::DsaAck, ns3::DsaRsp, ns3::DsaReq, ns3::RngRsp, ns3::ManagementMessageType, ns3::DlMap, ns3::Dcd, ns3::WifiMacTrailer, ns3::WifiMacHeader, ns3::SnrTag, ns3::MgtEmlOmn, ns3::MgtDelBaHeader, ns3::MgtAddBaResponseHeader, ns3::MgtAddBaRequestHeader, ns3::WifiActionHeader, ns3::MuSnrTag, ns3::CtrlTriggerHeader, ns3::CtrlBAckResponseHeader, ns3::CtrlBAckRequestHeader, ns3::AmsduSubframeHeader, ns3::AmpduTag, ns3::AmpduSubframeHeader, ns3::PyVizPacketTag, ns3::UanHeaderRcAck, ns3::UanHeaderRcCts, ns3::UanHeaderRcCtsGlobal, ns3::UanHeaderRcRts, ns3::UanHeaderRcData, ns3::UanHeaderCommon, ns3::TrafficControlLayer, ns3::AlohaNoackMacHeader, ns3::SixLowPanMesh, ns3::SixLowPanBc0, ns3::SixLowPanUdpNhcExtension, ns3::SixLowPanNhcExtension, ns3::SixLowPanIphc, ns3::SixLowPanIpv6, ns3::SixLowPanFragN, ns3::SixLowPanFrag1, ns3::SixLowPanHc1, ns3::PppHeader, ns3::olsr::MessageHeader, ns3::olsr::PacketHeader, ns3::TimestampTag, ns3::SllHeader, ns3::SimpleTag, ns3::RadiotapHeader, ns3::PbbPacket, ns3::DeviceNameTag, ns3::PacketSocketTag, ns3::LlcSnapHeader, ns3::FlowIdTag, ns3::EthernetTrailer, ns3::EthernetHeader, anonymous_namespace{sequence-number-test-suite.cc}::SequenceNumberTestObj, anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >, anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >, anonymous_namespace{packet-test-suite.cc}::ALargeTestTag, anonymous_namespace{packet-test-suite.cc}::ATestTag< N >, anonymous_namespace{packet-metadata-test.cc}::HistoryTrailer< N >, anonymous_namespace{packet-metadata-test.cc}::HistoryHeader< N >, ns3::SocketIpv6TclassTag, ns3::SocketPriorityTag, ns3::SocketIpTosTag, ns3::SocketSetDontFragmentTag, ns3::SocketIpv6HopLimitTag, ns3::SocketIpTtlTag, MyTag, MyHeader, ns3::AnimByteTag, ns3::MeshInformationElementVector, ns3::flame::FlameTag, ns3::flame::FlameHeader, ns3::dot11s::PeerLinkConfirmStart, ns3::dot11s::PeerLinkCloseStart, ns3::dot11s::PeerLinkOpenStart, ns3::dot11s::HwmpTag, ns3::dot11s::MeshHeader, ns3::IdealHandoverCommandHeader, ns3::IdealHandoverPreparationInfoHeader, ns3::RrcAsn1Header, ns3::RlcTag, ns3::LteRlcSduStatusTag, ns3::LteRlcHeader, ns3::LteRlcAmHeader, ns3::LteRadioBearerTag, ns3::LtePhyTag, ns3::PdcpTag, ns3::LtePdcpHeader, ns3::Asn1Header, ns3::EpsBearer, ns3::EpsBearerTag, ns3::EpcX2HandoverCancelHeader, ns3::EpcX2ResourceStatusUpdateHeader, ns3::EpcX2LoadInformationHeader, ns3::EpcX2UeContextReleaseHeader, ns3::EpcX2SnStatusTransferHeader, ns3::EpcX2HandoverPreparationFailureHeader, ns3::EpcX2HandoverRequestAckHeader, ns3::EpcX2HandoverRequestHeader, ns3::EpcX2Header, ns3::GtpuHeader, ns3::GtpcDeleteBearerResponseMessage, ns3::GtpcDeleteBearerRequestMessage, ns3::GtpcDeleteBearerCommandMessage, ns3::GtpcModifyBearerResponseMessage, ns3::GtpcModifyBearerRequestMessage, ns3::GtpcCreateSessionResponseMessage, ns3::GtpcCreateSessionRequestMessage, ns3::GtpcHeader, ns3::PointToPointEpcHelper, ns3::NoBackhaulEpcHelper, ns3::EmuEpcHelper, ns3::LrWpanMacTrailer, ns3::CommandPayloadHeader, ns3::BeaconPayloadHeader, ns3::LrWpanMacHeader, ns3::LrWpanLqiTag, IPv6TestTag, IPv4TestTag, ns3::UdpHeader, ns3::TcpSocketBase, ns3::TcpOptionUnknown, ns3::TcpOption, ns3::TcpOptionWinScale, ns3::TcpOptionTS, ns3::TcpOptionSack, ns3::TcpOptionSackPermitted, ns3::TcpOptionMSS, ns3::TcpOptionNOP, ns3::TcpOptionEnd, ns3::TcpHeader, ns3::RttMeanDeviation, ns3::RttEstimator, ns3::RipNgHeader, ns3::RipNgRte, ns3::RipHeader, ns3::RipRte, ns3::Ipv6PacketInfoTag, ns3::Ipv6OptionRouterAlertHeader, ns3::Ipv6OptionJumbogramHeader, ns3::Ipv6OptionPadnHeader, ns3::Ipv6OptionPad1Header, ns3::Ipv6OptionHeader, ns3::Ipv6Header, ns3::Ipv6ExtensionAHHeader, ns3::Ipv6ExtensionESPHeader, ns3::Ipv6ExtensionLooseRoutingHeader, ns3::Ipv6ExtensionRoutingHeader, ns3::Ipv6ExtensionFragmentHeader, ns3::Ipv6ExtensionDestinationHeader, ns3::Ipv6ExtensionHopByHopHeader, ns3::Ipv6ExtensionHeader, ns3::Ipv4PacketInfoTag, ns3::Ipv4Header, ns3::Icmpv6L4Protocol, ns3::Icmpv6OptionRedirected, ns3::Icmpv6OptionLinkLayerAddress, ns3::Icmpv6OptionPrefixInformation, ns3::Icmpv6OptionMtu, ns3::Icmpv6ParameterError, ns3::Icmpv6TimeExceeded, ns3::Icmpv6TooBig, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6Echo, ns3::Icmpv6Redirection, ns3::Icmpv6RS, ns3::Icmpv6RA, ns3::Icmpv6NA, ns3::Icmpv6NS, ns3::Icmpv6OptionHeader, ns3::Icmpv6Header, ns3::Icmpv4TimeExceeded, ns3::Icmpv4DestinationUnreachable, ns3::Icmpv4Echo, ns3::Icmpv4Header, ns3::ArpHeader, ns3::DhcpHeader, ns3::Ipv6FlowProbeTag, ns3::Ipv4FlowProbeTag, ns3::FlowMonitor, ns3::dsr::DsrOptionAck, ns3::dsr::DsrOptionAckReq, ns3::dsr::DsrOptionRerr, ns3::dsr::DsrOptionSR, ns3::dsr::DsrOptionRrep, ns3::dsr::DsrOptionRreq, ns3::dsr::DsrOptionAckHeader, ns3::dsr::DsrOptionAckReqHeader, ns3::dsr::DsrOptionRerrUnsupportedHeader, ns3::dsr::DsrOptionRerrUnreachHeader, ns3::dsr::DsrOptionRerrHeader, ns3::dsr::DsrOptionSRHeader, ns3::dsr::DsrOptionRrepHeader, ns3::dsr::DsrOptionRreqHeader, ns3::dsr::DsrOptionPadnHeader, ns3::dsr::DsrOptionPad1Header, ns3::dsr::DsrOptionHeader, ns3::dsr::DsrRoutingHeader, ns3::dsr::DsrFsHeader, ns3::dsdv::DeferredRouteOutputTag, ns3::dsdv::DsdvHeader, ns3::Object, ns3::ConfigStore, ns3::ThreeGppHttpHeader, ns3::SeqTsSizeHeader, ns3::SeqTsHeader, ns3::SeqTsEchoHeader, ns3::aodv::DeferredRouteOutputTag, ns3::aodv::RerrHeader, ns3::aodv::RrepAckHeader, ns3::aodv::RrepHeader, ns3::aodv::RreqHeader, ns3::aodv::TypeHeader, ns3::HttpHeader, ns3::QKDAppHeader, and ns3::HttpHeader.
Referenced by ns3::PacketTagList::Add(), ns3::Packet::AddByteTag(), ns3::Packet::AddHeader(), ns3::PacketMetadata::AddHeader(), ns3::Packet::AddPacketTag(), ns3::Packet::AddTrailer(), ns3::PacketMetadata::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().
|
static |
Get the type ID.
Definition at line 66 of file object-base.cc.
References GetObjectIid(), and NS_LOG_FUNCTION_NOARGS.
Referenced by ConstructSelf().
|
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::VisualSimulatorImpl, and ns3::FlowMonitor.
Definition at line 79 of file object-base.cc.
References NS_LOG_FUNCTION.
Referenced by ConstructSelf(), and ns3::FlowMonitor::NotifyConstructionCompleted().
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:
[in] | name | The name of the attribute to set. |
[in] | value | The name of the attribute to set. |
Definition at line 204 of file object-base.cc.
References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_SET, ns3::TypeId::AttributeInformation::checker, DoSet(), ns3::TypeId::AttributeInformation::flags, GetInstanceTypeId(), ns3::TypeId::GetName(), ns3::TypeId::LookupAttributeByName(), NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by FemtocellBlockAllocator::FemtocellBlockAllocator(), ns3::JakesPropagationLossModel::JakesPropagationLossModel(), ns3::LrWpanMac::LrWpanMac(), ns3::LrWpanPhy::LrWpanPhy(), ns3::LteSpectrumPhy::LteSpectrumPhy(), ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), ns3::ThreeGppChannelConditionModel::ThreeGppChannelConditionModel(), ns3::TwoRaySpectrumPropagationLossModel::TwoRaySpectrumPropagationLossModel(), ns3::UanMacRc::Associate(), ns3::UanMacRc::AssociateTimeout(), ns3::cell_edited_callback(), ComputeEndToEndGain(), ChainRegressionTest::CreateDevices(), ns3::olsr::Bug780Test::CreateNodes(), ns3::TraceFadingLossModel::DoCalcRxPowerSpectralDensity(), ns3::FqCobaltQueueDisc::DoEnqueue(), ns3::FqCoDelQueueDisc::DoEnqueue(), ns3::FqPieQueueDisc::DoEnqueue(), ns3::dot11s::HwmpProtocol::DoInitialize(), ns3::dot11s::PeerManagementProtocol::DoInitialize(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::SteadyStateRandomWaypointMobilityModel::DoInitializePrivate(), BuildingsPenetrationLossesTestCase::DoRun(), OutdoorRandomWalkTestCase::DoRun(), ThreeGppV2vUrbanLosNlosvChCondModelTestCase::DoRun(), ThreeGppV2vHighwayLosNlosvChCondModelTestCase::DoRun(), ns3::test::RandomVariable::ConstantTestCase::DoRun(), IcmpEchoReplyTestCase::DoRun(), IcmpTimeExceedTestCase::DoRun(), IcmpV6EchoReplyTestCase::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), Ipv4DeduplicationTest::DoRun(), Ipv6PacketInfoTagTest::DoRun(), Ipv6RawSocketImplTest::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LenaHarqTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), LenaMimoTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LteRlcAmE2eTestCase::DoRun(), LteRlcUmE2eTestCase::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LteUeMeasurementsTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LteUeMeasurementsPiecewiseTestCase3::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), BufferTest::DoRun(), ErrorModelSimple::DoRun(), ThreeGppChannelConditionModelTestCase::DoRun(), V2vUrbanProbChCondModelTestCase::DoRun(), V2vHighwayProbChCondModelTestCase::DoRun(), ThreeGppV2vUrbanPropagationLossModelTestCase::DoRun(), ThreeGppV2vHighwayPropagationLossModelTestCase::DoRun(), BlockAckAggregationDisabledTest::DoRun(), TwoLevelAggregationTest::DoRun(), SetChannelFrequencyTest::DoRun(), Ipv4RawSocketImplTest::DoSendData_IpHdr(), Ipv4HeaderTest::DoSendData_IpHdr_Dscp(), AmpduAggregationTest::DoSetup(), WifiPhyCcaIndicationTest::DoSetup(), TestUlMuMimoPhyTransmission::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), LteAggregationThroughputScaleTestCase::GetThroughput(), ns3::QKDAppHelper::InstallPostProcessing(), ns3::LteHelper::InstallSingleEnbDevice(), ns3::dsdv::RoutingProtocol::NotifyInterfaceUp(), ns3::ThreeGppHttpClient::OpenConnection(), ns3::UanMacRc::RtsTimeout(), Experiment::Run(), NetAnimExperiment::Run(), TestUlOfdmaPowerControl::RunOne(), ThreeGppShadowingTestCase::RunTest(), ns3::UanMacRc::ScheduleData(), Experiment::SelectSrcDest(), ns3::Ping::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::ThreeGppHttpServer::StartApplication(), ns3::Ping::StartApplication(), ns3::Radvd::StartApplication(), ns3::V4TraceRoute::StartApplication(), Ipv4FragmentationTest::StartClient(), Ipv6FragmentationTest::StartClient(), SixlowpanFragmentationTest::StartClient(), ns3::AnimationInterface::UpdatePosition(), and NetAnimExperiment::UpdatePositions().
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.
[in] | name | The name of the attribute to set. |
[in] | value | The value to set it to. |
true
if the requested attribute exists and could be set, false
otherwise. Definition at line 227 of file object-base.cc.
References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_SET, ns3::TypeId::AttributeInformation::checker, DoSet(), ns3::TypeId::AttributeInformation::flags, GetInstanceTypeId(), ns3::TypeId::LookupAttributeByName(), and NS_LOG_FUNCTION.
Referenced by WaypointLazyNotifyTrue::DoRun(), WaypointInitialPositionIsWaypoint::DoRun(), ns3::LteHelper::InstallSingleEnbDevice(), and ns3::Config::MatchContainer::SetFailSafe().
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.
[in] | name | The name of the target trace source. |
[in] | context | The trace context associated to the callback. |
[in] | cb | The callback to connect to the trace source. |
true
on success, false
if TraceSource was not found. Definition at line 329 of file object-base.cc.
References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.
Referenced by DhcpTestCase::DoRun().
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.
[in] | name | The name of the target trace source. |
[in] | cb | The callback to connect to the trace source. |
true
on success, false
if TraceSource was not found. Definition at line 315 of file object-base.cc.
References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.
Referenced by TcpRateLinuxWithBufferTest::TcpRateLinuxWithBufferTest(), ns3::TcpSocketBase::TcpSocketBase(), ns3::ApplicationPacketProbe::ConnectByObject(), ns3::Ipv4PacketProbe::ConnectByObject(), ns3::Ipv6PacketProbe::ConnectByObject(), ns3::PacketProbe::ConnectByObject(), ns3::BooleanProbe::ConnectByObject(), ns3::DoubleProbe::ConnectByObject(), ns3::TimeProbe::ConnectByObject(), ns3::Uinteger16Probe::ConnectByObject(), ns3::Uinteger32Probe::ConnectByObject(), ns3::Uinteger8Probe::ConnectByObject(), TestCounter::ConnectTraces(), ns3::Config::MatchContainer::ConnectWithoutContextFailSafe(), ns3::ApWifiMac::DoInitialize(), ns3::RrMultiUserScheduler::DoInitialize(), ns3::StaWifiMac::DoInitialize(), BulkSendBasicTestCase::DoRun(), BulkSendSeqTsSizeTestCase::DoRun(), UdpSocketImplTest::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), WaypointMobilityModelAddWaypointTest::DoRun(), WaveformGeneratorTestCase::DoRun(), WifiAcMappingTest::DoRun(), AmpduAggregationTest::DoRun(), PreservePacketsInAmpdus::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), SpectrumWifiPhyFilterTest::DoSetup(), EmlsrOperationsTestBase::DoSetup(), MultiLinkOperationsTestBase::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestAmpduReception::DoSetup(), TestUnsupportedBandwidthReception::DoSetup(), TestSpectrumChannelWithBandwidthFilter::DoSetup(), WifiPhyThresholdsTest::DoSetup(), ns3::ClickInternetStackHelper::EnableAsciiIpv4Internal(), ns3::InternetStackHelper::EnableAsciiIpv4Internal(), ns3::QKDApp004::PrepareSendSocketToKMS(), NeighborCacheExample::Run(), InterferenceExperiment::Run(), ns3::HierarchicalMobilityModel::SetChild(), ns3::HierarchicalMobilityModel::SetParent(), ns3::EmlsrManager::SetWifiMac(), ns3::FrameExchangeManager::SetWifiPhy(), ns3::QKDPostprocessingApplication::StartApplication(), and OfdmaAckSequenceTest::Transmit().
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.
[in] | name | The name of the target trace source. |
[in] | context | The trace context associated to the callback. |
[in] | cb | The callback to disconnect from the trace source. |
true
on success, false
if TraceSource was not found. Definition at line 357 of file object-base.cc.
References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.
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.
[in] | name | The name of the target trace source. |
[in] | cb | The callback to disconnect from the trace source. |
true
on success, false
if TraceSource was not found. Definition at line 343 of file object-base.cc.
References GetInstanceTypeId(), ns3::TypeId::LookupTraceSourceByName(), and NS_LOG_FUNCTION.
Referenced by ns3::Config::MatchContainer::DisconnectWithoutContext(), ns3::EmlsrManager::DoDispose(), ns3::RrMultiUserScheduler::DoDispose(), ns3::FrameExchangeManager::ResetPhy(), ns3::HierarchicalMobilityModel::SetChild(), and ns3::HierarchicalMobilityModel::SetParent().
|
related |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly.
Definition at line 56 of file object-base.cc.
References NS_LOG_FUNCTION_NOARGS, ns3::TypeId::SetGroupName(), and ns3::TypeId::SetParent().
Referenced by GetTypeId().