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 
52 NS_OBJECT_ENSURE_REGISTERED (LteEnbPhy);
53 
54 // duration of the data part of a subframe in DL
55 // = 0.001 / 14 * 11 (fixed to 11 symbols) -1ns as margin to avoid overlapping simulator events
56 static const Time DL_DATA_DURATION = NanoSeconds (785714 -1);
57 
58 // delay from subframe start to transmission of the data in DL
59 // = 0.001 / 14 * 3 (ctrl fixed to 3 symbols)
60 static const Time DL_CTRL_DELAY_FROM_SUBFRAME_START = NanoSeconds (214286);
61 
63 // member SAP forwarders
65 
66 
68 {
69 public:
71 
72  // inherited from LteEnbPhySapProvider
73  virtual void SendMacPdu (Ptr<Packet> p);
74  virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth);
75  virtual void SetCellId (uint16_t cellId);
77  virtual uint8_t GetMacChTtiDelay ();
78 
79 
80 private:
82 };
83 
85 {
86 
87 }
88 
89 void
91 {
92  m_phy->DoSendMacPdu (p);
93 }
94 
95 void
96 EnbMemberLteEnbPhySapProvider::SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth)
97 {
98  m_phy->DoSetBandwidth (ulBandwidth, dlBandwidth);
99 }
100 
101 void
103 {
104  m_phy->DoSetCellId (cellId);
105 }
106 
107 void
109 {
111 }
112 
113 uint8_t
115 {
116  return (m_phy->DoGetMacChTtiDelay ());
117 }
118 
119 
121 // generic LteEnbPhy methods
123 
124 
125 
127 {
128  NS_LOG_FUNCTION (this);
129  NS_FATAL_ERROR ("This constructor should not be called");
130 }
131 
133  : LtePhy (dlPhy, ulPhy),
134  m_enbPhySapUser (0),
135  m_enbCphySapUser (0),
136  m_nrFrames (0),
137  m_nrSubFrames (0),
138  m_srsPeriodicity (0),
139  m_srsStartTime (Seconds (0)),
140  m_currentSrsOffset (0),
141  m_interferenceSampleCounter (0)
142 {
145  m_harqPhyModule = Create <LteHarqPhy> ();
146  m_downlinkSpectrumPhy->SetHarqPhyModule (m_harqPhyModule);
147  m_uplinkSpectrumPhy->SetHarqPhyModule (m_harqPhyModule);
149 }
150 
151 TypeId
153 {
154  static TypeId tid = TypeId ("ns3::LteEnbPhy")
155  .SetParent<LtePhy> ()
156  .AddConstructor<LteEnbPhy> ()
157  .AddAttribute ("TxPower",
158  "Transmission power in dBm",
159  DoubleValue (30.0),
160  MakeDoubleAccessor (&LteEnbPhy::SetTxPower,
162  MakeDoubleChecker<double> ())
163  .AddAttribute ("NoiseFigure",
164  "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
165  " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
166  "\"the difference in decibels (dB) between"
167  " the noise output of the actual receiver to the noise output of an "
168  " ideal receiver with the same overall gain and bandwidth when the receivers "
169  " are connected to sources at the standard noise temperature T0.\" "
170  "In this model, we consider T0 = 290K.",
171  DoubleValue (5.0),
172  MakeDoubleAccessor (&LteEnbPhy::SetNoiseFigure,
174  MakeDoubleChecker<double> ())
175  .AddAttribute ("MacToChannelDelay",
176  "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.",
177  UintegerValue (2),
178  MakeUintegerAccessor (&LteEnbPhy::SetMacChDelay,
180  MakeUintegerChecker<uint8_t> ())
181  .AddTraceSource ("ReportUeSinr",
182  "Report UEs' averaged linear SINR",
184  .AddAttribute ("UeSinrSamplePeriod",
185  "The sampling period for reporting UEs' SINR stats (default value 1)",
186  UintegerValue (1),
187  MakeUintegerAccessor (&LteEnbPhy::m_srsSamplePeriod),
188  MakeUintegerChecker<uint16_t> ())
189  .AddTraceSource ("ReportInterference",
190  "Report linear interference power per PHY RB",
192  .AddAttribute ("InterferenceSamplePeriod",
193  "The sampling period for reporting interference stats (default value 1)",
194  UintegerValue (1),
195  MakeUintegerAccessor (&LteEnbPhy::m_interferenceSamplePeriod),
196  MakeUintegerChecker<uint16_t> ())
197  .AddTraceSource ("DlPhyTransmission",
198  "DL transmission PHY layer statistics.",
200  .AddAttribute ("DlSpectrumPhy",
201  "The downlink LteSpectrumPhy associated to this LtePhy",
203  PointerValue (),
204  MakePointerAccessor (&LteEnbPhy::GetDlSpectrumPhy),
205  MakePointerChecker <LteSpectrumPhy> ())
206  .AddAttribute ("UlSpectrumPhy",
207  "The uplink LteSpectrumPhy associated to this LtePhy",
209  PointerValue (),
210  MakePointerAccessor (&LteEnbPhy::GetUlSpectrumPhy),
211  MakePointerChecker <LteSpectrumPhy> ())
212  ;
213  return tid;
214 }
215 
216 
218 {
219 }
220 
221 void
223 {
224  NS_LOG_FUNCTION (this);
225  m_ueAttached.clear ();
226  m_srsUeOffset.clear ();
227  delete m_enbPhySapProvider;
228  delete m_enbCphySapProvider;
230 }
231 
232 void
234 {
235  NS_LOG_FUNCTION (this);
237  m_uplinkSpectrumPhy->SetNoisePowerSpectralDensity (noisePsd);
239 }
240 
241 
242 void
244 {
245  m_enbPhySapUser = s;
246 }
247 
250 {
251  return (m_enbPhySapProvider);
252 }
253 
254 void
256 {
257  NS_LOG_FUNCTION (this);
259 }
260 
263 {
264  NS_LOG_FUNCTION (this);
265  return (m_enbCphySapProvider);
266 }
267 
268 void
270 {
271  NS_LOG_FUNCTION (this << pow);
272  m_txPower = pow;
273 }
274 
275 double
277 {
278  NS_LOG_FUNCTION (this);
279  return m_txPower;
280 }
281 
282 void
284 {
285  NS_LOG_FUNCTION (this << nf);
286  m_noiseFigure = nf;
287 }
288 
289 double
291 {
292  NS_LOG_FUNCTION (this);
293  return m_noiseFigure;
294 }
295 
296 void
298 {
299  NS_LOG_FUNCTION (this);
300  m_macChTtiDelay = delay;
301  for (int i = 0; i < m_macChTtiDelay; i++)
302  {
303  Ptr<PacketBurst> pb = CreateObject <PacketBurst> ();
304  m_packetBurstQueue.push_back (pb);
305  std::list<Ptr<LteControlMessage> > l;
306  m_controlMessagesQueue.push_back (l);
307  std::list<UlDciLteControlMessage> l1;
308  m_ulDciQueue.push_back (l1);
309  }
310  for (int i = 0; i < UL_PUSCH_TTIS_DELAY; i++)
311  {
312  std::list<UlDciLteControlMessage> l1;
313  m_ulDciQueue.push_back (l1);
314  }
315 }
316 
317 uint8_t
319 {
320  return (m_macChTtiDelay);
321 }
322 
325 {
326  return m_downlinkSpectrumPhy;
327 }
328 
331 {
332  return m_uplinkSpectrumPhy;
333 }
334 
335 bool
336 LteEnbPhy::AddUePhy (uint16_t rnti)
337 {
338  NS_LOG_FUNCTION (this << rnti);
339  std::set <uint16_t>::iterator it;
340  it = m_ueAttached.find (rnti);
341  if (it == m_ueAttached.end ())
342  {
343  m_ueAttached.insert (rnti);
344  return (true);
345  }
346  else
347  {
348  NS_LOG_ERROR ("UE already attached");
349  return (false);
350  }
351 }
352 
353 bool
354 LteEnbPhy::DeleteUePhy (uint16_t rnti)
355 {
356  NS_LOG_FUNCTION (this << rnti);
357  std::set <uint16_t>::iterator it;
358  it = m_ueAttached.find (rnti);
359  if (it == m_ueAttached.end ())
360  {
361  NS_LOG_ERROR ("UE not attached");
362  return (false);
363  }
364  else
365  {
366  m_ueAttached.erase (it);
367  return (true);
368  }
369 }
370 
371 
372 
373 void
375 {
376  NS_LOG_FUNCTION (this);
377  SetMacPdu (p);
378 }
379 
380 uint8_t
382 {
383  return (m_macChTtiDelay);
384 }
385 
386 
387 void
389 {
390  NS_LOG_FUNCTION (this);
392 }
393 
394 void
395 LteEnbPhy::SetDownlinkSubChannels (std::vector<int> mask)
396 {
397  NS_LOG_FUNCTION (this);
400  m_downlinkSpectrumPhy->SetTxPowerSpectralDensity (txPsd);
401 }
402 
403 std::vector<int>
405 {
406  NS_LOG_FUNCTION (this);
408 }
409 
412 {
413  NS_LOG_FUNCTION (this);
414 
416 
417  return psd;
418 }
419 
420 
421 void
423 {
424  NS_LOG_FUNCTION (this);
425 }
426 
427 
428 void
430 {
431  NS_LOG_FUNCTION (this << msg);
432  // queues the message (wait for MAC-PHY delay)
433  SetControlMessages (msg);
434 }
435 
436 
437 
438 void
440 {
441  NS_FATAL_ERROR ("Obsolete function");
442  NS_LOG_FUNCTION (this << msg);
444 }
445 
446 void
448 {
449  NS_LOG_FUNCTION (this);
450  std::list<Ptr<LteControlMessage> >::iterator it;
451  for (it = msgList.begin (); it != msgList.end(); it++)
452  {
453  switch ((*it)->GetMessageType ())
454  {
456  {
457  Ptr<RachPreambleLteControlMessage> rachPreamble = DynamicCast<RachPreambleLteControlMessage> (*it);
458  m_enbPhySapUser->ReceiveRachPreamble (rachPreamble->GetRapId ());
459  }
460  break;
462  {
463  Ptr<DlCqiLteControlMessage> dlcqiMsg = DynamicCast<DlCqiLteControlMessage> (*it);
464  CqiListElement_s dlcqi = dlcqiMsg->GetDlCqi ();
465  // check whether the UE is connected
466  if (m_ueAttached.find (dlcqi.m_rnti) != m_ueAttached.end ())
467  {
469  }
470  }
471  break;
473  {
474  Ptr<BsrLteControlMessage> bsrMsg = DynamicCast<BsrLteControlMessage> (*it);
475  MacCeListElement_s bsr = bsrMsg->GetBsr ();
476  // check whether the UE is connected
477  if (m_ueAttached.find (bsr.m_rnti) != m_ueAttached.end ())
478  {
480  }
481  }
482  break;
484  {
485  Ptr<DlHarqFeedbackLteControlMessage> dlharqMsg = DynamicCast<DlHarqFeedbackLteControlMessage> (*it);
486  DlInfoListElement_s dlharq = dlharqMsg->GetDlHarqFeedback ();
487  // check whether the UE is connected
488  if (m_ueAttached.find (dlharq.m_rnti) != m_ueAttached.end ())
489  {
491  }
492  }
493  break;
494  default:
495  NS_FATAL_ERROR ("Unexpected LteControlMessage type");
496  break;
497  }
498  }
499 }
500 
501 
502 
503 void
505 {
506  NS_LOG_FUNCTION (this);
507 
508  ++m_nrFrames;
509  NS_LOG_INFO ("-----frame " << m_nrFrames << "-----");
510  m_nrSubFrames = 0;
511 
512  // send MIB at beginning of every frame
514  Ptr<MibLteControlMessage> mibMsg = Create<MibLteControlMessage> ();
515  mibMsg->SetMib (m_mib);
516  m_controlMessagesQueue.at (0).push_back (mibMsg);
517 
518  StartSubFrame ();
519 }
520 
521 
522 void
524 {
525  NS_LOG_FUNCTION (this);
526 
527  ++m_nrSubFrames;
528 
529  /*
530  * Send SIB1 at 6th subframe of every odd-numbered radio frame. This is
531  * equivalent with Section 5.2.1.2 of 3GPP TS 36.331, where it is specified
532  * "repetitions are scheduled in subframe #5 of all other radio frames for
533  * which SFN mod 2 = 0," except that 3GPP counts frames and subframes starting
534  * from 0, while ns-3 counts starting from 1.
535  */
536  if ((m_nrSubFrames == 6) && ((m_nrFrames % 2) == 1))
537  {
538  Ptr<Sib1LteControlMessage> msg = Create<Sib1LteControlMessage> ();
539  msg->SetSib1 (m_sib1);
540  m_controlMessagesQueue.at (0).push_back (msg);
541  }
542 
543  if (m_srsPeriodicity>0)
544  {
545  // might be 0 in case the eNB has no UEs attached
546  NS_ASSERT_MSG (m_nrFrames > 1, "the SRS index check code assumes that frameNo starts at 1");
547  NS_ASSERT_MSG (m_nrSubFrames > 0 && m_nrSubFrames <= 10, "the SRS index check code assumes that subframeNo starts at 1");
549  }
550  NS_LOG_INFO ("-----sub frame " << m_nrSubFrames << "-----");
551  m_harqPhyModule->SubframeIndication (m_nrFrames, m_nrSubFrames);
552 
553  // update info on TB to be received
554  std::list<UlDciLteControlMessage> uldcilist = DequeueUlDci ();
555  std::list<UlDciLteControlMessage>::iterator dciIt = uldcilist.begin ();
556  NS_LOG_DEBUG (this << " eNB Expected TBs " << uldcilist.size ());
557  for (dciIt = uldcilist.begin (); dciIt!=uldcilist.end (); dciIt++)
558  {
559  std::set <uint16_t>::iterator it2;
560  it2 = m_ueAttached.find ((*dciIt).GetDci ().m_rnti);
561 
562  if (it2 == m_ueAttached.end ())
563  {
564  NS_LOG_ERROR ("UE not attached");
565  }
566  else
567  {
568  // send info of TB to LteSpectrumPhy
569  // translate to allocation map
570  std::vector <int> rbMap;
571  for (int i = (*dciIt).GetDci ().m_rbStart; i < (*dciIt).GetDci ().m_rbStart + (*dciIt).GetDci ().m_rbLen; i++)
572  {
573  rbMap.push_back (i);
574  }
575  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*/);
576  if ((*dciIt).GetDci ().m_ndi==1)
577  {
578  NS_LOG_DEBUG (this << " RNTI " << (*dciIt).GetDci ().m_rnti << " NEW TB");
579  }
580  else
581  {
582  NS_LOG_DEBUG (this << " RNTI " << (*dciIt).GetDci ().m_rnti << " HARQ RETX");
583  }
584  }
585  }
586 
587  // process the current burst of control messages
588  std::list<Ptr<LteControlMessage> > ctrlMsg = GetControlMessages ();
589  m_dlDataRbMap.clear ();
590  if (ctrlMsg.size () > 0)
591  {
592  std::list<Ptr<LteControlMessage> >::iterator it;
593  it = ctrlMsg.begin ();
594  while (it != ctrlMsg.end ())
595  {
596  Ptr<LteControlMessage> msg = (*it);
597  if (msg->GetMessageType () == LteControlMessage::DL_DCI)
598  {
599  Ptr<DlDciLteControlMessage> dci = DynamicCast<DlDciLteControlMessage> (msg);
600  // get the tx power spectral density according to DL-DCI(s)
601  // translate the DCI to Spectrum framework
602  uint32_t mask = 0x1;
603  for (int i = 0; i < 32; i++)
604  {
605  if (((dci->GetDci ().m_rbBitmap & mask) >> i) == 1)
606  {
607  for (int k = 0; k < GetRbgSize (); k++)
608  {
609  m_dlDataRbMap.push_back ((i * GetRbgSize ()) + k);
610  //NS_LOG_DEBUG(this << " [enb]DL-DCI allocated PRB " << (i*GetRbgSize()) + k);
611  }
612  }
613  mask = (mask << 1);
614  }
615  // fire trace of DL Tx PHY stats
616  for (uint8_t i = 0; i < dci->GetDci ().m_mcs.size (); i++)
617  {
619  params.m_cellId = m_cellId;
620  params.m_imsi = 0; // it will be set by DlPhyTransmissionCallback in LteHelper
622  params.m_rnti = dci->GetDci ().m_rnti;
623  params.m_txMode = 0; // TBD
624  params.m_layer = i;
625  params.m_mcs = dci->GetDci ().m_mcs.at (i);
626  params.m_size = dci->GetDci ().m_tbsSize.at (i);
627  params.m_rv = dci->GetDci ().m_rv.at (i);
628  params.m_ndi = dci->GetDci ().m_ndi.at (i);
629  m_dlPhyTransmission (params);
630  }
631 
632  }
633  else if (msg->GetMessageType () == LteControlMessage::UL_DCI)
634  {
635  Ptr<UlDciLteControlMessage> dci = DynamicCast<UlDciLteControlMessage> (msg);
636  QueueUlDci (*dci);
637  }
638  else if (msg->GetMessageType () == LteControlMessage::RAR)
639  {
640  Ptr<RarLteControlMessage> rarMsg = DynamicCast<RarLteControlMessage> (msg);
641  for (std::list<RarLteControlMessage::Rar>::const_iterator it = rarMsg->RarListBegin (); it != rarMsg->RarListEnd (); ++it)
642  {
643  if (it->rarPayload.m_grant.m_ulDelay == true)
644  {
645  NS_FATAL_ERROR (" RAR delay is not yet implemented");
646  }
647  UlGrant_s ulGrant = it->rarPayload.m_grant;
648  // translate the UL grant in a standard UL-DCI and queue it
649  UlDciListElement_s dci;
650  dci.m_rnti = ulGrant.m_rnti;
651  dci.m_rbStart = ulGrant.m_rbStart;
652  dci.m_rbLen = ulGrant.m_rbLen;
653  dci.m_tbSize = ulGrant.m_tbSize;
654  dci.m_mcs = ulGrant.m_mcs;
655  dci.m_hopping = ulGrant.m_hopping;
656  dci.m_tpc = ulGrant.m_tpc;
657  dci.m_cqiRequest = ulGrant.m_cqiRequest;
658  dci.m_ndi = 1;
660  msg.SetDci (dci);
661  QueueUlDci (msg);
662  }
663  }
664  it++;
665 
666  }
667  }
668 
669  SendControlChannels (ctrlMsg);
670 
671  // send data frame
673  if (pb)
674  {
675  Simulator::Schedule (DL_CTRL_DELAY_FROM_SUBFRAME_START, // ctrl frame fixed to 3 symbols
677  this,pb);
678  }
679 
680  // trigger the MAC
682 
683  Simulator::Schedule (Seconds (GetTti ()),
685  this);
686 
687 }
688 
689 void
691 {
692  NS_LOG_FUNCTION (this << " eNB " << m_cellId << " start tx ctrl frame");
693  // set the current tx power spectral density (full bandwidth)
694  std::vector <int> dlRb;
695  for (uint8_t i = 0; i < m_dlBandwidth; i++)
696  {
697  dlRb.push_back (i);
698  }
699  SetDownlinkSubChannels (dlRb);
700  NS_LOG_LOGIC (this << " eNB start TX CTRL");
701  bool pss = false;
702  if ((m_nrSubFrames == 1) || (m_nrSubFrames == 6))
703  {
704  pss = true;
705  }
706  m_downlinkSpectrumPhy->StartTxDlCtrlFrame (ctrlMsgList, pss);
707 
708 }
709 
710 void
712 {
713  // set the current tx power spectral density
715  // send the current burts of packets
716  NS_LOG_LOGIC (this << " eNB start TX DATA");
717  std::list<Ptr<LteControlMessage> > ctrlMsgList;
718  ctrlMsgList.clear ();
719  m_downlinkSpectrumPhy->StartTxDataFrame (pb, ctrlMsgList, DL_DATA_DURATION);
720 }
721 
722 
723 void
725 {
726  NS_LOG_FUNCTION (this << Simulator::Now ().GetSeconds ());
727  if (m_nrSubFrames == 10)
728  {
730  }
731  else
732  {
734  }
735 }
736 
737 
738 void
740 {
741  NS_LOG_FUNCTION (this << Simulator::Now ().GetSeconds ());
743 }
744 
745 
746 void
748 {
749  NS_LOG_FUNCTION (this << sinr << Simulator::Now () << m_srsStartTime);
750  // avoid processing SRSs sent with an old SRS configuration index
752  {
754  m_enbPhySapUser->UlCqiReport (ulcqi);
755  }
756 }
757 
758 void
760 {
761  NS_LOG_FUNCTION (this << sinr);
763  m_enbPhySapUser->UlCqiReport (ulcqi);
764 }
765 
766 void
768 {
769  NS_LOG_FUNCTION (this << interf);
770  Ptr<SpectrumValue> interfCopy = Create<SpectrumValue> (interf);
772  if (m_interferenceSampleCounter == m_interferenceSamplePeriod)
773  {
774  m_reportInterferenceTrace (m_cellId, interfCopy);
775  m_interferenceSampleCounter = 0;
776  }
777 }
778 
779 void
781 {
782  // not used by eNB
783 }
784 
785 
786 
789 {
790  NS_LOG_FUNCTION (this << sinr);
791  Values::const_iterator it;
793  ulcqi.m_ulCqi.m_type = UlCqi_s::PUSCH;
794  int i = 0;
795  for (it = sinr.ConstValuesBegin (); it != sinr.ConstValuesEnd (); it++)
796  {
797  double sinrdb = 10 * std::log10 ((*it));
798 // NS_LOG_DEBUG ("ULCQI RB " << i << " value " << sinrdb);
799  // convert from double to fixed point notation Sxxxxxxxxxxx.xxx
800  int16_t sinrFp = LteFfConverter::double2fpS11dot3 (sinrdb);
801  ulcqi.m_ulCqi.m_sinr.push_back (sinrFp);
802  i++;
803  }
804  return (ulcqi);
805 
806 }
807 
808 
809 void
810 LteEnbPhy::DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth)
811 {
812  NS_LOG_FUNCTION (this << (uint32_t) ulBandwidth << (uint32_t) dlBandwidth);
813  m_ulBandwidth = ulBandwidth;
814  m_dlBandwidth = dlBandwidth;
815 
816  static const int Type0AllocationRbg[4] = {
817  10, // RGB size 1
818  26, // RGB size 2
819  63, // RGB size 3
820  110 // RGB size 4
821  }; // see table 7.1.6.1-1 of 36.213
822  for (int i = 0; i < 4; i++)
823  {
824  if (dlBandwidth < Type0AllocationRbg[i])
825  {
826  m_rbgSize = i + 1;
827  break;
828  }
829  }
830 }
831 
832 void
833 LteEnbPhy::DoSetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn)
834 {
835  NS_LOG_FUNCTION (this << ulEarfcn << dlEarfcn);
836  m_ulEarfcn = ulEarfcn;
837  m_dlEarfcn = dlEarfcn;
838 }
839 
840 
841 void
842 LteEnbPhy::DoAddUe (uint16_t rnti)
843 {
844  NS_LOG_FUNCTION (this << rnti);
845 
846  bool success = AddUePhy (rnti);
847  NS_ASSERT_MSG (success, "AddUePhy() failed");
848 }
849 
850 void
851 LteEnbPhy::DoRemoveUe (uint16_t rnti)
852 {
853  NS_LOG_FUNCTION (this << rnti);
854 
855  bool success = DeleteUePhy (rnti);
856  NS_ASSERT_MSG (success, "DeleteUePhy() failed");
857 }
858 
859 
862 {
863  NS_LOG_FUNCTION (this << sinr);
864  Values::const_iterator it;
866  ulcqi.m_ulCqi.m_type = UlCqi_s::SRS;
867  int i = 0;
868  double srsSum = 0.0;
869  for (it = sinr.ConstValuesBegin (); it != sinr.ConstValuesEnd (); it++)
870  {
871  double sinrdb = 10 * log10 ((*it));
872  // NS_LOG_DEBUG ("ULCQI RB " << i << " value " << sinrdb);
873  // convert from double to fixed point notation Sxxxxxxxxxxx.xxx
874  int16_t sinrFp = LteFfConverter::double2fpS11dot3 (sinrdb);
875  srsSum += (*it);
876  ulcqi.m_ulCqi.m_sinr.push_back (sinrFp);
877  i++;
878  }
879  // Insert the user generated the srs as a vendor specific parameter
880  NS_LOG_DEBUG (this << " ENB RX UL-CQI of " << m_srsUeOffset.at (m_currentSrsOffset));
882  vsp.m_type = SRS_CQI_RNTI_VSP;
883  vsp.m_length = sizeof(SrsCqiRntiVsp);
884  Ptr<SrsCqiRntiVsp> rnti = Create <SrsCqiRntiVsp> (m_srsUeOffset.at (m_currentSrsOffset));
885  vsp.m_value = rnti;
886  ulcqi.m_vendorSpecificList.push_back (vsp);
887  // call SRS tracing method
889  (i > 0) ? (srsSum / i) : DBL_MAX);
890  return (ulcqi);
891 
892 }
893 
894 
895 void
896 LteEnbPhy::CreateSrsReport(uint16_t rnti, double srs)
897 {
898  NS_LOG_FUNCTION (this << rnti << srs);
899  std::map <uint16_t,uint16_t>::iterator it = m_srsSampleCounterMap.find (rnti);
900  if (it==m_srsSampleCounterMap.end ())
901  {
902  // create new entry
903  m_srsSampleCounterMap.insert (std::pair <uint16_t,uint16_t> (rnti, 0));
904  it = m_srsSampleCounterMap.find (rnti);
905  }
906  (*it).second++;
907  if ((*it).second == m_srsSamplePeriod)
908  {
909  m_reportUeSinr (m_cellId, rnti, srs);
910  (*it).second = 0;
911  }
912 }
913 
914 void
915 LteEnbPhy::DoSetTransmissionMode (uint16_t rnti, uint8_t txMode)
916 {
917  NS_LOG_FUNCTION (this << rnti << (uint16_t)txMode);
918  // UL supports only SISO MODE
919 }
920 
921 void
923 {
924  NS_LOG_FUNCTION (this);
925  m_ulDciQueue.at (UL_PUSCH_TTIS_DELAY - 1).push_back (m);
926 }
927 
928 std::list<UlDciLteControlMessage>
930 {
931  NS_LOG_FUNCTION (this);
932  if (m_ulDciQueue.at (0).size ()>0)
933  {
934  std::list<UlDciLteControlMessage> ret = m_ulDciQueue.at (0);
935  m_ulDciQueue.erase (m_ulDciQueue.begin ());
936  std::list<UlDciLteControlMessage> l;
937  m_ulDciQueue.push_back (l);
938  return (ret);
939  }
940  else
941  {
942  m_ulDciQueue.erase (m_ulDciQueue.begin ());
943  std::list<UlDciLteControlMessage> l;
944  m_ulDciQueue.push_back (l);
945  std::list<UlDciLteControlMessage> emptylist;
946  return (emptylist);
947  }
948 }
949 
950 void
951 LteEnbPhy::DoSetSrsConfigurationIndex (uint16_t rnti, uint16_t srcCi)
952 {
953  NS_LOG_FUNCTION (this);
954  uint16_t p = GetSrsPeriodicity (srcCi);
955  if (p!=m_srsPeriodicity)
956  {
957  // resize the array of offset -> re-initialize variables
958  m_srsUeOffset.clear ();
959  m_srsUeOffset.resize (p, 0);
960  m_srsPeriodicity = p;
961  // inhibit SRS until RRC Connection Reconfiguration propagates
962  // to UEs, otherwise we might be wrong in determining the UE who
963  // actually sent the SRS (if the UE was using a stale SRS config)
964  // if we use a static SRS configuration index, we can have a 0ms guard time
965  m_srsStartTime = Simulator::Now () + MilliSeconds (m_macChTtiDelay) + MilliSeconds (0);
966  }
967 
968  NS_LOG_DEBUG (this << " ENB SRS P " << m_srsPeriodicity << " RNTI " << rnti << " offset " << GetSrsSubframeOffset (srcCi) << " CI " << srcCi);
969  std::map <uint16_t,uint16_t>::iterator it = m_srsCounter.find (rnti);
970  if (it != m_srsCounter.end ())
971  {
972  (*it).second = GetSrsSubframeOffset (srcCi) + 1;
973  }
974  else
975  {
976  m_srsCounter.insert (std::pair<uint16_t, uint16_t> (rnti, GetSrsSubframeOffset (srcCi) + 1));
977  }
978  m_srsUeOffset.at (GetSrsSubframeOffset (srcCi)) = rnti;
979 
980 }
981 
982 
983 void
985 {
986  NS_LOG_FUNCTION (this);
987  m_mib = mib;
988 }
989 
990 
991 void
993 {
994  NS_LOG_FUNCTION (this);
995  m_sib1 = sib1;
996 }
997 
998 
999 void
1001 {
1002  m_harqPhyModule = harq;
1003 }
1004 
1005 
1006 void
1008 {
1009  NS_LOG_FUNCTION (this);
1010  // forward to scheduler
1012 }
1013 
1014 };
Values::const_iterator ConstValuesEnd() const
virtual ~LteEnbPhy()
Definition: lte-enb-phy.cc:217
Template for the implementation of the LteEnbCphySapProvider as a member of an owner class of type C ...
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:79
uint8_t m_txMode
the transmission Mode
Definition: lte-common.h:124
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint16_t m_interferenceSampleCounter
Definition: lte-enb-phy.h:326
void DoSetCellId(uint16_t cellId)
Definition: lte-phy.cc:245
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:90
uint16_t m_srsSamplePeriod
Definition: lte-enb-phy.h:316
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
Definition: object-base.h:38
void SetDownlinkSubChannels(std::vector< int > mask)
set the resource blocks (a.k.a.
Definition: lte-enb-phy.cc:395
void CalcChannelQualityForUe(std::vector< double > sinr, Ptr< LteSpectrumPhy > ue)
Calculate the channel quality for a given UE.
Definition: lte-enb-phy.cc:422
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:354
std::list< UlDciLteControlMessage > DequeueUlDci(void)
Definition: lte-enb-phy.cc:929
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:114
virtual void ReceiveLteControlMessageList(std::list< Ptr< LteControlMessage > >)
PhySpectrum received a new list of LteControlMessage.
Definition: lte-enb-phy.cc:447
enum ns3::UlCqi_s::Type_e m_type
void DoSendLteControlMessage(Ptr< LteControlMessage > msg)
Definition: lte-enb-phy.cc:429
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:780
void DoSetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1)
Definition: lte-enb-phy.cc:992
uint16_t GetSrsPeriodicity(uint16_t srcCi) const
Definition: lte-phy.cc:147
double GetTti(void) const
Definition: lte-phy.cc:139
std::vector< uint16_t > m_sinr
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()
Create the PSD for TX.
Definition: lte-enb-phy.cc:411
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:108
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
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)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:223
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:95
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
EnbMemberLteEnbPhySapProvider(LteEnbPhy *phy)
Definition: lte-enb-phy.cc:84
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:825
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
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:833
LteEnbPhySapUser * m_enbPhySapUser
Definition: lte-enb-phy.h:292
uint8_t m_ulBandwidth
Definition: lte-phy.h:224
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:290
void CreateSrsReport(uint16_t rnti, double srs)
Definition: lte-enb-phy.cc:896
static const int Type0AllocationRbg[4]
void SetMacChDelay(uint8_t delay)
Definition: lte-enb-phy.cc:297
The attribute can be read.
Definition: type-id.h:56
static TypeId GetTypeId(void)
Definition: lte-enb-phy.cc:152
virtual void GenerateCtrlCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Ctrl frame
Definition: lte-enb-phy.cc:747
LteEnbCphySapProvider * m_enbCphySapProvider
Definition: lte-enb-phy.h:294
uint16_t GetSrsSubframeOffset(uint16_t srcCi) const
Definition: lte-phy.cc:165
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:75
void DoSetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib)
Definition: lte-enb-phy.cc:984
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Definition: lte-enb-phy.cc:233
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:759
uint8_t GetRbgSize(void) const
Definition: lte-phy.cc:183
Ptr< LteHarqPhy > m_harqPhyModule
Definition: lte-enb-phy.h:309
Ptr< LteSpectrumPhy > GetDlSpectrumPhy() const
Definition: lte-enb-phy.cc:324
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:96
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:439
uint16_t m_ulEarfcn
Definition: lte-phy.h:229
void StartSubFrame(void)
Start a LTE sub frame.
Definition: lte-enb-phy.cc:523
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:233
See section 4.3.3 vendorSpecifiListElement.
bool AddUePhy(uint16_t rnti)
Definition: lte-enb-phy.cc:336
#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:767
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:810
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:690
double GetTxPower() const
Definition: lte-enb-phy.cc:276
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:249
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:851
void SetControlMessages(Ptr< LteControlMessage > m)
Definition: lte-phy.cc:214
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:269
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:842
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Definition: simulator.h:986
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:102
LteEnbCphySapProvider * GetLteEnbCphySapProvider()
Get the CPHY SAP provider.
Definition: lte-enb-phy.cc:262
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:788
#define SRS_CQI_RNTI_VSP
LteEnbCphySapUser * m_enbCphySapUser
Definition: lte-enb-phy.h:295
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:84
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:381
friend class EnbMemberLteEnbPhySapProvider
Definition: lte-enb-phy.h:49
std::list< Ptr< LteControlMessage > > GetControlMessages(void)
Definition: lte-phy.cc:222
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
Ptr< PacketBurst > GetPacketBurst(void)
Definition: lte-phy.cc:195
void DoSetSrsConfigurationIndex(uint16_t rnti, uint16_t srcCi)
Definition: lte-enb-phy.cc:951
uint16_t m_cellId
Cell ID of the attached Enb.
Definition: lte-common.h:121
void SetNoiseFigure(double pow)
Definition: lte-enb-phy.cc:283
void SetLteEnbPhySapUser(LteEnbPhySapUser *s)
Set the PHY SAP User.
Definition: lte-enb-phy.cc:243
static const Time DL_DATA_DURATION
Definition: lte-enb-phy.cc:56
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:213
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:504
std::vector< int > GetDownlinkSubChannels(void)
Definition: lte-enb-phy.cc:404
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:915
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:861
void QueueUlDci(UlDciLteControlMessage m)
Definition: lte-enb-phy.cc:922
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:193
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:711
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:222
void PhyPduReceived(Ptr< Packet > p)
PhySpectrum received a new PHY-PDU.
Definition: lte-enb-phy.cc:388
std::set< uint16_t > m_ueAttached
Definition: lte-enb-phy.h:283
Ptr< LteSpectrumPhy > GetUlSpectrumPhy() const
Definition: lte-enb-phy.cc:330
void SetMacPdu(Ptr< Packet > p)
Definition: lte-phy.cc:189
a unique identifier for an interface.
Definition: type-id.h:49
uint8_t GetMacChDelay(void) const
Definition: lte-enb-phy.cc:318
int64_t GetMilliSeconds(void) const
Definition: nstime.h:281
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
void SetLteEnbCphySapUser(LteEnbCphySapUser *s)
Set the CPHY SAP User.
Definition: lte-enb-phy.cc:255
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Definition: object.cc:342
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:739
void DoSendMacPdu(Ptr< Packet > p)
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
Definition: lte-enb-phy.cc:374
void EndSubFrame(void)
End a LTE sub frame.
Definition: lte-enb-phy.cc:724
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:60