22 #include <ns3/object-factory.h>
25 #include <ns3/simulator.h>
26 #include <ns3/attribute-accessor-helper.h>
27 #include <ns3/double.h>
36 #include <ns3/lte-common.h>
56 virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth);
139 .AddConstructor<LteEnbPhy> ()
140 .AddAttribute (
"TxPower",
141 "Transmission power in dBm",
145 MakeDoubleChecker<double> ())
146 .AddAttribute (
"NoiseFigure",
147 "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
148 " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
149 "\"the difference in decibels (dB) between"
150 " the noise output of the actual receiver to the noise output of an "
151 " ideal receiver with the same overall gain and bandwidth when the receivers "
152 " are connected to sources at the standard noise temperature T0.\" "
153 "In this model, we consider T0 = 290K.",
157 MakeDoubleChecker<double> ())
158 .AddAttribute (
"MacToChannelDelay",
159 "The delay in TTI units that occurs between a scheduling decision in the MAC and the actual start of the transmission by the PHY. This is intended to be used to model the latency of real PHY and MAC implementations.",
163 MakeUintegerChecker<uint8_t> ())
240 std::list<Ptr<IdealControlMessage> > l;
242 std::list<UlDciIdealControlMessage> l1;
247 std::list<UlDciIdealControlMessage> l1;
261 std::map <uint16_t, Ptr<LteUePhy> >::iterator it;
278 std::map <uint16_t, Ptr<LteUePhy> >::iterator it;
382 std::list<UlDciIdealControlMessage> uldcilist =
DequeueUlDci ();
383 std::list<UlDciIdealControlMessage>::iterator dciIt = uldcilist.begin ();
384 for (dciIt = uldcilist.begin (); dciIt!=uldcilist.end (); dciIt++)
386 std::map <uint16_t, Ptr<LteUePhy> >::iterator it2;
397 std::vector <int> rbMap;
398 for (
int i = (*dciIt).GetDci ().m_rbStart; i < (*dciIt).GetDci ().m_rbStart + (*dciIt).GetDci ().m_rbLen; i++)
408 std::vector <int> dlRb;
409 if (ctrlMsg.size () > 0)
411 std::list<Ptr<IdealControlMessage> >::iterator it;
412 it = ctrlMsg.begin ();
413 while (it != ctrlMsg.end ())
418 std::map <uint16_t, Ptr<LteUePhy> >::iterator it2;
431 for (
int i = 0; i < 32; i++)
433 if (((dci->GetDci ().m_rbBitmap & mask) >> i) == 1)
437 dlRb.push_back ((i * GetRbgSize ()) + k);
443 (*it2).second->ReceiveIdealControlMessage (msg);
448 std::map <uint16_t, Ptr<LteUePhy> >::iterator it2;
459 (*it2).second->ReceiveIdealControlMessage (msg);
463 ctrlMsg.pop_front ();
464 it = ctrlMsg.begin ();
482 std::map <uint16_t, Ptr<LteUePhy> >::iterator it;
530 Values::const_iterator it;
536 double sinrdb = 10 * log10 ((*it));
540 ulcqi.
m_sinr.push_back (sinrFp);
561 std::list<UlDciIdealControlMessage>
567 std::list<UlDciIdealControlMessage> ret =
m_ulDciQueue.at (0);
569 std::list<UlDciIdealControlMessage> l;
576 std::list<UlDciIdealControlMessage> l;
578 std::list<UlDciIdealControlMessage> emptylist;