A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
trace-fading-loss-model.h
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
50
static
TypeId
GetTypeId ();
51
52
virtual
void
DoInitialize
(
void
);
53
57
typedef
std::pair<Ptr<const MobilityModel>,
Ptr<const MobilityModel>
>
ChannelRealizationId_t
;
58
67
int64_t
AssignStreams
(int64_t stream);
68
69
70
private
:
81
Ptr<SpectrumValue>
DoCalcRxPowerSpectralDensity
(
Ptr<const SpectrumValue>
txPsd,
82
Ptr<const MobilityModel>
a,
83
Ptr<const MobilityModel>
b)
const
;
84
91
double
GetValue
(
int
subChannel,
double
speed);
92
93
void
SetTraceFileName (std::string fileName);
94
void
SetTraceLength (
Time
t);
95
96
void
LoadTrace ();
97
98
99
100
mutable
std::map <ChannelRealizationId_t, int > m_windowOffsetsMap;
101
102
mutable
std::map <ChannelRealizationId_t, Ptr<UniformRandomVariable> > m_startVariableMap;
103
107
typedef
std::vector<double>
FadingTraceSample
;
111
typedef
std::vector<FadingTraceSample>
FadingTrace
;
112
113
114
115
std::string m_traceFile;
116
117
FadingTrace
m_fadingTrace;
118
119
120
Time
m_traceLength;
121
uint32_t m_samplesNum;
122
Time
m_windowSize;
123
uint8_t m_rbNum;
124
mutable
Time
m_lastWindowUpdate;
125
uint8_t m_timeGranularity;
126
127
};
128
129
130
131
}
// namespace ns3
132
133
#endif
/* TRACE_FADING_LOSS_MODEL_H */
ns3::Time
keep track of time unit.
Definition:
nstime.h:149
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::TraceFadingLossModel::FadingTrace
std::vector< FadingTraceSample > FadingTrace
Definition:
trace-fading-loss-model.h:111
ns3::TraceFadingLossModel::AssignStreams
int64_t AssignStreams(int64_t stream)
Definition:
trace-fading-loss-model.cc:224
ns3::TraceFadingLossModel::FadingTraceSample
std::vector< double > FadingTraceSample
Definition:
trace-fading-loss-model.h:107
ns3::TraceFadingLossModel::DoInitialize
virtual void DoInitialize(void)
Definition:
trace-fading-loss-model.cc:106
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:57
ns3::TraceFadingLossModel::GetValue
double GetValue(int subChannel, double speed)
Get the value for a particular sub channel and a given speed.
ns3::TraceFadingLossModel
fading loss model based on precalculated fading traces
Definition:
trace-fading-loss-model.h:44
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:144
ns3::SpectrumPropagationLossModel
spectrum-aware propagation loss model
Definition:
spectrum-propagation-loss-model.h:44
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:44
src
lte
model
trace-fading-loss-model.h
Generated on Sun Mar 16 2014 11:25:07 for ns-3 by
1.8.6