22 #include "ns3/lte-enb-net-device.h"
23 #include "ns3/lte-spectrum-phy.h"
24 #include "ns3/lte-ue-net-device.h"
43 for (
auto imsiIt = cellIdIt->second.begin(); imsiIt != cellIdIt->second.end(); ++imsiIt)
45 std::cout <<
"CellId: " << cellIdIt->first <<
" IMSI: " << imsiIt->first
46 <<
" pathloss: " << imsiIt->second <<
" dB" << std::endl;
58 return std::numeric_limits<double>::infinity();
60 auto ueIt = cellIt->second.find(imsi);
61 if (ueIt == cellIt->second.end())
63 return std::numeric_limits<double>::infinity();
75 uint16_t cellId = txPhy->GetDevice()->GetObject<
LteEnbNetDevice>()->GetCellId();
76 uint16_t imsi = rxPhy->GetDevice()->GetObject<
LteUeNetDevice>()->GetImsi();
87 uint16_t imsi = txPhy->GetDevice()->GetObject<
LteUeNetDevice>()->GetImsi();
88 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.