A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-spectrum-phy.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009, 2011 CTTC
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: Nicola Baldo <nbaldo@cttc.es>
19  * Giuseppe Piro <g.piro@poliba.it>
20  * Marco Miozzo <marco.miozzo@cttc.es> (add physical error model)
21  */
22 
23 
24 #include <ns3/object-factory.h>
25 #include <ns3/log.h>
26 #include <cmath>
27 #include <ns3/simulator.h>
28 #include <ns3/trace-source-accessor.h>
29 #include <ns3/antenna-model.h>
30 #include "lte-spectrum-phy.h"
32 #include "lte-net-device.h"
33 #include "lte-radio-bearer-tag.h"
35 #include "lte-phy-tag.h"
36 #include <ns3/lte-mi-error-model.h>
37 #include <ns3/lte-radio-bearer-tag.h>
38 #include <ns3/boolean.h>
39 #include <ns3/double.h>
40 #include <ns3/config.h>
41 
42 NS_LOG_COMPONENT_DEFINE ("LteSpectrumPhy");
43 
44 namespace ns3 {
45 
46 
47 
48 // duration of SRS portion of UL subframe
49 // = 1 symbol for SRS -1ns as margin to avoid overlapping simulator events
50 static const Time UL_SRS_DURATION = NanoSeconds (71429 -1);
51 
52 // duration of the control portion of a subframe
53 // = 0.001 / 14 * 3 (ctrl fixed to 3 symbols) -1ns as margin to avoid overlapping simulator events
54 static const Time DL_CTRL_DURATION = NanoSeconds (214286 -1);
55 
56 double EffectiveCodingRate[29] = {
57  0.08,
58  0.1,
59  0.11,
60  0.15,
61  0.19,
62  0.24,
63  0.3,
64  0.37,
65  0.44,
66  0.51,
67  0.3,
68  0.33,
69  0.37,
70  0.42,
71  0.48,
72  0.54,
73  0.6,
74  0.43,
75  0.45,
76  0.5,
77  0.55,
78  0.6,
79  0.65,
80  0.7,
81  0.75,
82  0.8,
83  0.85,
84  0.89,
85  0.92
86 };
87 
88 
89 
90 
92 {
93 }
94 
95 TbId_t::TbId_t (const uint16_t a, const uint8_t b)
96 : m_rnti (a),
97  m_layer (b)
98 {
99 }
100 
101 bool
102 operator == (const TbId_t &a, const TbId_t &b)
103 {
104  return ( (a.m_rnti == b.m_rnti) && (a.m_layer == b.m_layer) );
105 }
106 
107 bool
108 operator < (const TbId_t& a, const TbId_t& b)
109 {
110  return ( (a.m_rnti < b.m_rnti) || ( (a.m_rnti == b.m_rnti) && (a.m_layer < b.m_layer) ) );
111 }
112 
113 NS_OBJECT_ENSURE_REGISTERED (LteSpectrumPhy)
114  ;
115 
117  : m_state (IDLE),
118  m_cellId (0),
119  m_transmissionMode (0),
120  m_layersNum (1)
121 {
122  NS_LOG_FUNCTION (this);
123  m_random = CreateObject<UniformRandomVariable> ();
124  m_random->SetAttribute ("Min", DoubleValue (0.0));
125  m_random->SetAttribute ("Max", DoubleValue (1.0));
126  m_interferenceData = CreateObject<LteInterference> ();
127  m_interferenceCtrl = CreateObject<LteInterference> ();
128 
129  for (uint8_t i = 0; i < 7; i++)
130  {
131  m_txModeGain.push_back (1.0);
132  }
133 }
134 
135 
137 {
138  NS_LOG_FUNCTION (this);
139  m_expectedTbs.clear ();
140  m_txModeGain.clear ();
141 }
142 
144 {
145  NS_LOG_FUNCTION (this);
146  m_channel = 0;
147  m_mobility = 0;
148  m_device = 0;
149  m_interferenceData->Dispose ();
150  m_interferenceData = 0;
151  m_interferenceCtrl->Dispose ();
152  m_interferenceCtrl = 0;
153  m_ltePhyTxEndCallback = MakeNullCallback< void, Ptr<const Packet> > ();
154  m_ltePhyRxDataEndErrorCallback = MakeNullCallback< void > ();
155  m_ltePhyRxDataEndOkCallback = MakeNullCallback< void, Ptr<Packet> > ();
156  m_ltePhyRxCtrlEndOkCallback = MakeNullCallback< void, std::list<Ptr<LteControlMessage> > > ();
157  m_ltePhyRxCtrlEndErrorCallback = MakeNullCallback< void > ();
158  m_ltePhyDlHarqFeedbackCallback = MakeNullCallback< void, DlInfoListElement_s > ();
159  m_ltePhyUlHarqFeedbackCallback = MakeNullCallback< void, UlInfoListElement_s > ();
160  m_ltePhyRxPssCallback = MakeNullCallback< void, uint16_t, Ptr<SpectrumValue> > ();
162 }
163 
164 std::ostream& operator<< (std::ostream& os, LteSpectrumPhy::State s)
165 {
166  switch (s)
167  {
169  os << "IDLE";
170  break;
172  os << "RX_DATA";
173  break;
175  os << "RX_CTRL";
176  break;
177  case LteSpectrumPhy::TX:
178  os << "TX";
179  break;
180  default:
181  os << "UNKNOWN";
182  break;
183  }
184  return os;
185 }
186 
187 TypeId
189 {
190  static TypeId tid = TypeId ("ns3::LteSpectrumPhy")
192  .AddTraceSource ("TxStart",
193  "Trace fired when a new transmission is started",
195  .AddTraceSource ("TxEnd",
196  "Trace fired when a previosuly started transmission is finished",
198  .AddTraceSource ("RxStart",
199  "Trace fired when the start of a signal is detected",
201  .AddTraceSource ("RxEndOk",
202  "Trace fired when a previosuly started RX terminates successfully",
204  .AddTraceSource ("RxEndError",
205  "Trace fired when a previosuly started RX terminates with an error",
207  .AddAttribute ("DataErrorModelEnabled",
208  "Activate/Deactivate the error model of data (TBs of PDSCH and PUSCH) [by default is active].",
209  BooleanValue (true),
210  MakeBooleanAccessor (&LteSpectrumPhy::m_dataErrorModelEnabled),
211  MakeBooleanChecker ())
212  .AddAttribute ("CtrlErrorModelEnabled",
213  "Activate/Deactivate the error model of control (PCFICH-PDCCH decodification) [by default is active].",
214  BooleanValue (true),
215  MakeBooleanAccessor (&LteSpectrumPhy::m_ctrlErrorModelEnabled),
216  MakeBooleanChecker ())
217  .AddTraceSource ("DlPhyReception",
218  "DL reception PHY layer statistics.",
220  .AddTraceSource ("UlPhyReception",
221  "DL reception PHY layer statistics.",
223  ;
224  return tid;
225 }
226 
227 
228 
231 {
232  NS_LOG_FUNCTION (this);
233  return m_device;
234 }
235 
236 
239 {
240  NS_LOG_FUNCTION (this);
241  return m_mobility;
242 }
243 
244 
245 void
247 {
248  NS_LOG_FUNCTION (this << d);
249  m_device = d;
250 }
251 
252 
253 void
255 {
256  NS_LOG_FUNCTION (this << m);
257  m_mobility = m;
258 }
259 
260 
261 void
263 {
264  NS_LOG_FUNCTION (this << c);
265  m_channel = c;
266 }
267 
270 {
271  return m_channel;
272 }
273 
276 {
277  return m_rxSpectrumModel;
278 }
279 
280 
281 void
283 {
284  NS_LOG_FUNCTION (this << txPsd);
285  NS_ASSERT (txPsd);
286  m_txPsd = txPsd;
287 }
288 
289 
290 void
292 {
293  NS_LOG_FUNCTION (this << noisePsd);
294  NS_ASSERT (noisePsd);
295  m_rxSpectrumModel = noisePsd->GetSpectrumModel ();
296  m_interferenceData->SetNoisePowerSpectralDensity (noisePsd);
297  m_interferenceCtrl->SetNoisePowerSpectralDensity (noisePsd);
298 }
299 
300 
301 void
303 {
304  NS_LOG_FUNCTION (this);
305  m_cellId = 0;
306  m_state = IDLE;
307  m_transmissionMode = 0;
308  m_layersNum = 1;
309  m_endTxEvent.Cancel ();
313  m_rxControlMessageList.clear ();
314  m_expectedTbs.clear ();
315  m_txControlMessageList.clear ();
316  m_rxPacketBurstList.clear ();
317  m_txPacketBurst = 0;
318  m_rxSpectrumModel = 0;
319 }
320 
321 
322 
323 void
325 {
326  NS_LOG_FUNCTION (this);
328 }
329 
330 
331 void
333 {
334  NS_LOG_FUNCTION (this);
336 }
337 
338 
339 void
341 {
342  NS_LOG_FUNCTION (this);
344 }
345 
346 void
348 {
349  NS_LOG_FUNCTION (this);
351 }
352 
353 void
355 {
356  NS_LOG_FUNCTION (this);
358 }
359 
360 
361 void
363 {
364  NS_LOG_FUNCTION (this);
366 }
367 
368 void
370 {
371  NS_LOG_FUNCTION (this);
373 }
374 
375 void
377 {
378  NS_LOG_FUNCTION (this);
380 }
381 
382 
385 {
386  return m_antenna;
387 }
388 
389 void
391 {
392  NS_LOG_FUNCTION (this << a);
393  m_antenna = a;
394 }
395 
396 void
398 {
399  ChangeState (newState);
400 }
401 
402 
403 void
405 {
406  NS_LOG_LOGIC (this << " state: " << m_state << " -> " << newState);
407  m_state = newState;
408 }
409 
410 
411 void
413 {
414  m_harqPhyModule = harq;
415 }
416 
417 
418 
419 
420 bool
422 {
423  NS_LOG_FUNCTION (this << pb);
424  NS_LOG_LOGIC (this << " state: " << m_state);
425 
426  m_phyTxStartTrace (pb);
427 
428  switch (m_state)
429  {
430  case RX_DATA:
431  case RX_CTRL:
432  NS_FATAL_ERROR ("cannot TX while RX: according to FDD channel acces, the physical layer for transmission cannot be used for reception");
433  break;
434 
435  case TX:
436  NS_FATAL_ERROR ("cannot TX while already TX: the MAC should avoid this");
437  break;
438 
439  case IDLE:
440  {
441  /*
442  m_txPsd must be setted by the device, according to
443  (i) the available subchannel for transmission
444  (ii) the power transmission
445  */
446  NS_ASSERT (m_txPsd);
447  m_txPacketBurst = pb;
448 
449  // we need to convey some PHY meta information to the receiver
450  // to be used for simulation purposes (e.g., the CellId). This
451  // is done by setting the ctrlMsgList parameter of
452  // LteSpectrumSignalParametersDataFrame
453  ChangeState (TX);
455  Ptr<LteSpectrumSignalParametersDataFrame> txParams = Create<LteSpectrumSignalParametersDataFrame> ();
456  txParams->duration = duration;
457  txParams->txPhy = GetObject<SpectrumPhy> ();
458  txParams->txAntenna = m_antenna;
459  txParams->psd = m_txPsd;
460  txParams->packetBurst = pb;
461  txParams->ctrlMsgList = ctrlMsgList;
462  txParams->cellId = m_cellId;
463  m_channel->StartTx (txParams);
465  }
466  return false;
467  break;
468 
469  default:
470  NS_FATAL_ERROR ("unknown state");
471  return true;
472  break;
473  }
474 }
475 
476 bool
478 {
479  NS_LOG_FUNCTION (this << " PSS " << (uint16_t)pss);
480  NS_LOG_LOGIC (this << " state: " << m_state);
481 
482 
483 // m_phyTxStartTrace (pb);
484 
485  switch (m_state)
486  {
487  case RX_DATA:
488  case RX_CTRL:
489  NS_FATAL_ERROR ("cannot TX while RX: according to FDD channel acces, the physical layer for transmission cannot be used for reception");
490  break;
491 
492  case TX:
493  NS_FATAL_ERROR ("cannot TX while already TX: the MAC should avoid this");
494  break;
495 
496  case IDLE:
497  {
498  /*
499  m_txPsd must be setted by the device, according to
500  (i) the available subchannel for transmission
501  (ii) the power transmission
502  */
503  NS_ASSERT (m_txPsd);
504 
505  // we need to convey some PHY meta information to the receiver
506  // to be used for simulation purposes (e.g., the CellId). This
507  // is done by setting the cellId parameter of
508  // LteSpectrumSignalParametersDlCtrlFrame
509  ChangeState (TX);
511 
512  Ptr<LteSpectrumSignalParametersDlCtrlFrame> txParams = Create<LteSpectrumSignalParametersDlCtrlFrame> ();
513  txParams->duration = DL_CTRL_DURATION;
514  txParams->txPhy = GetObject<SpectrumPhy> ();
515  txParams->txAntenna = m_antenna;
516  txParams->psd = m_txPsd;
517  txParams->cellId = m_cellId;
518  txParams->pss = pss;
519  txParams->ctrlMsgList = ctrlMsgList;
520  m_channel->StartTx (txParams);
522  }
523  return false;
524  break;
525 
526  default:
527  NS_FATAL_ERROR ("unknown state");
528  return true;
529  break;
530  }
531 }
532 
533 
534 bool
536 {
537  NS_LOG_FUNCTION (this);
538  NS_LOG_LOGIC (this << " state: " << m_state);
539 
540  // m_phyTxStartTrace (pb);
541 
542  switch (m_state)
543  {
544  case RX_DATA:
545  case RX_CTRL:
546  NS_FATAL_ERROR ("cannot TX while RX: according to FDD channel acces, the physical layer for transmission cannot be used for reception");
547  break;
548 
549  case TX:
550  NS_FATAL_ERROR ("cannot TX while already TX: the MAC should avoid this");
551  break;
552 
553  case IDLE:
554  {
555  /*
556  m_txPsd must be setted by the device, according to
557  (i) the available subchannel for transmission
558  (ii) the power transmission
559  */
560  NS_ASSERT (m_txPsd);
561  NS_LOG_LOGIC (this << " m_txPsd: " << *m_txPsd);
562 
563  // we need to convey some PHY meta information to the receiver
564  // to be used for simulation purposes (e.g., the CellId). This
565  // is done by setting the cellId parameter of
566  // LteSpectrumSignalParametersDlCtrlFrame
567  ChangeState (TX);
569  Ptr<LteSpectrumSignalParametersUlSrsFrame> txParams = Create<LteSpectrumSignalParametersUlSrsFrame> ();
570  txParams->duration = UL_SRS_DURATION;
571  txParams->txPhy = GetObject<SpectrumPhy> ();
572  txParams->txAntenna = m_antenna;
573  txParams->psd = m_txPsd;
574  txParams->cellId = m_cellId;
575  m_channel->StartTx (txParams);
577  }
578  return false;
579  break;
580 
581  default:
582  NS_FATAL_ERROR ("unknown state");
583  return true;
584  break;
585  }
586 }
587 
588 
589 
590 void
592 {
593  NS_LOG_FUNCTION (this);
594  NS_LOG_LOGIC (this << " state: " << m_state);
595 
596  NS_ASSERT (m_state == TX);
597 
599 
601  {
602  for (std::list<Ptr<Packet> >::const_iterator iter = m_txPacketBurst->Begin (); iter
603  != m_txPacketBurst->End (); ++iter)
604  {
605  Ptr<Packet> packet = (*iter)->Copy ();
606  m_ltePhyTxEndCallback (packet);
607  }
608  }
609 
610  m_txPacketBurst = 0;
611  ChangeState (IDLE);
612 }
613 
614 
615 void
617 {
618  NS_LOG_FUNCTION (this << spectrumRxParams);
619  NS_LOG_LOGIC (this << " state: " << m_state);
620 
621  Ptr <const SpectrumValue> rxPsd = spectrumRxParams->psd;
622  Time duration = spectrumRxParams->duration;
623 
624  // the device might start RX only if the signal is of a type
625  // understood by this device - in this case, an LTE signal.
626  Ptr<LteSpectrumSignalParametersDataFrame> lteDataRxParams = DynamicCast<LteSpectrumSignalParametersDataFrame> (spectrumRxParams);
627  if (lteDataRxParams != 0)
628  {
629  m_interferenceData->AddSignal (rxPsd, duration);
630  StartRxData (lteDataRxParams);
631  }
632  else
633  {
634  Ptr<LteSpectrumSignalParametersDlCtrlFrame> lteDlCtrlRxParams = DynamicCast<LteSpectrumSignalParametersDlCtrlFrame> (spectrumRxParams);
635  Ptr<LteSpectrumSignalParametersUlSrsFrame> lteUlSrsRxParams = DynamicCast<LteSpectrumSignalParametersUlSrsFrame> (spectrumRxParams);
636  if ((lteDlCtrlRxParams!=0)||(lteUlSrsRxParams!=0))
637  {
638  m_interferenceCtrl->AddSignal (rxPsd, duration);
639  StartRxCtrl (spectrumRxParams);
640  }
641  else
642  {
643  // other type of signal (could be 3G, GSM, whatever) -> interference
644  m_interferenceData->AddSignal (rxPsd, duration);
645  m_interferenceCtrl->AddSignal (rxPsd, duration);
646  }
647  }
648 
649 }
650 
651 void
653 {
654  NS_LOG_FUNCTION (this);
655  switch (m_state)
656  {
657  case TX:
658  NS_FATAL_ERROR ("cannot RX while TX: according to FDD channel access, the physical layer for transmission cannot be used for reception");
659  break;
660  case RX_CTRL:
661  NS_FATAL_ERROR ("cannot RX Data while receiving control");
662  break;
663  case IDLE:
664  case RX_DATA:
665  // the behavior is similar when
666  // we're IDLE or RX because we can receive more signals
667  // simultaneously (e.g., at the eNB).
668  {
669  // To check if we're synchronized to this signal, we check
670  // for the CellId which is reported in the
671  // LteSpectrumSignalParametersDataFrame
672  if (params->cellId == m_cellId)
673  {
674  NS_LOG_LOGIC (this << " synchronized with this signal (cellId=" << params->cellId << ")");
675  if ((m_rxPacketBurstList.empty ())&&(m_rxControlMessageList.empty ()))
676  {
677  NS_ASSERT (m_state == IDLE);
678  // first transmission, i.e., we're IDLE and we
679  // start RX
681  m_firstRxDuration = params->duration;
682  NS_LOG_LOGIC (this << " scheduling EndRx with delay " << params->duration.GetSeconds () << "s");
684  }
685  else
686  {
688  // sanity check: if there are multiple RX events, they
689  // should occur at the same time and have the same
690  // duration, otherwise the interference calculation
691  // won't be correct
693  && (m_firstRxDuration == params->duration));
694  }
695 
697  if (params->packetBurst)
698  {
699  m_rxPacketBurstList.push_back (params->packetBurst);
700  m_interferenceData->StartRx (params->psd);
701 
702  m_phyRxStartTrace (params->packetBurst);
703  }
704  NS_LOG_DEBUG (this << " insert msgs " << params->ctrlMsgList.size ());
705  m_rxControlMessageList.insert (m_rxControlMessageList.end (), params->ctrlMsgList.begin (), params->ctrlMsgList.end ());
706 
707  NS_LOG_LOGIC (this << " numSimultaneousRxEvents = " << m_rxPacketBurstList.size ());
708  }
709  else
710  {
711  NS_LOG_LOGIC (this << " not in sync with this signal (cellId="
712  << params->cellId << ", m_cellId=" << m_cellId << ")");
713  }
714  }
715  break;
716 
717  default:
718  NS_FATAL_ERROR ("unknown state");
719  break;
720  }
721 
722  NS_LOG_LOGIC (this << " state: " << m_state);
723 }
724 
725 
726 
727 void
729 {
730  NS_LOG_FUNCTION (this);
731  switch (m_state)
732  {
733  case TX:
734  NS_FATAL_ERROR ("cannot RX while TX: according to FDD channel access, the physical layer for transmission cannot be used for reception");
735  break;
736  case RX_DATA:
737  NS_FATAL_ERROR ("cannot RX data while receing control");
738  break;
739  case IDLE:
740  case RX_CTRL:
741  // the behavior is similar when
742  // we're IDLE or RX because we can receive more signals
743  // simultaneously (e.g., at the eNB).
744  {
745  // To check if we're synchronized to this signal, we check
746  // for the CellId which is reported in the
747  // LteSpectrumSignalParametersDlCtrlFrame
748  uint16_t cellId;
749  bool dl;
750  Ptr<LteSpectrumSignalParametersDlCtrlFrame> lteDlCtrlRxParams = DynamicCast<LteSpectrumSignalParametersDlCtrlFrame> (params);
751  if (lteDlCtrlRxParams!=0)
752  {
753  cellId = lteDlCtrlRxParams->cellId;
754  dl = true;
755  }
756  else
757  {
758  Ptr<LteSpectrumSignalParametersUlSrsFrame> lteUlSrsRxParams = DynamicCast<LteSpectrumSignalParametersUlSrsFrame> (params);
759  cellId = lteUlSrsRxParams->cellId;
760  dl = false;
761  }
762  if (dl)
763  {
764  // check presence of PSS for UE measuerements
765  if (lteDlCtrlRxParams->pss == true)
766  {
767  SpectrumValue pssPsd = *params->psd;
769  {
770  m_ltePhyRxPssCallback (cellId, params->psd);
771  }
772  }
773  }
774  if (cellId == m_cellId)
775  {
776  NS_LOG_LOGIC (this << " synchronized with this signal (cellId=" << cellId << ")");
777  if (m_state == IDLE)
778  {
779  // first transmission, i.e., we're IDLE and we
780  // start RX
783  m_firstRxDuration = params->duration;
784  NS_LOG_LOGIC (this << " scheduling EndRx with delay " << params->duration);
785  if (dl==true)
786  {
787  // store the DCIs
788  m_rxControlMessageList = lteDlCtrlRxParams->ctrlMsgList;
790  }
791  else
792  {
794  }
795  }
796  else if (m_state == RX_CTRL)
797  {
798  // sanity check: if there are multiple RX events, they
799  // should occur at the same time and have the same
800  // duration, otherwise the interference calculation
801  // won't be correct
803  && (m_firstRxDuration == params->duration));
804  }
805 
807  m_interferenceCtrl->StartRx (params->psd);
808 
809 // NS_LOG_LOGIC (this << " numSimultaneousRxEvents = " << m_rxPacketBurstList.size ());
810  }
811  else
812  {
813  NS_LOG_LOGIC (this << " not in sync with this signal (cellId="
814  << cellId << ", m_cellId=" << m_cellId << ")");
815  }
816  }
817  break;
818 
819  default:
820  NS_FATAL_ERROR ("unknown state");
821  break;
822  }
823 
824  NS_LOG_LOGIC (this << " state: " << m_state);
825 }
826 
827 
828 void
830 {
831  NS_LOG_FUNCTION (this << sinr);
832  m_sinrPerceived = sinr;
833 }
834 
835 
836 void
837 LteSpectrumPhy::AddExpectedTb (uint16_t rnti, uint8_t ndi, uint16_t size, uint8_t mcs, std::vector<int> map, uint8_t layer, uint8_t harqId,uint8_t rv, bool downlink)
838 {
839  NS_LOG_FUNCTION (this << " rnti: " << rnti << " NDI " << (uint16_t)ndi << " size " << size << " mcs " << (uint16_t)mcs << " layer " << (uint16_t)layer << " rv " << (uint16_t)rv);
840  TbId_t tbId;
841  tbId.m_rnti = rnti;
842  tbId.m_layer = layer;
843  expectedTbs_t::iterator it;
844  it = m_expectedTbs.find (tbId);
845  if (it != m_expectedTbs.end ())
846  {
847  // migth be a TB of an unreceived packet (due to high progpalosses)
848  m_expectedTbs.erase (it);
849  }
850  // insert new entry
851  tbInfo_t tbInfo = {ndi, size, mcs, map, harqId, rv, 0.0, downlink, false, false};
852  m_expectedTbs.insert (std::pair<TbId_t, tbInfo_t> (tbId,tbInfo));
853 }
854 
855 
856 void
858 {
859  NS_LOG_FUNCTION (this);
860  NS_LOG_LOGIC (this << " state: " << m_state);
861 
863 
864  // this will trigger CQI calculation and Error Model evaluation
865  // as a side effect, the error model should update the error status of all TBs
866  m_interferenceData->EndRx ();
867  NS_LOG_DEBUG (this << " No. of burts " << m_rxPacketBurstList.size ());
868  NS_LOG_DEBUG (this << " Expected TBs " << m_expectedTbs.size ());
869  expectedTbs_t::iterator itTb = m_expectedTbs.begin ();
870 
871  // apply transmission mode gain
872  NS_LOG_DEBUG (this << " txMode " << (uint16_t)m_transmissionMode << " gain " << m_txModeGain.at (m_transmissionMode));
875 
876  while (itTb!=m_expectedTbs.end ())
877  {
878  if ((m_dataErrorModelEnabled)&&(m_rxPacketBurstList.size ()>0)) // avoid to check for errors when there is no actual data transmitted
879  {
880  // retrieve HARQ info
881  HarqProcessInfoList_t harqInfoList;
882  if ((*itTb).second.ndi == 0)
883  {
884  // TB retxed: retrieve HARQ history
885  uint16_t ulHarqId = 0;
886  if ((*itTb).second.downlink)
887  {
888  harqInfoList = m_harqPhyModule->GetHarqProcessInfoDl ((*itTb).second.harqProcessId, (*itTb).first.m_layer);
889  }
890  else
891  {
892  harqInfoList = m_harqPhyModule->GetHarqProcessInfoUl ((*itTb).first.m_rnti, ulHarqId);
893  }
894  }
895  TbStats_t tbStats = LteMiErrorModel::GetTbDecodificationStats (m_sinrPerceived, (*itTb).second.rbBitmap, (*itTb).second.size, (*itTb).second.mcs, harqInfoList);
896  (*itTb).second.mi = tbStats.mi;
897  (*itTb).second.corrupt = m_random->GetValue () > tbStats.tbler ? false : true;
898  NS_LOG_DEBUG (this << "RNTI " << (*itTb).first.m_rnti << " size " << (*itTb).second.size << " mcs " << (uint32_t)(*itTb).second.mcs << " bitmap " << (*itTb).second.rbBitmap.size () << " layer " << (uint16_t)(*itTb).first.m_layer << " TBLER " << tbStats.tbler << " corrupted " << (*itTb).second.corrupt);
899  // fire traces on DL/UL reception PHY stats
902  params.m_cellId = m_cellId;
903  params.m_imsi = 0; // it will be set by DlPhyTransmissionCallback in LteHelper
904  params.m_rnti = (*itTb).first.m_rnti;
905  params.m_txMode = m_transmissionMode;
906  params.m_layer = (*itTb).first.m_layer;
907  params.m_mcs = (*itTb).second.mcs;
908  params.m_size = (*itTb).second.size;
909  params.m_rv = (*itTb).second.rv;
910  params.m_ndi = (*itTb).second.ndi;
911  params.m_correctness = (uint8_t)!(*itTb).second.corrupt;
912  if ((*itTb).second.downlink)
913  {
914  // DL
915  m_dlPhyReception (params);
916  }
917  else
918  {
919  // UL
920  params.m_rv = harqInfoList.size ();
921  m_ulPhyReception (params);
922  }
923  }
924 
925  itTb++;
926  }
927  std::map <uint16_t, DlInfoListElement_s> harqDlInfoMap;
928  for (std::list<Ptr<PacketBurst> >::const_iterator i = m_rxPacketBurstList.begin ();
929  i != m_rxPacketBurstList.end (); ++i)
930  {
931  for (std::list<Ptr<Packet> >::const_iterator j = (*i)->Begin (); j != (*i)->End (); ++j)
932  {
933  // retrieve TB info of this packet
934  LteRadioBearerTag tag;
935  (*j)->PeekPacketTag (tag);
936  TbId_t tbId;
937  tbId.m_rnti = tag.GetRnti ();
938  tbId.m_layer = tag.GetLayer ();
939  itTb = m_expectedTbs.find (tbId);
940  NS_LOG_INFO (this << " Packet of " << tbId.m_rnti << " layer " << (uint16_t) tag.GetLayer ());
941  if (itTb!=m_expectedTbs.end ())
942  {
943  if (!(*itTb).second.corrupt)
944  {
945  m_phyRxEndOkTrace (*j);
946 
948  {
950  }
951  }
952  else
953  {
954  // TB received with errors
956  }
957 
958  // send HARQ feedback (if not already done for this TB)
959  if (!(*itTb).second.harqFeedbackSent)
960  {
961  (*itTb).second.harqFeedbackSent = true;
962  if (!(*itTb).second.downlink)
963  {
964  UlInfoListElement_s harqUlInfo;
965  harqUlInfo.m_rnti = tbId.m_rnti;
966  harqUlInfo.m_tpc = 0;
967  if ((*itTb).second.corrupt)
968  {
970  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " send UL-HARQ-NACK");
971  m_harqPhyModule->UpdateUlHarqProcessStatus (tbId.m_rnti, (*itTb).second.mi, (*itTb).second.size, (*itTb).second.size / EffectiveCodingRate [(*itTb).second.mcs]);
972  }
973  else
974  {
976  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " send UL-HARQ-ACK");
977  m_harqPhyModule->ResetUlHarqProcessStatus (tbId.m_rnti, (*itTb).second.harqProcessId);
978  }
980  {
981  m_ltePhyUlHarqFeedbackCallback (harqUlInfo);
982  }
983  }
984  else
985  {
986  std::map <uint16_t, DlInfoListElement_s>::iterator itHarq = harqDlInfoMap.find (tbId.m_rnti);
987  if (itHarq==harqDlInfoMap.end ())
988  {
989  DlInfoListElement_s harqDlInfo;
991  harqDlInfo.m_rnti = tbId.m_rnti;
992  harqDlInfo.m_harqProcessId = (*itTb).second.harqProcessId;
993  if ((*itTb).second.corrupt)
994  {
995  harqDlInfo.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::NACK;
996  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " harqId " << (uint16_t)(*itTb).second.harqProcessId << " layer " <<(uint16_t)tbId.m_layer << " send DL-HARQ-NACK");
997  m_harqPhyModule->UpdateDlHarqProcessStatus ((*itTb).second.harqProcessId, tbId.m_layer, (*itTb).second.mi, (*itTb).second.size, (*itTb).second.size / EffectiveCodingRate [(*itTb).second.mcs]);
998  }
999  else
1000  {
1001 
1002  harqDlInfo.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::ACK;
1003  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " harqId " << (uint16_t)(*itTb).second.harqProcessId << " layer " <<(uint16_t)tbId.m_layer << " size " << (*itTb).second.size << " send DL-HARQ-ACK");
1004  m_harqPhyModule->ResetDlHarqProcessStatus ((*itTb).second.harqProcessId);
1005  }
1006  harqDlInfoMap.insert (std::pair <uint16_t, DlInfoListElement_s> (tbId.m_rnti, harqDlInfo));
1007  }
1008  else
1009  {
1010  if ((*itTb).second.corrupt)
1011  {
1012  (*itHarq).second.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::NACK;
1013  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " harqId " << (uint16_t)(*itTb).second.harqProcessId << " layer " <<(uint16_t)tbId.m_layer << " size " << (*itHarq).second.m_harqStatus.size () << " send DL-HARQ-NACK");
1014  m_harqPhyModule->UpdateDlHarqProcessStatus ((*itTb).second.harqProcessId, tbId.m_layer, (*itTb).second.mi, (*itTb).second.size, (*itTb).second.size / EffectiveCodingRate [(*itTb).second.mcs]);
1015  }
1016  else
1017  {
1018  NS_ASSERT_MSG (tbId.m_layer < (*itHarq).second.m_harqStatus.size (), " layer " << (uint16_t)tbId.m_layer);
1019  (*itHarq).second.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::ACK;
1020  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " harqId " << (uint16_t)(*itTb).second.harqProcessId << " layer " << (uint16_t)tbId.m_layer << " size " << (*itHarq).second.m_harqStatus.size () << " send DL-HARQ-ACK");
1021  m_harqPhyModule->ResetDlHarqProcessStatus ((*itTb).second.harqProcessId);
1022  }
1023  }
1024  } // end if ((*itTb).second.downlink) HARQ
1025  } // end if (!(*itTb).second.harqFeedbackSent)
1026  }
1027  }
1028  }
1029 
1030  // send DL HARQ feedback to LtePhy
1031  std::map <uint16_t, DlInfoListElement_s>::iterator itHarq;
1032  for (itHarq = harqDlInfoMap.begin (); itHarq != harqDlInfoMap.end (); itHarq++)
1033  {
1035  {
1036  m_ltePhyDlHarqFeedbackCallback ((*itHarq).second);
1037  }
1038  }
1039  // forward control messages of this frame to LtePhy
1040  if (!m_rxControlMessageList.empty ())
1041  {
1043  {
1045  }
1046  }
1047  ChangeState (IDLE);
1048  m_rxPacketBurstList.clear ();
1049  m_rxControlMessageList.clear ();
1050  m_expectedTbs.clear ();
1051 }
1052 
1053 
1054 void
1056 {
1057  NS_LOG_FUNCTION (this);
1058  NS_LOG_LOGIC (this << " state: " << m_state);
1059 
1060  NS_ASSERT (m_state == RX_CTRL);
1061 
1062  // this will trigger CQI calculation and Error Model evaluation
1063  // as a side effect, the error model should update the error status of all TBs
1064  m_interferenceCtrl->EndRx ();
1065  // apply transmission mode gain
1066  NS_LOG_DEBUG (this << " txMode " << (uint16_t)m_transmissionMode << " gain " << m_txModeGain.at (m_transmissionMode));
1068  if (m_transmissionMode>0)
1069  {
1070  // in case of MIMO, ctrl is always txed as TX diversity
1071  m_sinrPerceived *= m_txModeGain.at (1);
1072  }
1073 // m_sinrPerceived *= m_txModeGain.at (m_transmissionMode);
1074  bool error = false;
1076  {
1079  error = m_random->GetValue () > errorRate ? false : true;
1080  NS_LOG_DEBUG (this << " PCFICH-PDCCH Decodification, errorRate " << errorRate << " error " << error);
1081  }
1082 
1083  if (!error)
1084  {
1086  {
1087  NS_LOG_DEBUG (this << " PCFICH-PDCCH Rxed OK");
1089  }
1090  }
1091  else
1092  {
1094  {
1095  NS_LOG_DEBUG (this << " PCFICH-PDCCH Error");
1097  }
1098  }
1099  ChangeState (IDLE);
1100  m_rxControlMessageList.clear ();
1101 }
1102 
1103 void
1105 {
1106  NS_ASSERT (m_state == RX_CTRL);
1107  ChangeState (IDLE);
1108  m_interferenceCtrl->EndRx ();
1109  // nothing to do (used only for SRS at this stage)
1110 }
1111 
1112 void
1113 LteSpectrumPhy::SetCellId (uint16_t cellId)
1114 {
1115  m_cellId = cellId;
1116 }
1117 
1118 
1119 void
1121 {
1122  m_interferenceCtrl->AddRsPowerChunkProcessor (p);
1123 }
1124 
1125 
1126 void
1128 {
1129  m_interferenceData->AddSinrChunkProcessor (p);
1130 }
1131 
1132 void
1134 {
1135  m_interferenceCtrl->AddInterferenceChunkProcessor (p);
1136 }
1137 
1138 void
1140 {
1141  m_interferenceData->AddInterferenceChunkProcessor (p);
1142 }
1143 
1144 void
1146 {
1147  m_interferenceCtrl->AddSinrChunkProcessor (p);
1148 }
1149 
1150 void
1152 {
1153  NS_LOG_FUNCTION (this << (uint16_t) txMode);
1154  NS_ASSERT_MSG (txMode < m_txModeGain.size (), "TransmissionMode not available: 1.." << m_txModeGain.size ());
1155  m_transmissionMode = txMode;
1157 }
1158 
1159 
1160 void
1161 LteSpectrumPhy::SetTxModeGain (uint8_t txMode, double gain)
1162 {
1163  NS_LOG_FUNCTION (this << " txmode " << (uint16_t)txMode << " gain " << gain);
1164  // convert to linear
1165  gain = std::pow (10.0, (gain / 10.0));
1166  if (m_txModeGain.size () < txMode)
1167  {
1168  m_txModeGain.resize (txMode);
1169  }
1170  std::vector <double> temp;
1171  temp = m_txModeGain;
1172  m_txModeGain.clear ();
1173  for (uint8_t i = 0; i < temp.size (); i++)
1174  {
1175  if (i==txMode-1)
1176  {
1177  m_txModeGain.push_back (gain);
1178  }
1179  else
1180  {
1181  m_txModeGain.push_back (temp.at (i));
1182  }
1183  }
1184 }
1185 
1186 int64_t
1188 {
1189  NS_LOG_FUNCTION (this << stream);
1190  m_random->SetStream (stream);
1191  return 1;
1192 }
1193 
1194 
1195 
1196 } // namespace ns3
static const Time UL_SRS_DURATION
Ptr< LteHarqPhy > m_harqPhyModule
void SetLtePhyTxEndCallback(LtePhyTxEndCallback c)
set the callback for the end of a TX, as part of the interconnections between the PHY and the MAC ...
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:345
void SetStream(int64_t stream)
Specifies the stream number for this RNG stream.
void StartRxData(Ptr< LteSpectrumSignalParametersDataFrame > params)
Abstract base class for Spectrum-aware PHY layers.
Definition: spectrum-phy.h:45
Ptr< LteInterference > m_interferenceCtrl
Hold a bool native type.
Definition: boolean.h:38
LtePhyRxCtrlEndOkCallback m_ltePhyRxCtrlEndOkCallback
uint8_t m_mcs
MCS for transport block.
Definition: lte-common.h:141
TracedCallback< Ptr< const PacketBurst > > m_phyTxEndTrace
uint16_t GetRnti(void) const
void SetState(State newState)
Set the state of the phy layer.
bool IsNull(void) const
Check for null implementation.
Definition: callback.h:1014
void AddInterferenceCtrlChunkProcessor(Ptr< LteSinrChunkProcessor > p)
LteSinrChunkProcessor devoted to evaluate interference + noise power in control symbols of the subfra...
#define NS_ASSERT(condition)
Definition: assert.h:64
uint8_t m_rv
the redundancy version (HARQ)
Definition: lte-common.h:143
TracedCallback< Ptr< const Packet > > m_phyRxEndErrorTrace
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
void SetLtePhyRxDataEndErrorCallback(LtePhyRxDataEndErrorCallback c)
set the callback for the end of a RX in error, as part of the interconnections between the PHY and th...
Channel is IDLE, no packet is being transmitted.
Definition: csma-channel.h:62
void SetTxModeGain(uint8_t txMode, double gain)
LtePhyRxCtrlEndErrorCallback m_ltePhyRxCtrlEndErrorCallback
void SetTransmissionMode(uint8_t txMode)
Ptr< SpectrumChannel > m_channel
std::list< Ptr< LteControlMessage > > m_txControlMessageList
LtePhyTxEndCallback m_ltePhyTxEndCallback
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: object.cc:336
#define NS_LOG_INFO(msg)
Definition: log.h:298
expectedTbs_t m_expectedTbs
bool operator<(const Room &a, const Room &b)
Ptr< LteInterference > m_interferenceData
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
Ptr< SpectrumChannel > GetChannel()
LtePhyRxDataEndErrorCallback m_ltePhyRxDataEndErrorCallback
See section 4.3.12 ulInfoListElement.
static TbStats_t GetTbDecodificationStats(const SpectrumValue &sinr, const std::vector< int > &map, uint16_t size, uint8_t mcs, HarqProcessInfoList_t miHistory)
run the error-model algorithm for the specified TB
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
set the noise power spectral density
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
void SetDevice(Ptr< NetDevice > d)
set the associated NetDevice instance
std::list< Ptr< PacketBurst > > m_rxPacketBurstList
static const Time DL_CTRL_DURATION
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:72
void SetLtePhyUlHarqFeedbackCallback(LtePhyUlHarqFeedbackCallback c)
set the callback for the UL HARQ feedback as part of the interconnections between the LteSpectrumPhy ...
void ChangeState(State newState)
std::list< Ptr< LteControlMessage > > m_rxControlMessageList
void SetLtePhyRxCtrlEndOkCallback(LtePhyRxCtrlEndOkCallback c)
set the callback for the successful end of a RX ctrl frame, as part of the interconnections between t...
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
set the Power Spectral Density of outgoing signals in W/Hz.
void SetLtePhyRxCtrlEndErrorCallback(LtePhyRxCtrlEndErrorCallback c)
set the callback for the erroneous end of a RX ctrl frame, as part of the interconnections between th...
Ptr< AntennaModel > m_antenna
TracedCallback< Ptr< const PacketBurst > > m_phyRxStartTrace
LtePhyRxDataEndOkCallback m_ltePhyRxDataEndOkCallback
static uint8_t TxMode2LayerNum(uint8_t txMode)
Definition: lte-common.cc:170
Ptr< SampleEmitter > s
bool StartTxDataFrame(Ptr< PacketBurst > pb, std::list< Ptr< LteControlMessage > > ctrlMsgList, Time duration)
Start a transmission of data frame in DL and UL.
uint8_t m_layer
the layer (cw) of the transmission
Definition: lte-common.h:140
Ptr< MobilityModel > m_mobility
void SetHarqPhyModule(Ptr< LteHarqPhy > harq)
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
static double GetPcfichPdcchError(const SpectrumValue &sinr)
run the error-model algorithm for the specified PCFICH+PDCCH channels
double EffectiveCodingRate[29]
#define NS_LOG_LOGIC(msg)
Definition: log.h:368
#define list
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
See section 4.3.23 dlInfoListElement.
void StartRxCtrl(Ptr< SpectrumSignalParameters > params)
Ptr< NetDevice > GetDevice()
get the associated NetDevice instance
Ptr< SpectrumValue > m_txPsd
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:43
Ptr< Packet > Copy(void) const
Definition: packet.cc:122
void SetAntenna(Ptr< AntennaModel > a)
set the AntennaModel to be used
void AddRsPowerChunkProcessor(Ptr< LteSinrChunkProcessor > p)
uint16_t m_rnti
uint8_t m_ndi
new data indicator flag
Definition: lte-common.h:144
void AddExpectedTb(uint16_t rnti, uint8_t ndi, uint16_t size, uint8_t mcs, std::vector< int > map, uint8_t layer, uint8_t harqId, uint8_t rv, bool downlink)
Ptr< const SpectrumModel > GetRxSpectrumModel() const
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Ptr< AntennaModel > GetRxAntenna()
get the AntennaModel used by the NetDevice for reception
Ptr< MobilityModel > GetMobility()
get the associated MobilityModel instance
Ptr< const SpectrumModel > m_rxSpectrumModel
LtePhyDlHarqFeedbackCallback m_ltePhyDlHarqFeedbackCallback
double GetValue(double min, double max)
Returns a random double from the uniform distribution with the specified range.
std::vector< enum HarqStatus_e > m_harqStatus
Ptr< PacketBurst > m_txPacketBurst
void SetChannel(Ptr< SpectrumChannel > c)
Set the channel attached to this device.
uint8_t m_txMode
the transmission Mode
Definition: lte-common.h:139
uint16_t m_size
Size of transport block.
Definition: lte-common.h:142
void Reset()
reset the internal state
TracedCallback< PhyReceptionStatParameters > m_ulPhyReception
Trace information regarding PHY stats from UL Rx perspective PhyReceptionStatParameters (see lte-comm...
static Time Now(void)
Return the "current simulation time".
Definition: simulator.cc:180
Ptr< NetDevice > m_device
uint8_t m_correctness
correctness of the TB received
Definition: lte-common.h:145
LtePhyUlHarqFeedbackCallback m_ltePhyUlHarqFeedbackCallback
static TypeId GetTypeId(void)
TracedCallback< Ptr< const Packet > > m_phyRxEndOkTrace
bool StartTxDlCtrlFrame(std::list< Ptr< LteControlMessage > > ctrlMsgList, bool pss)
Start a transmission of control frame in DL.
#define NS_ASSERT_MSG(condition, message)
Definition: assert.h:86
uint16_t m_rnti
C-RNTI scheduled.
Definition: lte-common.h:138
uint16_t m_cellId
Cell ID of the attached Enb.
Definition: lte-common.h:136
void SetLtePhyDlHarqFeedbackCallback(LtePhyDlHarqFeedbackCallback c)
set the callback for the DL HARQ feedback as part of the interconnections between the LteSpectrumPhy ...
void AddCtrlSinrChunkProcessor(Ptr< LteSinrChunkProcessor > p)
void AddDataSinrChunkProcessor(Ptr< LteSinrChunkProcessor > p)
void SetLtePhyRxPssCallback(LtePhyRxPssCallback c)
set the callback for the reception of the PSS as part of the interconnections between the LteSpectrum...
NS_LOG_COMPONENT_DEFINE("LteSpectrumPhy")
LtePhyRxPssCallback m_ltePhyRxPssCallback
#define NS_LOG_DEBUG(msg)
Definition: log.h:289
bool operator==(const EventId &a, const EventId &b)
Definition: event-id.cc:89
void AddInterferenceDataChunkProcessor(Ptr< LteSinrChunkProcessor > p)
LteSinrChunkProcessor devoted to evaluate interference + noise power in data symbols of the subframe...
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::cancel method.
Definition: event-id.cc:47
Tag used to define the RNTI and LC id for each MAC packet trasmitted.
void SetLtePhyRxDataEndOkCallback(LtePhyRxDataEndOkCallback c)
set the callback for the successful end of a RX, as part of the interconnections between the PHY and ...
void SetMobility(Ptr< MobilityModel > m)
Set the mobility model associated with this device.
enum ns3::UlInfoListElement_s::ReceptionStatus_e m_receptionStatus
void StartRx(Ptr< SpectrumSignalParameters > params)
Notify the SpectrumPhy instance of an incoming signal.
Hold a floating point type.
Definition: double.h:41
TracedCallback< Ptr< const PacketBurst > > m_phyTxStartTrace
void SetAttribute(std::string name, const AttributeValue &value)
Definition: object-base.cc:161
Set of values corresponding to a given SpectrumModel.
uint64_t m_imsi
IMSI of the scheduled UE.
Definition: lte-common.h:137
a unique identifier for an interface.
Definition: type-id.h:49
uint8_t GetLayer(void) const
void UpdateSinrPerceived(const SpectrumValue &sinr)
int64_t GetMilliSeconds(void) const
Definition: nstime.h:283
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611
bool StartTxUlSrsFrame()
Start a transmission of control frame in UL.
void SetCellId(uint16_t cellId)
SpectrumValue m_sinrPerceived
std::vector< double > m_txModeGain
TracedCallback< PhyReceptionStatParameters > m_dlPhyReception
Trace information regarding PHY stats from DL Rx perspective PhyReceptionStatParameters (see lte-comm...
std::vector< HarqProcessInfoElement_t > HarqProcessInfoList_t
Definition: lte-harq-phy.h:47