A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
lte
model
trace-fading-loss-model.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Giuseppe Piro <g.piro@poliba.it>
19
* Marco Miozzo <mmiozzo@cttc.es>
20
*/
21
22
23
#ifndef TRACE_FADING_LOSS_MODEL_H
24
#define TRACE_FADING_LOSS_MODEL_H
25
26
27
#include <ns3/object.h>
28
#include <ns3/spectrum-propagation-loss-model.h>
29
#include <map>
30
#include "ns3/random-variable-stream.h"
31
#include <ns3/nstime.h>
32
33
namespace
ns3
{
34
35
36
class
MobilityModel;
37
38
44
class
TraceFadingLossModel
:
public
SpectrumPropagationLossModel
45
{
46
public
:
47
TraceFadingLossModel
();
48
virtual
~TraceFadingLossModel
();
49
54
static
TypeId
GetTypeId
();
55
56
virtual
void
DoInitialize
(
void
);
57
61
typedef
std::pair<Ptr<const MobilityModel>,
Ptr<const MobilityModel>
>
ChannelRealizationId_t
;
62
71
int64_t
AssignStreams
(int64_t stream);
72
73
74
private
:
83
Ptr<SpectrumValue>
DoCalcRxPowerSpectralDensity
(
Ptr<const SpectrumValue>
txPsd,
84
Ptr<const MobilityModel>
a,
85
Ptr<const MobilityModel>
b)
const
;
86
93
double
GetValue
(
int
subChannel,
double
speed);
94
99
void
SetTraceFileName
(std::string fileName);
104
void
SetTraceLength
(
Time
t);
105
107
void
LoadTrace
();
108
109
110
111
mutable
std::map <ChannelRealizationId_t, int >
m_windowOffsetsMap
;
112
113
mutable
std::map <ChannelRealizationId_t, Ptr<UniformRandomVariable> >
m_startVariableMap
;
114
118
typedef
std::vector<double>
FadingTraceSample
;
122
typedef
std::vector<FadingTraceSample>
FadingTrace
;
123
124
125
126
std::string
m_traceFile
;
127
128
FadingTrace
m_fadingTrace
;
129
130
131
Time
m_traceLength
;
132
uint32_t
m_samplesNum
;
133
Time
m_windowSize
;
134
uint8_t
m_rbNum
;
135
mutable
Time
m_lastWindowUpdate
;
136
uint8_t
m_timeGranularity
;
137
mutable
uint64_t
m_currentStream
;
138
mutable
uint64_t
m_lastStream
;
139
uint64_t
m_streamSetSize
;
140
mutable
bool
m_streamsAssigned
;
141
142
};
143
144
145
146
}
// namespace ns3
147
148
#endif
/* TRACE_FADING_LOSS_MODEL_H */
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::TraceFadingLossModel::m_rbNum
uint8_t m_rbNum
RB number.
Definition:
trace-fading-loss-model.h:134
ns3::TraceFadingLossModel::m_fadingTrace
FadingTrace m_fadingTrace
fading trace
Definition:
trace-fading-loss-model.h:128
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::TraceFadingLossModel::m_streamSetSize
uint64_t m_streamSetSize
stream set size
Definition:
trace-fading-loss-model.h:139
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:122
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:237
ns3::TraceFadingLossModel::FadingTraceSample
std::vector< double > FadingTraceSample
Vector with fading samples in time domain (for a fixed RB)
Definition:
trace-fading-loss-model.h:118
ns3::TraceFadingLossModel::DoInitialize
virtual void DoInitialize(void)
Initialize() implementation.
Definition:
trace-fading-loss-model.cc:113
ns3::TraceFadingLossModel::DoCalcRxPowerSpectralDensity
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumValue > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Definition:
trace-fading-loss-model.cc:151
ns3::TraceFadingLossModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
trace-fading-loss-model.cc:58
ns3::TraceFadingLossModel::LoadTrace
void LoadTrace()
Load trace function.
Definition:
trace-fading-loss-model.cc:120
ns3::TraceFadingLossModel::m_lastWindowUpdate
Time m_lastWindowUpdate
time of last window update
Definition:
trace-fading-loss-model.h:135
ns3::TraceFadingLossModel::ChannelRealizationId_t
std::pair< Ptr< const MobilityModel >, Ptr< const MobilityModel > > ChannelRealizationId_t
The couple of mobility mnode that form a fading channel realization.
Definition:
trace-fading-loss-model.h:61
ns3::TraceFadingLossModel::m_samplesNum
uint32_t m_samplesNum
number of samples
Definition:
trace-fading-loss-model.h:132
ns3::TraceFadingLossModel::m_traceLength
Time m_traceLength
the trace time
Definition:
trace-fading-loss-model.h:131
ns3::TraceFadingLossModel::GetValue
double GetValue(int subChannel, double speed)
Get the value for a particular sub channel and a given speed.
ns3::TraceFadingLossModel::m_startVariableMap
std::map< ChannelRealizationId_t, Ptr< UniformRandomVariable > > m_startVariableMap
start variable map
Definition:
trace-fading-loss-model.h:113
ns3::TraceFadingLossModel::SetTraceFileName
void SetTraceFileName(std::string fileName)
Set the trace file name.
Definition:
trace-fading-loss-model.cc:99
ns3::TraceFadingLossModel
fading loss model based on precalculated fading traces
Definition:
trace-fading-loss-model.h:44
ns3::TraceFadingLossModel::m_timeGranularity
uint8_t m_timeGranularity
time granularity
Definition:
trace-fading-loss-model.h:136
ns3::TraceFadingLossModel::SetTraceLength
void SetTraceLength(Time t)
Set the trace time.
Definition:
trace-fading-loss-model.cc:107
ns3::TraceFadingLossModel::m_lastStream
uint64_t m_lastStream
the last stream
Definition:
trace-fading-loss-model.h:138
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TraceFadingLossModel::m_streamsAssigned
bool m_streamsAssigned
is streams assigned?
Definition:
trace-fading-loss-model.h:140
ns3::TraceFadingLossModel::m_currentStream
uint64_t m_currentStream
the current stream
Definition:
trace-fading-loss-model.h:137
ns3::TraceFadingLossModel::~TraceFadingLossModel
virtual ~TraceFadingLossModel()
Definition:
trace-fading-loss-model.cc:49
ns3::TraceFadingLossModel::m_windowOffsetsMap
std::map< ChannelRealizationId_t, int > m_windowOffsetsMap
windows offsets map
Definition:
trace-fading-loss-model.h:111
ns3::TraceFadingLossModel::m_windowSize
Time m_windowSize
window size
Definition:
trace-fading-loss-model.h:133
ns3::SpectrumPropagationLossModel
spectrum-aware propagation loss model
Definition:
spectrum-propagation-loss-model.h:44
ns3::TraceFadingLossModel::m_traceFile
std::string m_traceFile
the trace file name
Definition:
trace-fading-loss-model.h:126
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::TraceFadingLossModel::TraceFadingLossModel
TraceFadingLossModel()
Definition:
trace-fading-loss-model.cc:41
Generated on Wed Nov 7 2018 10:02:03 for ns-3 by
1.8.14