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