23 #include "ns3/lte-enb-net-device.h" 24 #include "ns3/lte-ue-net-device.h" 25 #include "ns3/lte-spectrum-phy.h" 41 for (std::map<uint16_t, std::map<uint64_t, double> >::const_iterator cellIdIt =
m_pathlossMap.begin ();
45 for (std::map<uint64_t, double>::const_iterator imsiIt = cellIdIt->second.begin ();
46 imsiIt != cellIdIt->second.end ();
49 std::cout <<
"CellId: " << cellIdIt->first <<
" IMSI: " << imsiIt->first <<
" pathloss: " << imsiIt->second <<
" dB" << std::endl;
59 std::map<uint16_t, std::map<uint64_t, double> >::iterator cellIt =
m_pathlossMap.find (cellId);
62 return std::numeric_limits<double>::infinity ();
64 std::map<uint64_t, double>::iterator ueIt = cellIt->second.find (imsi);
65 if (ueIt == cellIt->second.end())
67 return std::numeric_limits<double>::infinity ();
80 uint16_t cellId = txPhy->GetDevice ()->GetObject<
LteEnbNetDevice> ()->GetCellId ();
81 uint16_t imsi = rxPhy->GetDevice ()->GetObject<
LteUeNetDevice> ()->GetImsi ();
93 uint16_t imsi = txPhy->GetDevice ()->GetObject<
LteUeNetDevice> ()->GetImsi ();
94 uint16_t cellId = rxPhy->GetDevice ()->GetObject<
LteEnbNetDevice> ()->GetCellId ();
void Print()
print the stored pathloss values to standard output
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb)
update the pathloss value
virtual ~LteGlobalPathlossDatabase(void)
std::map< uint16_t, std::map< uint64_t, double > > m_pathlossMap
List of the last pathloss value for each UE by CellId.
virtual void UpdatePathloss(std::string context, Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb)
update the pathloss value
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double GetPathloss(uint16_t cellId, uint64_t imsi)
The eNodeB device implementation.
The LteUeNetDevice class implements the UE net device.