A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
44 {
45 public:
46 
48  virtual ~RadioEnvironmentMapHelper ();
49 
50  // inherited from Object
51  virtual void DoDispose (void);
52  static TypeId GetTypeId (void);
53 
57  uint8_t GetBandwidth () const;
58 
63  void SetBandwidth (uint8_t bw);
64 
69  void Install ();
70 
71 private:
72 
73  void DelayedInstall ();
74  void RunOneIteration (double xMin, double xMax, double yMin, double yMax);
75  void PrintAndReset ();
76  void Finalize ();
77 
78 
79  struct RemPoint
80  {
83  };
84 
85  std::list<RemPoint> m_rem;
86 
87  double m_xMin;
88  double m_xMax;
89  uint16_t m_xRes;
90  double m_xStep;
91 
92  double m_yMin;
93  double m_yMax;
94  uint16_t m_yRes;
95  double m_yStep;
96 
98 
99  uint16_t m_earfcn;
100  uint16_t m_bandwidth;
101 
102  double m_z;
103 
104  std::string m_channelPath;
105  std::string m_outputFile;
106 
108 
110 
111  double m_noisePower;
112 
113  std::ofstream m_outFile;
114 
115 };
116 
117 
118 }
119 
120 #endif /* RADIO_ENVIRONMENT_MAP_HELPER_H */
Generates a 2D map of the SINR from the strongest transmitter in the downlink of an LTE FDD system...
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:60
void RunOneIteration(double xMin, double xMax, double yMin, double yMax)
void Install()
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings...
a base class which provides memory management and object aggregation
Definition: object.h:64
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
a unique identifier for an interface.
Definition: type-id.h:49