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 static const 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 
116  : m_state (IDLE),
117  m_cellId (0),
118  m_transmissionMode (0),
119  m_layersNum (1)
120 {
121  NS_LOG_FUNCTION (this);
122  m_random = CreateObject<UniformRandomVariable> ();
123  m_random->SetAttribute ("Min", DoubleValue (0.0));
124  m_random->SetAttribute ("Max", DoubleValue (1.0));
125  m_interferenceData = CreateObject<LteInterference> ();
126  m_interferenceCtrl = CreateObject<LteInterference> ();
127 
128  for (uint8_t i = 0; i < 7; i++)
129  {
130  m_txModeGain.push_back (1.0);
131  }
132 }
133 
134 
136 {
137  NS_LOG_FUNCTION (this);
138  m_expectedTbs.clear ();
139  m_txModeGain.clear ();
140 }
141 
143 {
144  NS_LOG_FUNCTION (this);
145  m_channel = 0;
146  m_mobility = 0;
147  m_device = 0;
148  m_interferenceData->Dispose ();
149  m_interferenceData = 0;
150  m_interferenceCtrl->Dispose ();
151  m_interferenceCtrl = 0;
152  m_ltePhyTxEndCallback = MakeNullCallback< void, Ptr<const Packet> > ();
153  m_ltePhyRxDataEndErrorCallback = MakeNullCallback< void > ();
154  m_ltePhyRxDataEndOkCallback = MakeNullCallback< void, Ptr<Packet> > ();
155  m_ltePhyRxCtrlEndOkCallback = MakeNullCallback< void, std::list<Ptr<LteControlMessage> > > ();
156  m_ltePhyRxCtrlEndErrorCallback = MakeNullCallback< void > ();
157  m_ltePhyDlHarqFeedbackCallback = MakeNullCallback< void, DlInfoListElement_s > ();
158  m_ltePhyUlHarqFeedbackCallback = MakeNullCallback< void, UlInfoListElement_s > ();
159  m_ltePhyRxPssCallback = MakeNullCallback< void, uint16_t, Ptr<SpectrumValue> > ();
161 }
162 
163 std::ostream& operator<< (std::ostream& os, LteSpectrumPhy::State s)
164 {
165  switch (s)
166  {
168  os << "IDLE";
169  break;
171  os << "RX_DATA";
172  break;
174  os << "RX_CTRL";
175  break;
176  case LteSpectrumPhy::TX:
177  os << "TX";
178  break;
179  default:
180  os << "UNKNOWN";
181  break;
182  }
183  return os;
184 }
185 
186 TypeId
188 {
189  static TypeId tid = TypeId ("ns3::LteSpectrumPhy")
191  .AddTraceSource ("TxStart",
192  "Trace fired when a new transmission is started",
194  .AddTraceSource ("TxEnd",
195  "Trace fired when a previosuly started transmission is finished",
197  .AddTraceSource ("RxStart",
198  "Trace fired when the start of a signal is detected",
200  .AddTraceSource ("RxEndOk",
201  "Trace fired when a previosuly started RX terminates successfully",
203  .AddTraceSource ("RxEndError",
204  "Trace fired when a previosuly started RX terminates with an error",
206  .AddAttribute ("DataErrorModelEnabled",
207  "Activate/Deactivate the error model of data (TBs of PDSCH and PUSCH) [by default is active].",
208  BooleanValue (true),
209  MakeBooleanAccessor (&LteSpectrumPhy::m_dataErrorModelEnabled),
210  MakeBooleanChecker ())
211  .AddAttribute ("CtrlErrorModelEnabled",
212  "Activate/Deactivate the error model of control (PCFICH-PDCCH decodification) [by default is active].",
213  BooleanValue (true),
214  MakeBooleanAccessor (&LteSpectrumPhy::m_ctrlErrorModelEnabled),
215  MakeBooleanChecker ())
216  .AddTraceSource ("DlPhyReception",
217  "DL reception PHY layer statistics.",
219  .AddTraceSource ("UlPhyReception",
220  "DL reception PHY layer statistics.",
222  ;
223  return tid;
224 }
225 
226 
227 
230 {
231  NS_LOG_FUNCTION (this);
232  return m_device;
233 }
234 
235 
238 {
239  NS_LOG_FUNCTION (this);
240  return m_mobility;
241 }
242 
243 
244 void
246 {
247  NS_LOG_FUNCTION (this << d);
248  m_device = d;
249 }
250 
251 
252 void
254 {
255  NS_LOG_FUNCTION (this << m);
256  m_mobility = m;
257 }
258 
259 
260 void
262 {
263  NS_LOG_FUNCTION (this << c);
264  m_channel = c;
265 }
266 
269 {
270  return m_channel;
271 }
272 
275 {
276  return m_rxSpectrumModel;
277 }
278 
279 
280 void
282 {
283  NS_LOG_FUNCTION (this << txPsd);
284  NS_ASSERT (txPsd);
285  m_txPsd = txPsd;
286 }
287 
288 
289 void
291 {
292  NS_LOG_FUNCTION (this << noisePsd);
293  NS_ASSERT (noisePsd);
294  m_rxSpectrumModel = noisePsd->GetSpectrumModel ();
295  m_interferenceData->SetNoisePowerSpectralDensity (noisePsd);
296  m_interferenceCtrl->SetNoisePowerSpectralDensity (noisePsd);
297 }
298 
299 
300 void
302 {
303  NS_LOG_FUNCTION (this);
304  m_cellId = 0;
305  m_state = IDLE;
306  m_transmissionMode = 0;
307  m_layersNum = 1;
308  m_endTxEvent.Cancel ();
312  m_rxControlMessageList.clear ();
313  m_expectedTbs.clear ();
314  m_txControlMessageList.clear ();
315  m_rxPacketBurstList.clear ();
316  m_txPacketBurst = 0;
317  m_rxSpectrumModel = 0;
318 }
319 
320 
321 
322 void
324 {
325  NS_LOG_FUNCTION (this);
327 }
328 
329 
330 void
332 {
333  NS_LOG_FUNCTION (this);
335 }
336 
337 
338 void
340 {
341  NS_LOG_FUNCTION (this);
343 }
344 
345 void
347 {
348  NS_LOG_FUNCTION (this);
350 }
351 
352 void
354 {
355  NS_LOG_FUNCTION (this);
357 }
358 
359 
360 void
362 {
363  NS_LOG_FUNCTION (this);
365 }
366 
367 void
369 {
370  NS_LOG_FUNCTION (this);
372 }
373 
374 void
376 {
377  NS_LOG_FUNCTION (this);
379 }
380 
381 
384 {
385  return m_antenna;
386 }
387 
388 void
390 {
391  NS_LOG_FUNCTION (this << a);
392  m_antenna = a;
393 }
394 
395 void
397 {
398  ChangeState (newState);
399 }
400 
401 
402 void
404 {
405  NS_LOG_LOGIC (this << " state: " << m_state << " -> " << newState);
406  m_state = newState;
407 }
408 
409 
410 void
412 {
413  m_harqPhyModule = harq;
414 }
415 
416 
417 
418 
419 bool
421 {
422  NS_LOG_FUNCTION (this << pb);
423  NS_LOG_LOGIC (this << " state: " << m_state);
424 
425  m_phyTxStartTrace (pb);
426 
427  switch (m_state)
428  {
429  case RX_DATA:
430  case RX_CTRL:
431  NS_FATAL_ERROR ("cannot TX while RX: according to FDD channel acces, the physical layer for transmission cannot be used for reception");
432  break;
433 
434  case TX:
435  NS_FATAL_ERROR ("cannot TX while already TX: the MAC should avoid this");
436  break;
437 
438  case IDLE:
439  {
440  /*
441  m_txPsd must be setted by the device, according to
442  (i) the available subchannel for transmission
443  (ii) the power transmission
444  */
445  NS_ASSERT (m_txPsd);
446  m_txPacketBurst = pb;
447 
448  // we need to convey some PHY meta information to the receiver
449  // to be used for simulation purposes (e.g., the CellId). This
450  // is done by setting the ctrlMsgList parameter of
451  // LteSpectrumSignalParametersDataFrame
452  ChangeState (TX);
454  Ptr<LteSpectrumSignalParametersDataFrame> txParams = Create<LteSpectrumSignalParametersDataFrame> ();
455  txParams->duration = duration;
456  txParams->txPhy = GetObject<SpectrumPhy> ();
457  txParams->txAntenna = m_antenna;
458  txParams->psd = m_txPsd;
459  txParams->packetBurst = pb;
460  txParams->ctrlMsgList = ctrlMsgList;
461  txParams->cellId = m_cellId;
462  m_channel->StartTx (txParams);
464  }
465  return false;
466  break;
467 
468  default:
469  NS_FATAL_ERROR ("unknown state");
470  return true;
471  break;
472  }
473 }
474 
475 bool
477 {
478  NS_LOG_FUNCTION (this << " PSS " << (uint16_t)pss);
479  NS_LOG_LOGIC (this << " state: " << m_state);
480 
481 
482 // m_phyTxStartTrace (pb);
483 
484  switch (m_state)
485  {
486  case RX_DATA:
487  case RX_CTRL:
488  NS_FATAL_ERROR ("cannot TX while RX: according to FDD channel acces, the physical layer for transmission cannot be used for reception");
489  break;
490 
491  case TX:
492  NS_FATAL_ERROR ("cannot TX while already TX: the MAC should avoid this");
493  break;
494 
495  case IDLE:
496  {
497  /*
498  m_txPsd must be setted by the device, according to
499  (i) the available subchannel for transmission
500  (ii) the power transmission
501  */
502  NS_ASSERT (m_txPsd);
503 
504  // we need to convey some PHY meta information to the receiver
505  // to be used for simulation purposes (e.g., the CellId). This
506  // is done by setting the cellId parameter of
507  // LteSpectrumSignalParametersDlCtrlFrame
508  ChangeState (TX);
510 
511  Ptr<LteSpectrumSignalParametersDlCtrlFrame> txParams = Create<LteSpectrumSignalParametersDlCtrlFrame> ();
512  txParams->duration = DL_CTRL_DURATION;
513  txParams->txPhy = GetObject<SpectrumPhy> ();
514  txParams->txAntenna = m_antenna;
515  txParams->psd = m_txPsd;
516  txParams->cellId = m_cellId;
517  txParams->pss = pss;
518  txParams->ctrlMsgList = ctrlMsgList;
519  m_channel->StartTx (txParams);
521  }
522  return false;
523  break;
524 
525  default:
526  NS_FATAL_ERROR ("unknown state");
527  return true;
528  break;
529  }
530 }
531 
532 
533 bool
535 {
536  NS_LOG_FUNCTION (this);
537  NS_LOG_LOGIC (this << " state: " << m_state);
538 
539  // m_phyTxStartTrace (pb);
540 
541  switch (m_state)
542  {
543  case RX_DATA:
544  case RX_CTRL:
545  NS_FATAL_ERROR ("cannot TX while RX: according to FDD channel acces, the physical layer for transmission cannot be used for reception");
546  break;
547 
548  case TX:
549  NS_FATAL_ERROR ("cannot TX while already TX: the MAC should avoid this");
550  break;
551 
552  case IDLE:
553  {
554  /*
555  m_txPsd must be setted by the device, according to
556  (i) the available subchannel for transmission
557  (ii) the power transmission
558  */
559  NS_ASSERT (m_txPsd);
560  NS_LOG_LOGIC (this << " m_txPsd: " << *m_txPsd);
561 
562  // we need to convey some PHY meta information to the receiver
563  // to be used for simulation purposes (e.g., the CellId). This
564  // is done by setting the cellId parameter of
565  // LteSpectrumSignalParametersDlCtrlFrame
566  ChangeState (TX);
568  Ptr<LteSpectrumSignalParametersUlSrsFrame> txParams = Create<LteSpectrumSignalParametersUlSrsFrame> ();
569  txParams->duration = UL_SRS_DURATION;
570  txParams->txPhy = GetObject<SpectrumPhy> ();
571  txParams->txAntenna = m_antenna;
572  txParams->psd = m_txPsd;
573  txParams->cellId = m_cellId;
574  m_channel->StartTx (txParams);
576  }
577  return false;
578  break;
579 
580  default:
581  NS_FATAL_ERROR ("unknown state");
582  return true;
583  break;
584  }
585 }
586 
587 
588 
589 void
591 {
592  NS_LOG_FUNCTION (this);
593  NS_LOG_LOGIC (this << " state: " << m_state);
594 
595  NS_ASSERT (m_state == TX);
596 
598 
600  {
601  for (std::list<Ptr<Packet> >::const_iterator iter = m_txPacketBurst->Begin (); iter
602  != m_txPacketBurst->End (); ++iter)
603  {
604  Ptr<Packet> packet = (*iter)->Copy ();
605  m_ltePhyTxEndCallback (packet);
606  }
607  }
608 
609  m_txPacketBurst = 0;
610  ChangeState (IDLE);
611 }
612 
613 
614 void
616 {
617  NS_LOG_FUNCTION (this << spectrumRxParams);
618  NS_LOG_LOGIC (this << " state: " << m_state);
619 
620  Ptr <const SpectrumValue> rxPsd = spectrumRxParams->psd;
621  Time duration = spectrumRxParams->duration;
622 
623  // the device might start RX only if the signal is of a type
624  // understood by this device - in this case, an LTE signal.
625  Ptr<LteSpectrumSignalParametersDataFrame> lteDataRxParams = DynamicCast<LteSpectrumSignalParametersDataFrame> (spectrumRxParams);
626  if (lteDataRxParams != 0)
627  {
628  m_interferenceData->AddSignal (rxPsd, duration);
629  StartRxData (lteDataRxParams);
630  }
631  else
632  {
633  Ptr<LteSpectrumSignalParametersDlCtrlFrame> lteDlCtrlRxParams = DynamicCast<LteSpectrumSignalParametersDlCtrlFrame> (spectrumRxParams);
634  Ptr<LteSpectrumSignalParametersUlSrsFrame> lteUlSrsRxParams = DynamicCast<LteSpectrumSignalParametersUlSrsFrame> (spectrumRxParams);
635  if ((lteDlCtrlRxParams!=0)||(lteUlSrsRxParams!=0))
636  {
637  m_interferenceCtrl->AddSignal (rxPsd, duration);
638  StartRxCtrl (spectrumRxParams);
639  }
640  else
641  {
642  // other type of signal (could be 3G, GSM, whatever) -> interference
643  m_interferenceData->AddSignal (rxPsd, duration);
644  m_interferenceCtrl->AddSignal (rxPsd, duration);
645  }
646  }
647 
648 }
649 
650 void
652 {
653  NS_LOG_FUNCTION (this);
654  switch (m_state)
655  {
656  case TX:
657  NS_FATAL_ERROR ("cannot RX while TX: according to FDD channel access, the physical layer for transmission cannot be used for reception");
658  break;
659  case RX_CTRL:
660  NS_FATAL_ERROR ("cannot RX Data while receiving control");
661  break;
662  case IDLE:
663  case RX_DATA:
664  // the behavior is similar when
665  // we're IDLE or RX because we can receive more signals
666  // simultaneously (e.g., at the eNB).
667  {
668  // To check if we're synchronized to this signal, we check
669  // for the CellId which is reported in the
670  // LteSpectrumSignalParametersDataFrame
671  if (params->cellId == m_cellId)
672  {
673  NS_LOG_LOGIC (this << " synchronized with this signal (cellId=" << params->cellId << ")");
674  if ((m_rxPacketBurstList.empty ())&&(m_rxControlMessageList.empty ()))
675  {
676  NS_ASSERT (m_state == IDLE);
677  // first transmission, i.e., we're IDLE and we
678  // start RX
680  m_firstRxDuration = params->duration;
681  NS_LOG_LOGIC (this << " scheduling EndRx with delay " << params->duration.GetSeconds () << "s");
683  }
684  else
685  {
687  // sanity check: if there are multiple RX events, they
688  // should occur at the same time and have the same
689  // duration, otherwise the interference calculation
690  // won't be correct
692  && (m_firstRxDuration == params->duration));
693  }
694 
696  if (params->packetBurst)
697  {
698  m_rxPacketBurstList.push_back (params->packetBurst);
699  m_interferenceData->StartRx (params->psd);
700 
701  m_phyRxStartTrace (params->packetBurst);
702  }
703  NS_LOG_DEBUG (this << " insert msgs " << params->ctrlMsgList.size ());
704  m_rxControlMessageList.insert (m_rxControlMessageList.end (), params->ctrlMsgList.begin (), params->ctrlMsgList.end ());
705 
706  NS_LOG_LOGIC (this << " numSimultaneousRxEvents = " << m_rxPacketBurstList.size ());
707  }
708  else
709  {
710  NS_LOG_LOGIC (this << " not in sync with this signal (cellId="
711  << params->cellId << ", m_cellId=" << m_cellId << ")");
712  }
713  }
714  break;
715 
716  default:
717  NS_FATAL_ERROR ("unknown state");
718  break;
719  }
720 
721  NS_LOG_LOGIC (this << " state: " << m_state);
722 }
723 
724 
725 
726 void
728 {
729  NS_LOG_FUNCTION (this);
730  switch (m_state)
731  {
732  case TX:
733  NS_FATAL_ERROR ("cannot RX while TX: according to FDD channel access, the physical layer for transmission cannot be used for reception");
734  break;
735  case RX_DATA:
736  NS_FATAL_ERROR ("cannot RX data while receing control");
737  break;
738  case IDLE:
739  case RX_CTRL:
740  // the behavior is similar when
741  // we're IDLE or RX because we can receive more signals
742  // simultaneously (e.g., at the eNB).
743  {
744  // To check if we're synchronized to this signal, we check
745  // for the CellId which is reported in the
746  // LteSpectrumSignalParametersDlCtrlFrame
747  uint16_t cellId;
748  bool dl;
749  Ptr<LteSpectrumSignalParametersDlCtrlFrame> lteDlCtrlRxParams = DynamicCast<LteSpectrumSignalParametersDlCtrlFrame> (params);
750  if (lteDlCtrlRxParams!=0)
751  {
752  cellId = lteDlCtrlRxParams->cellId;
753  dl = true;
754  }
755  else
756  {
757  Ptr<LteSpectrumSignalParametersUlSrsFrame> lteUlSrsRxParams = DynamicCast<LteSpectrumSignalParametersUlSrsFrame> (params);
758  cellId = lteUlSrsRxParams->cellId;
759  dl = false;
760  }
761  if (dl)
762  {
763  // check presence of PSS for UE measuerements
764  if (lteDlCtrlRxParams->pss == true)
765  {
766  SpectrumValue pssPsd = *params->psd;
768  {
769  m_ltePhyRxPssCallback (cellId, params->psd);
770  }
771  }
772  }
773  if (cellId == m_cellId)
774  {
775  NS_LOG_LOGIC (this << " synchronized with this signal (cellId=" << cellId << ")");
776  if (m_state == IDLE)
777  {
778  // first transmission, i.e., we're IDLE and we
779  // start RX
782  m_firstRxDuration = params->duration;
783  NS_LOG_LOGIC (this << " scheduling EndRx with delay " << params->duration);
784  if (dl==true)
785  {
786  // store the DCIs
787  m_rxControlMessageList = lteDlCtrlRxParams->ctrlMsgList;
789  }
790  else
791  {
793  }
794  }
795  else if (m_state == RX_CTRL)
796  {
797  // sanity check: if there are multiple RX events, they
798  // should occur at the same time and have the same
799  // duration, otherwise the interference calculation
800  // won't be correct
802  && (m_firstRxDuration == params->duration));
803  }
804 
806  m_interferenceCtrl->StartRx (params->psd);
807 
808 // NS_LOG_LOGIC (this << " numSimultaneousRxEvents = " << m_rxPacketBurstList.size ());
809  }
810  else
811  {
812  NS_LOG_LOGIC (this << " not in sync with this signal (cellId="
813  << cellId << ", m_cellId=" << m_cellId << ")");
814  }
815  }
816  break;
817 
818  default:
819  NS_FATAL_ERROR ("unknown state");
820  break;
821  }
822 
823  NS_LOG_LOGIC (this << " state: " << m_state);
824 }
825 
826 
827 void
829 {
830  NS_LOG_FUNCTION (this << sinr);
831  m_sinrPerceived = sinr;
832 }
833 
834 
835 void
836 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)
837 {
838  NS_LOG_FUNCTION (this << " rnti: " << rnti << " NDI " << (uint16_t)ndi << " size " << size << " mcs " << (uint16_t)mcs << " layer " << (uint16_t)layer << " rv " << (uint16_t)rv);
839  TbId_t tbId;
840  tbId.m_rnti = rnti;
841  tbId.m_layer = layer;
842  expectedTbs_t::iterator it;
843  it = m_expectedTbs.find (tbId);
844  if (it != m_expectedTbs.end ())
845  {
846  // migth be a TB of an unreceived packet (due to high progpalosses)
847  m_expectedTbs.erase (it);
848  }
849  // insert new entry
850  tbInfo_t tbInfo = {ndi, size, mcs, map, harqId, rv, 0.0, downlink, false, false};
851  m_expectedTbs.insert (std::pair<TbId_t, tbInfo_t> (tbId,tbInfo));
852 }
853 
854 
855 void
857 {
858  NS_LOG_FUNCTION (this);
859  NS_LOG_LOGIC (this << " state: " << m_state);
860 
862 
863  // this will trigger CQI calculation and Error Model evaluation
864  // as a side effect, the error model should update the error status of all TBs
865  m_interferenceData->EndRx ();
866  NS_LOG_DEBUG (this << " No. of burts " << m_rxPacketBurstList.size ());
867  NS_LOG_DEBUG (this << " Expected TBs " << m_expectedTbs.size ());
868  expectedTbs_t::iterator itTb = m_expectedTbs.begin ();
869 
870  // apply transmission mode gain
871  NS_LOG_DEBUG (this << " txMode " << (uint16_t)m_transmissionMode << " gain " << m_txModeGain.at (m_transmissionMode));
874 
875  while (itTb!=m_expectedTbs.end ())
876  {
877  if ((m_dataErrorModelEnabled)&&(m_rxPacketBurstList.size ()>0)) // avoid to check for errors when there is no actual data transmitted
878  {
879  // retrieve HARQ info
880  HarqProcessInfoList_t harqInfoList;
881  if ((*itTb).second.ndi == 0)
882  {
883  // TB retxed: retrieve HARQ history
884  uint16_t ulHarqId = 0;
885  if ((*itTb).second.downlink)
886  {
887  harqInfoList = m_harqPhyModule->GetHarqProcessInfoDl ((*itTb).second.harqProcessId, (*itTb).first.m_layer);
888  }
889  else
890  {
891  harqInfoList = m_harqPhyModule->GetHarqProcessInfoUl ((*itTb).first.m_rnti, ulHarqId);
892  }
893  }
894  TbStats_t tbStats = LteMiErrorModel::GetTbDecodificationStats (m_sinrPerceived, (*itTb).second.rbBitmap, (*itTb).second.size, (*itTb).second.mcs, harqInfoList);
895  (*itTb).second.mi = tbStats.mi;
896  (*itTb).second.corrupt = m_random->GetValue () > tbStats.tbler ? false : true;
897  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);
898  // fire traces on DL/UL reception PHY stats
901  params.m_cellId = m_cellId;
902  params.m_imsi = 0; // it will be set by DlPhyTransmissionCallback in LteHelper
903  params.m_rnti = (*itTb).first.m_rnti;
904  params.m_txMode = m_transmissionMode;
905  params.m_layer = (*itTb).first.m_layer;
906  params.m_mcs = (*itTb).second.mcs;
907  params.m_size = (*itTb).second.size;
908  params.m_rv = (*itTb).second.rv;
909  params.m_ndi = (*itTb).second.ndi;
910  params.m_correctness = (uint8_t)!(*itTb).second.corrupt;
911  if ((*itTb).second.downlink)
912  {
913  // DL
914  m_dlPhyReception (params);
915  }
916  else
917  {
918  // UL
919  params.m_rv = harqInfoList.size ();
920  m_ulPhyReception (params);
921  }
922  }
923 
924  itTb++;
925  }
926  std::map <uint16_t, DlInfoListElement_s> harqDlInfoMap;
927  for (std::list<Ptr<PacketBurst> >::const_iterator i = m_rxPacketBurstList.begin ();
928  i != m_rxPacketBurstList.end (); ++i)
929  {
930  for (std::list<Ptr<Packet> >::const_iterator j = (*i)->Begin (); j != (*i)->End (); ++j)
931  {
932  // retrieve TB info of this packet
933  LteRadioBearerTag tag;
934  (*j)->PeekPacketTag (tag);
935  TbId_t tbId;
936  tbId.m_rnti = tag.GetRnti ();
937  tbId.m_layer = tag.GetLayer ();
938  itTb = m_expectedTbs.find (tbId);
939  NS_LOG_INFO (this << " Packet of " << tbId.m_rnti << " layer " << (uint16_t) tag.GetLayer ());
940  if (itTb!=m_expectedTbs.end ())
941  {
942  if (!(*itTb).second.corrupt)
943  {
944  m_phyRxEndOkTrace (*j);
945 
947  {
949  }
950  }
951  else
952  {
953  // TB received with errors
955  }
956 
957  // send HARQ feedback (if not already done for this TB)
958  if (!(*itTb).second.harqFeedbackSent)
959  {
960  (*itTb).second.harqFeedbackSent = true;
961  if (!(*itTb).second.downlink)
962  {
963  UlInfoListElement_s harqUlInfo;
964  harqUlInfo.m_rnti = tbId.m_rnti;
965  harqUlInfo.m_tpc = 0;
966  if ((*itTb).second.corrupt)
967  {
969  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " send UL-HARQ-NACK");
970  m_harqPhyModule->UpdateUlHarqProcessStatus (tbId.m_rnti, (*itTb).second.mi, (*itTb).second.size, (*itTb).second.size / EffectiveCodingRate [(*itTb).second.mcs]);
971  }
972  else
973  {
975  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " send UL-HARQ-ACK");
976  m_harqPhyModule->ResetUlHarqProcessStatus (tbId.m_rnti, (*itTb).second.harqProcessId);
977  }
979  {
980  m_ltePhyUlHarqFeedbackCallback (harqUlInfo);
981  }
982  }
983  else
984  {
985  std::map <uint16_t, DlInfoListElement_s>::iterator itHarq = harqDlInfoMap.find (tbId.m_rnti);
986  if (itHarq==harqDlInfoMap.end ())
987  {
988  DlInfoListElement_s harqDlInfo;
990  harqDlInfo.m_rnti = tbId.m_rnti;
991  harqDlInfo.m_harqProcessId = (*itTb).second.harqProcessId;
992  if ((*itTb).second.corrupt)
993  {
994  harqDlInfo.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::NACK;
995  NS_LOG_DEBUG (this << " RNTI " << tbId.m_rnti << " harqId " << (uint16_t)(*itTb).second.harqProcessId << " layer " <<(uint16_t)tbId.m_layer << " send DL-HARQ-NACK");
996  m_harqPhyModule->UpdateDlHarqProcessStatus ((*itTb).second.harqProcessId, tbId.m_layer, (*itTb).second.mi, (*itTb).second.size, (*itTb).second.size / EffectiveCodingRate [(*itTb).second.mcs]);
997  }
998  else
999  {
1000 
1001  harqDlInfo.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::ACK;
1002  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");
1003  m_harqPhyModule->ResetDlHarqProcessStatus ((*itTb).second.harqProcessId);
1004  }
1005  harqDlInfoMap.insert (std::pair <uint16_t, DlInfoListElement_s> (tbId.m_rnti, harqDlInfo));
1006  }
1007  else
1008  {
1009  if ((*itTb).second.corrupt)
1010  {
1011  (*itHarq).second.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::NACK;
1012  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");
1013  m_harqPhyModule->UpdateDlHarqProcessStatus ((*itTb).second.harqProcessId, tbId.m_layer, (*itTb).second.mi, (*itTb).second.size, (*itTb).second.size / EffectiveCodingRate [(*itTb).second.mcs]);
1014  }
1015  else
1016  {
1017  NS_ASSERT_MSG (tbId.m_layer < (*itHarq).second.m_harqStatus.size (), " layer " << (uint16_t)tbId.m_layer);
1018  (*itHarq).second.m_harqStatus.at (tbId.m_layer) = DlInfoListElement_s::ACK;
1019  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");
1020  m_harqPhyModule->ResetDlHarqProcessStatus ((*itTb).second.harqProcessId);
1021  }
1022  }
1023  } // end if ((*itTb).second.downlink) HARQ
1024  } // end if (!(*itTb).second.harqFeedbackSent)
1025  }
1026  }
1027  }
1028 
1029  // send DL HARQ feedback to LtePhy
1030  std::map <uint16_t, DlInfoListElement_s>::iterator itHarq;
1031  for (itHarq = harqDlInfoMap.begin (); itHarq != harqDlInfoMap.end (); itHarq++)
1032  {
1034  {
1035  m_ltePhyDlHarqFeedbackCallback ((*itHarq).second);
1036  }
1037  }
1038  // forward control messages of this frame to LtePhy
1039  if (!m_rxControlMessageList.empty ())
1040  {
1042  {
1044  }
1045  }
1046  ChangeState (IDLE);
1047  m_rxPacketBurstList.clear ();
1048  m_rxControlMessageList.clear ();
1049  m_expectedTbs.clear ();
1050 }
1051 
1052 
1053 void
1055 {
1056  NS_LOG_FUNCTION (this);
1057  NS_LOG_LOGIC (this << " state: " << m_state);
1058 
1059  NS_ASSERT (m_state == RX_CTRL);
1060 
1061  // this will trigger CQI calculation and Error Model evaluation
1062  // as a side effect, the error model should update the error status of all TBs
1063  m_interferenceCtrl->EndRx ();
1064  // apply transmission mode gain
1065  NS_LOG_DEBUG (this << " txMode " << (uint16_t)m_transmissionMode << " gain " << m_txModeGain.at (m_transmissionMode));
1067  if (m_transmissionMode>0)
1068  {
1069  // in case of MIMO, ctrl is always txed as TX diversity
1070  m_sinrPerceived *= m_txModeGain.at (1);
1071  }
1072 // m_sinrPerceived *= m_txModeGain.at (m_transmissionMode);
1073  bool error = false;
1075  {
1078  error = m_random->GetValue () > errorRate ? false : true;
1079  NS_LOG_DEBUG (this << " PCFICH-PDCCH Decodification, errorRate " << errorRate << " error " << error);
1080  }
1081 
1082  if (!error)
1083  {
1085  {
1086  NS_LOG_DEBUG (this << " PCFICH-PDCCH Rxed OK");
1088  }
1089  }
1090  else
1091  {
1093  {
1094  NS_LOG_DEBUG (this << " PCFICH-PDCCH Error");
1096  }
1097  }
1098  ChangeState (IDLE);
1099  m_rxControlMessageList.clear ();
1100 }
1101 
1102 void
1104 {
1105  NS_ASSERT (m_state == RX_CTRL);
1106  ChangeState (IDLE);
1107  m_interferenceCtrl->EndRx ();
1108  // nothing to do (used only for SRS at this stage)
1109 }
1110 
1111 void
1112 LteSpectrumPhy::SetCellId (uint16_t cellId)
1113 {
1114  m_cellId = cellId;
1115 }
1116 
1117 
1118 void
1120 {
1121  m_interferenceCtrl->AddRsPowerChunkProcessor (p);
1122 }
1123 
1124 
1125 void
1127 {
1128  m_interferenceData->AddSinrChunkProcessor (p);
1129 }
1130 
1131 void
1133 {
1134  m_interferenceCtrl->AddInterferenceChunkProcessor (p);
1135 }
1136 
1137 void
1139 {
1140  m_interferenceData->AddInterferenceChunkProcessor (p);
1141 }
1142 
1143 void
1145 {
1146  m_interferenceCtrl->AddSinrChunkProcessor (p);
1147 }
1148 
1149 void
1151 {
1152  NS_LOG_FUNCTION (this << (uint16_t) txMode);
1153  NS_ASSERT_MSG (txMode < m_txModeGain.size (), "TransmissionMode not available: 1.." << m_txModeGain.size ());
1154  m_transmissionMode = txMode;
1156 }
1157 
1158 
1159 void
1160 LteSpectrumPhy::SetTxModeGain (uint8_t txMode, double gain)
1161 {
1162  NS_LOG_FUNCTION (this << " txmode " << (uint16_t)txMode << " gain " << gain);
1163  // convert to linear
1164  gain = std::pow (10.0, (gain / 10.0));
1165  if (m_txModeGain.size () < txMode)
1166  {
1167  m_txModeGain.resize (txMode);
1168  }
1169  std::vector <double> temp;
1170  temp = m_txModeGain;
1171  m_txModeGain.clear ();
1172  for (uint8_t i = 0; i < temp.size (); i++)
1173  {
1174  if (i==txMode-1)
1175  {
1176  m_txModeGain.push_back (gain);
1177  }
1178  else
1179  {
1180  m_txModeGain.push_back (temp.at (i));
1181  }
1182  }
1183 }
1184 
1185 int64_t
1187 {
1188  NS_LOG_FUNCTION (this << stream);
1189  m_random->SetStream (stream);
1190  return 1;
1191 }
1192 
1193 
1194 
1195 } // 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 ...
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:79
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:60
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
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
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
Definition: object-base.h:38
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:1018
void AddInterferenceCtrlChunkProcessor(Ptr< LteSinrChunkProcessor > p)
LteSinrChunkProcessor devoted to evaluate interference + noise power in control symbols of the subfra...
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:61
uint8_t m_rv
the redundancy version (HARQ)
Definition: lte-common.h:143
TracedCallback< Ptr< const Packet > > m_phyRxEndErrorTrace
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)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
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:335
#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
expectedTbs_t m_expectedTbs
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:825
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
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
static const double EffectiveCodingRate[29]
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
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:233
#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.
bool operator<(const int64x64_t &lhs, const int64x64_t &rhs)
Less than operator.
Definition: int64x64-128.h:327
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
performs a COW copy of the packet.
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)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:84
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...
LtePhyRxPssCallback m_ltePhyRxPssCallback
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:213
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:176
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:281
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
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