A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
mobility-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008 INRIA
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
#ifndef MOBILITY_HELPER_H
22
#define MOBILITY_HELPER_H
23
24
#include <vector>
25
#include "ns3/object-factory.h"
26
#include "ns3/attribute.h"
27
#include "ns3/output-stream-wrapper.h"
28
#include "ns3/position-allocator.h"
29
#include "
node-container.h
"
30
31
namespace
ns3 {
32
33
class
PositionAllocator;
34
class
MobilityModel;
35
42
class
MobilityHelper
43
{
44
public
:
49
MobilityHelper
();
50
55
~MobilityHelper
();
56
63
void
SetPositionAllocator
(
Ptr<PositionAllocator>
allocator);
64
86
void
SetPositionAllocator
(std::string type,
87
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
88
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
89
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
90
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
91
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
92
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
93
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
(),
94
std::string n8 =
""
,
const
AttributeValue
&v8 =
EmptyAttributeValue
(),
95
std::string n9 =
""
,
const
AttributeValue
&v9 =
EmptyAttributeValue
());
96
121
void
SetMobilityModel
(std::string type,
122
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
123
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
124
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
125
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
126
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
127
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
128
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
(),
129
std::string n8 =
""
,
const
AttributeValue
&v8 =
EmptyAttributeValue
(),
130
std::string n9 =
""
,
const
AttributeValue
&v9 =
EmptyAttributeValue
());
131
150
void
PushReferenceMobilityModel
(
Ptr<Object>
reference
);
169
void
PushReferenceMobilityModel
(std::string referenceName);
174
void
PopReferenceMobilityModel
(
void
);
175
180
std::string
GetMobilityModelType
(
void
)
const
;
181
192
void
Install
(
Ptr<Node>
node)
const
;
203
void
Install
(std::string nodeName)
const
;
204
216
void
Install
(
NodeContainer
container)
const
;
217
222
void
InstallAll
(
void
);
223
232
static
void
EnableAscii
(
Ptr<OutputStreamWrapper>
stream, uint32_t nodeid);
241
static
void
EnableAscii
(
Ptr<OutputStreamWrapper>
stream,
NodeContainer
n);
249
static
void
EnableAsciiAll
(
Ptr<OutputStreamWrapper>
stream);
262
int64_t
AssignStreams
(
NodeContainer
c, int64_t stream);
263
264
private
:
268
static
void
CourseChanged
(
Ptr<OutputStreamWrapper>
stream,
Ptr<const MobilityModel>
mobility);
269
std::vector<Ptr<MobilityModel> >
m_mobilityStack
;
270
ObjectFactory
m_mobility
;
271
Ptr<PositionAllocator>
m_position
;
272
};
273
274
}
// namespace ns3
275
276
#endif
/* MOBILITY_HELPER_H */
src
mobility
helper
mobility-helper.h
Generated on Tue May 14 2013 11:08:29 for ns-3 by
1.8.1.2