A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-global-pathloss-database.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011,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 LTE_GLOBAL_PATHLOSS_DATABASE_H
23 #define LTE_GLOBAL_PATHLOSS_DATABASE_H
24 
25 #include <ns3/log.h>
26 #include <ns3/ptr.h>
27 #include <string>
28 #include <map>
29 
30 namespace ns3 {
31 
32 class SpectrumPhy;
33 
41 {
42 public:
43 
44  virtual ~LteGlobalPathlossDatabase (void);
45 
54  virtual void UpdatePathloss (std::string context, Ptr<SpectrumPhy> txPhy, Ptr<SpectrumPhy> rxPhy, double lossDb) = 0;
55 
64  double GetPathloss (uint16_t cellId, uint64_t imsi);
65 
70  void Print ();
71 
72 protected:
73 
74  // CELL ID IMSI PATHLOSS
75  std::map<uint16_t, std::map<uint64_t, double> > m_pathlossMap;
76 };
77 
78 
80 {
81 public:
82  // inherited from LteGlobalPathlossDatabase
83  virtual void UpdatePathloss (std::string context, Ptr<SpectrumPhy> txPhy, Ptr<SpectrumPhy> rxPhy, double lossDb);
84 };
85 
86 
88 {
89 public:
90  // inherited from LteGlobalPathlossDatabase
91  virtual void UpdatePathloss (std::string context, Ptr<SpectrumPhy> txPhy, Ptr<SpectrumPhy> rxPhy, double lossDb);
92 };
93 
94 
95 } // namespace ns3
96 
97 
98 
99 
100 #endif // LTE_GLOBAL_PATHLOSS_DATABASE_H
void Print()
print the stored pathloss values to standard output
virtual void UpdatePathloss(std::string context, Ptr< SpectrumPhy > txPhy, Ptr< SpectrumPhy > rxPhy, double lossDb)=0
update the pathloss value
Store the last pathloss value for each TX-RX pair.
std::map< uint16_t, std::map< uint64_t, double > > m_pathlossMap
double GetPathloss(uint16_t cellId, uint64_t imsi)