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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Nicola Baldo <nbaldo@cttc.es>
7 */
8
9#ifndef LTE_GLOBAL_PATHLOSS_DATABASE_H
10#define LTE_GLOBAL_PATHLOSS_DATABASE_H
11
12#include <ns3/log.h>
13#include <ns3/ptr.h>
14
15#include <map>
16#include <string>
17
18namespace ns3
19{
20
21class SpectrumPhy;
22
23/**
24 * @ingroup lte
25 *
26 * Store the last pathloss value for each TX-RX pair. This is an
27 * example of how the PathlossTrace (provided by some SpectrumChannel
28 * implementations) work.
29 *
30 */
32{
33 public:
35
36 /**
37 * update the pathloss value
38 *
39 * @param context
40 * @param txPhy the transmitting PHY
41 * @param rxPhy the receiving PHY
42 * @param lossDb the loss in dB
43 */
44 virtual void UpdatePathloss(std::string context,
47 double lossDb) = 0;
48
49 /**
50 *
51 *
52 * @param cellId the id of the eNB
53 * @param imsi the id of the UE
54 *
55 * @return the pathloss value between the UE and the eNB
56 */
57 double GetPathloss(uint16_t cellId, uint64_t imsi);
58
59 /**
60 * print the stored pathloss values to standard output
61 *
62 */
63 void Print();
64
65 protected:
66 /**
67 * List of the last pathloss value for each UE by CellId.
68 * ( CELL ID, ( IMSI,PATHLOSS ))
69 */
70 std::map<uint16_t, std::map<uint64_t, double>> m_pathlossMap;
71};
72
73/**
74 * @ingroup lte
75 * Store the last pathloss value for each TX-RX pair for downlink
76 */
78{
79 public:
80 // inherited from LteGlobalPathlossDatabase
81 void UpdatePathloss(std::string context,
84 double lossDb) override;
85};
86
87/**
88 * @ingroup lte
89 * Store the last pathloss value for each TX-RX pair for uplink
90 */
92{
93 public:
94 // inherited from LteGlobalPathlossDatabase
95 void UpdatePathloss(std::string context,
98 double lossDb) override;
99};
100
101} // namespace ns3
102
103#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.