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
radio-environment-map-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 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: Nicola Baldo <nbaldo@cttc.es>
18
*/
19
20
#ifndef RADIO_ENVIRONMENT_MAP_HELPER_H
21
#define RADIO_ENVIRONMENT_MAP_HELPER_H
22
23
#include <ns3/object.h>
24
25
#include <fstream>
26
27
namespace
ns3
28
{
29
30
class
RemSpectrumPhy;
31
class
Node;
32
class
NetDevice;
33
class
SpectrumChannel;
34
// class BuildingsMobilityModel;
35
class
MobilityModel;
36
37
/**
38
* \ingroup lte
39
*
40
* Generates a 2D map of the SINR from the strongest transmitter in the
41
* downlink of an LTE FDD system. For instructions on usage, please refer to
42
* the User Documentation.
43
*/
44
class
RadioEnvironmentMapHelper
:
public
Object
45
{
46
public
:
47
RadioEnvironmentMapHelper
();
48
~RadioEnvironmentMapHelper
()
override
;
49
50
// inherited from Object
51
void
DoDispose
()
override
;
52
/**
53
* Register this type.
54
* \return The object TypeId.
55
*/
56
static
TypeId
GetTypeId
();
57
58
/**
59
* \return the bandwidth (in num of RBs) over which SINR is calculated
60
*/
61
uint16_t
GetBandwidth
()
const
;
62
63
/**
64
*
65
* \param bw the bandwidth (in num of RBs) over which SINR is calculated
66
*/
67
void
SetBandwidth
(uint16_t bw);
68
69
/**
70
* Deploy the RemSpectrumPhy objects that generate the map according to the specified settings.
71
*
72
*/
73
void
Install
();
74
75
private
:
76
/**
77
* Scheduled by Install() to perform the actual generation of map.
78
*
79
* If control channel is used for SINR calculation (the default), the delay
80
* is 2.6 milliseconds from the start of simulation. Otherwise, if data
81
* channel is used, the delay is 500.1 milliseconds from the start of
82
* simulation.
83
*
84
* The method will divide the whole map into parts (each contains at most a
85
* certain number of SINR listening points), and then call RunOneIteration()
86
* on each part, one by one.
87
*/
88
void
DelayedInstall
();
89
90
/**
91
* Mobilize all the listeners to a specified area. Afterwards, schedule a
92
* call to PrintAndReset() in 0.5 milliseconds.
93
*
94
* \param xMin X coordinate of the first SINR listening point to deploy.
95
* \param xMax X coordinate of the last SINR listening point to deploy.
96
* \param yMin Y coordinate of the first SINR listening point to deploy.
97
* \param yMax Y coordinate of the last SINR listening point to deploy.
98
*/
99
void
RunOneIteration
(
double
xMin,
double
xMax,
double
yMin,
double
yMax);
100
101
/// Go through every listener, write the computed SINR, and then reset it.
102
void
PrintAndReset
();
103
104
/// Called when the map generation procedure has been completed.
105
void
Finalize
();
106
107
/// A complete Radio Environment Map is composed of many of this structure.
108
struct
RemPoint
109
{
110
/// Simplified listener which compute SINR over the DL channel.
111
Ptr<RemSpectrumPhy>
phy
;
112
/// Position of the listener in the environment.
113
Ptr<MobilityModel>
bmm
;
114
};
115
116
/// List of listeners in the environment.
117
std::list<RemPoint>
m_rem
;
118
119
double
m_xMin
;
///< The `XMin` attribute.
120
double
m_xMax
;
///< The `XMax` attribute.
121
uint16_t
m_xRes
;
///< The `XRes` attribute.
122
double
m_xStep
;
///< Distance along X axis between adjacent listening points.
123
124
double
m_yMin
;
///< The `YMin` attribute.
125
double
m_yMax
;
///< The `YMax` attribute.
126
uint16_t
m_yRes
;
///< The `YRes` attribute.
127
double
m_yStep
;
///< Distance along Y axis between adjacent listening points.
128
129
uint32_t
m_maxPointsPerIteration
;
///< The `MaxPointsPerIteration` attribute.
130
131
uint16_t
m_earfcn
;
///< The `Earfcn` attribute.
132
uint16_t
m_bandwidth
;
///< The `Bandwidth` attribute.
133
134
double
m_z
;
///< The `Z` attribute.
135
136
/**
137
* The `ChannelPath` attribute. If `Channel` attribute is not set, then
138
* `ChannelPath` will be used to determine the DL channel object for which
139
* the REM will be created.
140
*/
141
std::string
m_channelPath
;
142
143
std::string
m_outputFile
;
///< The `OutputFile` attribute.
144
145
bool
m_stopWhenDone
;
///< The `StopWhenDone` attribute.
146
147
/**
148
* The `Channel` attribute, which is a direct pointer to the DL channel
149
* object for which will be created the REM. Alternatively, `ChannelPath`
150
* attribute can be used. If `ChannelPath` attribute is being used then the
151
* m_channel object is configured by using the `ChannelPath` attribute value.
152
*/
153
Ptr<SpectrumChannel>
m_channel
;
154
155
double
m_noisePower
;
///< The `NoisePower` attribute.
156
157
std::ofstream
m_outFile
;
///< Stream the output to a file.
158
159
bool
m_useDataChannel
;
///< The `UseDataChannel` attribute.
160
int32_t
m_rbId
;
///< The `RbId` attribute.
161
162
};
// end of `class RadioEnvironmentMapHelper`
163
164
}
// namespace ns3
165
166
#endif
/* RADIO_ENVIRONMENT_MAP_HELPER_H */
int32_t
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::RadioEnvironmentMapHelper
Generates a 2D map of the SINR from the strongest transmitter in the downlink of an LTE FDD system.
Definition:
radio-environment-map-helper.h:45
ns3::RadioEnvironmentMapHelper::~RadioEnvironmentMapHelper
~RadioEnvironmentMapHelper() override
Definition:
radio-environment-map-helper.cc:54
ns3::RadioEnvironmentMapHelper::Install
void Install()
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings.
Definition:
radio-environment-map-helper.cc:203
ns3::RadioEnvironmentMapHelper::m_yRes
uint16_t m_yRes
The YRes attribute.
Definition:
radio-environment-map-helper.h:126
ns3::RadioEnvironmentMapHelper::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition:
radio-environment-map-helper.cc:65
ns3::RadioEnvironmentMapHelper::m_xRes
uint16_t m_xRes
The XRes attribute.
Definition:
radio-environment-map-helper.h:121
ns3::RadioEnvironmentMapHelper::m_rem
std::list< RemPoint > m_rem
List of listeners in the environment.
Definition:
radio-environment-map-helper.h:117
ns3::RadioEnvironmentMapHelper::m_rbId
int32_t m_rbId
The RbId attribute.
Definition:
radio-environment-map-helper.h:160
ns3::RadioEnvironmentMapHelper::m_channel
Ptr< SpectrumChannel > m_channel
The Channel attribute, which is a direct pointer to the DL channel object for which will be created t...
Definition:
radio-environment-map-helper.h:153
ns3::RadioEnvironmentMapHelper::m_outFile
std::ofstream m_outFile
Stream the output to a file.
Definition:
radio-environment-map-helper.h:157
ns3::RadioEnvironmentMapHelper::m_useDataChannel
bool m_useDataChannel
The UseDataChannel attribute.
Definition:
radio-environment-map-helper.h:159
ns3::RadioEnvironmentMapHelper::m_z
double m_z
The Z attribute.
Definition:
radio-environment-map-helper.h:134
ns3::RadioEnvironmentMapHelper::m_outputFile
std::string m_outputFile
The OutputFile attribute.
Definition:
radio-environment-map-helper.h:143
ns3::RadioEnvironmentMapHelper::m_noisePower
double m_noisePower
The NoisePower attribute.
Definition:
radio-environment-map-helper.h:155
ns3::RadioEnvironmentMapHelper::RadioEnvironmentMapHelper
RadioEnvironmentMapHelper()
Definition:
radio-environment-map-helper.cc:50
ns3::RadioEnvironmentMapHelper::SetBandwidth
void SetBandwidth(uint16_t bw)
Definition:
radio-environment-map-helper.cc:183
ns3::RadioEnvironmentMapHelper::m_yMin
double m_yMin
The YMin attribute.
Definition:
radio-environment-map-helper.h:124
ns3::RadioEnvironmentMapHelper::Finalize
void Finalize()
Called when the map generation procedure has been completed.
Definition:
radio-environment-map-helper.cc:363
ns3::RadioEnvironmentMapHelper::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
radio-environment-map-helper.cc:59
ns3::RadioEnvironmentMapHelper::m_earfcn
uint16_t m_earfcn
The Earfcn attribute.
Definition:
radio-environment-map-helper.h:131
ns3::RadioEnvironmentMapHelper::m_xMax
double m_xMax
The XMax attribute.
Definition:
radio-environment-map-helper.h:120
ns3::RadioEnvironmentMapHelper::m_maxPointsPerIteration
uint32_t m_maxPointsPerIteration
The MaxPointsPerIteration attribute.
Definition:
radio-environment-map-helper.h:129
ns3::RadioEnvironmentMapHelper::m_xStep
double m_xStep
Distance along X axis between adjacent listening points.
Definition:
radio-environment-map-helper.h:122
ns3::RadioEnvironmentMapHelper::DelayedInstall
void DelayedInstall()
Scheduled by Install() to perform the actual generation of map.
Definition:
radio-environment-map-helper.cc:242
ns3::RadioEnvironmentMapHelper::m_channelPath
std::string m_channelPath
The ChannelPath attribute.
Definition:
radio-environment-map-helper.h:141
ns3::RadioEnvironmentMapHelper::PrintAndReset
void PrintAndReset()
Go through every listener, write the computed SINR, and then reset it.
Definition:
radio-environment-map-helper.cc:341
ns3::RadioEnvironmentMapHelper::m_xMin
double m_xMin
The XMin attribute.
Definition:
radio-environment-map-helper.h:119
ns3::RadioEnvironmentMapHelper::m_bandwidth
uint16_t m_bandwidth
The Bandwidth attribute.
Definition:
radio-environment-map-helper.h:132
ns3::RadioEnvironmentMapHelper::GetBandwidth
uint16_t GetBandwidth() const
Definition:
radio-environment-map-helper.cc:177
ns3::RadioEnvironmentMapHelper::RunOneIteration
void RunOneIteration(double xMin, double xMax, double yMin, double yMax)
Mobilize all the listeners to a specified area.
Definition:
radio-environment-map-helper.cc:306
ns3::RadioEnvironmentMapHelper::m_yStep
double m_yStep
Distance along Y axis between adjacent listening points.
Definition:
radio-environment-map-helper.h:127
ns3::RadioEnvironmentMapHelper::m_yMax
double m_yMax
The YMax attribute.
Definition:
radio-environment-map-helper.h:125
ns3::RadioEnvironmentMapHelper::m_stopWhenDone
bool m_stopWhenDone
The StopWhenDone attribute.
Definition:
radio-environment-map-helper.h:145
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.
ns3::RadioEnvironmentMapHelper::RemPoint
A complete Radio Environment Map is composed of many of this structure.
Definition:
radio-environment-map-helper.h:109
ns3::RadioEnvironmentMapHelper::RemPoint::phy
Ptr< RemSpectrumPhy > phy
Simplified listener which compute SINR over the DL channel.
Definition:
radio-environment-map-helper.h:111
ns3::RadioEnvironmentMapHelper::RemPoint::bmm
Ptr< MobilityModel > bmm
Position of the listener in the environment.
Definition:
radio-environment-map-helper.h:113
src
lte
helper
radio-environment-map-helper.h
Generated on Tue May 28 2024 23:37:05 for ns-3 by
1.9.6