A Discrete-Event Network Simulator
API
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 
43 {
44 public:
45 
46  virtual ~LteGlobalPathlossDatabase (void);
47 
56  virtual void UpdatePathloss (std::string context, Ptr<const SpectrumPhy> txPhy, Ptr<const SpectrumPhy> rxPhy, double lossDb) = 0;
57 
66  double GetPathloss (uint16_t cellId, uint64_t imsi);
67 
72  void Print ();
73 
74 protected:
79  std::map<uint16_t, std::map<uint64_t, double> > m_pathlossMap;
80 };
81 
87 {
88 public:
89  // inherited from LteGlobalPathlossDatabase
90  virtual void UpdatePathloss (std::string context, Ptr<const SpectrumPhy> txPhy, Ptr<const SpectrumPhy> rxPhy, double lossDb);
91 };
92 
98 {
99 public:
100  // inherited from LteGlobalPathlossDatabase
101  virtual void UpdatePathloss (std::string context, Ptr<const SpectrumPhy> txPhy, Ptr<const SpectrumPhy> rxPhy, double lossDb);
102 };
103 
104 
105 } // namespace ns3
106 
107 
108 
109 
110 #endif // LTE_GLOBAL_PATHLOSS_DATABASE_H
void Print()
print the stored pathloss values to standard output
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const 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
List of the last pathloss value for each UE by CellId.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double GetPathloss(uint16_t cellId, uint64_t imsi)