ns3::MobilityHelper Class Reference
[Mobility]
Helper class used to assign positions and mobility models to nodes.  
More...
#include <mobility-helper.h>
List of all members.
Public Member Functions | 
|   | MobilityHelper () | 
| void  | SetPositionAllocator (Ptr< PositionAllocator > allocator) | 
| 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()) | 
| 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  | PushReferenceMobilityModel (Ptr< Object > reference) | 
| void  | PushReferenceMobilityModel (std::string referenceName) | 
| void  | PopReferenceMobilityModel (void) | 
| std::string  | GetMobilityModelType (void) const  | 
| void  | Install (Ptr< Node > node) const  | 
|   | "Layout" a single node according to the current position allocator type.  
  | 
| void  | Install (std::string nodeName) const  | 
|   | "Layout" a single node according to the current position allocator type.  
  | 
| void  | Install (NodeContainer container) const  | 
|   | Layout a collection of nodes according to the current position allocator type.  
  | 
| void  | InstallAll (void) | 
Static Public Member Functions | 
| static void  | EnableAscii (std::ostream &os, uint32_t nodeid) | 
| static void  | EnableAscii (std::ostream &os, NodeContainer n) | 
| static void  | EnableAsciiAll (std::ostream &os) | 
Detailed Description
Helper class used to assign positions and mobility models to nodes. 
MobilityHelper::Install is the most important method here. 
Constructor & Destructor Documentation
      
        
          | ns3::MobilityHelper::MobilityHelper  | 
          ( | 
           | 
           )  | 
           | 
        
      
 
Construct a Mobility Helper which is used to make life easier when working with mobility models. 
 
 
Member Function Documentation
      
        
          | static void ns3::MobilityHelper::EnableAscii  | 
          ( | 
          std::ostream &  | 
           os,  | 
        
        
           | 
           | 
          NodeContainer  | 
           n |   | 
        
        
           | 
          ) | 
           |  |  [static] | 
        
      
 
- Parameters:
 - 
  
     | os  | output stream  | 
     | n  | node 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. 
 
 
      
        
          | static void ns3::MobilityHelper::EnableAscii  | 
          ( | 
          std::ostream &  | 
           os,  | 
        
        
           | 
           | 
          uint32_t  | 
           nodeid |   | 
        
        
           | 
          ) | 
           |  |  [static] | 
        
      
 
- Parameters:
 - 
  
     | os  | output stream  | 
     | nodeid  | the 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. 
 
 
      
        
          | static void ns3::MobilityHelper::EnableAsciiAll  | 
          ( | 
          std::ostream &  | 
           os | 
           )  | 
           [static] | 
        
      
 
- Parameters:
 - 
  
  
 
Enable ascii output on the mobility model associated every node in the system and dump that to the specified stdc++ output stream. 
 
 
      
        
          | std::string ns3::MobilityHelper::GetMobilityModelType  | 
          ( | 
          void  | 
           | 
           )  | 
           const | 
        
      
 
- Returns:
 - a string which contains the TypeId of the currently-selected mobility model. 
 
 
 
      
        
          | void ns3::MobilityHelper::Install  | 
          ( | 
          NodeContainer  | 
           container | 
           )  | 
           const | 
        
      
 
 
      
        
          | void ns3::MobilityHelper::Install  | 
          ( | 
          std::string  | 
           nodeName | 
           )  | 
           const | 
        
      
 
 
      
        
          | void ns3::MobilityHelper::Install  | 
          ( | 
          Ptr< Node >  | 
           node | 
           )  | 
           const | 
        
      
 
 
      
        
          | void ns3::MobilityHelper::InstallAll  | 
          ( | 
          void  | 
           | 
           )  | 
           | 
        
      
 
 
      
        
          | void ns3::MobilityHelper::PopReferenceMobilityModel  | 
          ( | 
          void  | 
           | 
           )  | 
           | 
        
      
 
Remove the top item from the top of the stack of "reference mobility models". 
 
 
      
        
          | void ns3::MobilityHelper::PushReferenceMobilityModel  | 
          ( | 
          std::string  | 
           referenceName | 
           )  | 
           | 
        
      
 
- Parameters:
 - 
  
     | referenceName  | named 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. 
 
 
      
        
          | void ns3::MobilityHelper::PushReferenceMobilityModel  | 
          ( | 
          Ptr< Object >  | 
           reference | 
           )  | 
           | 
        
      
 
- Parameters:
 - 
  
  
 
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. 
 
 
      
        
          | 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:
 - 
  
     | type  | the type of mobility model to use.  | 
     | n1  | the name of the attribute to set in the mobility model.  | 
     | v1  | the value of the attribute to set in the mobility model.  | 
     | n2  | the name of the attribute to set in the mobility model.  | 
     | v2  | the value of the attribute to set in the mobility model.  | 
     | n3  | the name of the attribute to set in the mobility model.  | 
     | v3  | the value of the attribute to set in the mobility model.  | 
     | n4  | the name of the attribute to set in the mobility model.  | 
     | v4  | the value of the attribute to set in the mobility model.  | 
     | n5  | the name of the attribute to set in the mobility model.  | 
     | v5  | the value of the attribute to set in the mobility model.  | 
     | n6  | the name of the attribute to set in the mobility model.  | 
     | v6  | the value of the attribute to set in the mobility model.  | 
     | n7  | the name of the attribute to set in the mobility model.  | 
     | v7  | the value of the attribute to set in the mobility model.  | 
     | n8  | the name of the attribute to set in the mobility model.  | 
     | v8  | the value of the attribute to set in the mobility model.  | 
     | n9  | the name of the attribute to set in the mobility model.  | 
     | v9  | the 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. 
 
 
      
        
          | 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:
 - 
  
     | type  | the type of mobility model to use.  | 
     | n1  | the name of the attribute to set in the mobility model.  | 
     | v1  | the value of the attribute to set in the mobility model.  | 
     | n2  | the name of the attribute to set in the mobility model.  | 
     | v2  | the value of the attribute to set in the mobility model.  | 
     | n3  | the name of the attribute to set in the mobility model.  | 
     | v3  | the value of the attribute to set in the mobility model.  | 
     | n4  | the name of the attribute to set in the mobility model.  | 
     | v4  | the value of the attribute to set in the mobility model.  | 
     | n5  | the name of the attribute to set in the mobility model.  | 
     | v5  | the value of the attribute to set in the mobility model.  | 
     | n6  | the name of the attribute to set in the mobility model.  | 
     | v6  | the value of the attribute to set in the mobility model.  | 
     | n7  | the name of the attribute to set in the mobility model.  | 
     | v7  | the value of the attribute to set in the mobility model.  | 
     | n8  | the name of the attribute to set in the mobility model.  | 
     | v8  | the value of the attribute to set in the mobility model.  | 
     | n9  | the name of the attribute to set in the mobility model.  | 
     | v9  | the value of the attribute to set in the mobility model.  | 
  
   
 
 
Set the position allocator which will be used to allocate the initial position of every node initialized during MobilityModel::Install.
- Parameters:
 - 
  
     | allocator  | allocate initial node positions  | 
  
   
 
 
The documentation for this class was generated from the following file:
- src/helper/mobility-helper.h