A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
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 "ns3/random-variable-stream.h"
25
#include <ns3/nstime.h>
26
#include <ns3/object.h>
27
#include <ns3/spectrum-propagation-loss-model.h>
28
29
#include <map>
30
31
namespace
ns3
32
{
33
34
class
MobilityModel;
35
41
class
TraceFadingLossModel
:
public
SpectrumPropagationLossModel
42
{
43
public
:
44
TraceFadingLossModel
();
45
~TraceFadingLossModel
()
override
;
46
51
static
TypeId
GetTypeId
();
52
53
void
DoInitialize
()
override
;
54
58
typedef
std::pair<Ptr<const MobilityModel>,
Ptr<const MobilityModel>
>
ChannelRealizationId_t
;
59
68
int64_t
AssignStreams
(int64_t stream);
69
70
private
:
78
Ptr<SpectrumValue>
DoCalcRxPowerSpectralDensity
(
Ptr<const SpectrumSignalParameters>
params,
79
Ptr<const MobilityModel>
a,
80
Ptr<const MobilityModel>
b)
const override
;
81
88
double
GetValue
(
int
subChannel,
double
speed);
89
94
void
SetTraceFileName
(std::string fileName);
99
void
SetTraceLength
(
Time
t);
100
102
void
LoadTrace
();
103
104
mutable
std::map<ChannelRealizationId_t, int>
m_windowOffsetsMap
;
105
106
mutable
std::map<ChannelRealizationId_t, Ptr<UniformRandomVariable>>
107
m_startVariableMap
;
108
112
typedef
std::vector<double>
FadingTraceSample
;
116
typedef
std::vector<FadingTraceSample>
FadingTrace
;
117
118
std::string
m_traceFile
;
119
120
FadingTrace
m_fadingTrace
;
121
122
Time
m_traceLength
;
123
uint32_t
m_samplesNum
;
124
Time
m_windowSize
;
125
uint32_t
m_rbNum
;
126
mutable
Time
m_lastWindowUpdate
;
127
uint32_t
m_timeGranularity
;
128
mutable
uint64_t
m_currentStream
;
129
mutable
uint64_t
m_lastStream
;
130
uint64_t
m_streamSetSize
;
131
mutable
bool
m_streamsAssigned
;
132
};
133
134
}
// namespace ns3
135
136
#endif
/* TRACE_FADING_LOSS_MODEL_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::SpectrumPropagationLossModel
spectrum-aware propagation loss model
Definition:
spectrum-propagation-loss-model.h:43
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:42
ns3::TraceFadingLossModel::m_rbNum
uint32_t m_rbNum
RB number.
Definition:
trace-fading-loss-model.h:125
ns3::TraceFadingLossModel::m_streamSetSize
uint64_t m_streamSetSize
stream set size
Definition:
trace-fading-loss-model.h:130
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:149
ns3::TraceFadingLossModel::m_traceLength
Time m_traceLength
the trace time
Definition:
trace-fading-loss-model.h:122
ns3::TraceFadingLossModel::m_traceFile
std::string m_traceFile
the trace file name
Definition:
trace-fading-loss-model.h:118
ns3::TraceFadingLossModel::m_lastWindowUpdate
Time m_lastWindowUpdate
time of last window update
Definition:
trace-fading-loss-model.h:126
ns3::TraceFadingLossModel::SetTraceLength
void SetTraceLength(Time t)
Set the trace time.
Definition:
trace-fading-loss-model.cc:107
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:123
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:58
ns3::TraceFadingLossModel::~TraceFadingLossModel
~TraceFadingLossModel() override
Definition:
trace-fading-loss-model.cc:48
ns3::TraceFadingLossModel::FadingTraceSample
std::vector< double > FadingTraceSample
Vector with fading samples in time domain (for a fixed RB)
Definition:
trace-fading-loss-model.h:112
ns3::TraceFadingLossModel::m_timeGranularity
uint32_t m_timeGranularity
time granularity
Definition:
trace-fading-loss-model.h:127
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:116
ns3::TraceFadingLossModel::TraceFadingLossModel
TraceFadingLossModel()
Definition:
trace-fading-loss-model.cc:41
ns3::TraceFadingLossModel::SetTraceFileName
void SetTraceFileName(std::string fileName)
Set the trace file name.
Definition:
trace-fading-loss-model.cc:99
ns3::TraceFadingLossModel::m_streamsAssigned
bool m_streamsAssigned
is streams assigned?
Definition:
trace-fading-loss-model.h:131
ns3::TraceFadingLossModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
trace-fading-loss-model.cc:56
ns3::TraceFadingLossModel::m_windowOffsetsMap
std::map< ChannelRealizationId_t, int > m_windowOffsetsMap
windows offsets map
Definition:
trace-fading-loss-model.h:104
ns3::TraceFadingLossModel::m_startVariableMap
std::map< ChannelRealizationId_t, Ptr< UniformRandomVariable > > m_startVariableMap
start variable map
Definition:
trace-fading-loss-model.h:107
ns3::TraceFadingLossModel::m_currentStream
uint64_t m_currentStream
the current stream
Definition:
trace-fading-loss-model.h:128
ns3::TraceFadingLossModel::LoadTrace
void LoadTrace()
Load trace function.
Definition:
trace-fading-loss-model.cc:119
ns3::TraceFadingLossModel::m_fadingTrace
FadingTrace m_fadingTrace
fading trace
Definition:
trace-fading-loss-model.h:120
ns3::TraceFadingLossModel::m_windowSize
Time m_windowSize
window size
Definition:
trace-fading-loss-model.h:124
ns3::TraceFadingLossModel::m_lastStream
uint64_t m_lastStream
the last stream
Definition:
trace-fading-loss-model.h:129
ns3::TraceFadingLossModel::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
trace-fading-loss-model.cc:113
ns3::TraceFadingLossModel::AssignStreams
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition:
trace-fading-loss-model.cc:242
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
spectrum
model
trace-fading-loss-model.h
Generated on Sun Jul 2 2023 18:22:03 for ns-3 by
1.9.6