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-velocity-mobility-model.h
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
#ifndef CONSTANT_VELOCITY_MOBILITY_MODEL_H
9
#define CONSTANT_VELOCITY_MOBILITY_MODEL_H
10
11
#include "
constant-velocity-helper.h
"
12
#include "
mobility-model.h
"
13
14
#include "ns3/nstime.h"
15
16
#include <stdint.h>
17
18
namespace
ns3
19
{
20
21
/**
22
* \ingroup mobility
23
*
24
* \brief Mobility model for which the current speed does not change once it has been set and until
25
* it is set again explicitly to a new value.
26
*/
27
class
ConstantVelocityMobilityModel
:
public
MobilityModel
28
{
29
public
:
30
/**
31
* Register this type with the TypeId system.
32
* \return the object TypeId
33
*/
34
static
TypeId
GetTypeId
();
35
/**
36
* Create position located at coordinates (0,0,0) with
37
* speed (0,0,0).
38
*/
39
ConstantVelocityMobilityModel
();
40
~ConstantVelocityMobilityModel
()
override
;
41
42
/**
43
* \param speed the new speed to set.
44
*
45
* Set the current speed now to (dx,dy,dz)
46
* Unit is meters/s
47
*/
48
void
SetVelocity
(
const
Vector& speed);
49
50
private
:
51
Vector
DoGetPosition
()
const override
;
52
void
DoSetPosition
(
const
Vector& position)
override
;
53
Vector
DoGetVelocity
()
const override
;
54
ConstantVelocityHelper
m_helper
;
//!< helper object for this model
55
};
56
57
}
// namespace ns3
58
59
#endif
/* CONSTANT_VELOCITY_POSITION */
ns3::ConstantVelocityHelper
Utility class used to move node with constant velocity.
Definition
constant-velocity-helper.h:27
ns3::ConstantVelocityMobilityModel
Mobility model for which the current speed does not change once it has been set and until it is set a...
Definition
constant-velocity-mobility-model.h:28
ns3::ConstantVelocityMobilityModel::DoGetPosition
Vector DoGetPosition() const override
Definition
constant-velocity-mobility-model.cc:45
ns3::ConstantVelocityMobilityModel::ConstantVelocityMobilityModel
ConstantVelocityMobilityModel()
Create position located at coordinates (0,0,0) with speed (0,0,0).
Definition
constant-velocity-mobility-model.cc:27
ns3::ConstantVelocityMobilityModel::DoSetPosition
void DoSetPosition(const Vector &position) override
Definition
constant-velocity-mobility-model.cc:52
ns3::ConstantVelocityMobilityModel::GetTypeId
static TypeId GetTypeId()
Register this type with the TypeId system.
Definition
constant-velocity-mobility-model.cc:18
ns3::ConstantVelocityMobilityModel::m_helper
ConstantVelocityHelper m_helper
helper object for this model
Definition
constant-velocity-mobility-model.h:54
ns3::ConstantVelocityMobilityModel::SetVelocity
void SetVelocity(const Vector &speed)
Definition
constant-velocity-mobility-model.cc:36
ns3::ConstantVelocityMobilityModel::~ConstantVelocityMobilityModel
~ConstantVelocityMobilityModel() override
Definition
constant-velocity-mobility-model.cc:31
ns3::ConstantVelocityMobilityModel::DoGetVelocity
Vector DoGetVelocity() const override
Definition
constant-velocity-mobility-model.cc:59
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition
mobility-model.h:29
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
constant-velocity-helper.h
mobility-model.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mobility
model
constant-velocity-mobility-model.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0