holds a vector of ns3::NetDevice pointers More...
#include "net-device-container.h"
Public Types | |
typedef std::vector< Ptr< NetDevice > >::const_iterator | Iterator |
NetDevice container iterator. | |
Public Member Functions | |
NetDeviceContainer () | |
Create an empty NetDeviceContainer. | |
NetDeviceContainer (const NetDeviceContainer &a, const NetDeviceContainer &b) | |
NetDeviceContainer (Ptr< NetDevice > dev) | |
NetDeviceContainer (std::string devName) | |
Create a NetDeviceContainer with exactly one device which has been previously instantiated and assigned a name using the Object name service. | |
void | Add (NetDeviceContainer other) |
Append the contents of another NetDeviceContainer to the end of this container. | |
void | Add (Ptr< NetDevice > device) |
Append a single Ptr<NetDevice> to this container. | |
void | Add (std::string deviceName) |
Append to this container the single Ptr<NetDevice> referred to via its object name service registered name. | |
Iterator | Begin () const |
Get an iterator which refers to the first NetDevice in the container. | |
Iterator | End () const |
Get an iterator which indicates past-the-last NetDevice in the container. | |
Ptr< NetDevice > | Get (uint32_t i) const |
Get the Ptr<NetDevice> stored in this container at a given index. | |
uint32_t | GetN () const |
Get the number of Ptr<NetDevice> stored in this container. | |
Private Attributes | |
std::vector< Ptr< NetDevice > > | m_devices |
NetDevices smart pointers. | |
holds a vector of ns3::NetDevice pointers
Typically ns-3 NetDevices are installed on nodes using a net device helper. The helper Install method takes a NodeContainer which holds some number of Ptr<Node>. For each of the Nodes in the NodeContainer the helper will instantiate a net device, add a MAC address and a queue to the device and install it to the node. For each of the devices, the helper also adds the device into a Container for later use by the caller. This is that container used to hold the Ptr<NetDevice> which are instantiated by the device helper.
Definition at line 42 of file net-device-container.h.
typedef std::vector<Ptr<NetDevice>>::const_iterator ns3::NetDeviceContainer::Iterator |
NetDevice container iterator.
Definition at line 46 of file net-device-container.h.
ns3::NetDeviceContainer::NetDeviceContainer | ( | ) |
Create an empty NetDeviceContainer.
Definition at line 27 of file net-device-container.cc.
dev | a device to add to the container |
Create a NetDeviceContainer with exactly one net device that has previously been instantiated
Definition at line 31 of file net-device-container.cc.
References m_devices.
ns3::NetDeviceContainer::NetDeviceContainer | ( | std::string | devName | ) |
Create a NetDeviceContainer with exactly one device which has been previously instantiated and assigned a name using the Object name service.
This NetDevice is specified by its assigned name.
devName | The name of the device to add to the container |
Create a NetDeviceContainer with exactly one device
Definition at line 36 of file net-device-container.cc.
References m_devices.
ns3::NetDeviceContainer::NetDeviceContainer | ( | const NetDeviceContainer & | a, |
const NetDeviceContainer & | b | ||
) |
a | a device container |
b | another device container |
Create a device container which is a concatenation of the two input NetDeviceContainers.
Definition at line 42 of file net-device-container.cc.
References Add().
void ns3::NetDeviceContainer::Add | ( | NetDeviceContainer | other | ) |
Append the contents of another NetDeviceContainer to the end of this container.
other | The NetDeviceContainer to append. |
Definition at line 73 of file net-device-container.cc.
References Begin(), End(), and m_devices.
Referenced by ns3::CsmaStarHelper::CsmaStarHelper(), NetDeviceContainer(), ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), ns3::PointToPointGridHelper::PointToPointGridHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), ns3::PointToPointDumbbellHelper::AssignIpv4Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv6Addresses(), UdpClientServerTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), UdpEchoClientSetFillTestCase::DoRun(), DhcpTestCase::DoRun(), RadvdTestCase::DoRun(), IcmpEchoReplyTestCase::DoRun(), IcmpV6EchoReplyTestCase::DoRun(), Ipv4RipTest::DoRun(), Ipv4RipCountToInfinityTest::DoRun(), Ipv4RipSplitHorizonStrategyTest::DoRun(), IpAddressHelperTestCasev6::DoRun(), Ipv6RipngTest::DoRun(), Ipv6RipngCountToInfinityTest::DoRun(), Ipv6RipngSplitHorizonStrategyTest::DoRun(), DynamicNeighborCacheTest::DoRun(), ChannelTest::DoRun(), NetDeviceContainerTest::DoRun(), InterfaceContainerTest::DoRun(), FlushTest::DoRun(), DuplicateTest::DoRun(), DynamicPartialTest::DoRun(), CarrierAggregationConfigTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaStarTestCase::DoRun(), WifiUseAvailBwTest::DoRun(), TestUnsupportedModulationReception::DoRun(), TwoLinkTest::DoSetup(), TwoLanTest::DoSetup(), BridgeTest::DoSetup(), TwoBridgeTest::DoSetup(), WifiPrimaryChannelsTest::DoSetup(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::GlobalRouter::FindAllNonBridgedDevicesOnLink(), ns3::NixVectorRouting< T >::GetAdjacentNetDevices(), ns3::FdNetDeviceHelper::Install(), ns3::CsmaHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), ns3::SixLowPanHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::BridgeHelper::Install(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::GlobalRouter::ProcessBridgedBroadcastLink(), ns3::GlobalRouter::ProcessSingleBroadcastLink(), and ns3::LteHexGridEnbTopologyHelper::SetPositionAndInstallEnbDevice().
Append a single Ptr<NetDevice> to this container.
device | The Ptr<NetDevice> to append. |
Definition at line 82 of file net-device-container.cc.
References m_devices.
void ns3::NetDeviceContainer::Add | ( | std::string | deviceName | ) |
Append to this container the single Ptr<NetDevice> referred to via its object name service registered name.
Definition at line 88 of file net-device-container.cc.
References m_devices.
NetDeviceContainer::Iterator ns3::NetDeviceContainer::Begin | ( | ) | const |
Get an iterator which refers to the first NetDevice in the container.
NetDevices 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 NetDevices
Definition at line 49 of file net-device-container.cc.
References m_devices.
Referenced by ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), Add(), ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(), ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(), ns3::CsmaHelper::AssignStreams(), ns3::LrWpanHelper::AssignStreams(), ns3::LteHelper::AssignStreams(), ns3::MeshHelper::AssignStreams(), ns3::SixLowPanHelper::AssignStreams(), ns3::UanHelper::AssignStreams(), ns3::WifiHelper::AssignStreams(), ns3::WimaxHelper::AssignStreams(), ns3::NoBackhaulEpcHelper::AssignUeIpv6Address(), ns3::LteHelper::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::NixVectorRouting< T >::BFS(), ns3::NixVectorRouting< T >::BuildNixVector(), LteRadioLinkFailureTestCase::CheckConnected(), ns3::LrWpanHelper::CreateAssociatedPan(), LteCellSelectionTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::TrafficControlHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::BridgeHelper::Install(), ns3::DhcpHelper::InstallDhcpClient(), MeshTest::Report(), ns3::LrWpanHelper::SetExtendedAddresses(), and ns3::TrafficControlHelper::Uninstall().
NetDeviceContainer::Iterator ns3::NetDeviceContainer::End | ( | ) | const |
Get an iterator which indicates past-the-last NetDevice in the container.
NetDevices 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 NetDevices
Definition at line 55 of file net-device-container.cc.
References m_devices.
Referenced by ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), Add(), ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(), ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(), ns3::CsmaHelper::AssignStreams(), ns3::LrWpanHelper::AssignStreams(), ns3::LteHelper::AssignStreams(), ns3::MeshHelper::AssignStreams(), ns3::SixLowPanHelper::AssignStreams(), ns3::UanHelper::AssignStreams(), ns3::WifiHelper::AssignStreams(), ns3::WimaxHelper::AssignStreams(), ns3::NoBackhaulEpcHelper::AssignUeIpv6Address(), ns3::LteHelper::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::NixVectorRouting< T >::BFS(), ns3::NixVectorRouting< T >::BuildNixVector(), LteRadioLinkFailureTestCase::CheckConnected(), ns3::LrWpanHelper::CreateAssociatedPan(), LteCellSelectionTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::TrafficControlHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::BridgeHelper::Install(), ns3::DhcpHelper::InstallDhcpClient(), MeshTest::Report(), ns3::LrWpanHelper::SetExtendedAddresses(), and ns3::TrafficControlHelper::Uninstall().
Get the Ptr<NetDevice> stored in this container at a given index.
NetDevices 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<NetDevice>.
i | the index of the requested device pointer. |
Definition at line 67 of file net-device-container.cc.
References m_devices.
Referenced by ns3::CsmaStarHelper::CsmaStarHelper(), ns3::EmuEpcHelper::EmuEpcHelper(), ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), NodeStatistics::NodeStatistics(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), ns3::SixLowPanHelper::AddContext(), ns3::EmuEpcHelper::AddEnb(), ns3::Ipv4AddressHelper::Assign(), ns3::Ipv6AddressHelper::Assign(), ns3::CsmaStarHelper::AssignIpv4Addresses(), ns3::PointToPointStarHelper::AssignIpv4Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv4Addresses(), ns3::PointToPointGridHelper::AssignIpv4Addresses(), ns3::CsmaStarHelper::AssignIpv6Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv6Addresses(), ns3::PointToPointGridHelper::AssignIpv6Addresses(), ns3::PointToPointStarHelper::AssignIpv6Addresses(), ns3::GlobalRouter::BuildNetworkLSAs(), WifiPrimaryChannelsTest::CheckAssociation(), LteRadioLinkFailureTestCase::CheckIdle(), WifiUseAvailBwTest::CheckResults(), WifiTxopTest::CheckResults(), OfdmaAckSequenceTest::CheckResults(), ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), DhcpTestCase::DoRun(), RadvdTestCase::DoRun(), PingTestCase::DoRun(), Ipv4FragmentationTest::DoRun(), Ipv4PacketInfoTagTest::DoRun(), Ipv4RawSocketImplTest::DoRun(), Ipv6DadTest::DoRun(), Ipv6ForwardingTest::DoRun(), Ipv6PacketInfoTagTest::DoRun(), Ipv6RawSocketImplTest::DoRun(), ns3::TcpGeneralTest::DoRun(), UdpSocketImplTest::DoRun(), Udp6SocketImplTest::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), CarrierAggregationConfigTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LteCqiGenerationTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LteHardFrTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LenaHarqTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), LenaMimoTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LteRadioLinkFailureTestCase::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(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), NixVectorRoutingTest::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), WaveformGeneratorTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), CsmaStarTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), WifiAcMappingTest::DoRun(), TcFlowControlTestCase::DoRun(), WifiUseAvailBwTest::DoRun(), OfdmaAckSequenceTest::DoRun(), TestUnsupportedModulationReception::DoRun(), WifiPrimaryChannelsTest::DoRun(), SetChannelFrequencyTest::DoRun(), Bug2222TestCase::DoRun(), Bug2843TestCase::DoRun(), Issue169TestCase::DoRun(), IdealRateManagerChannelWidthTest::DoRun(), IdealRateManagerMimoTest::DoRun(), WifiTxopTest::DoRun(), Ns3WimaxNetworkEntryTestCase::DoRun(), Ns3WimaxManagementConnectionsTestCase::DoRun(), Ns3WimaxSfCreationTestCase::DoRun(), Ns3WimaxSimpleOFDMTestCase::DoRunOnce(), Ns3WimaxSFTypeTestCase::DoRunOnce(), Ns3WimaxSchedulingTestCase::DoRunOnce(), WifiPrimaryChannelsTest::DoSendHeTbPpdu(), PingTestCase::DoSetup(), BridgeTest::DoSetup(), TwoBridgeTest::DoSetup(), EmlsrOperationsTestBase::DoSetup(), TestUlOfdmaPowerControl::DoSetup(), WifiPrimaryChannelsTest::DoSetup(), ns3::NixVectorRouting< T >::FindNetDeviceForNixIndex(), GetYansWifiPhyPtr(), SetChannelFrequencyTest::GetYansWifiPhyPtr(), ns3::SixLowPanHelper::Install(), ns3::SixLowPanHelper::InvalidateContext(), ns3::NeighborCacheHelper::PopulateNeighborCache(), SixlowpanIphcStatefulImplTest::ReceiveFromMockDevice(), WifiPrimaryChannelsTest::ReceiveUl(), ns3::SixLowPanHelper::RemoveContext(), ns3::SixLowPanHelper::RenewContext(), NeighborCacheExample::Run(), NetAnimExperiment::Run(), Experiment::Run(), TestInterBssConstantObssPdAlgo::RunOne(), Issue40TestCase::RunOne(), Bug2470TestCase::RunSubtest(), WifiPrimaryChannelsTest::SendDlMuPpdu(), WifiPrimaryChannelsTest::SendDlSuPpdu(), WifiPrimaryChannelsTest::SendHeTbPpdu(), WifiChannelSwitchingTest::SendPacket(), TestInterBssConstantObssPdAlgo::SetupSimulation(), OfdmaAckSequenceTest::Transmit(), and WifiUseAvailBwTest::Transmit().
uint32_t ns3::NetDeviceContainer::GetN | ( | ) | const |
Get the number of Ptr<NetDevice> stored in this container.
NetDevices 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 NetDevices
Definition at line 61 of file net-device-container.cc.
References m_devices.
Referenced by NodeStatistics::NodeStatistics(), ns3::SixLowPanHelper::AddContext(), ns3::Ipv4AddressHelper::Assign(), ns3::Ipv6AddressHelper::Assign(), ns3::PointToPointGridHelper::AssignIpv4Addresses(), ns3::PointToPointGridHelper::AssignIpv6Addresses(), ns3::Ipv6AddressHelper::AssignWithoutAddress(), ns3::Ipv6AddressHelper::AssignWithoutOnLink(), ns3::LteHelper::AttachToClosestEnb(), ns3::GlobalRouter::BuildNetworkLSAs(), ns3::NixVectorRouting< T >::BuildNixVector(), LteRadioLinkFailureTestCase::CheckIdle(), HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), ns3::GlobalRouter::DiscoverLSAs(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), OfdmaAckSequenceTest::DoRun(), ns3::GlobalRouter::FindAllNonBridgedDevicesOnLink(), ns3::NixVectorRouting< T >::FindNetDeviceForNixIndex(), ns3::NixVectorRouting< T >::FindTotalNeighbors(), ns3::SixLowPanHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::SixLowPanHelper::InvalidateContext(), ns3::NeighborCacheHelper::PopulateNeighborCache(), ns3::SixLowPanHelper::RemoveContext(), ns3::SixLowPanHelper::RenewContext(), NetAnimExperiment::Run(), Experiment::Run(), TestInterBssConstantObssPdAlgo::RunOne(), and OfdmaAckSequenceTest::Transmit().
NetDevices smart pointers.
Definition at line 200 of file net-device-container.h.
Referenced by NetDeviceContainer(), Add(), Begin(), End(), Get(), and GetN().