A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
27namespace ns3
28{
29
30class MobilityModel;
31
38{
39 public:
44 static TypeId GetTypeId();
45 ~PropagationDelayModel() override;
64 int64_t AssignStreams(int64_t stream);
65
66 protected:
76 virtual int64_t DoAssignStreams(int64_t stream) = 0;
77};
78
85{
86 public:
91 static TypeId GetTypeId();
92
99
100 private:
101 int64_t DoAssignStreams(int64_t stream) override;
103};
104
111{
112 public:
117 static TypeId GetTypeId();
118
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 */
Time GetDelay(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
ConstantSpeedPropagationDelayModel()
Use the default parameters from PropagationDelayConstantSpeed.
static TypeId GetTypeId()
Get the type ID.
A base class which provides memory management and object aggregation.
Definition: object.h:89
calculate a propagation delay.
static TypeId GetTypeId()
Get the type ID.
virtual int64_t DoAssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model.
int64_t AssignStreams(int64_t stream)
If this delay model uses objects of type RandomVariableStream, set the stream numbers to the integers...
virtual Time GetDelay(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
the propagation delay is random
RandomPropagationDelayModel()
Use the default parameters from PropagationDelayRandomDistribution.
Ptr< RandomVariableStream > m_variable
random generator
static TypeId GetTypeId()
Get the type ID.
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Time GetDelay(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.