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>
37 #include <ns3/lte-vendor-specific-parameters.h>
65 virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth);
145 m_srsPeriodicity (0),
146 m_currentSrsOffset (0)
157 .AddConstructor<LteEnbPhy> ()
158 .AddAttribute (
"TxPower",
159 "Transmission power in dBm",
163 MakeDoubleChecker<double> ())
164 .AddAttribute (
"NoiseFigure",
165 "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
166 " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
167 "\"the difference in decibels (dB) between"
168 " the noise output of the actual receiver to the noise output of an "
169 " ideal receiver with the same overall gain and bandwidth when the receivers "
170 " are connected to sources at the standard noise temperature T0.\" "
171 "In this model, we consider T0 = 290K.",
175 MakeDoubleChecker<double> ())
176 .AddAttribute (
"MacToChannelDelay",
177 "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.",
181 MakeUintegerChecker<uint8_t> ())
259 std::list<Ptr<LteControlMessage> > l;
261 std::list<UlDciLteControlMessage> l1;
266 std::list<UlDciLteControlMessage> l1;
280 std::set <uint16_t>::iterator it;
297 std::set <uint16_t>::iterator it;
390 std::list<Ptr<LteControlMessage> >::iterator it;
391 for (it = msgList.begin (); it != msgList.end(); it++)
427 std::list<UlDciLteControlMessage> uldcilist =
DequeueUlDci ();
428 std::list<UlDciLteControlMessage>::iterator dciIt = uldcilist.begin ();
430 NS_LOG_DEBUG (
this <<
" eNB Expected TBs " << uldcilist.size ());
431 for (dciIt = uldcilist.begin (); dciIt!=uldcilist.end (); dciIt++)
433 std::set <uint16_t>::iterator it2;
444 std::vector <int> rbMap;
445 for (
int i = (*dciIt).GetDci ().m_rbStart; i < (*dciIt).GetDci ().m_rbStart + (*dciIt).GetDci ().m_rbLen; i++)
456 std::list<DlDciListElement_s> dlDci;
457 std::list<UlDciListElement_s> ulDci;
460 if (ctrlMsg.size () > 0)
462 std::list<Ptr<LteControlMessage> >::iterator it;
463 it = ctrlMsg.begin ();
464 while (it != ctrlMsg.end ())
470 dlDci.push_back (dci->GetDci ());
474 for (
int i = 0; i < 32; i++)
476 if (((dci->GetDci ().m_rbBitmap & mask) >> i) == 1)
491 ulDci.push_back (dci->GetDci ());
523 std::vector <int> dlRb;
541 std::list<Ptr<LteControlMessage> > ctrlMsgList;
542 ctrlMsgList.clear ();
592 Values::const_iterator it;
598 double sinrdb = 10 * std::log10 ((*it));
614 Values::const_iterator it;
620 double sinrdb = 10 * log10 ((*it));
653 std::list<UlDciLteControlMessage>
659 std::list<UlDciLteControlMessage> ret =
m_ulDciQueue.at (0);
661 std::list<UlDciLteControlMessage> l;
668 std::list<UlDciLteControlMessage> l;
670 std::list<UlDciLteControlMessage> emptylist;
690 std::map <uint16_t,uint16_t>::iterator it =
m_srsCounter.find (rnti);