A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
e
i
l
o
r
s
t
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
constant-velocity-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006,2007 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
#ifndef CONSTANT_VELOCITY_HELPER_H
20
#define CONSTANT_VELOCITY_HELPER_H
21
22
#include "
box.h
"
23
24
#include "ns3/nstime.h"
25
#include "ns3/vector.h"
26
27
namespace
ns3
28
{
29
30
class
Rectangle;
31
37
class
ConstantVelocityHelper
38
{
39
public
:
40
ConstantVelocityHelper
();
45
ConstantVelocityHelper
(
const
Vector& position);
51
ConstantVelocityHelper
(
const
Vector& position,
const
Vector& vel);
52
57
void
SetPosition
(
const
Vector& position);
62
Vector
GetCurrentPosition
()
const
;
67
Vector
GetVelocity
()
const
;
72
void
SetVelocity
(
const
Vector& vel);
76
void
Pause
();
80
void
Unpause
();
81
87
void
UpdateWithBounds
(
const
Rectangle
& rectangle)
const
;
92
void
UpdateWithBounds
(
const
Box
& bounds)
const
;
96
void
Update
()
const
;
97
98
private
:
99
mutable
Time
m_lastUpdate
;
100
mutable
Vector
m_position
;
101
Vector
m_velocity
;
102
bool
m_paused
;
103
};
104
105
}
// namespace ns3
106
107
#endif
/* CONSTANT_VELOCITY_HELPER_H */
box.h
ns3::Box
a 3d box
Definition:
box.h:35
ns3::ConstantVelocityHelper
Utility class used to move node with constant velocity.
Definition:
constant-velocity-helper.h:38
ns3::ConstantVelocityHelper::ConstantVelocityHelper
ConstantVelocityHelper()
Definition:
constant-velocity-helper.cc:32
ns3::ConstantVelocityHelper::m_lastUpdate
Time m_lastUpdate
time of last update
Definition:
constant-velocity-helper.h:99
ns3::ConstantVelocityHelper::GetCurrentPosition
Vector GetCurrentPosition() const
Get current position vector.
Definition:
constant-velocity-helper.cc:63
ns3::ConstantVelocityHelper::m_position
Vector m_position
state variable for current position
Definition:
constant-velocity-helper.h:100
ns3::ConstantVelocityHelper::GetVelocity
Vector GetVelocity() const
Get velocity; if paused, will return a zero vector.
Definition:
constant-velocity-helper.cc:70
ns3::ConstantVelocityHelper::Update
void Update() const
Update position, if not paused, from last position and time of last update.
Definition:
constant-velocity-helper.cc:85
ns3::ConstantVelocityHelper::UpdateWithBounds
void UpdateWithBounds(const Rectangle &rectangle) const
Update position, if not paused, from last position and time of last update.
Definition:
constant-velocity-helper.cc:103
ns3::ConstantVelocityHelper::Unpause
void Unpause()
Resume mobility from current position at current velocity.
Definition:
constant-velocity-helper.cc:134
ns3::ConstantVelocityHelper::SetPosition
void SetPosition(const Vector &position)
Set position vector.
Definition:
constant-velocity-helper.cc:54
ns3::ConstantVelocityHelper::SetVelocity
void SetVelocity(const Vector &vel)
Set new velocity vector.
Definition:
constant-velocity-helper.cc:77
ns3::ConstantVelocityHelper::Pause
void Pause()
Pause mobility at current position.
Definition:
constant-velocity-helper.cc:127
ns3::ConstantVelocityHelper::m_velocity
Vector m_velocity
state variable for velocity
Definition:
constant-velocity-helper.h:101
ns3::ConstantVelocityHelper::m_paused
bool m_paused
state variable for paused
Definition:
constant-velocity-helper.h:102
ns3::Rectangle
a 2d rectangle
Definition:
rectangle.h:35
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mobility
model
constant-velocity-helper.h
Generated on Sun Mar 3 2024 17:11:05 for ns-3 by
1.9.1