A Discrete-Event Network Simulator
API
radio-environment-map-helper.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2012 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: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 
22 #ifndef RADIO_ENVIRONMENT_MAP_HELPER_H
23 #define RADIO_ENVIRONMENT_MAP_HELPER_H
24 
25 
26 #include <ns3/object.h>
27 #include <fstream>
28 
29 
30 namespace ns3 {
31 
32 class RemSpectrumPhy;
33 class Node;
34 class NetDevice;
35 class SpectrumChannel;
36 //class BuildingsMobilityModel;
37 class MobilityModel;
38 
47 {
48 public:
49 
51  virtual ~RadioEnvironmentMapHelper ();
52 
53  // inherited from Object
54  virtual void DoDispose (void);
59  static TypeId GetTypeId (void);
60 
64  uint16_t GetBandwidth () const;
65 
70  void SetBandwidth (uint16_t bw);
71 
76  void Install ();
77 
78 private:
79 
92  void DelayedInstall ();
93 
103  void RunOneIteration (double xMin, double xMax, double yMin, double yMax);
104 
106  void PrintAndReset ();
107 
109  void Finalize ();
110 
112  struct RemPoint
113  {
118  };
119 
121  std::list<RemPoint> m_rem;
122 
123  double m_xMin;
124  double m_xMax;
125  uint16_t m_xRes;
126  double m_xStep;
127 
128  double m_yMin;
129  double m_yMax;
130  uint16_t m_yRes;
131  double m_yStep;
132 
134 
135  uint16_t m_earfcn;
136  uint16_t m_bandwidth;
137 
138  double m_z;
139 
145  std::string m_channelPath;
146 
147  std::string m_outputFile;
148 
150 
158 
159  double m_noisePower;
160 
161  std::ofstream m_outFile;
162 
164  int32_t m_rbId;
165 
166 }; // end of `class RadioEnvironmentMapHelper`
167 
168 
169 } // end of `namespace ns3`
170 
171 #endif /* RADIO_ENVIRONMENT_MAP_HELPER_H */
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
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.
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.
virtual void DoDispose(void)
Destructor implementation.
std::string m_outputFile
The OutputFile attribute.
double m_noisePower
The NoisePower attribute.
void Finalize()
Called when the map generation procedure has been completed.
uint16_t m_earfcn
The Earfcn attribute.
static TypeId GetTypeId(void)
Register this type.
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.