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 31 of file net-device-container.h.
typedef std::vector<Ptr<NetDevice>>::const_iterator ns3::NetDeviceContainer::Iterator |
NetDevice container iterator.
Definition at line 35 of file net-device-container.h.
ns3::NetDeviceContainer::NetDeviceContainer | ( | ) |
Create an empty NetDeviceContainer.
Definition at line 16 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 20 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 25 of file net-device-container.cc.
References ns3::Names::Find(), and 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 31 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 62 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(), CarrierAggregationConfigTestCase::DoRun(), ChannelTest::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaStarTestCase::DoRun(), DhcpTestCase::DoRun(), DuplicateTest::DoRun(), DynamicNeighborCacheTest::DoRun(), DynamicPartialTest::DoRun(), FlushTest::DoRun(), IcmpEchoReplyTestCase::DoRun(), IcmpV6EchoReplyTestCase::DoRun(), InterfaceContainerTest::DoRun(), IpAddressHelperTestCasev6::DoRun(), Ipv4RipCountToInfinityTest::DoRun(), Ipv4RipSplitHorizonStrategyTest::DoRun(), Ipv4RipTest::DoRun(), Ipv6RipngCountToInfinityTest::DoRun(), Ipv6RipngSplitHorizonStrategyTest::DoRun(), Ipv6RipngTest::DoRun(), LteCellSelectionTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), NetDeviceContainerTest::DoRun(), RadvdTestCase::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), TestUnsupportedModulationReception::DoRun(), UdpClientServerTestCase::DoRun(), UdpEchoClientSetFillTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), WifiUseAvailBwTest::DoRun(), AidAssignmentTest::DoSetup(), BridgeTest::DoSetup(), TwoBridgeTest::DoSetup(), TwoLanTest::DoSetup(), TwoLinkTest::DoSetup(), WifiPrimaryChannelsTest::DoSetup(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::GlobalRouter::FindAllNonBridgedDevicesOnLink(), ns3::NixVectorRouting< T >::GetAdjacentNetDevices(), ns3::BridgeHelper::Install(), ns3::CsmaHelper::Install(), ns3::FdNetDeviceHelper::Install(), ns3::OpenFlowSwitchHelper::Install(), ns3::OpenFlowSwitchHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), ns3::SixLowPanHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), 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 71 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 77 of file net-device-container.cc.
References ns3::Names::Find(), and 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 38 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::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::LteHelper::AttachToClosestEnb(), ns3::NixVectorRouting< T >::BFS(), ns3::NixVectorRouting< T >::BuildNixVector(), LteRadioLinkFailureTestCase::CheckConnected(), ns3::LrWpanHelper::CreateAssociatedPan(), LteCellSelectionTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::BridgeHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::OpenFlowSwitchHelper::Install(), ns3::OpenFlowSwitchHelper::Install(), ns3::TrafficControlHelper::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 44 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::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::LteHelper::AttachToClosestEnb(), ns3::NixVectorRouting< T >::BFS(), ns3::NixVectorRouting< T >::BuildNixVector(), LteRadioLinkFailureTestCase::CheckConnected(), ns3::LrWpanHelper::CreateAssociatedPan(), LteCellSelectionTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::BridgeHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::OpenFlowSwitchHelper::Install(), ns3::OpenFlowSwitchHelper::Install(), ns3::TrafficControlHelper::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 56 of file net-device-container.cc.
References m_devices.
Referenced by ns3::CsmaStarHelper::CsmaStarHelper(), ns3::EmuEpcHelper::EmuEpcHelper(), ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), ns3::PointToPointStarHelper::PointToPointStarHelper(), ns3::SixLowPanHelper::AddContext(), ns3::EmuEpcHelper::AddEnb(), ns3::Ipv4AddressHelper::Assign(), ns3::Ipv6AddressHelper::Assign(), ns3::CsmaStarHelper::AssignIpv4Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv4Addresses(), ns3::PointToPointGridHelper::AssignIpv4Addresses(), ns3::PointToPointStarHelper::AssignIpv4Addresses(), ns3::CsmaStarHelper::AssignIpv6Addresses(), ns3::PointToPointDumbbellHelper::AssignIpv6Addresses(), ns3::PointToPointGridHelper::AssignIpv6Addresses(), ns3::PointToPointStarHelper::AssignIpv6Addresses(), ns3::GlobalRouter::BuildNetworkLSAs(), WifiPrimaryChannelsTest::CheckAssociation(), LteRadioLinkFailureTestCase::CheckIdle(), OfdmaAckSequenceTest::CheckResults(), WifiTxopTest::CheckResults(), WifiUseAvailBwTest::CheckResults(), ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), AidAssignmentTest::DoRun(), Bug2222TestCase::DoRun(), Bug2843TestCase::DoRun(), CarrierAggregationConfigTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), CsmaStarTestCase::DoRun(), DhcpTestCase::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), IdealRateManagerChannelWidthTest::DoRun(), IdealRateManagerMimoTest::DoRun(), Ipv4FragmentationTest::DoRun(), Ipv4PacketInfoTagTest::DoRun(), Ipv4RawSocketImplTest::DoRun(), Ipv6DadTest::DoRun(), Ipv6ForwardingTest::DoRun(), Ipv6PacketInfoTagTest::DoRun(), Ipv6RawSocketImplTest::DoRun(), Issue169TestCase::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(), LteCellSelectionTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteRlcAmE2eTestCase::DoRun(), LteRlcUmE2eTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::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(), NixVectorRoutingTest::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), ns3::TcpGeneralTest::DoRun(), Ns3TcpCubicTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), Ns3WimaxManagementConnectionsTestCase::DoRun(), Ns3WimaxNetworkEntryTestCase::DoRun(), Ns3WimaxSfCreationTestCase::DoRun(), OfdmaAckSequenceTest::DoRun(), PingTestCase::DoRun(), RadvdTestCase::DoRun(), SetChannelFrequencyTest::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), TcFlowControlTestCase::DoRun(), TestUnsupportedModulationReception::DoRun(), Udp6SocketImplTest::DoRun(), UdpSocketImplTest::DoRun(), WaveformGeneratorTestCase::DoRun(), WifiAcMappingTest::DoRun(), WifiPrimaryChannelsTest::DoRun(), WifiTxopTest::DoRun(), WifiUseAvailBwTest::DoRun(), Ns3WimaxSchedulingTestCase::DoRunOnce(), Ns3WimaxSFTypeTestCase::DoRunOnce(), Ns3WimaxSimpleOFDMTestCase::DoRunOnce(), WifiPrimaryChannelsTest::DoSendHeTbPpdu(), AidAssignmentTest::DoSetup(), BridgeTest::DoSetup(), EmlsrOperationsTestBase::DoSetup(), PingTestCase::DoSetup(), TwoBridgeTest::DoSetup(), WifiPrimaryChannelsTest::DoSetup(), ns3::WifiPhyRxTraceHelper::Enable(), 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(), Experiment::Run(), Experiment::Run(), NeighborCacheExample::Run(), NetAnimExperiment::Run(), Issue40TestCase::RunOne(), TestInterBssConstantObssPdAlgo::RunOne(), Bug2470TestCase::RunSubtest(), WifiPrimaryChannelsTest::SendDlMuPpdu(), WifiPrimaryChannelsTest::SendDlSuPpdu(), WifiPrimaryChannelsTest::SendHeTbPpdu(), WifiChannelSwitchingTest::SendPacket(), AidAssignmentTest::SetSsid(), TestInterBssConstantObssPdAlgo::SetupSimulation(), OfdmaAckSequenceTest::Transmit(), WifiTxopTest::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 50 of file net-device-container.cc.
References m_devices.
Referenced by ns3::SixLowPanHelper::AddContext(), ns3::Ipv4AddressHelper::Assign(), ns3::Ipv6AddressHelper::Assign(), ns3::Ipv6AddressHelper::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(), WifiTxopTest::CheckResults(), FlameRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), ns3::GlobalRouter::DiscoverLSAs(), AidAssignmentTest::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), OfdmaAckSequenceTest::DoRun(), AidAssignmentTest::DoSetup(), ns3::WifiPhyRxTraceHelper::Enable(), ns3::GlobalRouter::FindAllNonBridgedDevicesOnLink(), ns3::NixVectorRouting< T >::FindNetDeviceForNixIndex(), ns3::NixVectorRouting< T >::FindTotalNeighbors(), ns3::DeviceEnergyModelHelper::Install(), ns3::SixLowPanHelper::Install(), ns3::SixLowPanHelper::InvalidateContext(), ns3::NeighborCacheHelper::PopulateNeighborCache(), ns3::SixLowPanHelper::RemoveContext(), ns3::SixLowPanHelper::RenewContext(), Experiment::Run(), NetAnimExperiment::Run(), TestInterBssConstantObssPdAlgo::RunOne(), AidAssignmentTest::SetSsid(), and OfdmaAckSequenceTest::Transmit().
NetDevices smart pointers.
Definition at line 189 of file net-device-container.h.
Referenced by NetDeviceContainer(), NetDeviceContainer(), Add(), Add(), Add(), Begin(), End(), Get(), and GetN().