A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
trace-fading-loss-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Giuseppe Piro <g.piro@poliba.it>
18
* Marco Miozzo <mmiozzo@cttc.es>
19
*/
20
21
#ifndef TRACE_FADING_LOSS_MODEL_H
22
#define TRACE_FADING_LOSS_MODEL_H
23
24
#include "
spectrum-propagation-loss-model.h
"
25
26
#include "ns3/random-variable-stream.h"
27
#include <ns3/nstime.h>
28
#include <ns3/object.h>
29
30
#include <map>
31
32
namespace
ns3
33
{
34
35
class
MobilityModel;
36
42
class
TraceFadingLossModel
:
public
SpectrumPropagationLossModel
43
{
44
public
:
45
TraceFadingLossModel
();
46
~TraceFadingLossModel
()
override
;
47
52
static
TypeId
GetTypeId
();
53
54
void
DoInitialize
()
override
;
55
59
typedef
std::pair<Ptr<const MobilityModel>,
Ptr<const MobilityModel>
>
ChannelRealizationId_t
;
60
61
protected
:
62
int64_t
DoAssignStreams
(int64_t stream)
override
;
63
64
private
:
72
Ptr<SpectrumValue>
DoCalcRxPowerSpectralDensity
(
Ptr<const SpectrumSignalParameters>
params
,
73
Ptr<const MobilityModel>
a,
74
Ptr<const MobilityModel>
b)
const override
;
75
82
double
GetValue
(
int
subChannel,
double
speed);
83
88
void
SetTraceFileName
(std::string fileName);
93
void
SetTraceLength
(
Time
t);
94
96
void
LoadTrace
();
97
98
mutable
std::map<ChannelRealizationId_t, int>
m_windowOffsetsMap
;
99
100
mutable
std::map<ChannelRealizationId_t, Ptr<UniformRandomVariable>>
101
m_startVariableMap
;
102
106
typedef
std::vector<double>
FadingTraceSample
;
110
typedef
std::vector<FadingTraceSample>
FadingTrace
;
111
112
std::string
m_traceFile
;
113
114
FadingTrace
m_fadingTrace
;
115
116
Time
m_traceLength
;
117
uint32_t
m_samplesNum
;
118
Time
m_windowSize
;
119
uint32_t
m_rbNum
;
120
mutable
Time
m_lastWindowUpdate
;
121
uint32_t
m_timeGranularity
;
122
mutable
uint64_t
m_currentStream
;
123
mutable
uint64_t
m_lastStream
;
124
uint64_t
m_streamSetSize
;
125
mutable
bool
m_streamsAssigned
;
126
};
127
128
}
// namespace ns3
129
130
#endif
/* TRACE_FADING_LOSS_MODEL_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::SpectrumPropagationLossModel
spectrum-aware propagation loss model
Definition:
spectrum-propagation-loss-model.h:44
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TraceFadingLossModel
fading loss model based on precalculated fading traces
Definition:
trace-fading-loss-model.h:43
ns3::TraceFadingLossModel::m_rbNum
uint32_t m_rbNum
RB number.
Definition:
trace-fading-loss-model.h:119
ns3::TraceFadingLossModel::m_streamSetSize
uint64_t m_streamSetSize
stream set size
Definition:
trace-fading-loss-model.h:124
ns3::TraceFadingLossModel::DoCalcRxPowerSpectralDensity
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > params, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Definition:
trace-fading-loss-model.cc:150
ns3::TraceFadingLossModel::m_traceLength
Time m_traceLength
the trace time
Definition:
trace-fading-loss-model.h:116
ns3::TraceFadingLossModel::m_traceFile
std::string m_traceFile
the trace file name
Definition:
trace-fading-loss-model.h:112
ns3::TraceFadingLossModel::m_lastWindowUpdate
Time m_lastWindowUpdate
time of last window update
Definition:
trace-fading-loss-model.h:120
ns3::TraceFadingLossModel::SetTraceLength
void SetTraceLength(Time t)
Set the trace time.
Definition:
trace-fading-loss-model.cc:108
ns3::TraceFadingLossModel::GetValue
double GetValue(int subChannel, double speed)
Get the value for a particular sub channel and a given speed.
ns3::TraceFadingLossModel::m_samplesNum
uint32_t m_samplesNum
number of samples
Definition:
trace-fading-loss-model.h:117
ns3::TraceFadingLossModel::ChannelRealizationId_t
std::pair< Ptr< const MobilityModel >, Ptr< const MobilityModel > > ChannelRealizationId_t
The couple of mobility node that form a fading channel realization.
Definition:
trace-fading-loss-model.h:59
ns3::TraceFadingLossModel::~TraceFadingLossModel
~TraceFadingLossModel() override
Definition:
trace-fading-loss-model.cc:49
ns3::TraceFadingLossModel::DoAssignStreams
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Definition:
trace-fading-loss-model.cc:241
ns3::TraceFadingLossModel::FadingTraceSample
std::vector< double > FadingTraceSample
Vector with fading samples in time domain (for a fixed RB)
Definition:
trace-fading-loss-model.h:106
ns3::TraceFadingLossModel::m_timeGranularity
uint32_t m_timeGranularity
time granularity
Definition:
trace-fading-loss-model.h:121
ns3::TraceFadingLossModel::FadingTrace
std::vector< FadingTraceSample > FadingTrace
Vector collecting the time fading traces in the frequency domain (per RB)
Definition:
trace-fading-loss-model.h:110
ns3::TraceFadingLossModel::TraceFadingLossModel
TraceFadingLossModel()
Definition:
trace-fading-loss-model.cc:42
ns3::TraceFadingLossModel::SetTraceFileName
void SetTraceFileName(std::string fileName)
Set the trace file name.
Definition:
trace-fading-loss-model.cc:100
ns3::TraceFadingLossModel::m_streamsAssigned
bool m_streamsAssigned
is streams assigned?
Definition:
trace-fading-loss-model.h:125
ns3::TraceFadingLossModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
trace-fading-loss-model.cc:57
ns3::TraceFadingLossModel::m_windowOffsetsMap
std::map< ChannelRealizationId_t, int > m_windowOffsetsMap
windows offsets map
Definition:
trace-fading-loss-model.h:98
ns3::TraceFadingLossModel::m_startVariableMap
std::map< ChannelRealizationId_t, Ptr< UniformRandomVariable > > m_startVariableMap
start variable map
Definition:
trace-fading-loss-model.h:101
ns3::TraceFadingLossModel::m_currentStream
uint64_t m_currentStream
the current stream
Definition:
trace-fading-loss-model.h:122
ns3::TraceFadingLossModel::LoadTrace
void LoadTrace()
Load trace function.
Definition:
trace-fading-loss-model.cc:120
ns3::TraceFadingLossModel::m_fadingTrace
FadingTrace m_fadingTrace
fading trace
Definition:
trace-fading-loss-model.h:114
ns3::TraceFadingLossModel::m_windowSize
Time m_windowSize
window size
Definition:
trace-fading-loss-model.h:118
ns3::TraceFadingLossModel::m_lastStream
uint64_t m_lastStream
the last stream
Definition:
trace-fading-loss-model.h:123
ns3::TraceFadingLossModel::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
trace-fading-loss-model.cc:114
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.
two-ray-to-three-gpp-ch-calibration.params
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Definition:
two-ray-to-three-gpp-ch-calibration.py:514
spectrum-propagation-loss-model.h
src
spectrum
model
trace-fading-loss-model.h
Generated on Sun Mar 3 2024 17:11:08 for ns-3 by
1.9.1