A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
jakes-process.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2012 Telum (www.telum.ru)
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Kirill Andreev <andreev@telum.ru>, Alexander Sofronov <sofronov@telum.ru>
19
*/
20
#ifndef DOPPLER_PROCESS_H
21
#define DOPPLER_PROCESS_H
22
23
#include "ns3/object.h"
24
#include "ns3/nstime.h"
25
#include "ns3/random-variable-stream.h"
26
#include <complex>
27
28
namespace
ns3
29
{
30
class
PropagationLossModel;
31
class
JakesPropagationLossModel;
55
class
JakesProcess
:
public
Object
56
{
57
public
:
62
static
TypeId
GetTypeId
(
void
);
63
JakesProcess
();
64
virtual
~JakesProcess
();
65
virtual
void
DoDispose
();
66
71
std::complex<double>
GetComplexGain
()
const
;
76
double
GetChannelGainDb
()
const
;
77
82
void
SetPropagationLossModel
(
Ptr<const PropagationLossModel>
model);
83
private
:
87
struct
Oscillator
88
{
95
Oscillator
(std::complex<double> amplitude,
double
initialPhase,
double
omega);
101
std::complex<double>
GetValueAt
(
Time
t)
const
;
102
103
std::complex<double>
m_amplitude
;
104
double
m_phase
;
105
double
m_omega
;
106
};
107
private
:
108
113
void
SetNOscillators
(
unsigned
int
nOscillators);
114
119
void
SetDopplerFrequencyHz
(
double
dopplerFrequencyHz);
120
124
void
ConstructOscillators
();
125
private
:
126
std::vector<Oscillator>
m_oscillators
;
127
double
m_omegaDopplerMax
;
128
unsigned
int
m_nOscillators
;
129
Ptr<UniformRandomVariable>
m_uniformVariable
;
130
Ptr<const JakesPropagationLossModel>
m_jakes
;
131
};
132
}
// namespace ns3
133
#endif // DOPPLER_PROCESS_H
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::JakesProcess::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
jakes-process.cc:49
ns3::JakesProcess::SetDopplerFrequencyHz
void SetDopplerFrequencyHz(double dopplerFrequencyHz)
Set the Doppler frequency.
Definition:
jakes-process.cc:87
ns3::JakesProcess::JakesProcess
JakesProcess()
Definition:
jakes-process.cc:116
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::JakesProcess::m_oscillators
std::vector< Oscillator > m_oscillators
Vector of oscillators.
Definition:
jakes-process.h:126
ns3::JakesProcess::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
jakes-process.cc:128
ns3::JakesProcess::GetComplexGain
std::complex< double > GetComplexGain() const
Get the channel complex gain.
Definition:
jakes-process.cc:134
ns3::JakesProcess::Oscillator::Oscillator
Oscillator(std::complex< double > amplitude, double initialPhase, double omega)
Initiate oscillator with complex amplitude, initial phase and rotation speed.
Definition:
jakes-process.cc:34
ns3::JakesProcess::~JakesProcess
virtual ~JakesProcess()
Definition:
jakes-process.cc:122
ns3::JakesProcess::GetChannelGainDb
double GetChannelGainDb() const
Get the channel gain in dB.
Definition:
jakes-process.cc:145
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::JakesProcess::m_uniformVariable
Ptr< UniformRandomVariable > m_uniformVariable
random stream
Definition:
jakes-process.h:129
ns3::JakesProcess::m_omegaDopplerMax
double m_omegaDopplerMax
max rotation speed Doppler frequency
Definition:
jakes-process.h:127
ns3::JakesProcess::Oscillator::m_amplitude
std::complex< double > m_amplitude
Complex number .
Definition:
jakes-process.h:103
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:88
ns3::JakesProcess::Oscillator
This class Represents a single oscillator.
Definition:
jakes-process.h:88
ns3::JakesProcess::m_jakes
Ptr< const JakesPropagationLossModel > m_jakes
pointer to the propagation loss model
Definition:
jakes-process.h:130
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:104
ns3::JakesProcess::ConstructOscillators
void ConstructOscillators()
Definition:
jakes-process.cc:93
ns3::JakesProcess::Oscillator::GetValueAt
std::complex< double > GetValueAt(Time t) const
Get the complex amplitude at a given moment.
Definition:
jakes-process.cc:41
ns3::JakesProcess
Implementation for a single path Stationary Jakes propagation loss model.
Definition:
jakes-process.h:56
ns3::JakesProcess::m_nOscillators
unsigned int m_nOscillators
number of oscillators
Definition:
jakes-process.h:128
ns3::JakesProcess::SetPropagationLossModel
void SetPropagationLossModel(Ptr< const PropagationLossModel > model)
Set the propagation model using this class.
Definition:
jakes-process.cc:68
ns3::JakesProcess::Oscillator::m_phase
double m_phase
Phase of the oscillator.
Definition:
jakes-process.h:104
ns3::JakesProcess::SetNOscillators
void SetNOscillators(unsigned int nOscillators)
Set the number of Oscillators to use.
Definition:
jakes-process.cc:81
ns3::JakesProcess::Oscillator::m_omega
double m_omega
Rotation speed of the oscillator .
Definition:
jakes-process.h:105
src
propagation
model
jakes-process.h
Generated on Fri Oct 1 2021 17:03:33 for ns-3 by
1.8.20