holds a vector of ns3::NetDevice pointers More...
#include <net-device-container.h>
Public Types | |
typedef std::vector< Ptr < NetDevice > >::const_iterator | Iterator |
Public Member Functions | |
NetDeviceContainer () | |
Create an empty NetDeviceContainer. More... | |
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. More... | |
NetDeviceContainer (const NetDeviceContainer &a, const NetDeviceContainer &b) | |
void | Add (NetDeviceContainer other) |
Append the contents of another NetDeviceContainer to the end of this container. More... | |
void | Add (Ptr< NetDevice > device) |
Append a single Ptr<NetDevice> to this container. More... | |
void | Add (std::string deviceName) |
Append to this container the single Ptr<NetDevice> referred to via its object name service registered name. More... | |
Iterator | Begin (void) const |
Get an iterator which refers to the first NetDevice in the container. More... | |
Iterator | End (void) const |
Get an iterator which indicates past-the-last NetDevice in the container. More... | |
Ptr< NetDevice > | Get (uint32_t i) const |
Get the Ptr<NetDevice> stored in this container at a given index. More... | |
uint32_t | GetN (void) const |
Get the number of Ptr<NetDevice> stored in this container. More... | |
Private Attributes | |
std::vector< Ptr< NetDevice > > | m_devices |
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 41 of file net-device-container.h.
typedef std::vector<Ptr<NetDevice> >::const_iterator ns3::NetDeviceContainer::Iterator |
Definition at line 44 of file net-device-container.h.
ns3::NetDeviceContainer::NetDeviceContainer | ( | ) |
Create an empty NetDeviceContainer.
Definition at line 26 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 29 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 33 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 38 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 67 of file net-device-container.cc.
References Begin(), End(), and m_devices.
Referenced by ns3::PointToPointDumbbellHelper::AssignIpv4Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv6Addresses(), ns3::CsmaStarHelper::CsmaStarHelper(), IpAddressHelperTestCasev6::DoRun(), UdpClientServerTestCase::DoRun(), CsmaBridgeTestCase::DoRun(), ns3::LteCellSelectionTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), UdpEchoClientSetFillTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaStarTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForDevice::EnablePcap(), ns3::Ipv4NixVectorRouting::GetAdjacentNetDevices(), ns3::SixLowPanHelper::Install(), ns3::FdNetDeviceHelper::Install(), ns3::EmuHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::PointToPointHelper::Install(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::WifiHelper::Install(), ns3::MeshHelper::Install(), ns3::WimaxHelper::Install(), ns3::CsmaHelper::Install(), ns3::UanHelper::Install(), ns3::LteSimpleHelper::InstallEnbDevice(), ns3::LteHelper::InstallEnbDevice(), ns3::LteSimpleHelper::InstallUeDevice(), ns3::LteHelper::InstallUeDevice(), main(), NetDeviceContainer(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), ns3::PointToPointEpcHelper::PointToPointEpcHelper(), ns3::PointToPointGridHelper::PointToPointGridHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), ns3::GlobalRouter::ProcessBridgedBroadcastLink(), ns3::GlobalRouter::ProcessSingleBroadcastLink(), ns3::LteHexGridEnbTopologyHelper::SetPositionAndInstallEnbDevice(), and WifiInterferenceTestCase::WifiSimpleInterference().
Append a single Ptr<NetDevice> to this container.
device | The Ptr<NetDevice> to append. |
Definition at line 75 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 80 of file net-device-container.cc.
References m_devices.
NetDeviceContainer::Iterator ns3::NetDeviceContainer::Begin | ( | void | ) | 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 46 of file net-device-container.cc.
References m_devices.
Referenced by ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), Add(), ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(), ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(), ns3::SixLowPanHelper::AssignStreams(), ns3::WifiHelper::AssignStreams(), ns3::MeshHelper::AssignStreams(), ns3::CsmaHelper::AssignStreams(), ns3::UanHelper::AssignStreams(), ns3::WimaxHelper::AssignStreams(), ns3::LteHelper::AssignStreams(), ns3::LteHelper::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::Ipv4NixVectorRouting::BFS(), ns3::Ipv4NixVectorRouting::BuildNixVector(), ns3::LteRrcConnectionEstablishmentTestCase::DoRun(), ns3::LteX2HandoverTestCase::DoRun(), ns3::LteX2HandoverMeasuresTestCase::DoRun(), ns3::LteEpcE2eDataTestCase::DoRun(), ns3::LteCellSelectionTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForDevice::EnablePcap(), ns3::BridgeHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), main(), and MeshTest::Report().
NetDeviceContainer::Iterator ns3::NetDeviceContainer::End | ( | void | ) | 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 51 of file net-device-container.cc.
References m_devices.
Referenced by ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), Add(), ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(), ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(), ns3::SixLowPanHelper::AssignStreams(), ns3::WifiHelper::AssignStreams(), ns3::MeshHelper::AssignStreams(), ns3::CsmaHelper::AssignStreams(), ns3::UanHelper::AssignStreams(), ns3::WimaxHelper::AssignStreams(), ns3::LteHelper::AssignStreams(), ns3::LteHelper::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::Ipv4NixVectorRouting::BFS(), ns3::Ipv4NixVectorRouting::BuildNixVector(), ns3::LteRrcConnectionEstablishmentTestCase::DoRun(), ns3::LteX2HandoverTestCase::DoRun(), ns3::LteX2HandoverMeasuresTestCase::DoRun(), ns3::LteEpcE2eDataTestCase::DoRun(), ns3::LteCellSelectionTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForDevice::EnablePcap(), ns3::BridgeHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), main(), and MeshTest::Report().
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 62 of file net-device-container.cc.
References m_devices.
Referenced by ns3::PointToPointEpcHelper::AddEnb(), ns3::PointToPointEpcHelper::AddX2Interface(), ns3::Ipv6AddressHelper::Assign(), ns3::Ipv4AddressHelper::Assign(), ns3::PointToPointStarHelper::AssignIpv4Addresses(), ns3::PointToPointGridHelper::AssignIpv4Addresses(), ns3::CsmaStarHelper::AssignIpv4Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv4Addresses(), ns3::PointToPointStarHelper::AssignIpv6Addresses(), ns3::PointToPointGridHelper::AssignIpv6Addresses(), ns3::CsmaStarHelper::AssignIpv6Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv6Addresses(), ns3::GlobalRouter::BuildNetworkLSAs(), ns3::aodv::Bug772ChainTest::CreateDevices(), ns3::LenaMimoTestCase::DoRun(), ns3::LenaHarqTestCase::DoRun(), ns3::LenaRrFfMacSchedulerTestCase::DoRun(), ns3::LteRlcUmE2eTestCase::DoRun(), ns3::LteRrcConnectionEstablishmentTestCase::DoRun(), ns3::LenaDataPhyErrorModelTestCase::DoRun(), ns3::LteRlcAmE2eTestCase::DoRun(), ns3::LenaPfFfMacSchedulerTestCase1::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), ns3::LenaTdBetFfMacSchedulerTestCase1::DoRun(), ns3::LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), ns3::LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), ns3::LenaPssFfMacSchedulerTestCase1::DoRun(), ns3::LenaFdBetFfMacSchedulerTestCase1::DoRun(), ns3::LteLinkAdaptationTestCase::DoRun(), ns3::LteInterferenceTestCase::DoRun(), Ns3WimaxSfCreationTestCase::DoRun(), ns3::LtePathlossModelSystemTestCase::DoRun(), Ns3WimaxNetworkEntryTestCase::DoRun(), NscTcpLossTestCase1::DoRun(), ns3::LteEnbAntennaTestCase::DoRun(), CsmaBridgeTestCase::DoRun(), ns3::LteX2HandoverTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), ns3::LteUeMeasurementsTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), ns3::LenaPfFfMacSchedulerTestCase2::DoRun(), ns3::LenaTdBetFfMacSchedulerTestCase2::DoRun(), ns3::LenaFdBetFfMacSchedulerTestCase2::DoRun(), ns3::LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), ns3::LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), ns3::LenaPssFfMacSchedulerTestCase2::DoRun(), ns3::LenaDlCtrlPhyErrorModelTestCase::DoRun(), ns3::LteHandoverDelayTestCase::DoRun(), ns3::SpectrumIdealPhyTestCase::DoRun(), ns3::EpcS1uDlTestCase::DoRun(), ns3::LteX2HandoverMeasuresTestCase::DoRun(), ns3::LteEpcE2eDataTestCase::DoRun(), ns3::LteCellSelectionTestCase::DoRun(), Ns3WimaxManagementConnectionsTestCase::DoRun(), ns3::LteHandoverTargetTestCase::DoRun(), ns3::LteUeMeasurementsPiecewiseTestCase1::DoRun(), NscTcpLossTestCase2::DoRun(), ns3::LteUeMeasurementsPiecewiseTestCase2::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), ns3::LteUeMeasurementsHandoverTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), CsmaStarTestCase::DoRun(), Ns3WimaxSchedulingTestCase::DoRunOnce(), Ns3WimaxSimpleOFDMTestCase::DoRunOnce(), Ns3WimaxSFTypeTestCase::DoRunOnce(), ns3::Ipv4NixVectorRouting::FindNetDeviceForNixIndex(), ns3::SixLowPanHelper::Install(), ns3::LteFadingTestSuite::LteFadingTestSuite(), main(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), NetAnimExperiment::Run(), and Experiment::Run().
uint32_t ns3::NetDeviceContainer::GetN | ( | void | ) | 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 57 of file net-device-container.cc.
References m_devices.
Referenced by ns3::Ipv6AddressHelper::Assign(), ns3::Ipv4AddressHelper::Assign(), ns3::PointToPointGridHelper::AssignIpv4Addresses(), ns3::PointToPointGridHelper::AssignIpv6Addresses(), ns3::Ipv6AddressHelper::AssignWithoutAddress(), ns3::LteHelper::AttachToClosestEnb(), ns3::GlobalRouter::BuildNetworkLSAs(), ns3::Ipv4NixVectorRouting::BuildNixVector(), PeerManagementProtocolRegressionTest::CreateDevices(), ns3::aodv::Bug772ChainTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), ns3::aodv::ChainRegressionTest::CreateDevices(), ns3::olsr::Bug780Test::CreateNodes(), ns3::GlobalRouter::DiscoverLSAs(), ns3::LteX2HandoverTestCase::DoRun(), ns3::EpcS1uDlTestCase::DoRun(), ns3::LteX2HandoverMeasuresTestCase::DoRun(), ns3::LteCellSelectionTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), CsmaStarTestCase::DoRun(), ns3::Ipv4NixVectorRouting::FindNetDeviceForNixIndex(), ns3::Ipv4NixVectorRouting::FindTotalNeighbors(), ns3::SixLowPanHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), main(), NetAnimExperiment::Run(), and Experiment::Run().
Definition at line 198 of file net-device-container.h.
Referenced by Add(), Begin(), End(), Get(), GetN(), and NetDeviceContainer().