A Discrete-Event Network Simulator
API
ns3::MobilityHelper Class Reference

Helper class used to assign positions and mobility models to nodes. More...

#include "mobility-helper.h"

+ Collaboration diagram for ns3::MobilityHelper:

Public Member Functions

 MobilityHelper ()
 Construct a Mobility Helper which is used to make life easier when working with mobility models. More...
 
 ~MobilityHelper ()
 Destroy a Mobility Helper. More...
 
int64_t AssignStreams (NodeContainer c, int64_t stream)
 Assign a fixed random variable stream number to the random variables used by the mobility models (including any position allocators assigned specifically to the model) on these nodes. More...
 
std::string GetMobilityModelType (void) const
 
void Install (Ptr< Node > node) const
 "Layout" a single node according to the current position allocator type. More...
 
void Install (std::string nodeName) const
 "Layout" a single node according to the current position allocator type. More...
 
void Install (NodeContainer container) const
 Layout a collection of nodes according to the current position allocator type. More...
 
void InstallAll (void)
 Perform the work of MobilityHelper::Install on all nodes which exist in the simulation. More...
 
void PopReferenceMobilityModel (void)
 Remove the top item from the top of the stack of "reference mobility models". More...
 
void PushReferenceMobilityModel (Ptr< Object > reference)
 
void PushReferenceMobilityModel (std::string referenceName)
 
void SetMobilityModel (std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
 
void SetPositionAllocator (Ptr< PositionAllocator > allocator)
 Set the position allocator which will be used to allocate the initial position of every node initialized during MobilityModel::Install. More...
 
void SetPositionAllocator (std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
 

Static Public Member Functions

static void EnableAscii (Ptr< OutputStreamWrapper > stream, uint32_t nodeid)
 
static void EnableAscii (Ptr< OutputStreamWrapper > stream, NodeContainer n)
 
static void EnableAsciiAll (Ptr< OutputStreamWrapper > stream)
 
static double GetDistanceSquaredBetween (Ptr< Node > n1, Ptr< Node > n2)
 

Static Private Member Functions

static void CourseChanged (Ptr< OutputStreamWrapper > stream, Ptr< const MobilityModel > mobility)
 Output course change events from mobility model to output stream. More...
 

Private Attributes

ObjectFactory m_mobility
 Object factory to create mobility objects. More...
 
std::vector< Ptr< MobilityModel > > m_mobilityStack
 Internal stack of mobility models. More...
 
Ptr< PositionAllocatorm_position
 Position allocator for use in hierarchical mobility model. More...
 

Detailed Description

Helper class used to assign positions and mobility models to nodes.

MobilityHelper::Install is the most important method here.

Definition at line 42 of file mobility-helper.h.

Constructor & Destructor Documentation

ns3::MobilityHelper::MobilityHelper ( )

Construct a Mobility Helper which is used to make life easier when working with mobility models.

Definition at line 36 of file mobility-helper.cc.

References m_mobility, m_position, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

ns3::MobilityHelper::~MobilityHelper ( )

Destroy a Mobility Helper.

Definition at line 43 of file mobility-helper.cc.

Member Function Documentation

int64_t ns3::MobilityHelper::AssignStreams ( NodeContainer  c,
int64_t  stream 
)

Assign a fixed random variable stream number to the random variables used by the mobility models (including any position allocators assigned specifically to the model) on these nodes.

Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.

Parameters
streamfirst stream index to use
cNodeContainer of the set of nodes for which the MobilityModels should be modified to use a fixed stream
Returns
the number of stream indices assigned by this helper

Definition at line 256 of file mobility-helper.cc.

References ns3::MobilityModel::AssignStreams(), ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Object::GetObject(), and third::mobility.

Referenced by MobilityTraceTestCase::DoRun(), RoutingExperiment::Run(), and VanetRoutingExperiment::SetupAdhocMobilityNodes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MobilityHelper::CourseChanged ( Ptr< OutputStreamWrapper stream,
Ptr< const MobilityModel mobility 
)
staticprivate

Output course change events from mobility model to output stream.

Parameters
streamoutput stream
mobilitymobility model

Definition at line 209 of file mobility-helper.cc.

References ns3::DoRound(), ns3::Node::GetId(), ns3::OutputStreamWrapper::GetStream(), and ns3::Simulator::Now().

Referenced by EnableAscii().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MobilityHelper::EnableAscii ( Ptr< OutputStreamWrapper stream,
uint32_t  nodeid 
)
static
Parameters
streaman output stream wrapper
nodeidthe id of the node to generate ascii output for.

Enable ascii output on the mobility model associated to the specified nodeid and dump that to the specified stdc++ output stream.

Definition at line 235 of file mobility-helper.cc.

References ns3::Config::ConnectWithoutContext(), CourseChanged(), and ns3::MakeBoundCallback().

Referenced by EnableAscii(), and EnableAsciiAll().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MobilityHelper::EnableAscii ( Ptr< OutputStreamWrapper stream,
NodeContainer  n 
)
static
Parameters
streaman output stream wrapper
nnode container

Enable ascii output on the mobility model associated each of the nodes in the input container and dump that to the specified stdc++ output stream.

Definition at line 243 of file mobility-helper.cc.

References ns3::NodeContainer::Begin(), EnableAscii(), and ns3::NodeContainer::End().

+ Here is the call graph for this function:

void ns3::MobilityHelper::EnableAsciiAll ( Ptr< OutputStreamWrapper stream)
static
Parameters
streaman output stream wrapper

Enable ascii output on the mobility model associated every node in the system and dump that to the specified stdc++ output stream.

Definition at line 251 of file mobility-helper.cc.

References EnableAscii(), and ns3::NodeContainer::GetGlobal().

+ Here is the call graph for this function:

double ns3::MobilityHelper::GetDistanceSquaredBetween ( Ptr< Node n1,
Ptr< Node n2 
)
static
Parameters
n1node 1
n2node 2
Returns
the distance (squared), in meters, between two nodes

Definition at line 274 of file mobility-helper.cc.

References ns3::Object::GetObject(), NS_ASSERT, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::BsmApplication::GenerateWaveTraffic(), and ns3::BsmApplication::HandleReceivedBsmPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::MobilityHelper::GetMobilityModelType ( void  ) const
Returns
a string which contains the TypeId of the currently-selected mobility model.

Definition at line 124 of file mobility-helper.cc.

References ns3::TypeId::GetName(), ns3::ObjectFactory::GetTypeId(), and m_mobility.

+ Here is the call graph for this function:

void ns3::MobilityHelper::Install ( Ptr< Node node) const

"Layout" a single node according to the current position allocator type.

This method creates an instance of a ns3::MobilityModel subclass (the type of which was set with MobilityHelper::SetMobilityModel), aggregates it to the provided node, and sets an initial position based on the current position allocator (set through MobilityHelper::SetPositionAllocator).

Parameters
nodeThe node to "layout."

Definition at line 130 of file mobility-helper.cc.

References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), ns3::TypeId::GetName(), ns3::Object::GetObject(), ns3::ObjectFactory::GetTypeId(), m_mobility, m_mobilityStack, m_position, NS_FATAL_ERROR, NS_LOG_DEBUG, and ns3::MobilityModel::SetPosition().

Referenced by AdvancePosition(), AodvqRegressionTestSuite::AodvqRegressionTestSuite(), CalculateThroughput(), ChangePosition(), ChangeSignalAndReportRate(), ConvertStringToStandard(), CourseChange(), CourseChangeCallback(), PeerManagementProtocolRegressionTest::CreateNodes(), Bug772ChainTest::CreateNodes(), HwmpProactiveRegressionTest::CreateNodes(), FlameRegressionTest::CreateNodes(), HwmpDoRfRegressionTest::CreateNodes(), HwmpSimplestRegressionTest::CreateNodes(), HwmpReactiveRegressionTest::CreateNodes(), MeshTest::CreateNodes(), ChainRegressionTest::CreateNodes(), WaveNetDeviceExample::CreateWaveNodes(), TestCaseHelper::CreatWaveDevice(), WifiMsduAggregatorThroughputTest::DoRun(), WifiAcMappingTest::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), MobilityTraceTestCase::DoRun(), LenaMimoTestCase::DoRun(), LenaHarqTestCase::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), RandomRoomPositionAllocatorTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LteLinkAdaptationTestCase::DoRun(), LteSecondaryCellSelectionTestCase::DoRun(), SpectrumIdealPhyTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), LteHandoverDelayTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), CarrierAggregationConfigTestCase::DoRun(), BuildingsHelperOneTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LteUeMeasurementsTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), SameRoomPositionAllocatorTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), WaypointMobilityModelViaHelper::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), Bug730TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), Bug2222TestCase::DoRun(), Bug2483TestCase::DoRun(), Experiment::GenerateTraffic(), GenerateTraffic(), LteAggregationThroughputScaleTestCase::GetThroughput(), Install(), InstallAll(), ns3::TvSpectrumTransmitterHelper::InstallRandomRegionalTransmitters(), LteFadingTestSuite::LteFadingTestSuite(), MonitorSniffRx(), NotifyHandoverEndOkEnb(), PhyStateTrace(), GlobalPathlossDatabase::Print(), PrintGnuplottableEnbListToFile(), RateCallback(), Ratio(), ReceivePacket(), NetAnimExperiment::Run(), RoutingExperiment::Run(), Experiment::Run(), SendPacket(), StaWifiMacScanningTestCase::Setup(), VanetRoutingExperiment::SetupAdhocMobilityNodes(), DsdvManetExample::SetupMobility(), DsdvqManetExample::SetupMobility(), SetupPacketReceive(), UanExperiment::SetupPositions(), static_SpectrumModelWifi5180MHz_initializer::static_SpectrumModelWifi5180MHz_initializer(), TotalEnergy(), TotalEnergyHarvested(), TxCallback(), and WifiInterferenceTestCase::WifiSimpleInterference().

+ Here is the call graph for this function:

void ns3::MobilityHelper::Install ( std::string  nodeName) const

"Layout" a single node according to the current position allocator type.

This method creates an instance of a ns3::MobilityModel subclass (the type of which was set with MobilityHelper::SetMobilityModel), aggregates it to the provided node, and sets an initial position based on the current position allocator (set through MobilityHelper::SetPositionAllocator).

Parameters
nodeNameThe name of the node to "layout."

Definition at line 163 of file mobility-helper.cc.

References Install().

+ Here is the call graph for this function:

void ns3::MobilityHelper::Install ( NodeContainer  container) const

Layout a collection of nodes according to the current position allocator type.

For each node in the provided NodeContainer, this method creates an instance of a ns3::MobilityModel subclass (the type of which was set with MobilityHelper::SetMobilityModel), aggregates it to the node, and sets an initial position based on the current position allocator (set through MobilityHelper::SetPositionAllocator).

Parameters
containerThe set of nodes to layout.

Definition at line 169 of file mobility-helper.cc.

References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), and Install().

+ Here is the call graph for this function:

void ns3::MobilityHelper::InstallAll ( void  )

Perform the work of MobilityHelper::Install on all nodes which exist in the simulation.

Definition at line 178 of file mobility-helper.cc.

References ns3::NodeContainer::GetGlobal(), and Install().

Referenced by CourseChange().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MobilityHelper::PopReferenceMobilityModel ( void  )

Remove the top item from the top of the stack of "reference mobility models".

Definition at line 117 of file mobility-helper.cc.

References m_mobilityStack.

void ns3::MobilityHelper::PushReferenceMobilityModel ( Ptr< Object reference)
Parameters
referenceitem to push.

Push an item on the top of the stack of "reference mobility models". The input item should be a node instance to which a mobility model has already been aggregated (usually by a call to Install).

If this stack is not empty when MobilityHelper::Install is called, the model from the top of the stack is used to create a ns3::HierarchicalMobilityModel to make the newly-created models define their positions relative to that of the parent mobility model.

This method is typically used to create hierarchical mobility patterns and positions by starting with the large-scale mobility features, and, then, defining the smaller-scale movements relative to a few reference points in the large-scale model.

Definition at line 103 of file mobility-helper.cc.

References ns3::Object::GetObject(), m_mobilityStack, and third::mobility.

Referenced by CourseChangeCallback().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MobilityHelper::PushReferenceMobilityModel ( std::string  referenceName)
Parameters
referenceNamenamed item to push.

Push an item on the top of the stack of "reference mobility models". The input item should be a node instance to which a mobility model has already been aggregated (usually by a call to Install).

If this stack is not empty when MobilityHelper::Install is called, the model from the top of the stack is used to create a ns3::HierarchicalMobilityModel to make the newly-created models define their positions relative to that of the parent mobility model.

This method is typically used to create hierarchical mobility patterns and positions by starting with the large-scale mobility features, and, then, defining the smaller-scale movements relative to a few reference points in the large-scale model.

Definition at line 110 of file mobility-helper.cc.

References m_mobilityStack, and third::mobility.

void ns3::MobilityHelper::SetMobilityModel ( std::string  type,
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue (),
std::string  n8 = "",
const AttributeValue v8 = EmptyAttributeValue (),
std::string  n9 = "",
const AttributeValue v9 = EmptyAttributeValue () 
)
Parameters
typethe type of mobility model to use.
n1the name of the attribute to set in the mobility model.
v1the value of the attribute to set in the mobility model.
n2the name of the attribute to set in the mobility model.
v2the value of the attribute to set in the mobility model.
n3the name of the attribute to set in the mobility model.
v3the value of the attribute to set in the mobility model.
n4the name of the attribute to set in the mobility model.
v4the value of the attribute to set in the mobility model.
n5the name of the attribute to set in the mobility model.
v5the value of the attribute to set in the mobility model.
n6the name of the attribute to set in the mobility model.
v6the value of the attribute to set in the mobility model.
n7the name of the attribute to set in the mobility model.
v7the value of the attribute to set in the mobility model.
n8the name of the attribute to set in the mobility model.
v8the value of the attribute to set in the mobility model.
n9the name of the attribute to set in the mobility model.
v9the value of the attribute to set in the mobility model.

Calls to MobilityHelper::Install will create an instance of a matching mobility model for each node.

Definition at line 79 of file mobility-helper.cc.

References m_mobility, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

Referenced by AodvqRegressionTestSuite::AodvqRegressionTestSuite(), CalculateThroughput(), ChangePosition(), ChangeSignalAndReportRate(), ConvertStringToStandard(), CourseChange(), CourseChangeCallback(), PeerManagementProtocolRegressionTest::CreateNodes(), Bug772ChainTest::CreateNodes(), HwmpProactiveRegressionTest::CreateNodes(), FlameRegressionTest::CreateNodes(), HwmpDoRfRegressionTest::CreateNodes(), HwmpSimplestRegressionTest::CreateNodes(), HwmpReactiveRegressionTest::CreateNodes(), MeshTest::CreateNodes(), ChainRegressionTest::CreateNodes(), WaveNetDeviceExample::CreateWaveNodes(), TestCaseHelper::CreatWaveDevice(), WifiMsduAggregatorThroughputTest::DoRun(), WifiAcMappingTest::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), MobilityTraceTestCase::DoRun(), LenaMimoTestCase::DoRun(), LenaHarqTestCase::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), RandomRoomPositionAllocatorTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LteLinkAdaptationTestCase::DoRun(), LteSecondaryCellSelectionTestCase::DoRun(), SpectrumIdealPhyTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), LteHandoverDelayTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), CarrierAggregationConfigTestCase::DoRun(), BuildingsHelperOneTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LteUeMeasurementsTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), SameRoomPositionAllocatorTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), WaypointMobilityModelViaHelper::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), Bug730TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), Bug2222TestCase::DoRun(), Bug2483TestCase::DoRun(), Experiment::GenerateTraffic(), GenerateTraffic(), LteAggregationThroughputScaleTestCase::GetThroughput(), ns3::TvSpectrumTransmitterHelper::InstallRandomRegionalTransmitters(), LteFadingTestSuite::LteFadingTestSuite(), MonitorSniffRx(), NotifyHandoverEndOkEnb(), PhyStateTrace(), GlobalPathlossDatabase::Print(), PrintGnuplottableEnbListToFile(), RateCallback(), Ratio(), ReceivePacket(), NetAnimExperiment::Run(), RoutingExperiment::Run(), Experiment::Run(), SendPacket(), StaWifiMacScanningTestCase::Setup(), VanetRoutingExperiment::SetupAdhocMobilityNodes(), DsdvManetExample::SetupMobility(), DsdvqManetExample::SetupMobility(), SetupPacketReceive(), UanExperiment::SetupPositions(), static_SpectrumModelWifi5180MHz_initializer::static_SpectrumModelWifi5180MHz_initializer(), TotalEnergy(), TotalEnergyHarvested(), TxCallback(), and WifiInterferenceTestCase::WifiSimpleInterference().

+ Here is the call graph for this function:

void ns3::MobilityHelper::SetPositionAllocator ( Ptr< PositionAllocator allocator)

Set the position allocator which will be used to allocate the initial position of every node initialized during MobilityModel::Install.

Parameters
allocatorallocate initial node positions

Definition at line 47 of file mobility-helper.cc.

References m_position.

Referenced by AodvqRegressionTestSuite::AodvqRegressionTestSuite(), CalculateThroughput(), ChangeSignalAndReportRate(), ConvertStringToStandard(), CourseChange(), CourseChangeCallback(), PeerManagementProtocolRegressionTest::CreateNodes(), Bug772ChainTest::CreateNodes(), HwmpProactiveRegressionTest::CreateNodes(), FlameRegressionTest::CreateNodes(), HwmpDoRfRegressionTest::CreateNodes(), HwmpSimplestRegressionTest::CreateNodes(), HwmpReactiveRegressionTest::CreateNodes(), MeshTest::CreateNodes(), ChainRegressionTest::CreateNodes(), WaveNetDeviceExample::CreateWaveNodes(), WifiMsduAggregatorThroughputTest::DoRun(), WifiAcMappingTest::DoRun(), MobilityTraceTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), RandomRoomPositionAllocatorTestCase::DoRun(), SpectrumIdealPhyTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteHandoverDelayTestCase::DoRun(), LteCqiGenerationTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), CarrierAggregationConfigTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteUeMeasurementsTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteCqiGenerationDlPowerControlTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), SameRoomPositionAllocatorTestCase::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), WaypointMobilityModelViaHelper::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), Bug730TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), Bug2222TestCase::DoRun(), Bug2483TestCase::DoRun(), Experiment::GenerateTraffic(), GenerateTraffic(), ns3::TvSpectrumTransmitterHelper::InstallRandomRegionalTransmitters(), MonitorSniffRx(), NotifyHandoverEndOkEnb(), PhyStateTrace(), PrintGnuplottableEnbListToFile(), RateCallback(), Ratio(), ReceivePacket(), NetAnimExperiment::Run(), RoutingExperiment::Run(), Experiment::Run(), SendPacket(), StaWifiMacScanningTestCase::Setup(), VanetRoutingExperiment::SetupAdhocMobilityNodes(), DsdvqManetExample::SetupMobility(), DsdvManetExample::SetupMobility(), SetupPacketReceive(), static_SpectrumModelWifi5180MHz_initializer::static_SpectrumModelWifi5180MHz_initializer(), TotalEnergy(), TotalEnergyHarvested(), TxCallback(), and WifiInterferenceTestCase::WifiSimpleInterference().

void ns3::MobilityHelper::SetPositionAllocator ( std::string  type,
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue (),
std::string  n8 = "",
const AttributeValue v8 = EmptyAttributeValue (),
std::string  n9 = "",
const AttributeValue v9 = EmptyAttributeValue () 
)
Parameters
typethe type of mobility model to use.
n1the name of the attribute to set in the mobility model.
v1the value of the attribute to set in the mobility model.
n2the name of the attribute to set in the mobility model.
v2the value of the attribute to set in the mobility model.
n3the name of the attribute to set in the mobility model.
v3the value of the attribute to set in the mobility model.
n4the name of the attribute to set in the mobility model.
v4the value of the attribute to set in the mobility model.
n5the name of the attribute to set in the mobility model.
v5the value of the attribute to set in the mobility model.
n6the name of the attribute to set in the mobility model.
v6the value of the attribute to set in the mobility model.
n7the name of the attribute to set in the mobility model.
v7the value of the attribute to set in the mobility model.
n8the name of the attribute to set in the mobility model.
v8the value of the attribute to set in the mobility model.
n9the name of the attribute to set in the mobility model.
v9the value of the attribute to set in the mobility model.

Definition at line 53 of file mobility-helper.cc.

References ns3::ObjectFactory::Create(), ns3::Object::GetObject(), m_position, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

Member Data Documentation

ObjectFactory ns3::MobilityHelper::m_mobility
private

Object factory to create mobility objects.

Definition at line 279 of file mobility-helper.h.

Referenced by GetMobilityModelType(), Install(), MobilityHelper(), and SetMobilityModel().

std::vector<Ptr<MobilityModel> > ns3::MobilityHelper::m_mobilityStack
private

Internal stack of mobility models.

Definition at line 278 of file mobility-helper.h.

Referenced by Install(), PopReferenceMobilityModel(), and PushReferenceMobilityModel().

Ptr<PositionAllocator> ns3::MobilityHelper::m_position
private

Position allocator for use in hierarchical mobility model.

Definition at line 280 of file mobility-helper.h.

Referenced by Install(), MobilityHelper(), and SetPositionAllocator().


The documentation for this class was generated from the following files: