22#include "ns3/lte-enb-net-device.h"
23#include "ns3/lte-spectrum-phy.h"
24#include "ns3/lte-ue-net-device.h"
41 for (std::map<uint16_t, std::map<uint64_t, double>>::const_iterator cellIdIt =
46 for (std::map<uint64_t, double>::const_iterator imsiIt = cellIdIt->second.begin();
47 imsiIt != cellIdIt->second.end();
50 std::cout <<
"CellId: " << cellIdIt->first <<
" IMSI: " << imsiIt->first
51 <<
" pathloss: " << imsiIt->second <<
" dB" << std::endl;
60 std::map<uint16_t, std::map<uint64_t, double>>::iterator cellIt =
m_pathlossMap.find(cellId);
63 return std::numeric_limits<double>::infinity();
65 std::map<uint64_t, double>::iterator ueIt = cellIt->second.find(imsi);
66 if (ueIt == cellIt->second.end())
68 return std::numeric_limits<double>::infinity();
80 uint16_t cellId = txPhy->GetDevice()->GetObject<
LteEnbNetDevice>()->GetCellId();
81 uint16_t imsi = rxPhy->GetDevice()->GetObject<
LteUeNetDevice>()->GetImsi();
92 uint16_t imsi = txPhy->GetDevice()->GetObject<
LteUeNetDevice>()->GetImsi();
93 uint16_t cellId = rxPhy->GetDevice()->GetObject<
LteEnbNetDevice>()->GetCellId();
void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb) override
update the pathloss value
The eNodeB device implementation.
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 ~LteGlobalPathlossDatabase()
The LteUeNetDevice class implements the UE net device.
Smart pointer class similar to boost::intrusive_ptr.
void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb) override
update the pathloss value
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.