A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-enb-phy.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Giuseppe Piro <g.piro@poliba.it>
19  * Marco Miozzo <mmiozzo@cttc.es>
20  */
21 
22 #include <ns3/object-factory.h>
23 #include <ns3/log.h>
24 #include <cfloat>
25 #include <cmath>
26 #include <ns3/simulator.h>
27 #include <ns3/attribute-accessor-helper.h>
28 #include <ns3/double.h>
29 
30 
31 #include "lte-enb-phy.h"
32 #include "lte-ue-phy.h"
33 #include "lte-net-device.h"
35 #include "lte-control-messages.h"
36 #include "lte-enb-net-device.h"
37 #include "lte-ue-rrc.h"
38 #include "lte-enb-mac.h"
39 #include <ns3/lte-common.h>
40 #include <ns3/lte-vendor-specific-parameters.h>
41 
42 // WILD HACK for the inizialization of direct eNB-UE ctrl messaging
43 #include <ns3/node-list.h>
44 #include <ns3/node.h>
45 #include <ns3/lte-ue-net-device.h>
46 #include <ns3/pointer.h>
47 
48 NS_LOG_COMPONENT_DEFINE ("LteEnbPhy");
49 
50 namespace ns3 {
51 
53  ;
54 
55 // duration of the data part of a subframe in DL
56 // = 0.001 / 14 * 11 (fixed to 11 symbols) -1ns as margin to avoid overlapping simulator events
57 static const Time DL_DATA_DURATION = NanoSeconds (785714 -1);
58 
59 // delay from subframe start to transmission of the data in DL
60 // = 0.001 / 14 * 3 (ctrl fixed to 3 symbols)
61 static const Time DL_CTRL_DELAY_FROM_SUBFRAME_START = NanoSeconds (214286);
62 
64 // member SAP forwarders
66 
67 
69 {
70 public:
72 
73  // inherited from LteEnbPhySapProvider
74  virtual void SendMacPdu (Ptr<Packet> p);
75  virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth);
76  virtual void SetCellId (uint16_t cellId);
78  virtual uint8_t GetMacChTtiDelay ();
79 
80 
81 private:
83 };
84 
86 {
87 
88 }
89 
90 void
92 {
93  m_phy->DoSendMacPdu (p);
94 }
95 
96 void
97 EnbMemberLteEnbPhySapProvider::SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth)
98 {
99  m_phy->DoSetBandwidth (ulBandwidth, dlBandwidth);
100 }
101 
102 void
104 {
105  m_phy->DoSetCellId (cellId);
106 }
107 
108 void
110 {
112 }
113 
114 uint8_t
116 {
117  return (m_phy->DoGetMacChTtiDelay ());
118 }
119 
120 
122 // generic LteEnbPhy methods
124 
125 
126 
128 {
129  NS_LOG_FUNCTION (this);
130  NS_FATAL_ERROR ("This constructor should not be called");
131 }
132 
134  : LtePhy (dlPhy, ulPhy),
135  m_enbPhySapUser (0),
136  m_enbCphySapUser (0),
137  m_nrFrames (0),
138  m_nrSubFrames (0),
139  m_srsPeriodicity (0),
140  m_srsStartTime (Seconds (0)),
141  m_currentSrsOffset (0),
142  m_interferenceSampleCounter (0)
143 {
146  m_harqPhyModule = Create <LteHarqPhy> ();
147  m_downlinkSpectrumPhy->SetHarqPhyModule (m_harqPhyModule);
148  m_uplinkSpectrumPhy->SetHarqPhyModule (m_harqPhyModule);
150 }
151 
152 TypeId
154 {
155  static TypeId tid = TypeId ("ns3::LteEnbPhy")
156  .SetParent<LtePhy> ()
157  .AddConstructor<LteEnbPhy> ()
158  .AddAttribute ("TxPower",
159  "Transmission power in dBm",
160  DoubleValue (30.0),
161  MakeDoubleAccessor (&LteEnbPhy::SetTxPower,
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.",
172  DoubleValue (5.0),
173  MakeDoubleAccessor (&LteEnbPhy::SetNoiseFigure,
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.",
178  UintegerValue (2),
179  MakeUintegerAccessor (&LteEnbPhy::SetMacChDelay,
181  MakeUintegerChecker<uint8_t> ())
182  .AddTraceSource ("ReportUeSinr",
183  "Report UEs' averaged linear SINR",
185  .AddAttribute ("UeSinrSamplePeriod",
186  "The sampling period for reporting UEs' SINR stats (default value 1)",
187  UintegerValue (1),
188  MakeUintegerAccessor (&LteEnbPhy::m_srsSamplePeriod),
189  MakeUintegerChecker<uint16_t> ())
190  .AddTraceSource ("ReportInterference",
191  "Report linear interference power per PHY RB",
193  .AddAttribute ("InterferenceSamplePeriod",
194  "The sampling period for reporting interference stats (default value 1)",
195  UintegerValue (1),
196  MakeUintegerAccessor (&LteEnbPhy::m_interferenceSamplePeriod),
197  MakeUintegerChecker<uint16_t> ())
198  .AddTraceSource ("DlPhyTransmission",
199  "DL transmission PHY layer statistics.",
201  .AddAttribute ("DlSpectrumPhy",
202  "The downlink LteSpectrumPhy associated to this LtePhy",
204  PointerValue (),
205  MakePointerAccessor (&LteEnbPhy::GetDlSpectrumPhy),
206  MakePointerChecker <LteSpectrumPhy> ())
207  .AddAttribute ("UlSpectrumPhy",
208  "The uplink LteSpectrumPhy associated to this LtePhy",
210  PointerValue (),
211  MakePointerAccessor (&LteEnbPhy::GetUlSpectrumPhy),
212  MakePointerChecker <LteSpectrumPhy> ())
213  ;
214  return tid;
215 }
216 
217 
219 {
220 }
221 
222 void
224 {
225  NS_LOG_FUNCTION (this);
226  m_ueAttached.clear ();
227  m_srsUeOffset.clear ();
228  delete m_enbPhySapProvider;
229  delete m_enbCphySapProvider;
231 }
232 
233 void
235 {
236  NS_LOG_FUNCTION (this);
238  m_uplinkSpectrumPhy->SetNoisePowerSpectralDensity (noisePsd);
240 }
241 
242 
243 void
245 {
246  m_enbPhySapUser = s;
247 }
248 
251 {
252  return (m_enbPhySapProvider);
253 }
254 
255 void
257 {
258  NS_LOG_FUNCTION (this);
260 }
261 
264 {
265  NS_LOG_FUNCTION (this);
266  return (m_enbCphySapProvider);
267 }
268 
269 void
271 {
272  NS_LOG_FUNCTION (this << pow);
273  m_txPower = pow;
274 }
275 
276 double
278 {
279  NS_LOG_FUNCTION (this);
280  return m_txPower;
281 }
282 
283 void
285 {
286  NS_LOG_FUNCTION (this << nf);
287  m_noiseFigure = nf;
288 }
289 
290 double
292 {
293  NS_LOG_FUNCTION (this);
294  return m_noiseFigure;
295 }
296 
297 void
299 {
300  NS_LOG_FUNCTION (this);
301  m_macChTtiDelay = delay;
302  for (int i = 0; i < m_macChTtiDelay; i++)
303  {
304  Ptr<PacketBurst> pb = CreateObject <PacketBurst> ();
305  m_packetBurstQueue.push_back (pb);
306  std::list<Ptr<LteControlMessage> > l;
307  m_controlMessagesQueue.push_back (l);
308  std::list<UlDciLteControlMessage> l1;
309  m_ulDciQueue.push_back (l1);
310  }
311  for (int i = 0; i < UL_PUSCH_TTIS_DELAY; i++)
312  {
313  std::list<UlDciLteControlMessage> l1;
314  m_ulDciQueue.push_back (l1);
315  }
316 }
317 
318 uint8_t
320 {
321  return (m_macChTtiDelay);
322 }
323 
326 {
327  return m_downlinkSpectrumPhy;
328 }
329 
332 {
333  return m_uplinkSpectrumPhy;
334 }
335 
336 bool
337 LteEnbPhy::AddUePhy (uint16_t rnti)
338 {
339  NS_LOG_FUNCTION (this << rnti);
340  std::set <uint16_t>::iterator it;
341  it = m_ueAttached.find (rnti);
342  if (it == m_ueAttached.end ())
343  {
344  m_ueAttached.insert (rnti);
345  return (true);
346  }
347  else
348  {
349  NS_LOG_ERROR ("UE already attached");
350  return (false);
351  }
352 }
353 
354 bool
355 LteEnbPhy::DeleteUePhy (uint16_t rnti)
356 {
357  NS_LOG_FUNCTION (this << rnti);
358  std::set <uint16_t>::iterator it;
359  it = m_ueAttached.find (rnti);
360  if (it == m_ueAttached.end ())
361  {
362  NS_LOG_ERROR ("UE not attached");
363  return (false);
364  }
365  else
366  {
367  m_ueAttached.erase (it);
368  return (true);
369  }
370 }
371 
372 
373 
374 void
376 {
377  NS_LOG_FUNCTION (this);
378  SetMacPdu (p);
379 }
380 
381 uint8_t
383 {
384  return (m_macChTtiDelay);
385 }
386 
387 
388 void
390 {
391  NS_LOG_FUNCTION (this);
393 }
394 
395 void
396 LteEnbPhy::SetDownlinkSubChannels (std::vector<int> mask)
397 {
398  NS_LOG_FUNCTION (this);
401  m_downlinkSpectrumPhy->SetTxPowerSpectralDensity (txPsd);
402 }
403 
404 std::vector<int>
406 {
407  NS_LOG_FUNCTION (this);
409 }
410 
413 {
414  NS_LOG_FUNCTION (this);
415 
417 
418  return psd;
419 }
420 
421 
422 void
424 {
425  NS_LOG_FUNCTION (this);
426 }
427 
428 
429 void
431 {
432  NS_LOG_FUNCTION (this << msg);
433  // queues the message (wait for MAC-PHY delay)
434  SetControlMessages (msg);
435 }
436 
437 
438 
439 void
441 {
442  NS_FATAL_ERROR ("Obsolete function");
443  NS_LOG_FUNCTION (this << msg);
445 }
446 
447 void
449 {
450  NS_LOG_FUNCTION (this);
451  std::list<Ptr<LteControlMessage> >::iterator it;
452  for (it = msgList.begin (); it != msgList.end(); it++)
453  {
454  switch ((*it)->GetMessageType ())
455  {
457  {
458  Ptr<RachPreambleLteControlMessage> rachPreamble = DynamicCast<RachPreambleLteControlMessage> (*it);
459  m_enbPhySapUser->ReceiveRachPreamble (rachPreamble->GetRapId ());
460  }
461  break;
463  {
464  Ptr<DlCqiLteControlMessage> dlcqiMsg = DynamicCast<DlCqiLteControlMessage> (*it);
465  CqiListElement_s dlcqi = dlcqiMsg->GetDlCqi ();
466  // check whether the UE is connected
467  if (m_ueAttached.find (dlcqi.m_rnti) != m_ueAttached.end ())
468  {
470  }
471  }
472  break;
474  {
475  Ptr<BsrLteControlMessage> bsrMsg = DynamicCast<BsrLteControlMessage> (*it);
476  MacCeListElement_s bsr = bsrMsg->GetBsr ();
477  // check whether the UE is connected
478  if (m_ueAttached.find (bsr.m_rnti) != m_ueAttached.end ())
479  {
481  }
482  }
483  break;
485  {
486  Ptr<DlHarqFeedbackLteControlMessage> dlharqMsg = DynamicCast<DlHarqFeedbackLteControlMessage> (*it);
487  DlInfoListElement_s dlharq = dlharqMsg->GetDlHarqFeedback ();
488  // check whether the UE is connected
489  if (m_ueAttached.find (dlharq.m_rnti) != m_ueAttached.end ())
490  {
492  }
493  }
494  break;
495  default:
496  NS_FATAL_ERROR ("Unexpected LteControlMessage type");
497  break;
498  }
499  }
500 }
501 
502 
503 
504 void
506 {
507  NS_LOG_FUNCTION (this);
508 
509  ++m_nrFrames;
510  NS_LOG_INFO ("-----frame " << m_nrFrames << "-----");
511  m_nrSubFrames = 0;
512 
513  // send MIB at beginning of every frame
515  Ptr<MibLteControlMessage> mibMsg = Create<MibLteControlMessage> ();
516  mibMsg->SetMib (m_mib);
517  m_controlMessagesQueue.at (0).push_back (mibMsg);
518 
519  StartSubFrame ();
520 }
521 
522 
523 void
525 {
526  NS_LOG_FUNCTION (this);
527 
528  ++m_nrSubFrames;
529 
530  /*
531  * Send SIB1 at 6th subframe of every odd-numbered radio frame. This is
532  * equivalent with Section 5.2.1.2 of 3GPP TS 36.331, where it is specified
533  * "repetitions are scheduled in subframe #5 of all other radio frames for
534  * which SFN mod 2 = 0," except that 3GPP counts frames and subframes starting
535  * from 0, while ns-3 counts starting from 1.
536  */
537  if ((m_nrSubFrames == 6) && ((m_nrFrames % 2) == 1))
538  {
539  Ptr<Sib1LteControlMessage> msg = Create<Sib1LteControlMessage> ();
540  msg->SetSib1 (m_sib1);
541  m_controlMessagesQueue.at (0).push_back (msg);
542  }
543 
544  if (m_srsPeriodicity>0)
545  {
546  // might be 0 in case the eNB has no UEs attached
547  NS_ASSERT_MSG (m_nrFrames > 1, "the SRS index check code assumes that frameNo starts at 1");
548  NS_ASSERT_MSG (m_nrSubFrames > 0 && m_nrSubFrames <= 10, "the SRS index check code assumes that subframeNo starts at 1");
550  }
551  NS_LOG_INFO ("-----sub frame " << m_nrSubFrames << "-----");
552  m_harqPhyModule->SubframeIndication (m_nrFrames, m_nrSubFrames);
553 
554  // update info on TB to be received
555  std::list<UlDciLteControlMessage> uldcilist = DequeueUlDci ();
556  std::list<UlDciLteControlMessage>::iterator dciIt = uldcilist.begin ();
557  NS_LOG_DEBUG (this << " eNB Expected TBs " << uldcilist.size ());
558  for (dciIt = uldcilist.begin (); dciIt!=uldcilist.end (); dciIt++)
559  {
560  std::set <uint16_t>::iterator it2;
561  it2 = m_ueAttached.find ((*dciIt).GetDci ().m_rnti);
562 
563  if (it2 == m_ueAttached.end ())
564  {
565  NS_LOG_ERROR ("UE not attached");
566  }
567  else
568  {
569  // send info of TB to LteSpectrumPhy
570  // translate to allocation map
571  std::vector <int> rbMap;
572  for (int i = (*dciIt).GetDci ().m_rbStart; i < (*dciIt).GetDci ().m_rbStart + (*dciIt).GetDci ().m_rbLen; i++)
573  {
574  rbMap.push_back (i);
575  }
576  m_uplinkSpectrumPhy->AddExpectedTb ((*dciIt).GetDci ().m_rnti, (*dciIt).GetDci ().m_ndi, (*dciIt).GetDci ().m_tbSize, (*dciIt).GetDci ().m_mcs, rbMap, 0 /* always SISO*/, 0 /* no HARQ proc id in UL*/, 0 /*evaluated by LteSpectrumPhy*/, false /* UL*/);
577  if ((*dciIt).GetDci ().m_ndi==1)
578  {
579  NS_LOG_DEBUG (this << " RNTI " << (*dciIt).GetDci ().m_rnti << " NEW TB");
580  }
581  else
582  {
583  NS_LOG_DEBUG (this << " RNTI " << (*dciIt).GetDci ().m_rnti << " HARQ RETX");
584  }
585  }
586  }
587 
588  // process the current burst of control messages
589  std::list<Ptr<LteControlMessage> > ctrlMsg = GetControlMessages ();
590  m_dlDataRbMap.clear ();
591  if (ctrlMsg.size () > 0)
592  {
593  std::list<Ptr<LteControlMessage> >::iterator it;
594  it = ctrlMsg.begin ();
595  while (it != ctrlMsg.end ())
596  {
597  Ptr<LteControlMessage> msg = (*it);
598  if (msg->GetMessageType () == LteControlMessage::DL_DCI)
599  {
600  Ptr<DlDciLteControlMessage> dci = DynamicCast<DlDciLteControlMessage> (msg);
601  // get the tx power spectral density according to DL-DCI(s)
602  // translate the DCI to Spectrum framework
603  uint32_t mask = 0x1;
604  for (int i = 0; i < 32; i++)
605  {
606  if (((dci->GetDci ().m_rbBitmap & mask) >> i) == 1)
607  {
608  for (int k = 0; k < GetRbgSize (); k++)
609  {
610  m_dlDataRbMap.push_back ((i * GetRbgSize ()) + k);
611  //NS_LOG_DEBUG(this << " [enb]DL-DCI allocated PRB " << (i*GetRbgSize()) + k);
612  }
613  }
614  mask = (mask << 1);
615  }
616  // fire trace of DL Tx PHY stats
617  for (uint8_t i = 0; i < dci->GetDci ().m_mcs.size (); i++)
618  {
620  params.m_cellId = m_cellId;
621  params.m_imsi = 0; // it will be set by DlPhyTransmissionCallback in LteHelper
623  params.m_rnti = dci->GetDci ().m_rnti;
624  params.m_txMode = 0; // TBD
625  params.m_layer = i;
626  params.m_mcs = dci->GetDci ().m_mcs.at (i);
627  params.m_size = dci->GetDci ().m_tbsSize.at (i);
628  params.m_rv = dci->GetDci ().m_rv.at (i);
629  params.m_ndi = dci->GetDci ().m_ndi.at (i);
630  m_dlPhyTransmission (params);
631  }
632 
633  }
634  else if (msg->GetMessageType () == LteControlMessage::UL_DCI)
635  {
636  Ptr<UlDciLteControlMessage> dci = DynamicCast<UlDciLteControlMessage> (msg);
637  QueueUlDci (*dci);
638  }
639  else if (msg->GetMessageType () == LteControlMessage::RAR)
640  {
641  Ptr<RarLteControlMessage> rarMsg = DynamicCast<RarLteControlMessage> (msg);
642  for (std::list<RarLteControlMessage::Rar>::const_iterator it = rarMsg->RarListBegin (); it != rarMsg->RarListEnd (); ++it)
643  {
644  if (it->rarPayload.m_grant.m_ulDelay == true)
645  {
646  NS_FATAL_ERROR (" RAR delay is not yet implemented");
647  }
648  UlGrant_s ulGrant = it->rarPayload.m_grant;
649  // translate the UL grant in a standard UL-DCI and queue it
650  UlDciListElement_s dci;
651  dci.m_rnti = ulGrant.m_rnti;
652  dci.m_rbStart = ulGrant.m_rbStart;
653  dci.m_rbLen = ulGrant.m_rbLen;
654  dci.m_tbSize = ulGrant.m_tbSize;
655  dci.m_mcs = ulGrant.m_mcs;
656  dci.m_hopping = ulGrant.m_hopping;
657  dci.m_tpc = ulGrant.m_tpc;
658  dci.m_cqiRequest = ulGrant.m_cqiRequest;
659  dci.m_ndi = 1;
661  msg.SetDci (dci);
662  QueueUlDci (msg);
663  }
664  }
665  it++;
666 
667  }
668  }
669 
670  SendControlChannels (ctrlMsg);
671 
672  // send data frame
674  if (pb)
675  {
676  Simulator::Schedule (DL_CTRL_DELAY_FROM_SUBFRAME_START, // ctrl frame fixed to 3 symbols
678  this,pb);
679  }
680 
681  // trigger the MAC
683 
684  Simulator::Schedule (Seconds (GetTti ()),
686  this);
687 
688 }
689 
690 void
692 {
693  NS_LOG_FUNCTION (this << " eNB " << m_cellId << " start tx ctrl frame");
694  // set the current tx power spectral density (full bandwidth)
695  std::vector <int> dlRb;
696  for (uint8_t i = 0; i < m_dlBandwidth; i++)
697  {
698  dlRb.push_back (i);
699  }
700  SetDownlinkSubChannels (dlRb);
701  NS_LOG_LOGIC (this << " eNB start TX CTRL");
702  bool pss = false;
703  if ((m_nrSubFrames == 1) || (m_nrSubFrames == 6))
704  {
705  pss = true;
706  }
707  m_downlinkSpectrumPhy->StartTxDlCtrlFrame (ctrlMsgList, pss);
708 
709 }
710 
711 void
713 {
714  // set the current tx power spectral density
716  // send the current burts of packets
717  NS_LOG_LOGIC (this << " eNB start TX DATA");
718  std::list<Ptr<LteControlMessage> > ctrlMsgList;
719  ctrlMsgList.clear ();
720  m_downlinkSpectrumPhy->StartTxDataFrame (pb, ctrlMsgList, DL_DATA_DURATION);
721 }
722 
723 
724 void
726 {
727  NS_LOG_FUNCTION (this << Simulator::Now ().GetSeconds ());
728  if (m_nrSubFrames == 10)
729  {
731  }
732  else
733  {
735  }
736 }
737 
738 
739 void
741 {
742  NS_LOG_FUNCTION (this << Simulator::Now ().GetSeconds ());
744 }
745 
746 
747 void
749 {
750  NS_LOG_FUNCTION (this << sinr << Simulator::Now () << m_srsStartTime);
751  // avoid processing SRSs sent with an old SRS configuration index
753  {
755  m_enbPhySapUser->UlCqiReport (ulcqi);
756  }
757 }
758 
759 void
761 {
762  NS_LOG_FUNCTION (this << sinr);
764  m_enbPhySapUser->UlCqiReport (ulcqi);
765 }
766 
767 void
769 {
770  NS_LOG_FUNCTION (this << interf);
771  Ptr<SpectrumValue> interfCopy = Create<SpectrumValue> (interf);
773  if (m_interferenceSampleCounter == m_interferenceSamplePeriod)
774  {
775  m_reportInterferenceTrace (m_cellId, interfCopy);
776  m_interferenceSampleCounter = 0;
777  }
778 }
779 
780 void
782 {
783  // not used by eNB
784 }
785 
786 
787 
790 {
791  NS_LOG_FUNCTION (this << sinr);
792  Values::const_iterator it;
794  ulcqi.m_ulCqi.m_type = UlCqi_s::PUSCH;
795  int i = 0;
796  for (it = sinr.ConstValuesBegin (); it != sinr.ConstValuesEnd (); it++)
797  {
798  double sinrdb = 10 * std::log10 ((*it));
799 // NS_LOG_DEBUG ("ULCQI RB " << i << " value " << sinrdb);
800  // convert from double to fixed point notation Sxxxxxxxxxxx.xxx
801  int16_t sinrFp = LteFfConverter::double2fpS11dot3 (sinrdb);
802  ulcqi.m_ulCqi.m_sinr.push_back (sinrFp);
803  i++;
804  }
805  return (ulcqi);
806 
807 }
808 
809 
810 void
811 LteEnbPhy::DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth)
812 {
813  NS_LOG_FUNCTION (this << (uint32_t) ulBandwidth << (uint32_t) dlBandwidth);
814  m_ulBandwidth = ulBandwidth;
815  m_dlBandwidth = dlBandwidth;
816 
817  int Type0AllocationRbg[4] = {
818  10, // RGB size 1
819  26, // RGB size 2
820  63, // RGB size 3
821  110 // RGB size 4
822  }; // see table 7.1.6.1-1 of 36.213
823  for (int i = 0; i < 4; i++)
824  {
825  if (dlBandwidth < Type0AllocationRbg[i])
826  {
827  m_rbgSize = i + 1;
828  break;
829  }
830  }
831 }
832 
833 void
834 LteEnbPhy::DoSetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn)
835 {
836  NS_LOG_FUNCTION (this << ulEarfcn << dlEarfcn);
837  m_ulEarfcn = ulEarfcn;
838  m_dlEarfcn = dlEarfcn;
839 }
840 
841 
842 void
843 LteEnbPhy::DoAddUe (uint16_t rnti)
844 {
845  NS_LOG_FUNCTION (this << rnti);
846 
847  bool success = AddUePhy (rnti);
848  NS_ASSERT_MSG (success, "AddUePhy() failed");
849 }
850 
851 void
852 LteEnbPhy::DoRemoveUe (uint16_t rnti)
853 {
854  NS_LOG_FUNCTION (this << rnti);
855 
856  bool success = DeleteUePhy (rnti);
857  NS_ASSERT_MSG (success, "DeleteUePhy() failed");
858 }
859 
860 
863 {
864  NS_LOG_FUNCTION (this << sinr);
865  Values::const_iterator it;
867  ulcqi.m_ulCqi.m_type = UlCqi_s::SRS;
868  int i = 0;
869  double srsSum = 0.0;
870  for (it = sinr.ConstValuesBegin (); it != sinr.ConstValuesEnd (); it++)
871  {
872  double sinrdb = 10 * log10 ((*it));
873  // NS_LOG_DEBUG ("ULCQI RB " << i << " value " << sinrdb);
874  // convert from double to fixed point notation Sxxxxxxxxxxx.xxx
875  int16_t sinrFp = LteFfConverter::double2fpS11dot3 (sinrdb);
876  srsSum += (*it);
877  ulcqi.m_ulCqi.m_sinr.push_back (sinrFp);
878  i++;
879  }
880  // Insert the user generated the srs as a vendor specific parameter
881  NS_LOG_DEBUG (this << " ENB RX UL-CQI of " << m_srsUeOffset.at (m_currentSrsOffset));
883  vsp.m_type = SRS_CQI_RNTI_VSP;
884  vsp.m_length = sizeof(SrsCqiRntiVsp);
885  Ptr<SrsCqiRntiVsp> rnti = Create <SrsCqiRntiVsp> (m_srsUeOffset.at (m_currentSrsOffset));
886  vsp.m_value = rnti;
887  ulcqi.m_vendorSpecificList.push_back (vsp);
888  // call SRS tracing method
890  (i > 0) ? (srsSum / i) : DBL_MAX);
891  return (ulcqi);
892 
893 }
894 
895 
896 void
897 LteEnbPhy::CreateSrsReport(uint16_t rnti, double srs)
898 {
899  NS_LOG_FUNCTION (this << rnti << srs);
900  std::map <uint16_t,uint16_t>::iterator it = m_srsSampleCounterMap.find (rnti);
901  if (it==m_srsSampleCounterMap.end ())
902  {
903  // create new entry
904  m_srsSampleCounterMap.insert (std::pair <uint16_t,uint16_t> (rnti, 0));
905  it = m_srsSampleCounterMap.find (rnti);
906  }
907  (*it).second++;
908  if ((*it).second == m_srsSamplePeriod)
909  {
910  m_reportUeSinr (m_cellId, rnti, srs);
911  (*it).second = 0;
912  }
913 }
914 
915 void
916 LteEnbPhy::DoSetTransmissionMode (uint16_t rnti, uint8_t txMode)
917 {
918  NS_LOG_FUNCTION (this << rnti << (uint16_t)txMode);
919  // UL supports only SISO MODE
920 }
921 
922 void
924 {
925  NS_LOG_FUNCTION (this);
926  m_ulDciQueue.at (UL_PUSCH_TTIS_DELAY - 1).push_back (m);
927 }
928 
929 std::list<UlDciLteControlMessage>
931 {
932  NS_LOG_FUNCTION (this);
933  if (m_ulDciQueue.at (0).size ()>0)
934  {
935  std::list<UlDciLteControlMessage> ret = m_ulDciQueue.at (0);
936  m_ulDciQueue.erase (m_ulDciQueue.begin ());
937  std::list<UlDciLteControlMessage> l;
938  m_ulDciQueue.push_back (l);
939  return (ret);
940  }
941  else
942  {
943  m_ulDciQueue.erase (m_ulDciQueue.begin ());
944  std::list<UlDciLteControlMessage> l;
945  m_ulDciQueue.push_back (l);
946  std::list<UlDciLteControlMessage> emptylist;
947  return (emptylist);
948  }
949 }
950 
951 void
952 LteEnbPhy::DoSetSrsConfigurationIndex (uint16_t rnti, uint16_t srcCi)
953 {
954  NS_LOG_FUNCTION (this);
955  uint16_t p = GetSrsPeriodicity (srcCi);
956  if (p!=m_srsPeriodicity)
957  {
958  // resize the array of offset -> re-initialize variables
959  m_srsUeOffset.clear ();
960  m_srsUeOffset.resize (p, 0);
961  m_srsPeriodicity = p;
962  // inhibit SRS until RRC Connection Reconfiguration propagates
963  // to UEs, otherwise we might be wrong in determining the UE who
964  // actually sent the SRS (if the UE was using a stale SRS config)
965  // if we use a static SRS configuration index, we can have a 0ms guard time
966  m_srsStartTime = Simulator::Now () + MilliSeconds (m_macChTtiDelay) + MilliSeconds (0);
967  }
968 
969  NS_LOG_DEBUG (this << " ENB SRS P " << m_srsPeriodicity << " RNTI " << rnti << " offset " << GetSrsSubframeOffset (srcCi) << " CI " << srcCi);
970  std::map <uint16_t,uint16_t>::iterator it = m_srsCounter.find (rnti);
971  if (it != m_srsCounter.end ())
972  {
973  (*it).second = GetSrsSubframeOffset (srcCi) + 1;
974  }
975  else
976  {
977  m_srsCounter.insert (std::pair<uint16_t, uint16_t> (rnti, GetSrsSubframeOffset (srcCi) + 1));
978  }
979  m_srsUeOffset.at (GetSrsSubframeOffset (srcCi)) = rnti;
980 
981 }
982 
983 
984 void
986 {
987  NS_LOG_FUNCTION (this);
988  m_mib = mib;
989 }
990 
991 
992 void
994 {
995  NS_LOG_FUNCTION (this);
996  m_sib1 = sib1;
997 }
998 
999 
1000 void
1002 {
1003  m_harqPhyModule = harq;
1004 }
1005 
1006 
1007 void
1009 {
1010  NS_LOG_FUNCTION (this);
1011  // forward to scheduler
1013 }
1014 
1015 };
Values::const_iterator ConstValuesEnd() const
virtual ~LteEnbPhy()
Definition: lte-enb-phy.cc:218
Template for the implementation of the LteEnbCphySapProvider as a member of an owner class of type C ...
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
uint8_t m_txMode
the transmission Mode
Definition: lte-common.h:124
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:345
uint16_t m_interferenceSampleCounter
Definition: lte-enb-phy.h:326
void DoSetCellId(uint16_t cellId)
Definition: lte-phy.cc:246
double m_noiseFigure
Definition: lte-phy.h:221
uint32_t m_nrSubFrames
Definition: lte-enb-phy.h:298
static uint16_t double2fpS11dot3(double val)
Definition: lte-common.cc:97
double m_txPower
Definition: lte-phy.h:220
uint16_t m_dlEarfcn
Definition: lte-phy.h:228
virtual void SendMacPdu(Ptr< Packet > p)
Send the MAC PDU to the channel.
Definition: lte-enb-phy.cc:91
uint16_t m_srsSamplePeriod
Definition: lte-enb-phy.h:316
void SetDownlinkSubChannels(std::vector< int > mask)
set the resource blocks (a.k.a.
Definition: lte-enb-phy.cc:396
void CalcChannelQualityForUe(std::vector< double > sinr, Ptr< LteSpectrumPhy > ue)
Calculate the channel quality for a given UE.
Definition: lte-enb-phy.cc:423
The Uplink Data Control Indicator messages defines the RB allocation for the users in the uplink...
bool DeleteUePhy(uint16_t rnti)
Definition: lte-enb-phy.cc:355
std::list< UlDciLteControlMessage > DequeueUlDci(void)
Definition: lte-enb-phy.cc:930
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
Definition: lte-phy.h:231
virtual uint8_t GetMacChTtiDelay()
Get the delay from MAC to Channel expressed in TTIs.
Definition: lte-enb-phy.cc:115
virtual void ReceiveLteControlMessageList(std::list< Ptr< LteControlMessage > >)
PhySpectrum received a new list of LteControlMessage.
Definition: lte-enb-phy.cc:448
enum ns3::UlCqi_s::Type_e m_type
void DoSendLteControlMessage(Ptr< LteControlMessage > msg)
Definition: lte-enb-phy.cc:430
virtual void ReportRsReceivedPower(const SpectrumValue &power)
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for ...
Definition: lte-enb-phy.cc:781
void DoSetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1)
Definition: lte-enb-phy.cc:993
uint16_t GetSrsPeriodicity(uint16_t srcCi) const
Definition: lte-phy.cc:148
double GetTti(void) const
Definition: lte-phy.cc:140
std::vector< uint16_t > m_sinr
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()
Create the PSD for TX.
Definition: lte-enb-phy.cc:412
std::vector< std::list< UlDciLteControlMessage > > m_ulDciQueue
Definition: lte-enb-phy.h:289
virtual void SendLteControlMessage(Ptr< LteControlMessage > msg)
Send SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
Definition: lte-enb-phy.cc:109
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
Ptr< LteSpectrumPhy > m_downlinkSpectrumPhy
Definition: lte-phy.h:217
See section 4.3.2 ulDciListElement.
TracedCallback< uint16_t, uint16_t, double > m_reportUeSinr
Trace reporting the linear average of SRS SINRs uint16_t cellId, uint16_t rnti, double sinrLinear...
Definition: lte-enb-phy.h:315
See section 4.3.24 cqiListElement.
#define NS_LOG_INFO(msg)
Definition: log.h:298
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
EnbMemberLteEnbPhySapProvider(LteEnbPhy *phy)
Definition: lte-enb-phy.cc:85
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
Definition: simulator.h:824
Service Access Point (SAP) offered by the eNB-PHY to the eNB-MAC.
See section 4.3.12 ulInfoListElement.
uint8_t m_rv
the redundancy version (HARQ)
Definition: lte-common.h:128
NS_LOG_COMPONENT_DEFINE("LteEnbPhy")
std::vector< int > m_dlDataRbMap
Definition: lte-enb-phy.h:287
uint32_t m_nrFrames
Definition: lte-enb-phy.h:297
std::map< uint16_t, uint16_t > m_srsCounter
Definition: lte-enb-phy.h:302
Service Access Point (SAP) offered by the eNB-PHY to the eNB-MAC.
void DoSetEarfcn(uint16_t dlEarfcn, uint16_t ulEarfcn)
Definition: lte-enb-phy.cc:834
LteEnbPhySapUser * m_enbPhySapUser
Definition: lte-enb-phy.h:292
uint8_t m_ulBandwidth
Definition: lte-phy.h:224
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:72
uint16_t m_tbSize
virtual void ReceiveRachPreamble(uint32_t prachId)=0
notify the reception of a RACH preamble on the PRACH
std::vector< int > m_listOfDownlinkSubchannel
Definition: lte-enb-phy.h:285
double GetNoiseFigure() const
Definition: lte-enb-phy.cc:291
void CreateSrsReport(uint16_t rnti, double srs)
Definition: lte-enb-phy.cc:897
void SetMacChDelay(uint8_t delay)
Definition: lte-enb-phy.cc:298
The attribute can be read.
Definition: type-id.h:56
static TypeId GetTypeId(void)
Definition: lte-enb-phy.cc:153
virtual void GenerateCtrlCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Ctrl frame
Definition: lte-enb-phy.cc:748
LteEnbCphySapProvider * m_enbCphySapProvider
Definition: lte-enb-phy.h:294
uint16_t GetSrsSubframeOffset(uint16_t srcCi) const
Definition: lte-phy.cc:166
std::vector< struct VendorSpecificListElement_s > m_vendorSpecificList
void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: lte-phy.cc:76
void DoSetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib)
Definition: lte-enb-phy.cc:985
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Definition: lte-enb-phy.cc:234
virtual void GenerateDataCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs) ...
Definition: lte-enb-phy.cc:760
uint8_t GetRbgSize(void) const
Definition: lte-phy.cc:184
Ptr< LteHarqPhy > m_harqPhyModule
Definition: lte-enb-phy.h:309
Ptr< LteSpectrumPhy > GetDlSpectrumPhy() const
Definition: lte-enb-phy.cc:325
uint64_t m_imsi
IMSI of the scheduled UE.
Definition: lte-common.h:122
std::map< uint16_t, uint16_t > m_srsSampleCounterMap
Definition: lte-enb-phy.h:317
virtual void ReceiveLteUlHarqFeedback(UlInfoListElement_s mes)
PhySpectrum generated a new UL HARQ feedback.
Hold an unsigned integer type.
Definition: uinteger.h:46
virtual void SetBandwidth(uint8_t ulBandwidth, uint8_t dlBandwidth)
Definition: lte-enb-phy.cc:97
Ptr< SampleEmitter > s
void SetHarqPhyModule(Ptr< LteHarqPhy > harq)
Define the RNTI that has generated the.
uint16_t m_interferenceSamplePeriod
Definition: lte-enb-phy.h:325
virtual void ReceiveLteControlMessage(Ptr< LteControlMessage > msg)
Receive the control message.
Definition: lte-enb-phy.cc:440
uint16_t m_ulEarfcn
Definition: lte-phy.h:229
void StartSubFrame(void)
Start a LTE sub frame.
Definition: lte-enb-phy.cc:524
#define NS_LOG_LOGIC(msg)
Definition: log.h:368
See section 4.3.3 vendorSpecifiListElement.
bool AddUePhy(uint16_t rnti)
Definition: lte-enb-phy.cc:337
#define list
virtual void ReportInterference(const SpectrumValue &interf)
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
Definition: lte-enb-phy.cc:768
See section 4.3.23 dlInfoListElement.
See section 4.3.14 macCEListElement.
void DoSetBandwidth(uint8_t ulBandwidth, uint8_t dlBandwidth)
Definition: lte-enb-phy.cc:811
uint8_t m_mcs
MCS for transport block.
Definition: lte-common.h:126
Substitutive structure for specifying BuildRarListElement_s::m_grant field.
void SendControlChannels(std::list< Ptr< LteControlMessage > > ctrlMsgList)
Send the PDCCH and PCFICH in the first 3 symbols.
Definition: lte-enb-phy.cc:691
double GetTxPower() const
Definition: lte-enb-phy.cc:277
uint8_t m_macChTtiDelay
Definition: lte-phy.h:233
virtual void UlInfoListElementHarqFeeback(UlInfoListElement_s params)=0
Notify the HARQ on the UL tranmission status.
LteEnbPhySapProvider * GetLteEnbPhySapProvider()
Get the PHY SAP provider.
Definition: lte-enb-phy.cc:250
hold objects of type Ptr
Definition: pointer.h:33
LteRrcSap::MasterInformationBlock m_mib
Definition: lte-enb-phy.h:306
void DoRemoveUe(uint16_t rnti)
Definition: lte-enb-phy.cc:852
void SetControlMessages(Ptr< LteControlMessage > m)
Definition: lte-phy.cc:215
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
LteEnbPhySapProvider * m_enbPhySapProvider
Definition: lte-enb-phy.h:291
uint16_t m_currentSrsOffset
Definition: lte-enb-phy.h:304
void SetTxPower(double pow)
Definition: lte-enb-phy.cc:270
void SetDci(UlDciListElement_s dci)
add a DCI into the message
uint8_t m_dlBandwidth
Definition: lte-phy.h:225
void DoAddUe(uint16_t rnti)
Definition: lte-enb-phy.cc:843
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Definition: simulator.h:985
uint16_t m_size
Size of transport block.
Definition: lte-common.h:127
static Time Now(void)
Return the "current simulation time".
Definition: simulator.cc:180
virtual void SetCellId(uint16_t cellId)
Definition: lte-enb-phy.cc:103
LteEnbCphySapProvider * GetLteEnbCphySapProvider()
Get the CPHY SAP provider.
Definition: lte-enb-phy.cc:263
uint16_t m_cellId
Definition: lte-phy.h:235
uint8_t m_ndi
new data indicator flag
Definition: lte-common.h:129
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters CreatePuschCqiReport(const SpectrumValue &sinr)
Create the UL CQI feedback from SINR values perceived at the physical layer with the PUSCH signal rec...
Definition: lte-enb-phy.cc:789
#define SRS_CQI_RNTI_VSP
LteEnbCphySapUser * m_enbCphySapUser
Definition: lte-enb-phy.h:295
#define NS_ASSERT_MSG(condition, message)
Definition: assert.h:86
static Ptr< SpectrumValue > CreateTxPowerSpectralDensity(uint16_t earfcn, uint8_t bandwidth, double powerTx, std::vector< int > activeRbs)
create a spectrum value representing the power spectral density of a signal to be transmitted...
uint8_t DoGetMacChTtiDelay()
Definition: lte-enb-phy.cc:382
friend class EnbMemberLteEnbPhySapProvider
Definition: lte-enb-phy.h:49
std::list< Ptr< LteControlMessage > > GetControlMessages(void)
Definition: lte-phy.cc:223
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
Ptr< PacketBurst > GetPacketBurst(void)
Definition: lte-phy.cc:196
void DoSetSrsConfigurationIndex(uint16_t rnti, uint16_t srcCi)
Definition: lte-enb-phy.cc:952
uint16_t m_cellId
Cell ID of the attached Enb.
Definition: lte-common.h:121
void SetNoiseFigure(double pow)
Definition: lte-enb-phy.cc:284
void SetLteEnbPhySapUser(LteEnbPhySapUser *s)
Set the PHY SAP User.
Definition: lte-enb-phy.cc:244
static const Time DL_DATA_DURATION
Definition: lte-enb-phy.cc:57
int Type0AllocationRbg[4]
#define NS_LOG_DEBUG(msg)
Definition: log.h:289
uint8_t m_layer
the layer (cw) of the transmission
Definition: lte-common.h:125
void StartFrame(void)
Start a LTE frame.
Definition: lte-enb-phy.cc:505
std::vector< int > GetDownlinkSubChannels(void)
Definition: lte-enb-phy.cc:405
std::vector< uint16_t > m_srsUeOffset
Definition: lte-enb-phy.h:303
void DoSetTransmissionMode(uint16_t rnti, uint8_t txMode)
Definition: lte-enb-phy.cc:916
uint8_t m_rbgSize
Definition: lte-phy.h:226
virtual void UlCqiReport(FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ulcqi)=0
Returns to MAC level the UL-CQI evaluated.
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters CreateSrsCqiReport(const SpectrumValue &sinr)
Create the UL CQI feedback from SINR values perceived at the physical layer with the SRS signal recei...
Definition: lte-enb-phy.cc:862
void QueueUlDci(UlDciLteControlMessage m)
Definition: lte-enb-phy.cc:923
#define NS_LOG_ERROR(msg)
Definition: log.h:271
Values::const_iterator ConstValuesBegin() const
LteRrcSap::SystemInformationBlockType1 m_sib1
Definition: lte-enb-phy.h:307
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
Definition: lte-phy.h:232
LteEnbPhy models the physical layer for the eNodeB.
Definition: lte-enb-phy.h:47
Ptr< LteSpectrumPhy > m_uplinkSpectrumPhy
Definition: lte-phy.h:218
virtual void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)=0
Trigger the start from a new frame (input from Phy layer)
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
TracedCallback< uint16_t, Ptr< SpectrumValue > > m_reportInterferenceTrace
Trace reporting the interference per PHY RB (TS 36.214 section 5.2.2, measured on DATA) uint16_t cell...
Definition: lte-enb-phy.h:324
void SendDataChannels(Ptr< PacketBurst > pb)
Send the PDSCH.
Definition: lte-enb-phy.cc:712
virtual void ReceivePhyPdu(Ptr< Packet > p)=0
Called by the Phy to notify the MAC of the reception of a new PHY-PDU.
Hold a floating point type.
Definition: double.h:41
Set of values corresponding to a given SpectrumModel.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: lte-enb-phy.cc:223
void PhyPduReceived(Ptr< Packet > p)
PhySpectrum received a new PHY-PDU.
Definition: lte-enb-phy.cc:389
std::set< uint16_t > m_ueAttached
Definition: lte-enb-phy.h:283
Ptr< LteSpectrumPhy > GetUlSpectrumPhy() const
Definition: lte-enb-phy.cc:331
void SetMacPdu(Ptr< Packet > p)
Definition: lte-phy.cc:190
a unique identifier for an interface.
Definition: type-id.h:49
uint8_t GetMacChDelay(void) const
Definition: lte-enb-phy.cc:319
int64_t GetMilliSeconds(void) const
Definition: nstime.h:283
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611
void SetLteEnbCphySapUser(LteEnbCphySapUser *s)
Set the CPHY SAP User.
Definition: lte-enb-phy.cc:256
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Definition: object.cc:343
uint16_t m_rnti
C-RNTI scheduled.
Definition: lte-common.h:123
The LtePhy models the physical layer of LTE.
Definition: lte-phy.h:52
TracedCallback< PhyTransmissionStatParameters > m_dlPhyTransmission
Trace information regarding PHY stats from UL Tx perspective PhyTrasmissionStatParameters see lte-com...
Definition: lte-enb-phy.h:332
static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint16_t earfcn, uint8_t bandwidth, double noiseFigure)
create a SpectrumValue that models the power spectral density of AWGN
#define UL_PUSCH_TTIS_DELAY
Definition: lte-common.h:28
uint16_t m_srsPeriodicity
Definition: lte-enb-phy.h:300
void EndFrame(void)
End a LTE frame.
Definition: lte-enb-phy.cc:740
void DoSendMacPdu(Ptr< Packet > p)
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
Definition: lte-enb-phy.cc:375
void EndSubFrame(void)
End a LTE sub frame.
Definition: lte-enb-phy.cc:725
virtual void ReceiveLteControlMessage(Ptr< LteControlMessage > msg)=0
Receive SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
static const Time DL_CTRL_DELAY_FROM_SUBFRAME_START
Definition: lte-enb-phy.cc:61