keep track of a set of node pointers. More...
#include "node-container.h"
Public Types | |
typedef std::vector< Ptr< Node > >::const_iterator | Iterator |
Node container iterator. | |
Public Member Functions | |
NodeContainer () | |
Create an empty NodeContainer. | |
template<typename... Ts> | |
NodeContainer (const NodeContainer &nc, Ts &&... args) | |
Create a node container which is a concatenation of multiple input NodeContainers. | |
NodeContainer (Ptr< Node > node) | |
Create a NodeContainer with exactly one node which has been previously instantiated. | |
NodeContainer (std::string nodeName) | |
Create a NodeContainer with exactly one node which has been previously instantiated and assigned a name using the Object Name Service. | |
NodeContainer (uint32_t n, uint32_t systemId=0) | |
Create a NodeContainer with the requested number of Nodes. | |
void | Add (const NodeContainer &nc) |
Append the contents of another NodeContainer to the end of this container. | |
template<typename... Ts> | |
void | Add (const NodeContainer &nc, Ts &&... args) |
Append the contents of another NodeContainer to the end of this container. | |
void | Add (Ptr< Node > node) |
Append a single Ptr<Node> to this container. | |
void | Add (std::string nodeName) |
Append to this container the single Ptr<Node> referred to via its object name service registered name. | |
Iterator | Begin () const |
Get an iterator which refers to the first Node in the container. | |
bool | Contains (uint32_t id) const |
Return true if container contains a Node with index id. | |
void | Create (uint32_t n) |
Create n nodes and append pointers to them to the end of this NodeContainer. | |
void | Create (uint32_t n, uint32_t systemId) |
Create n nodes with specified systemId for distributed simulations and append pointers to them to the end of this NodeContainer. | |
Iterator | End () const |
Get an iterator which indicates past-the-last Node in the container. | |
Ptr< Node > | Get (uint32_t i) const |
Get the Ptr<Node> stored in this container at a given index. | |
uint32_t | GetN () const |
Get the number of Ptr<Node> stored in this container. | |
Static Public Member Functions | |
static NodeContainer | GetGlobal () |
Create a NodeContainer that contains a list of all nodes created through NodeContainer::Create() and stored in the ns3::NodeList. | |
Private Attributes | |
std::vector< Ptr< Node > > | m_nodes |
Nodes smart pointers. | |
keep track of a set of node pointers.
Typically ns-3 helpers operate on more than one node at a time. For example a device helper may want to install devices on a large number of similar nodes. The helper Install methods usually take a NodeContainer as a parameter. NodeContainers hold the multiple Ptr<Node> which are used to refer to the nodes.
Definition at line 28 of file node-container.h.
typedef std::vector<Ptr<Node>>::const_iterator ns3::NodeContainer::Iterator |
Node container iterator.
Definition at line 32 of file node-container.h.
ns3::NodeContainer::NodeContainer | ( | ) |
Create an empty NodeContainer.
Definition at line 27 of file node-container.cc.
Create a NodeContainer with exactly one node which has been previously instantiated.
The single Node is specified by a smart pointer.
node | The Ptr<Node> to add to the container. |
Definition at line 31 of file node-container.cc.
References m_nodes.
ns3::NodeContainer::NodeContainer | ( | std::string | nodeName | ) |
Create a NodeContainer with exactly one node which has been previously instantiated and assigned a name using the Object Name Service.
This Node is then specified by its assigned name.
Definition at line 36 of file node-container.cc.
References ns3::Names::Find(), and m_nodes.
Create a NodeContainer with the requested number of Nodes.
This is syntactic sugar for
[in] | n | The number of nodes to create. |
[in] | systemId | The system id or rank associated with this node |
Definition at line 42 of file node-container.cc.
References Create(), and m_nodes.
ns3::NodeContainer::NodeContainer | ( | const NodeContainer & | nc, |
Ts &&... | args ) |
Create a node container which is a concatenation of multiple input NodeContainers.
Ts | [deduced] Template type parameter pack for the multiple NodeContainers |
nc | The first NodeContainer |
args | The remaining NodeContainers |
Definition at line 275 of file node-container.h.
References Add().
void ns3::NodeContainer::Add | ( | const NodeContainer & | nc | ) |
Append the contents of another NodeContainer to the end of this container.
nc | The NodeContainer to append. |
Definition at line 91 of file node-container.cc.
References Begin(), End(), and m_nodes.
Referenced by NodeContainer(), Add(), Experiment::AssignNeighbors(), ns3::NoBackhaulEpcHelper::AssignStreams(), ns3::BriteTopologyHelper::BuildBriteTopology(), BriteTopologyFunctionTestCase::DoRun(), BulkSendBasicTestCase::DoRun(), BulkSendSeqTsSizeTestCase::DoRun(), CsmaPingTestCase::DoRun(), CsmaStarTestCase::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), IcmpTimeExceedTestCase::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), NixVectorRoutingTest::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), TestWifiPhyRxTraceHelper::DoSetup(), TestWifiPhyRxTraceHelperMloStr::DoSetup(), TestWifiPhyRxTraceHelperYans::DoSetup(), Experiment::GenerateNeighbors(), GetGlobal(), and NeighborCacheExample::Run().
void ns3::NodeContainer::Add | ( | const NodeContainer & | nc, |
Ts &&... | args ) |
Append the contents of another NodeContainer to the end of this container.
Ts | [deduced] Template type parameter pack for the multiple NodeContainer |
nc | The NodeContainer to append |
args | The remaining NodeContainers to append |
Definition at line 285 of file node-container.h.
References Add().
Append a single Ptr<Node> to this container.
node | The Ptr<Node> to append. |
Definition at line 100 of file node-container.cc.
References m_nodes.
void ns3::NodeContainer::Add | ( | std::string | nodeName | ) |
Append to this container the single Ptr<Node> referred to via its object name service registered name.
Definition at line 106 of file node-container.cc.
References ns3::Names::Find(), and m_nodes.
NodeContainer::Iterator ns3::NodeContainer::Begin | ( | ) | const |
Get an iterator which refers to the first Node in the container.
Nodes can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the iterator method and is typically used in a for-loop to run through the Nodes
Definition at line 49 of file node-container.cc.
References m_nodes.
Referenced by ns3::SameRoomPositionAllocator::SameRoomPositionAllocator(), Add(), ns3::LteHelper::AddX2Interface(), ns3::AodvHelper::AssignStreams(), ns3::ApplicationHelper::AssignStreams(), ns3::GroupMobilityHelper::AssignStreams(), ns3::InternetStackHelper::AssignStreams(), ns3::MobilityHelper::AssignStreams(), ns3::OlsrHelper::AssignStreams(), ns3::RipHelper::AssignStreams(), ns3::RipNgHelper::AssignStreams(), ns3::ApplicationHelper::AssignStreamsToAllApps(), ns3::DistributedSimulatorImpl::CalculateLookAhead(), ns3::NullMessageSimulatorImpl::CalculateLookAhead(), ns3::lorawan::CreateNetworkServer(), ns3::lorawan::LoraHelper::DoPrintDeviceStatus(), ns3::lorawan::LoraHelper::DoPrintPhyPerformance(), Ipv4DeduplicationPerformanceTest::DoRun(), Ipv4DeduplicationTest::DoRun(), LteCellSelectionTestCase::DoRun(), RandomRoomPositionAllocatorTestCase::DoRun(), SameRoomPositionAllocatorTestCase::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), ns3::MobilityHelper::EnableAscii(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForIpv4::EnablePcapIpv4(), ns3::PcapHelperForIpv4::EnablePcapIpv4(), ns3::PcapHelperForIpv6::EnablePcapIpv6(), ns3::PcapHelperForIpv6::EnablePcapIpv6(), ns3::SameRoomPositionAllocator::GetNext(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::ApplicationHelper::Install(), ns3::BuildingsHelper::Install(), ns3::ClickInternetStackHelper::Install(), ns3::CsmaHelper::Install(), ns3::EnergySourceHelper::Install(), ns3::FdNetDeviceHelper::Install(), ns3::GenericBatteryModelHelper::Install(), ns3::GenericBatteryModelHelper::Install(), ns3::GroupMobilityHelper::Install(), ns3::InternetStackHelper::Install(), ns3::lorawan::ForwarderHelper::Install(), ns3::lorawan::LoraHelper::Install(), ns3::lorawan::OneShotSenderHelper::Install(), ns3::lorawan::PeriodicSenderHelper::Install(), ns3::LrWpanHelper::Install(), ns3::MeshHelper::Install(), ns3::MobilityHelper::Install(), ns3::PacketSocketHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::UanHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::WifiHelper::Install(), ns3::WimaxHelper::Install(), ns3::WimaxHelper::Install(), ns3::WimaxHelper::Install(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::LteHelper::InstallEnbDevice(), ns3::LteSimpleHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), ns3::LteSimpleHelper::InstallUeDevice(), UanExperiment::SendPackets(), ns3::ClickInternetStackHelper::SetClickFile(), ns3::ClickInternetStackHelper::SetDefines(), ns3::ClickInternetStackHelper::SetRoutingTableElement(), ns3::lorawan::LorawanMacHelper::SetSpreadingFactorsGivenDistribution(), ns3::lorawan::LorawanMacHelper::SetSpreadingFactorsUp(), UanExperiment::SetupApplications(), UanExperiment::SetupCommunications(), ns3::AnimationInterface::TrackIpv4Route(), Experiment::UpdatePositions(), and NetAnimExperiment::UpdatePositions().
bool ns3::NodeContainer::Contains | ( | uint32_t | id | ) | const |
Return true if container contains a Node with index id.
id | Node Id |
Definition at line 113 of file node-container.cc.
References m_nodes.
void ns3::NodeContainer::Create | ( | uint32_t | n | ) |
Create n nodes and append pointers to them to the end of this NodeContainer.
Nodes are at the heart of any ns-3 simulation. One of the first tasks that any simulation needs to do is to create a number of nodes. This method automates that task.
n | The number of Nodes to create |
Definition at line 73 of file node-container.cc.
References ns3::CreateObject(), and m_nodes.
Referenced by ns3::CsmaStarHelper::CsmaStarHelper(), NodeContainer(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), ns3::PointToPointGridHelper::PointToPointGridHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), ns3::BriteTopologyHelper::BuildBriteTopology(), BatteryLifetimeTest::ConstantLoadTest(), ns3::lorawan::CreateEndDevices(), ns3::lorawan::CreateGateways(), AodvExample::CreateNodes(), Bug772ChainTest::CreateNodes(), ChainRegressionTest::CreateNodes(), DsdvManetExample::CreateNodes(), FlameRegressionTest::CreateNodes(), HwmpDoRfRegressionTest::CreateNodes(), HwmpProactiveRegressionTest::CreateNodes(), HwmpReactiveRegressionTest::CreateNodes(), HwmpSimplestRegressionTest::CreateNodes(), MeshTest::CreateNodes(), Ns2MobilityHelperTest::CreateNodes(), ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), PeerManagementProtocolRegressionTest::CreateNodes(), TracerouteExample::CreateNodes(), BasicEnergyDepletionTest::DepletionTestCase(), BlockAckAggregationDisabledTest::DoRun(), BriteTopologyFunctionTestCase::DoRun(), Bug2222TestCase::DoRun(), Bug2843TestCase::DoRun(), Bug730TestCase::DoRun(), BuildingsChannelConditionModelTestCase::DoRun(), BuildingsHelperOneTestCase::DoRun(), BuildingsPenetrationLossesTestCase::DoRun(), CarrierAggregationConfigTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), ChannelTest::DoRun(), CsmaBroadcastTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaOneSubnetTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), CsmaPingTestCase::DoRun(), CsmaRawIpSocketTestCase::DoRun(), CsmaStarTestCase::DoRun(), DhcpTestCase::DoRun(), DsssModulationTest::DoRun(), DuplicateTest::DoRun(), DynamicPartialTest::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), FlushTest::DoRun(), IcmpEchoReplyTestCase::DoRun(), IcmpTimeExceedTestCase::DoRun(), IcmpV6EchoReplyTestCase::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), IdealRateManagerChannelWidthTest::DoRun(), IdealRateManagerMimoTest::DoRun(), InterfaceContainerTest::DoRun(), IpAddressHelperTestCasev6::DoRun(), Ipv4DeduplicationPerformanceTest::DoRun(), Ipv4DeduplicationTest::DoRun(), Ipv4DynamicGlobalRoutingTestCase::DoRun(), Issue169TestCase::DoRun(), Issue211Test::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaHarqTestCase::DoRun(), LenaMimoTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LrWpanAckTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverDelayTestCase::DoRun(), LteHandoverFailureTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LtePrimaryCellChangeTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteRlcAmE2eTestCase::DoRun(), LteRlcUmE2eTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteSecondaryCellSelectionTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LteUeMeasurementsPiecewiseTestCase3::DoRun(), LteUeMeasurementsTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), MobilityTraceTestCase::DoRun(), NetDeviceContainerTest::DoRun(), NixVectorRoutingTest::DoRun(), ns3::aodv::LoopbackTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), ns3::TcpGeneralTest::DoRun(), Ns3TcpCubicTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpSocketTestCaseCsma::DoRun(), Ns3TcpStateTestCase::DoRun(), Ns3WimaxManagementConnectionsTestCase::DoRun(), Ns3WimaxNetworkEntryTestCase::DoRun(), Ns3WimaxSfCreationTestCase::DoRun(), OfdmaAckSequenceTest::DoRun(), OutdoorRandomWalkTestCase::DoRun(), OverallGainAverageTest::DoRun(), PacketSocketAppsTest::DoRun(), PreservePacketsInAmpdus::DoRun(), QosFragmentationTestCase::DoRun(), RandomRoomPositionAllocatorTestCase::DoRun(), SameRoomPositionAllocatorTestCase::DoRun(), SetChannelFrequencyTest::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), SpectrumIdealPhyTestCase::DoRun(), TcFlowControlTestCase::DoRun(), ThreeGppAntennaSetupChangedTest::DoRun(), ThreeGppCalcLongTermMultiPortTest::DoRun(), ThreeGppChannelConditionModelTestCase::DoRun(), ThreeGppChannelMatrixComputationTest::DoRun(), ThreeGppChannelMatrixUpdateTest::DoRun(), ThreeGppIndoorOfficePropagationLossModelTestCase::DoRun(), ThreeGppMimoPolarizationTest::DoRun(), ThreeGppRmaPropagationLossModelTestCase::DoRun(), ThreeGppSpectrumPropagationLossModelTest::DoRun(), ThreeGppUmaPropagationLossModelTestCase::DoRun(), ThreeGppUmiPropagationLossModelTestCase::DoRun(), ThreeGppV2vBuildingsChCondModelTestCase::DoRun(), ThreeGppV2vHighwayLosNlosvChCondModelTestCase::DoRun(), ThreeGppV2vHighwayPropagationLossModelTestCase::DoRun(), ThreeGppV2vUrbanLosNlosvChCondModelTestCase::DoRun(), ThreeGppV2vUrbanPropagationLossModelTestCase::DoRun(), UdpClientServerTestCase::DoRun(), UdpEchoClientSetFillTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), V2vHighwayProbChCondModelTestCase::DoRun(), V2vUrbanProbChCondModelTestCase::DoRun(), WaypointMobilityModelViaHelper::DoRun(), WifiAcMappingTest::DoRun(), WifiChannelSwitchingTest::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), Ns3WimaxSchedulingTestCase::DoRunOnce(), Ns3WimaxSFTypeTestCase::DoRunOnce(), Ns3WimaxSimpleOFDMTestCase::DoRunOnce(), BridgeTest::DoSetup(), LanTest::DoSetup(), LinkTest::DoSetup(), PingTestCase::DoSetup(), TestUlOfdmaPowerControl::DoSetup(), TwoBridgeTest::DoSetup(), TwoLanTest::DoSetup(), TwoLinkTest::DoSetup(), WifiPrimaryChannelsTest::DoSetup(), experiment(), experiment(), ns3::TvSpectrumTransmitterHelper::InstallRandomRegionalTransmitters(), UanExperiment::Prepare(), AnimationInterfaceTestCase::PrepareNetwork(), AnimationRemainingEnergyTestCase::PrepareNetwork(), Experiment::Run(), Experiment::Run(), Experiment::Run(), Experiment::Run(), Experiment::Run(), Experiment::Run(), NeighborCacheExample::Run(), NetAnimExperiment::Run(), RoutingExperiment::Run(), Issue40TestCase::RunOne(), TestInterBssConstantObssPdAlgo::RunOne(), Bug2470TestCase::RunSubtest(), TbfQueueDiscTestCase::RunTbfTest(), ThreeGppShadowingTestCase::RunTest(), StaWifiMacScanningTestCase::Setup(), WifiFilsFrameTest::SetupDevice(), ThreeGppNTNPropagationLossModelTestCase::TestChannelGain(), and BatteryLifetimeTest::VariableLoadTest().
Create n nodes with specified systemId for distributed simulations and append pointers to them to the end of this NodeContainer.
Nodes are at the heart of any ns-3 simulation. One of the first tasks that any simulation needs to do is to create a number of nodes. This method automates that task, and adds the ability to specify systemId for distributed simulations.
n | The number of Nodes to create |
systemId | The system id or rank associated with this node |
Definition at line 82 of file node-container.cc.
References ns3::CreateObject(), and m_nodes.
NodeContainer::Iterator ns3::NodeContainer::End | ( | ) | const |
Get an iterator which indicates past-the-last Node in the container.
Nodes can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the iterator method and is typically used in a for-loop to run through the Nodes
Definition at line 55 of file node-container.cc.
References m_nodes.
Referenced by ns3::SameRoomPositionAllocator::SameRoomPositionAllocator(), Add(), ns3::LteHelper::AddX2Interface(), ns3::AodvHelper::AssignStreams(), ns3::ApplicationHelper::AssignStreams(), ns3::GroupMobilityHelper::AssignStreams(), ns3::InternetStackHelper::AssignStreams(), ns3::MobilityHelper::AssignStreams(), ns3::OlsrHelper::AssignStreams(), ns3::RipHelper::AssignStreams(), ns3::RipNgHelper::AssignStreams(), ns3::ApplicationHelper::AssignStreamsToAllApps(), ns3::DistributedSimulatorImpl::CalculateLookAhead(), ns3::NullMessageSimulatorImpl::CalculateLookAhead(), ns3::lorawan::CreateNetworkServer(), ns3::lorawan::LoraHelper::DoPrintDeviceStatus(), ns3::lorawan::LoraHelper::DoPrintPhyPerformance(), Ipv4DeduplicationPerformanceTest::DoRun(), Ipv4DeduplicationTest::DoRun(), LteCellSelectionTestCase::DoRun(), RandomRoomPositionAllocatorTestCase::DoRun(), SameRoomPositionAllocatorTestCase::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), ns3::MobilityHelper::EnableAscii(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForIpv4::EnablePcapIpv4(), ns3::PcapHelperForIpv4::EnablePcapIpv4(), ns3::PcapHelperForIpv6::EnablePcapIpv6(), ns3::PcapHelperForIpv6::EnablePcapIpv6(), ns3::SameRoomPositionAllocator::GetNext(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::ApplicationHelper::Install(), ns3::BuildingsHelper::Install(), ns3::ClickInternetStackHelper::Install(), ns3::CsmaHelper::Install(), ns3::EnergySourceHelper::Install(), ns3::FdNetDeviceHelper::Install(), ns3::GenericBatteryModelHelper::Install(), ns3::GenericBatteryModelHelper::Install(), ns3::GroupMobilityHelper::Install(), ns3::InternetStackHelper::Install(), ns3::lorawan::ForwarderHelper::Install(), ns3::lorawan::LoraHelper::Install(), ns3::lorawan::OneShotSenderHelper::Install(), ns3::lorawan::PeriodicSenderHelper::Install(), ns3::LrWpanHelper::Install(), ns3::MeshHelper::Install(), ns3::MobilityHelper::Install(), ns3::PacketSocketHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::UanHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::WifiHelper::Install(), ns3::WimaxHelper::Install(), ns3::WimaxHelper::Install(), ns3::WimaxHelper::Install(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::LteHelper::InstallEnbDevice(), ns3::LteSimpleHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), ns3::LteSimpleHelper::InstallUeDevice(), UanExperiment::SendPackets(), ns3::ClickInternetStackHelper::SetClickFile(), ns3::ClickInternetStackHelper::SetDefines(), ns3::ClickInternetStackHelper::SetRoutingTableElement(), ns3::lorawan::LorawanMacHelper::SetSpreadingFactorsGivenDistribution(), ns3::lorawan::LorawanMacHelper::SetSpreadingFactorsUp(), UanExperiment::SetupApplications(), UanExperiment::SetupCommunications(), ns3::AnimationInterface::TrackIpv4Route(), Experiment::UpdatePositions(), and NetAnimExperiment::UpdatePositions().
Get the Ptr<Node> stored in this container at a given index.
Nodes can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the direct method and is used to retrieve the indexed Ptr<Node>.
i | the index of the requested node pointer. |
Definition at line 67 of file node-container.cc.
References m_nodes.
Referenced by ns3::CsmaStarHelper::CsmaStarHelper(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), ns3::PointToPointGridHelper::PointToPointGridHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), Experiment::AssignNeighbors(), ns3::PointToPointStarHelper::BoundingBox(), BuildAppsTest(), BuildAppsTest(), AnimationRemainingEnergyTestCase::CheckLogic(), TestWifiPhyRxTraceHelperMloStr::CheckStats(), TestWifiPhyRxTraceHelperMloStr::CheckStats(), ns3::BriteTopologyHelper::ConstructTopology(), Bug772ChainTest::CreateDevices(), ChainRegressionTest::CreateDevices(), AodvExample::CreateNodes(), Ns2MobilityHelperTest::CreateNodes(), ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), TracerouteExample::CreateNodes(), BlockAckAggregationDisabledTest::DoRun(), BridgeTest::DoRun(), BriteTopologyFunctionTestCase::DoRun(), Bug2222TestCase::DoRun(), Bug730TestCase::DoRun(), BuildingsChannelConditionModelTestCase::DoRun(), BuildingsHelperOneTestCase::DoRun(), BuildingsPenetrationLossesTestCase::DoRun(), BulkSendBasicTestCase::DoRun(), BulkSendSeqTsSizeTestCase::DoRun(), CarrierAggregationConfigTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), ChainRegressionTest::DoRun(), ChannelTest::DoRun(), CsmaBroadcastTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaOneSubnetTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), CsmaPingTestCase::DoRun(), CsmaRawIpSocketTestCase::DoRun(), CsmaStarTestCase::DoRun(), DownlinkPacketTest::DoRun(), DsssModulationTest::DoRun(), DuplicateTest::DoRun(), DynamicPartialTest::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), FlushTest::DoRun(), IcmpEchoReplyTestCase::DoRun(), IcmpTimeExceedTestCase::DoRun(), IcmpV6EchoReplyTestCase::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), InterfaceContainerTest::DoRun(), IpAddressHelperTestCasev6::DoRun(), Ipv4DeduplicationTest::DoRun(), Ipv4DynamicGlobalRoutingTestCase::DoRun(), Issue211Test::DoRun(), LanTest::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaHarqTestCase::DoRun(), LenaMimoTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LinkCheckTest::DoRun(), LinkTest::DoRun(), LteCellSelectionTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LteUeMeasurementsPiecewiseTestCase3::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), NetDeviceContainerTest::DoRun(), NetworkStatusTest::DoRun(), NixVectorRoutingTest::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), ns3::TcpGeneralTest::DoRun(), Ns3TcpCubicTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpSocketTestCaseCsma::DoRun(), Ns3TcpStateTestCase::DoRun(), OutdoorRandomWalkTestCase::DoRun(), OverallGainAverageTest::DoRun(), PacketSocketAppsTest::DoRun(), PingTestCase::DoRun(), PreservePacketsInAmpdus::DoRun(), QosFragmentationTestCase::DoRun(), SetChannelFrequencyTest::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), SpectrumIdealPhyTestCase::DoRun(), SpectrumWifiPhyInterfacesHelperTest::DoRun(), StaWifiMacScanningTestCase::DoRun(), TcFlowControlTestCase::DoRun(), TestWifiPhyRxTraceHelperMloStr::DoRun(), ThreeGppAntennaSetupChangedTest::DoRun(), ThreeGppCalcLongTermMultiPortTest::DoRun(), ThreeGppChannelConditionModelTestCase::DoRun(), ThreeGppChannelMatrixComputationTest::DoRun(), ThreeGppChannelMatrixUpdateTest::DoRun(), ThreeGppIndoorOfficePropagationLossModelTestCase::DoRun(), ThreeGppMimoPolarizationTest::DoRun(), ThreeGppRmaPropagationLossModelTestCase::DoRun(), ThreeGppSpectrumPropagationLossModelTest::DoRun(), ThreeGppUmaPropagationLossModelTestCase::DoRun(), ThreeGppUmiPropagationLossModelTestCase::DoRun(), ThreeGppV2vBuildingsChCondModelTestCase::DoRun(), ThreeGppV2vHighwayLosNlosvChCondModelTestCase::DoRun(), ThreeGppV2vHighwayPropagationLossModelTestCase::DoRun(), ThreeGppV2vUrbanLosNlosvChCondModelTestCase::DoRun(), ThreeGppV2vUrbanPropagationLossModelTestCase::DoRun(), TwoBridgeTest::DoRun(), TwoLanTest::DoRun(), TwoLinkTest::DoRun(), UdpClientServerTestCase::DoRun(), UdpEchoClientSetFillTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), UplinkPacketTest::DoRun(), V2vHighwayProbChCondModelTestCase::DoRun(), V2vUrbanProbChCondModelTestCase::DoRun(), WaypointMobilityModelViaHelper::DoRun(), WifiAcMappingTest::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), WifiUseAvailBwTest::DoRun(), BridgeTest::DoSetup(), OrigBlockAckWindowStalled::DoSetup(), PingTestCase::DoSetup(), SpectrumWifiPhyMultipleInterfacesTest::DoSetup(), TestUlOfdmaPowerControl::DoSetup(), TwoBridgeTest::DoSetup(), TwoLanTest::DoSetup(), TwoLinkTest::DoSetup(), WifiPrimaryChannelsTest::DoSetup(), experiment(), experiment(), Experiment::GenerateNeighbors(), ns3::CsmaStarHelper::GetHub(), ns3::PointToPointStarHelper::GetHub(), ns3::PointToPointDumbbellHelper::GetLeft(), ns3::PointToPointDumbbellHelper::GetLeft(), ns3::PointToPointDumbbellHelper::GetRight(), ns3::PointToPointDumbbellHelper::GetRight(), ns3::CsmaStarHelper::GetSpokeNode(), ns3::PointToPointStarHelper::GetSpokeNode(), ns3::PointToPointHelper::Install(), MeshTest::InstallApplication(), AodvExample::InstallApplications(), DsdvManetExample::InstallApplications(), FlameRegressionTest::InstallApplications(), HwmpDoRfRegressionTest::InstallApplications(), HwmpProactiveRegressionTest::InstallApplications(), HwmpReactiveRegressionTest::InstallApplications(), HwmpSimplestRegressionTest::InstallApplications(), TracerouteExample::InstallApplications(), ns3::PointToPointGridHelper::InstallStack(), AnimationInterfaceTestCase::PrepareNetwork(), AnimationRemainingEnergyTestCase::PrepareNetwork(), HwmpReactiveRegressionTest::ResetPosition(), HwmpSimplestRegressionTest::ResetPosition(), Experiment::Run(), Experiment::Run(), Experiment::Run(), Experiment::Run(), Experiment::Run(), NeighborCacheExample::Run(), NetAnimExperiment::Run(), RoutingExperiment::Run(), Issue40TestCase::RunOne(), TestInterBssConstantObssPdAlgo::RunOne(), TbfQueueDiscTestCase::RunTbfTest(), ThreeGppShadowingTestCase::RunTest(), Experiment::SelectSrcDest(), Experiment::SendMultiDestinations(), WifiChannelSwitchingTest::SendPacket(), ns3::LteHexGridEnbTopologyHelper::SetPositionAndInstallEnbDevice(), ns3::lorawan::LorawanMacHelper::SetSpreadingFactorsUp(), WifiFilsFrameTest::SetupDevice(), UanExperiment::SetupPositions(), ThreeGppNTNPropagationLossModelTestCase::TestChannelGain(), and UpdateAnimation().
|
static |
Create a NodeContainer that contains a list of all nodes created through NodeContainer::Create() and stored in the ns3::NodeList.
Whenever a Node is created, a Ptr<Node> is added to a global list of all nodes in the system. It is sometimes useful to be able to get to all nodes in one place. This method creates a NodeContainer that is initialized to contain all of the simulation nodes,
Definition at line 17 of file node-container.cc.
References Add(), ns3::NodeList::Begin(), and ns3::NodeList::End().
Referenced by ns3::DistributedSimulatorImpl::CalculateLookAhead(), ns3::NullMessageSimulatorImpl::CalculateLookAhead(), ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), ns3::MobilityHelper::EnableAsciiAll(), ns3::UanHelper::EnableAsciiAll(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4All(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4All(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6All(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6All(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl(), ns3::PcapHelperForIpv4::EnablePcapIpv4(), ns3::PcapHelperForIpv4::EnablePcapIpv4All(), ns3::PcapHelperForIpv6::EnablePcapIpv6(), ns3::PcapHelperForIpv6::EnablePcapIpv6All(), ns3::ClickInternetStackHelper::InstallAll(), ns3::EnergySourceHelper::InstallAll(), ns3::InternetStackHelper::InstallAll(), and ns3::MobilityHelper::InstallAll().
uint32_t ns3::NodeContainer::GetN | ( | ) | const |
Get the number of Ptr<Node> stored in this container.
Nodes can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the direct method and is typically used to define an ending condition in a for-loop that runs through the stored Nodes
Definition at line 61 of file node-container.cc.
References m_nodes.
Referenced by ns3::CsmaStarHelper::CsmaStarHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), ns3::CsmaStarHelper::AssignIpv4Addresses(), ns3::PointToPointStarHelper::AssignIpv4Addresses(), ns3::CsmaStarHelper::AssignIpv6Addresses(), ns3::PointToPointStarHelper::AssignIpv6Addresses(), Experiment::AssignNeighbors(), ns3::PointToPointStarHelper::BoundingBox(), CarrierAggregationConfigTestCase::DoRun(), CsmaStarTestCase::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), Ipv4DeduplicationPerformanceTest::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LteCellSelectionTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), RocketfuelTopologyReaderMapsTest::DoRun(), RocketfuelTopologyReaderWeightsTest::DoRun(), ns3::PointToPointHelper::Install(), ns3::PointToPointGridHelper::InstallStack(), ns3::PointToPointDumbbellHelper::LeftCount(), ns3::PointToPointDumbbellHelper::RightCount(), Experiment::Run(), Experiment::Run(), NetAnimExperiment::Run(), Experiment::SelectSrcDest(), Experiment::SendMultiDestinations(), ns3::LteHexGridEnbTopologyHelper::SetPositionAndInstallEnbDevice(), ns3::CsmaStarHelper::SpokeCount(), ns3::PointToPointStarHelper::SpokeCount(), ns3::AnimationInterface::TrackIpv4Route(), and UpdateAnimation().
Nodes smart pointers.
Definition at line 262 of file node-container.h.
Referenced by NodeContainer(), NodeContainer(), NodeContainer(), Add(), Add(), Add(), Begin(), Contains(), Create(), Create(), End(), Get(), and GetN().