A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
mobility
model
constant-acceleration-mobility-model.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation;
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
*
16
* Author: Gustavo Carneiro <gjc@inescporto.pt>
17
*/
18
#ifndef CONSTANT_ACCELERATION_MOBILITY_MODEL_H
19
#define CONSTANT_ACCELERATION_MOBILITY_MODEL_H
20
21
#include "
mobility-model.h
"
22
#include "ns3/nstime.h"
23
24
namespace
ns3
{
25
31
class
ConstantAccelerationMobilityModel
:
public
MobilityModel
32
{
33
public
:
38
static
TypeId
GetTypeId
(
void
);
43
ConstantAccelerationMobilityModel
();
44
virtual
~ConstantAccelerationMobilityModel
();
50
void
SetVelocityAndAcceleration
(
const
Vector &velocity,
const
Vector &acceleration);
51
52
private
:
53
virtual
Vector
DoGetPosition
(
void
)
const
;
54
virtual
void
DoSetPosition
(
const
Vector &position);
55
virtual
Vector
DoGetVelocity
(
void
)
const
;
56
57
Time
m_baseTime
;
58
Vector
m_basePosition
;
59
Vector
m_baseVelocity
;
60
Vector
m_acceleration
;
61
};
62
63
}
// namespace ns3
64
65
#endif
/* CONSTANT_ACCELERATION_MOBILITY_MODEL_H */
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::ConstantAccelerationMobilityModel::DoGetPosition
virtual Vector DoGetPosition(void) const
Definition:
constant-acceleration-mobility-model.cc:52
ns3::ConstantAccelerationMobilityModel::GetTypeId
static TypeId GetTypeId(void)
Register this type with the TypeId system.
Definition:
constant-acceleration-mobility-model.cc:25
ns3::ConstantAccelerationMobilityModel
Mobility model for which the current acceleration does not change once it has been set and until it i...
Definition:
constant-acceleration-mobility-model.h:31
ns3::ConstantAccelerationMobilityModel::m_baseVelocity
Vector m_baseVelocity
the base velocity
Definition:
constant-acceleration-mobility-model.h:59
ns3::ConstantAccelerationMobilityModel::m_acceleration
Vector m_acceleration
the acceleration
Definition:
constant-acceleration-mobility-model.h:60
ns3::ConstantAccelerationMobilityModel::~ConstantAccelerationMobilityModel
virtual ~ConstantAccelerationMobilityModel()
Definition:
constant-acceleration-mobility-model.cc:38
ns3::ConstantAccelerationMobilityModel::m_baseTime
Time m_baseTime
the base time
Definition:
constant-acceleration-mobility-model.h:57
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition:
mobility-model.h:39
ns3::ConstantAccelerationMobilityModel::ConstantAccelerationMobilityModel
ConstantAccelerationMobilityModel()
Create position located at coordinates (0,0,0) with speed (0,0,0).
Definition:
constant-acceleration-mobility-model.cc:34
mobility-model.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ConstantAccelerationMobilityModel::DoGetVelocity
virtual Vector DoGetVelocity(void) const
Definition:
constant-acceleration-mobility-model.cc:43
ns3::ConstantAccelerationMobilityModel::DoSetPosition
virtual void DoSetPosition(const Vector &position)
Definition:
constant-acceleration-mobility-model.cc:62
ns3::ConstantAccelerationMobilityModel::SetVelocityAndAcceleration
void SetVelocityAndAcceleration(const Vector &velocity, const Vector &acceleration)
Set the model's velocity and acceleration.
Definition:
constant-acceleration-mobility-model.cc:71
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::ConstantAccelerationMobilityModel::m_basePosition
Vector m_basePosition
the base position
Definition:
constant-acceleration-mobility-model.h:58
Generated on Wed Nov 7 2018 10:02:05 for ns-3 by
1.8.14