A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
constant-position-mobility-model.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006,2007 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
#include "
constant-position-mobility-model.h
"
9
10
namespace
ns3
11
{
12
13
NS_OBJECT_ENSURE_REGISTERED
(ConstantPositionMobilityModel);
14
15
TypeId
16
ConstantPositionMobilityModel::GetTypeId
()
17
{
18
static
TypeId
tid =
TypeId
(
"ns3::ConstantPositionMobilityModel"
)
19
.
SetParent
<
MobilityModel
>()
20
.SetGroupName(
"Mobility"
)
21
.AddConstructor<
ConstantPositionMobilityModel
>();
22
return
tid;
23
}
24
25
ConstantPositionMobilityModel::ConstantPositionMobilityModel
()
26
{
27
}
28
29
ConstantPositionMobilityModel::~ConstantPositionMobilityModel
()
30
{
31
}
32
33
Vector
34
ConstantPositionMobilityModel::DoGetPosition
()
const
35
{
36
return
m_position
;
37
}
38
39
void
40
ConstantPositionMobilityModel::DoSetPosition
(
const
Vector& position)
41
{
42
m_position
= position;
43
NotifyCourseChange
();
44
}
45
46
Vector
47
ConstantPositionMobilityModel::DoGetVelocity
()
const
48
{
49
return
Vector(0.0, 0.0, 0.0);
50
}
51
52
}
// namespace ns3
ns3::ConstantPositionMobilityModel
Mobility model for which the current position does not change once it has been set and until it is se...
Definition
constant-position-mobility-model.h:23
ns3::ConstantPositionMobilityModel::DoGetVelocity
Vector DoGetVelocity() const override
Definition
constant-position-mobility-model.cc:47
ns3::ConstantPositionMobilityModel::m_position
Vector m_position
the constant position
Definition
constant-position-mobility-model.h:41
ns3::ConstantPositionMobilityModel::DoGetPosition
Vector DoGetPosition() const override
Definition
constant-position-mobility-model.cc:34
ns3::ConstantPositionMobilityModel::ConstantPositionMobilityModel
ConstantPositionMobilityModel()
Create a position located at coordinates (0,0,0)
Definition
constant-position-mobility-model.cc:25
ns3::ConstantPositionMobilityModel::DoSetPosition
void DoSetPosition(const Vector &position) override
Definition
constant-position-mobility-model.cc:40
ns3::ConstantPositionMobilityModel::~ConstantPositionMobilityModel
~ConstantPositionMobilityModel() override
Definition
constant-position-mobility-model.cc:29
ns3::ConstantPositionMobilityModel::GetTypeId
static TypeId GetTypeId()
Register this type with the TypeId system.
Definition
constant-position-mobility-model.cc:16
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition
mobility-model.h:29
ns3::MobilityModel::NotifyCourseChange
void NotifyCourseChange() const
Must be invoked by subclasses when the course of the position changes to notify course change listene...
Definition
mobility-model.cc:101
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
constant-position-mobility-model.h
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mobility
model
constant-position-mobility-model.cc
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0