A Discrete-Event Network Simulator
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
27namespace ns3
28{
29
30class RemSpectrumPhy;
31class Node;
32class NetDevice;
33class SpectrumChannel;
34// class BuildingsMobilityModel;
35class MobilityModel;
36
45{
46 public:
49
50 // inherited from Object
51 void DoDispose() override;
56 static TypeId GetTypeId();
57
61 uint16_t GetBandwidth() const;
62
67 void SetBandwidth(uint16_t bw);
68
73 void Install();
74
75 private:
88 void DelayedInstall();
89
99 void RunOneIteration(double xMin, double xMax, double yMin, double yMax);
100
102 void PrintAndReset();
103
105 void Finalize();
106
108 struct RemPoint
109 {
114 };
115
117 std::list<RemPoint> m_rem;
118
119 double m_xMin;
120 double m_xMax;
121 uint16_t m_xRes;
122 double m_xStep;
123
124 double m_yMin;
125 double m_yMax;
126 uint16_t m_yRes;
127 double m_yStep;
128
130
131 uint16_t m_earfcn;
132 uint16_t m_bandwidth;
133
134 double m_z;
135
141 std::string m_channelPath;
142
143 std::string m_outputFile;
144
146
154
156
157 std::ofstream m_outFile;
158
161
162}; // end of `class RadioEnvironmentMapHelper`
163
164} // namespace ns3
165
166#endif /* RADIO_ENVIRONMENT_MAP_HELPER_H */
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Generates a 2D map of the SINR from the strongest transmitter in the downlink of an LTE FDD system.
void Install()
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings.
static TypeId GetTypeId()
Register this type.
std::list< RemPoint > m_rem
List of listeners in the environment.
Ptr< SpectrumChannel > m_channel
The Channel attribute, which is a direct pointer to the DL channel object for which will be created t...
std::ofstream m_outFile
Stream the output to a file.
bool m_useDataChannel
The UseDataChannel attribute.
std::string m_outputFile
The OutputFile attribute.
double m_noisePower
The NoisePower attribute.
void Finalize()
Called when the map generation procedure has been completed.
void DoDispose() override
Destructor implementation.
uint16_t m_earfcn
The Earfcn attribute.
uint32_t m_maxPointsPerIteration
The MaxPointsPerIteration attribute.
double m_xStep
Distance along X axis between adjacent listening points.
void DelayedInstall()
Scheduled by Install() to perform the actual generation of map.
std::string m_channelPath
The ChannelPath attribute.
void PrintAndReset()
Go through every listener, write the computed SINR, and then reset it.
uint16_t m_bandwidth
The Bandwidth attribute.
void RunOneIteration(double xMin, double xMax, double yMin, double yMax)
Mobilize all the listeners to a specified area.
double m_yStep
Distance along Y axis between adjacent listening points.
bool m_stopWhenDone
The StopWhenDone attribute.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
A complete Radio Environment Map is composed of many of this structure.
Ptr< RemSpectrumPhy > phy
Simplified listener which compute SINR over the DL channel.
Ptr< MobilityModel > bmm
Position of the listener in the environment.