A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-global-pathloss-database.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011,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 LTE_GLOBAL_PATHLOSS_DATABASE_H
21#define LTE_GLOBAL_PATHLOSS_DATABASE_H
22
23#include <ns3/log.h>
24#include <ns3/ptr.h>
25
26#include <map>
27#include <string>
28
29namespace ns3
30{
31
32class SpectrumPhy;
33
34/**
35 * \ingroup lte
36 *
37 * Store the last pathloss value for each TX-RX pair. This is an
38 * example of how the PathlossTrace (provided by some SpectrumChannel
39 * implementations) work.
40 *
41 */
43{
44 public:
46
47 /**
48 * update the pathloss value
49 *
50 * \param context
51 * \param txPhy the transmitting PHY
52 * \param rxPhy the receiving PHY
53 * \param lossDb the loss in dB
54 */
55 virtual void UpdatePathloss(std::string context,
58 double lossDb) = 0;
59
60 /**
61 *
62 *
63 * \param cellId the id of the eNB
64 * \param imsi the id of the UE
65 *
66 * \return the pathloss value between the UE and the eNB
67 */
68 double GetPathloss(uint16_t cellId, uint64_t imsi);
69
70 /**
71 * print the stored pathloss values to standard output
72 *
73 */
74 void Print();
75
76 protected:
77 /**
78 * List of the last pathloss value for each UE by CellId.
79 * ( CELL ID, ( IMSI,PATHLOSS ))
80 */
81 std::map<uint16_t, std::map<uint64_t, double>> m_pathlossMap;
82};
83
84/**
85 * \ingroup lte
86 * Store the last pathloss value for each TX-RX pair for downlink
87 */
89{
90 public:
91 // inherited from LteGlobalPathlossDatabase
92 void UpdatePathloss(std::string context,
95 double lossDb) override;
96};
97
98/**
99 * \ingroup lte
100 * Store the last pathloss value for each TX-RX pair for uplink
101 */
103{
104 public:
105 // inherited from LteGlobalPathlossDatabase
106 void UpdatePathloss(std::string context,
109 double lossDb) override;
110};
111
112} // namespace ns3
113
114#endif // LTE_GLOBAL_PATHLOSS_DATABASE_H
Store the last pathloss value for each TX-RX pair.
double GetPathloss(uint16_t cellId, uint64_t imsi)
std::map< uint16_t, std::map< uint64_t, double > > m_pathlossMap
List of the last pathloss value for each UE by CellId.
void Print()
print the stored pathloss values to standard output
virtual void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb)=0
update the pathloss value
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Every class exported by the ns3 library is enclosed in the ns3 namespace.