author | Pavel Boyko <boyko@iitp.ru> |
Mon, 02 Aug 2010 13:16:57 +0400 | |
changeset 6472 | 54ce45443509 |
parent 5362 | d31f56c9b7cb |
permissions | -rw-r--r-- |
2833
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
2 |
/* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
3 |
* Copyright (c) 2008 INRIA |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
4 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
7 |
* published by the Free Software Foundation; |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
8 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
12 |
* GNU General Public License for more details. |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
13 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
17 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2701
diff
changeset
|
19 |
*/ |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
20 |
|
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
21 |
#ifndef MOBILITY_HELPER_H |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
#define MOBILITY_HELPER_H |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
|
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
#include <vector> |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
#include "ns3/object-factory.h" |
2438
e2ac9f9aeeb9
value.h -> attribute.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
26 |
#include "ns3/attribute.h" |
2700
c54fbae72e8f
change signature of MobilityHelper::Layout and MobilityHelper::LayoutAll.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2603
diff
changeset
|
27 |
#include "ns3/position-allocator.h" |
c54fbae72e8f
change signature of MobilityHelper::Layout and MobilityHelper::LayoutAll.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2603
diff
changeset
|
28 |
#include "node-container.h" |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
29 |
|
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
namespace ns3 { |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
|
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
32 |
class PositionAllocator; |
2401
281ea8b13525
add hierarchical support to MobilityHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2399
diff
changeset
|
33 |
class MobilityModel; |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
|
2700
c54fbae72e8f
change signature of MobilityHelper::Layout and MobilityHelper::LayoutAll.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2603
diff
changeset
|
35 |
/** |
6472
54ce45443509
Mobility doxygen: all classes are documented and added to the mobility module. All public methods and fields should follow.
Pavel Boyko <boyko@iitp.ru>
parents:
5362
diff
changeset
|
36 |
* \ingroup mobility |
54ce45443509
Mobility doxygen: all classes are documented and added to the mobility module. All public methods and fields should follow.
Pavel Boyko <boyko@iitp.ru>
parents:
5362
diff
changeset
|
37 |
* \brief Helper class used to assign positions and mobility models to nodes. |
2701 | 38 |
* |
2995
b72805b3ca69
Align helper API use of Install()
Tom Henderson <tomh@tomh.org>
parents:
2897
diff
changeset
|
39 |
* MobilityHelper::Install is the most important method here. |
2700
c54fbae72e8f
change signature of MobilityHelper::Layout and MobilityHelper::LayoutAll.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2603
diff
changeset
|
40 |
*/ |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
41 |
class MobilityHelper |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
42 |
{ |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
43 |
public: |
5362 | 44 |
/** |
45 |
* Construct a Mobility Helper which is used to make life easier when working |
|
46 |
* with mobility models. |
|
47 |
*/ |
|
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
48 |
MobilityHelper (); |
5362 | 49 |
|
50 |
/** |
|
51 |
* \internal |
|
52 |
* Destroy a Mobility Helper |
|
53 |
*/ |
|
2897
cb427d45a011
avoid compilation warning about undefined MobilityModel class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
54 |
~MobilityHelper (); |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
55 |
|
2701 | 56 |
/** |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
57 |
* Set the position allocator which will be used to allocate the initial |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
58 |
* position of every node initialized during MobilityModel::Install. |
2701 | 59 |
* |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
60 |
* \param allocator allocate initial node positions |
2701 | 61 |
*/ |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
62 |
void SetPositionAllocator (Ptr<PositionAllocator> allocator); |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
63 |
|
2701 | 64 |
/** |
65 |
* \param type the type of mobility model to use. |
|
66 |
* \param n1 the name of the attribute to set in the mobility model. |
|
67 |
* \param v1 the value of the attribute to set in the mobility model. |
|
68 |
* \param n2 the name of the attribute to set in the mobility model. |
|
69 |
* \param v2 the value of the attribute to set in the mobility model. |
|
70 |
* \param n3 the name of the attribute to set in the mobility model. |
|
71 |
* \param v3 the value of the attribute to set in the mobility model. |
|
72 |
* \param n4 the name of the attribute to set in the mobility model. |
|
73 |
* \param v4 the value of the attribute to set in the mobility model. |
|
74 |
* \param n5 the name of the attribute to set in the mobility model. |
|
75 |
* \param v5 the value of the attribute to set in the mobility model. |
|
76 |
* \param n6 the name of the attribute to set in the mobility model. |
|
77 |
* \param v6 the value of the attribute to set in the mobility model. |
|
78 |
* \param n7 the name of the attribute to set in the mobility model. |
|
79 |
* \param v7 the value of the attribute to set in the mobility model. |
|
80 |
* \param n8 the name of the attribute to set in the mobility model. |
|
81 |
* \param v8 the value of the attribute to set in the mobility model. |
|
82 |
* \param n9 the name of the attribute to set in the mobility model. |
|
83 |
* \param v9 the value of the attribute to set in the mobility model. |
|
84 |
*/ |
|
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
85 |
void SetPositionAllocator (std::string type, |
3786
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
86 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
87 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
88 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
89 |
std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
90 |
std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
91 |
std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
92 |
std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
93 |
std::string n8 = "", const AttributeValue &v8 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
94 |
std::string n9 = "", const AttributeValue &v9 = EmptyAttributeValue ()); |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
95 |
|
2701 | 96 |
/** |
97 |
* \param type the type of mobility model to use. |
|
98 |
* \param n1 the name of the attribute to set in the mobility model. |
|
99 |
* \param v1 the value of the attribute to set in the mobility model. |
|
100 |
* \param n2 the name of the attribute to set in the mobility model. |
|
101 |
* \param v2 the value of the attribute to set in the mobility model. |
|
102 |
* \param n3 the name of the attribute to set in the mobility model. |
|
103 |
* \param v3 the value of the attribute to set in the mobility model. |
|
104 |
* \param n4 the name of the attribute to set in the mobility model. |
|
105 |
* \param v4 the value of the attribute to set in the mobility model. |
|
106 |
* \param n5 the name of the attribute to set in the mobility model. |
|
107 |
* \param v5 the value of the attribute to set in the mobility model. |
|
108 |
* \param n6 the name of the attribute to set in the mobility model. |
|
109 |
* \param v6 the value of the attribute to set in the mobility model. |
|
110 |
* \param n7 the name of the attribute to set in the mobility model. |
|
111 |
* \param v7 the value of the attribute to set in the mobility model. |
|
112 |
* \param n8 the name of the attribute to set in the mobility model. |
|
113 |
* \param v8 the value of the attribute to set in the mobility model. |
|
114 |
* \param n9 the name of the attribute to set in the mobility model. |
|
115 |
* \param v9 the value of the attribute to set in the mobility model. |
|
116 |
* |
|
2995
b72805b3ca69
Align helper API use of Install()
Tom Henderson <tomh@tomh.org>
parents:
2897
diff
changeset
|
117 |
* Calls to MobilityHelper::Install will create an instance of a matching |
2701 | 118 |
* mobility model for each node. |
119 |
*/ |
|
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
120 |
void SetMobilityModel (std::string type, |
3786
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
121 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
122 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
123 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
124 |
std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
125 |
std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
126 |
std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
127 |
std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
128 |
std::string n8 = "", const AttributeValue &v8 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3491
diff
changeset
|
129 |
std::string n9 = "", const AttributeValue &v9 = EmptyAttributeValue ()); |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
130 |
|
2701 | 131 |
/** |
132 |
* \param reference item to push. |
|
133 |
* |
|
134 |
* Push an item on the top of the stack of "reference mobility models". |
|
135 |
* The input item should be a node instance to which a mobility model |
|
2995
b72805b3ca69
Align helper API use of Install()
Tom Henderson <tomh@tomh.org>
parents:
2897
diff
changeset
|
136 |
* has already been aggregated (usually by a call to Install). |
2701 | 137 |
* |
4481 | 138 |
* If this stack is not empty when MobilityHelper::Install |
2701 | 139 |
* is called, the model from the top of the stack is used |
140 |
* to create a ns3::HierarchicalMobilityModel to make the |
|
141 |
* newly-created models define their positions relative to that |
|
142 |
* of the parent mobility model. |
|
143 |
* |
|
144 |
* This method is typically used to create hierarchical mobility |
|
145 |
* patterns and positions by starting with the large-scale mobility |
|
146 |
* features, and, then, defining the smaller-scale movements relative |
|
147 |
* to a few reference points in the large-scale model. |
|
148 |
*/ |
|
2401
281ea8b13525
add hierarchical support to MobilityHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2399
diff
changeset
|
149 |
void PushReferenceMobilityModel (Ptr<Object> reference); |
2701 | 150 |
/** |
4481 | 151 |
* \param referenceName named item to push. |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
152 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
153 |
* Push an item on the top of the stack of "reference mobility models". |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
154 |
* The input item should be a node instance to which a mobility model |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
155 |
* has already been aggregated (usually by a call to Install). |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
156 |
* |
4481 | 157 |
* If this stack is not empty when MobilityHelper::Install |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
158 |
* is called, the model from the top of the stack is used |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
159 |
* to create a ns3::HierarchicalMobilityModel to make the |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
160 |
* newly-created models define their positions relative to that |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
161 |
* of the parent mobility model. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
162 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
163 |
* This method is typically used to create hierarchical mobility |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
164 |
* patterns and positions by starting with the large-scale mobility |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
165 |
* features, and, then, defining the smaller-scale movements relative |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
166 |
* to a few reference points in the large-scale model. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
167 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
168 |
void PushReferenceMobilityModel (std::string referenceName); |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
169 |
/** |
2701 | 170 |
* Remove the top item from the top of the stack of |
171 |
* "reference mobility models". |
|
172 |
*/ |
|
2401
281ea8b13525
add hierarchical support to MobilityHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2399
diff
changeset
|
173 |
void PopReferenceMobilityModel (void); |
281ea8b13525
add hierarchical support to MobilityHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2399
diff
changeset
|
174 |
|
2701 | 175 |
/** |
6472
54ce45443509
Mobility doxygen: all classes are documented and added to the mobility module. All public methods and fields should follow.
Pavel Boyko <boyko@iitp.ru>
parents:
5362
diff
changeset
|
176 |
* \return a string which contains the TypeId of the currently-selected |
2701 | 177 |
* mobility model. |
178 |
*/ |
|
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
179 |
std::string GetMobilityModelType (void) const; |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
180 |
|
2701 | 181 |
/** |
6472
54ce45443509
Mobility doxygen: all classes are documented and added to the mobility module. All public methods and fields should follow.
Pavel Boyko <boyko@iitp.ru>
parents:
5362
diff
changeset
|
182 |
* \brief "Layout" a single node according to the current position allocator type. |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
183 |
* |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
184 |
* This method creates an instance of a ns3::MobilityModel subclass (the |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
185 |
* type of which was set with MobilityHelper::SetMobilityModel), aggregates |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
186 |
* it to the provided node, and sets an initial position based on the current |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
187 |
* position allocator (set through MobilityHelper::SetPositionAllocator). |
2701 | 188 |
* |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
189 |
* \param node The node to "layout." |
2701 | 190 |
*/ |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
191 |
void Install (Ptr<Node> node) const; |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
192 |
/** |
6472
54ce45443509
Mobility doxygen: all classes are documented and added to the mobility module. All public methods and fields should follow.
Pavel Boyko <boyko@iitp.ru>
parents:
5362
diff
changeset
|
193 |
* \brief "Layout" a single node according to the current position allocator type. |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
194 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
195 |
* This method creates an instance of a ns3::MobilityModel subclass (the |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
196 |
* type of which was set with MobilityHelper::SetMobilityModel), aggregates |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
197 |
* it to the provided node, and sets an initial position based on the current |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
198 |
* position allocator (set through MobilityHelper::SetPositionAllocator). |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
199 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
200 |
* \param nodeName The name of the node to "layout." |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
201 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
202 |
void Install (std::string nodeName) const; |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
203 |
|
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
204 |
/** |
6472
54ce45443509
Mobility doxygen: all classes are documented and added to the mobility module. All public methods and fields should follow.
Pavel Boyko <boyko@iitp.ru>
parents:
5362
diff
changeset
|
205 |
* \brief Layout a collection of nodes according to the current position allocator type. |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
206 |
* |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
207 |
* For each node in the provided NodeContainer, this method creates an instance |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
208 |
* of a ns3::MobilityModel subclass (the type of which was set with |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
209 |
* MobilityHelper::SetMobilityModel), aggregates it to the node, and sets an |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
210 |
* initial position based on the current position allocator (set through |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
211 |
* MobilityHelper::SetPositionAllocator). |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
212 |
* |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
213 |
* \param container The set of nodes to layout. |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
214 |
*/ |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
215 |
void Install (NodeContainer container) const; |
2701 | 216 |
|
217 |
/** |
|
2995
b72805b3ca69
Align helper API use of Install()
Tom Henderson <tomh@tomh.org>
parents:
2897
diff
changeset
|
218 |
* Perform the work of MobilityHelper::Install on _all_ nodes which |
2701 | 219 |
* exist in the simulation. |
220 |
*/ |
|
2995
b72805b3ca69
Align helper API use of Install()
Tom Henderson <tomh@tomh.org>
parents:
2897
diff
changeset
|
221 |
void InstallAll (void); |
3491
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
222 |
|
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
223 |
/** |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
224 |
* \param os output stream |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
225 |
* \param nodeid the id of the node to generate ascii output for. |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
226 |
* |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
227 |
* Enable ascii output on the mobility model associated to the |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
228 |
* specified nodeid and dump that to the specified stdc++ output |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
229 |
* stream. |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
230 |
*/ |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
231 |
static void EnableAscii (std::ostream &os, uint32_t nodeid); |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
232 |
/** |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
233 |
* \param os output stream |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
234 |
* \param n node container |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
235 |
* |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
236 |
* Enable ascii output on the mobility model associated each of |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
237 |
* the nodes in the input container and dump that to the |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
238 |
* specified stdc++ output stream. |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
239 |
*/ |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
240 |
static void EnableAscii (std::ostream &os, NodeContainer n); |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
241 |
/** |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
242 |
* \param os output stream |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
243 |
* |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
244 |
* Enable ascii output on the mobility model associated |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
245 |
* every node in the system and dump that to the specified |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
246 |
* stdc++ output stream. |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
247 |
*/ |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
248 |
static void EnableAsciiAll (std::ostream &os); |
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
249 |
|
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
250 |
private: |
5362 | 251 |
/** |
252 |
* \internal |
|
253 |
*/ |
|
3491
b2de71af0e3f
bug 251: mobility helper has no ascii output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3021
diff
changeset
|
254 |
static void CourseChanged (std::ostream *os, Ptr<const MobilityModel> mobility); |
2401
281ea8b13525
add hierarchical support to MobilityHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2399
diff
changeset
|
255 |
std::vector<Ptr<MobilityModel> > m_mobilityStack; |
2399
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
256 |
ObjectFactory m_mobility; |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
257 |
Ptr<PositionAllocator> m_position; |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
258 |
}; |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
259 |
|
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
260 |
} // namespace ns3 |
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
261 |
|
fd9d94d518d2
convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
262 |
#endif /* MOBILITY_HELPER_H */ |