A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
18
namespace
ns3
19
{
20
21
class
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
*/
31
class
LteGlobalPathlossDatabase
32
{
33
public
:
34
virtual
~LteGlobalPathlossDatabase
();
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,
45
Ptr<const SpectrumPhy>
txPhy,
46
Ptr<const SpectrumPhy>
rxPhy,
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
*/
77
class
DownlinkLteGlobalPathlossDatabase
:
public
LteGlobalPathlossDatabase
78
{
79
public
:
80
// inherited from LteGlobalPathlossDatabase
81
void
UpdatePathloss
(std::string context,
82
Ptr<const SpectrumPhy>
txPhy,
83
Ptr<const SpectrumPhy>
rxPhy,
84
double
lossDb)
override
;
85
};
86
87
/**
88
* \ingroup lte
89
* Store the last pathloss value for each TX-RX pair for uplink
90
*/
91
class
UplinkLteGlobalPathlossDatabase
:
public
LteGlobalPathlossDatabase
92
{
93
public
:
94
// inherited from LteGlobalPathlossDatabase
95
void
UpdatePathloss
(std::string context,
96
Ptr<const SpectrumPhy>
txPhy,
97
Ptr<const SpectrumPhy>
rxPhy,
98
double
lossDb)
override
;
99
};
100
101
}
// namespace ns3
102
103
#endif
// LTE_GLOBAL_PATHLOSS_DATABASE_H
ns3::DownlinkLteGlobalPathlossDatabase
Store the last pathloss value for each TX-RX pair for downlink.
Definition
lte-global-pathloss-database.h:78
ns3::DownlinkLteGlobalPathlossDatabase::UpdatePathloss
void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb) override
update the pathloss value
Definition
lte-global-pathloss-database.cc:58
ns3::LteGlobalPathlossDatabase
Store the last pathloss value for each TX-RX pair.
Definition
lte-global-pathloss-database.h:32
ns3::LteGlobalPathlossDatabase::GetPathloss
double GetPathloss(uint16_t cellId, uint64_t imsi)
Definition
lte-global-pathloss-database.cc:41
ns3::LteGlobalPathlossDatabase::m_pathlossMap
std::map< uint16_t, std::map< uint64_t, double > > m_pathlossMap
List of the last pathloss value for each UE by CellId.
Definition
lte-global-pathloss-database.h:70
ns3::LteGlobalPathlossDatabase::Print
void Print()
print the stored pathloss values to standard output
Definition
lte-global-pathloss-database.cc:27
ns3::LteGlobalPathlossDatabase::UpdatePathloss
virtual void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb)=0
update the pathloss value
ns3::LteGlobalPathlossDatabase::~LteGlobalPathlossDatabase
virtual ~LteGlobalPathlossDatabase()
Definition
lte-global-pathloss-database.cc:22
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::UplinkLteGlobalPathlossDatabase
Store the last pathloss value for each TX-RX pair for uplink.
Definition
lte-global-pathloss-database.h:92
ns3::UplinkLteGlobalPathlossDatabase::UpdatePathloss
void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb) override
update the pathloss value
Definition
lte-global-pathloss-database.cc:70
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
helper
lte-global-pathloss-database.h
Generated on Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0