A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
propagation-delay-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005,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 PROPAGATION_DELAY_MODEL_H
20
#define PROPAGATION_DELAY_MODEL_H
21
22
#include "ns3/nstime.h"
23
#include "ns3/object.h"
24
#include "ns3/ptr.h"
25
#include "ns3/random-variable-stream.h"
26
27
namespace
ns3
28
{
29
30
class
MobilityModel;
31
37
class
PropagationDelayModel
:
public
Object
38
{
39
public
:
44
static
TypeId
GetTypeId
();
45
~PropagationDelayModel
()
override
;
54
virtual
Time
GetDelay
(
Ptr<MobilityModel>
a,
Ptr<MobilityModel>
b)
const
= 0;
64
int64_t
AssignStreams
(int64_t stream);
65
66
protected
:
76
virtual
int64_t
DoAssignStreams
(int64_t stream) = 0;
77
};
78
84
class
RandomPropagationDelayModel
:
public
PropagationDelayModel
85
{
86
public
:
91
static
TypeId
GetTypeId
();
92
96
RandomPropagationDelayModel
();
97
~RandomPropagationDelayModel
()
override
;
98
Time
GetDelay
(
Ptr<MobilityModel>
a,
Ptr<MobilityModel>
b)
const override
;
99
100
private
:
101
int64_t
DoAssignStreams
(int64_t stream)
override
;
102
Ptr<RandomVariableStream>
m_variable
;
103
};
104
110
class
ConstantSpeedPropagationDelayModel
:
public
PropagationDelayModel
111
{
112
public
:
117
static
TypeId
GetTypeId
();
118
122
ConstantSpeedPropagationDelayModel
();
123
Time
GetDelay
(
Ptr<MobilityModel>
a,
Ptr<MobilityModel>
b)
const override
;
127
void
SetSpeed
(
double
speed);
131
double
GetSpeed
()
const
;
132
133
private
:
134
int64_t
DoAssignStreams
(int64_t stream)
override
;
135
double
m_speed
;
136
};
137
138
}
// namespace ns3
139
140
#endif
/* PROPAGATION_DELAY_MODEL_H */
ns3::ConstantSpeedPropagationDelayModel
the propagation speed is constant
Definition:
propagation-delay-model.h:111
ns3::ConstantSpeedPropagationDelayModel::GetDelay
Time GetDelay(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Definition:
propagation-delay-model.cc:114
ns3::ConstantSpeedPropagationDelayModel::GetSpeed
double GetSpeed() const
Definition:
propagation-delay-model.cc:128
ns3::ConstantSpeedPropagationDelayModel::m_speed
double m_speed
speed
Definition:
propagation-delay-model.h:135
ns3::ConstantSpeedPropagationDelayModel::SetSpeed
void SetSpeed(double speed)
Definition:
propagation-delay-model.cc:122
ns3::ConstantSpeedPropagationDelayModel::DoAssignStreams
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Definition:
propagation-delay-model.cc:134
ns3::ConstantSpeedPropagationDelayModel::ConstantSpeedPropagationDelayModel
ConstantSpeedPropagationDelayModel()
Use the default parameters from PropagationDelayConstantSpeed.
Definition:
propagation-delay-model.cc:109
ns3::ConstantSpeedPropagationDelayModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
propagation-delay-model.cc:93
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::PropagationDelayModel
calculate a propagation delay.
Definition:
propagation-delay-model.h:38
ns3::PropagationDelayModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
propagation-delay-model.cc:32
ns3::PropagationDelayModel::~PropagationDelayModel
~PropagationDelayModel() override
Definition:
propagation-delay-model.cc:39
ns3::PropagationDelayModel::DoAssignStreams
virtual int64_t DoAssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model.
ns3::PropagationDelayModel::AssignStreams
int64_t AssignStreams(int64_t stream)
If this delay model uses objects of type RandomVariableStream, set the stream numbers to the integers...
Definition:
propagation-delay-model.cc:44
ns3::PropagationDelayModel::GetDelay
virtual Time GetDelay(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
ns3::Ptr< MobilityModel >
ns3::RandomPropagationDelayModel
the propagation delay is random
Definition:
propagation-delay-model.h:85
ns3::RandomPropagationDelayModel::RandomPropagationDelayModel
RandomPropagationDelayModel()
Use the default parameters from PropagationDelayRandomDistribution.
Definition:
propagation-delay-model.cc:69
ns3::RandomPropagationDelayModel::m_variable
Ptr< RandomVariableStream > m_variable
random generator
Definition:
propagation-delay-model.h:102
ns3::RandomPropagationDelayModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
propagation-delay-model.cc:54
ns3::RandomPropagationDelayModel::DoAssignStreams
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Definition:
propagation-delay-model.cc:84
ns3::RandomPropagationDelayModel::~RandomPropagationDelayModel
~RandomPropagationDelayModel() override
Definition:
propagation-delay-model.cc:73
ns3::RandomPropagationDelayModel::GetDelay
Time GetDelay(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Definition:
propagation-delay-model.cc:78
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
propagation
model
propagation-delay-model.h
Generated on Sun Mar 3 2024 17:11:07 for ns-3 by
1.9.1