A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-ue-phy.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
3 * Copyright (c) 2018 Fraunhofer ESK : RLF extensions
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Author: Giuseppe Piro <g.piro@poliba.it>
8 * Marco Miozzo <marco.miozzo@cttc.es>
9 * Nicola Baldo <nbaldo@cttc.es>
10 * Modified by:
11 * Vignesh Babu <ns3-dev@esk.fraunhofer.de> (RLF extensions)
12 */
13
14#include "lte-ue-phy.h"
15
16#include "ff-mac-common.h"
17#include "lte-amc.h"
18#include "lte-common.h"
19#include "lte-net-device.h"
21#include "lte-ue-net-device.h"
23
24#include <ns3/boolean.h>
25#include <ns3/double.h>
26#include <ns3/log.h>
27#include <ns3/node.h>
28#include <ns3/object-factory.h>
29#include <ns3/pointer.h>
30#include <ns3/simulator.h>
31
32#include <cfloat>
33#include <cmath>
34#include <numeric>
35
36namespace ns3
37{
38
39NS_LOG_COMPONENT_DEFINE("LteUePhy");
40
41/**
42 * Duration of the data portion of a UL subframe.
43 * Equals to "TTI length - 1 symbol length for SRS - margin".
44 * The margin is 1 nanosecond and is intended to avoid overlapping simulator
45 * events. The duration of one symbol is TTI/14 (rounded). In other words,
46 * duration of data portion of UL subframe = 1 ms * (13/14) - 1 ns.
47 */
48static const Time UL_DATA_DURATION = NanoSeconds(1e6 - 71429 - 1);
49
50/**
51 * Delay from subframe start to transmission of SRS.
52 * Equals to "TTI length - 1 symbol for SRS".
53 */
55
56////////////////////////////////////////
57// member SAP forwarders
58////////////////////////////////////////
59
60/// UeMemberLteUePhySapProvider class
62{
63 public:
64 /**
65 * Constructor
66 *
67 * \param phy the LTE UE Phy
68 */
70
71 // inherited from LtePhySapProvider
72 void SendMacPdu(Ptr<Packet> p) override;
74 void SendRachPreamble(uint32_t prachId, uint32_t raRnti) override;
75 void NotifyConnectionSuccessful() override;
76
77 private:
78 LteUePhy* m_phy; ///< the Phy
79};
80
85
86void
91
92void
97
98void
103
104void
109
110////////////////////////////////////////
111// LteUePhy methods
112////////////////////////////////////////
113
114/// Map each of UE PHY states to its string representation.
115static const std::string g_uePhyStateName[LteUePhy::NUM_STATES] = {
116 "CELL_SEARCH",
117 "SYNCHRONIZED",
118};
119
120/**
121 * \param s The UE PHY state.
122 * \return The string representation of the given state.
123 */
124static inline const std::string&
126{
127 return g_uePhyStateName[s];
128}
129
131
133{
134 NS_LOG_FUNCTION(this);
135 NS_FATAL_ERROR("This constructor should not be called");
136}
137
139 : LtePhy(dlPhy, ulPhy),
140 m_uePhySapUser(nullptr),
141 m_ueCphySapUser(nullptr),
142 m_state(CELL_SEARCH),
143 m_subframeNo(0),
144 m_rsReceivedPowerUpdated(false),
145 m_rsInterferencePowerUpdated(false),
146 m_dataInterferencePowerUpdated(false),
147 m_pssReceived(false),
148 m_ueMeasurementsFilterPeriod(MilliSeconds(200)),
149 m_ueMeasurementsFilterLast(MilliSeconds(0)),
150 m_rsrpSinrSampleCounter(0),
151 m_imsi(0)
152{
158
159 NS_ASSERT_MSG(Simulator::Now().GetNanoSeconds() == 0,
160 "Cannot create UE devices after simulation started");
162
163 DoReset();
164}
165
167{
168 m_txModeGain.clear();
169}
170
171void
179
180TypeId
182{
183 static TypeId tid =
184 TypeId("ns3::LteUePhy")
185 .SetParent<LtePhy>()
186 .SetGroupName("Lte")
187 .AddConstructor<LteUePhy>()
188 .AddAttribute("TxPower",
189 "Transmission power in dBm",
190 DoubleValue(10.0),
193 .AddAttribute(
194 "NoiseFigure",
195 "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
196 " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
197 "\"the difference in decibels (dB) between"
198 " the noise output of the actual receiver to the noise output of an "
199 " ideal receiver with the same overall gain and bandwidth when the receivers "
200 " are connected to sources at the standard noise temperature T0.\" "
201 "In this model, we consider T0 = 290K.",
202 DoubleValue(9.0),
205 .AddAttribute("TxMode1Gain",
206 "Transmission mode 1 gain in dB",
207 DoubleValue(0.0),
210 .AddAttribute("TxMode2Gain",
211 "Transmission mode 2 gain in dB",
212 DoubleValue(4.2),
215 .AddAttribute("TxMode3Gain",
216 "Transmission mode 3 gain in dB",
217 DoubleValue(-2.8),
220 .AddAttribute("TxMode4Gain",
221 "Transmission mode 4 gain in dB",
222 DoubleValue(0.0),
225 .AddAttribute("TxMode5Gain",
226 "Transmission mode 5 gain in dB",
227 DoubleValue(0.0),
230 .AddAttribute("TxMode6Gain",
231 "Transmission mode 6 gain in dB",
232 DoubleValue(0.0),
235 .AddAttribute("TxMode7Gain",
236 "Transmission mode 7 gain in dB",
237 DoubleValue(0.0),
240 .AddTraceSource("ReportCurrentCellRsrpSinr",
241 "RSRP and SINR statistics.",
243 "ns3::LteUePhy::RsrpSinrTracedCallback")
244 .AddAttribute("RsrpSinrSamplePeriod",
245 "The sampling period for reporting RSRP-SINR stats (default value 1)",
246 UintegerValue(1),
249 .AddTraceSource("ReportUlPhyResourceBlocks",
250 "UL transmission PHY layer resource blocks.",
252 "ns3::LteUePhy::UlPhyResourceBlocksTracedCallback")
253 .AddTraceSource("ReportPowerSpectralDensity",
254 "Power Spectral Density data.",
256 "ns3::LteUePhy::PowerSpectralDensityTracedCallback")
257 .AddTraceSource("UlPhyTransmission",
258 "DL transmission PHY layer statistics.",
260 "ns3::PhyTransmissionStatParameters::TracedCallback")
261 .AddAttribute("DlSpectrumPhy",
262 "The downlink LteSpectrumPhy associated to this LtePhy",
264 PointerValue(),
267 .AddAttribute("UlSpectrumPhy",
268 "The uplink LteSpectrumPhy associated to this LtePhy",
270 PointerValue(),
273 .AddAttribute("RsrqUeMeasThreshold",
274 "Receive threshold for PSS on RSRQ [dB]",
275 DoubleValue(-1000.0),
278 .AddAttribute("UeMeasurementsFilterPeriod",
279 "Time period for reporting UE measurements, i.e., the"
280 "length of layer-1 filtering.",
284 .AddAttribute("DownlinkCqiPeriodicity",
285 "Periodicity in milliseconds for reporting the"
286 "wideband and subband downlink CQIs to the eNB",
290 .AddTraceSource("ReportUeMeasurements",
291 "Report UE measurements RSRP (dBm) and RSRQ (dB).",
293 "ns3::LteUePhy::RsrpRsrqTracedCallback")
294 .AddTraceSource("StateTransition",
295 "Trace fired upon every UE PHY state transition",
297 "ns3::LteUePhy::StateTracedCallback")
298 .AddAttribute("EnableUplinkPowerControl",
299 "If true, Uplink Power Control will be enabled.",
300 BooleanValue(true),
303 .AddAttribute("Qout",
304 "corresponds to 10% block error rate of a hypothetical PDCCH transmission"
305 "taking into account the PCFICH errors with transmission parameters."
306 "see 3GPP TS 36.213 4.2.1 and TS 36.133 7.6",
307 DoubleValue(-5),
310 .AddAttribute("Qin",
311 "corresponds to 2% block error rate of a hypothetical PDCCH transmission"
312 "taking into account the PCFICH errors with transmission parameters."
313 "see 3GPP TS 36.213 4.2.1 and TS 36.133 7.6",
314 DoubleValue(-3.9),
317 .AddAttribute(
318 "NumQoutEvalSf",
319 "This specifies the total number of consecutive subframes"
320 "which corresponds to the Qout evaluation period",
321 UintegerValue(200), // see 3GPP 3GPP TS 36.133 7.6.2.1
324 .AddAttribute(
325 "NumQinEvalSf",
326 "This specifies the total number of consecutive subframes"
327 "which corresponds to the Qin evaluation period",
328 UintegerValue(100), // see 3GPP 3GPP TS 36.133 7.6.2.1
331 .AddAttribute("EnableRlfDetection",
332 "If true, RLF detection will be enabled.",
333 BooleanValue(true),
336 return tid;
337}
338
339void
341{
342 NS_LOG_FUNCTION(this);
343
344 NS_ABORT_MSG_IF(!m_netDevice, "LteNetDevice is not available in LteUePhy");
345 Ptr<Node> node = m_netDevice->GetNode();
346 NS_ABORT_MSG_IF(!node, "Node is not available in the LteNetDevice of LteUePhy");
347 uint32_t nodeId = node->GetId();
348
349 // ScheduleWithContext() is needed here to set context for logs,
350 // because Initialize() is called outside of Node::AddDevice().
351
353
355}
356
357void
363
370
371void
377
384
385void
387{
388 NS_LOG_FUNCTION(this << nf);
389 m_noiseFigure = nf;
390}
391
392double
394{
395 NS_LOG_FUNCTION(this);
396 return m_noiseFigure;
397}
398
399void
401{
402 NS_LOG_FUNCTION(this << pow);
403 m_txPower = pow;
404 m_powerControl->SetTxPower(pow);
405}
406
407double
409{
410 NS_LOG_FUNCTION(this);
411 return m_txPower;
412}
413
416{
417 NS_LOG_FUNCTION(this);
418 return m_powerControl;
419}
420
421uint8_t
423{
424 return m_macChTtiDelay;
425}
426
432
438
439void
440LteUePhy::SetNumQoutEvalSf(uint16_t numSubframes)
441{
442 NS_LOG_FUNCTION(this << numSubframes);
443 NS_ABORT_MSG_IF(numSubframes % 10 != 0,
444 "Number of subframes used for Qout "
445 "evaluation must be multiple of 10");
446 m_numOfQoutEvalSf = numSubframes;
447}
448
449void
450LteUePhy::SetNumQinEvalSf(uint16_t numSubframes)
451{
452 NS_LOG_FUNCTION(this << numSubframes);
453 NS_ABORT_MSG_IF(numSubframes % 10 != 0,
454 "Number of subframes used for Qin "
455 "evaluation must be multiple of 10");
456 m_numOfQinEvalSf = numSubframes;
457}
458
459uint16_t
461{
462 NS_LOG_FUNCTION(this);
463 return m_numOfQoutEvalSf;
464}
465
466uint16_t
468{
469 NS_LOG_FUNCTION(this);
470 return m_numOfQinEvalSf;
471}
472
473void
480
481void
486
487void
489{
490 NS_LOG_FUNCTION(this);
491
493
495 m_uplinkSpectrumPhy->SetTxPowerSpectralDensity(txPsd);
496}
497
498void
500{
501 NS_LOG_FUNCTION(this);
503}
504
505std::vector<int>
511
512std::vector<int>
518
532
533void
535{
536 NS_LOG_FUNCTION(this);
537 /**
538 * We do not generate the CQI report
539 * when the UE is not synchronized to any cell.
540 *
541 * Also, the RLF is detected after the DL CTRL
542 * is received by the UE,therefore, we do not need
543 * to generate the CQI reports and the UE measurements
544 * for a CTRL for which the RLF has been detected.
545 */
546 if (m_cellId == 0)
547 {
548 return;
549 }
550 m_ctrlSinrForRlf = sinr;
552}
553
554void
556{
557 NS_LOG_FUNCTION(this << sinr);
558
560 NS_ASSERT(m_cellId > 0);
561
562 if (m_dlConfigured && m_ulConfigured && (m_rnti > 0))
563 {
564 // check periodic wideband CQI
566 {
567 NS_LOG_DEBUG("Reporting P10 CQI at : " << Simulator::Now().As(Time::MS)
568 << ". Last reported at : "
570 Ptr<LteUeNetDevice> thisDevice = GetDevice()->GetObject<LteUeNetDevice>();
572 if (msg)
573 {
575 }
577 }
578 // check aperiodic high-layer configured subband CQI
580 {
581 NS_LOG_DEBUG("Reporting A30 CQI at : " << Simulator::Now().As(Time::MS)
582 << ". Last reported at : "
584 Ptr<LteUeNetDevice> thisDevice = GetDevice()->GetObject<LteUeNetDevice>();
586 if (msg)
587 {
589 }
591 }
592 }
593
594 // Generate PHY trace
597 {
598 NS_ASSERT_MSG(m_rsReceivedPowerUpdated, " RS received power info obsolete");
599 // RSRP evaluated as averaged received power among RBs
600 uint16_t rbNum = m_rsReceivedPower.GetValuesN();
601
602 // sum PSD [W/Hz] of all bands
603 double sum = std::reduce(m_rsReceivedPower.ConstValuesBegin(),
605 0.0);
606
607 // convert PSD [W/Hz] to linear power [W]
608 sum *= (180000.0 / 12.0);
609
610 double rsrp = (rbNum > 0) ? (sum / rbNum) : DBL_MAX;
611 // averaged SINR among RBs
612 double avSinr = ComputeAvgSinr(sinr);
613
614 NS_LOG_INFO(this << " cellId " << m_cellId << " rnti " << m_rnti << " RSRP " << rsrp
615 << " SINR " << avSinr << " ComponentCarrierId "
616 << (uint16_t)m_componentCarrierId);
617 // trigger RLF detection only when UE has an active RRC connection
618 // and RLF detection attribute is set to true
620 {
621 double avrgSinrForRlf = ComputeAvgSinr(m_ctrlSinrForRlf);
622 RlfDetection(10 * log10(avrgSinrForRlf));
623 }
624
626 m_rnti,
627 rsrp,
628 avSinr,
629 (uint16_t)m_componentCarrierId);
631 }
632
633 if (m_pssReceived)
634 {
635 // measure instantaneous RSRQ now
636 NS_ASSERT_MSG(m_rsInterferencePowerUpdated, " RS interference power info obsolete");
637
638 auto itPss = m_pssList.begin();
639 while (itPss != m_pssList.end())
640 {
641 uint16_t rbNum = 0;
642 double rssiSum = 0.0;
643
648 itIntN++, itPj++)
649 {
650 rbNum++;
651 // convert PSD [W/Hz] to linear power [W] for the single RE
652 double interfPlusNoisePowerTxW = (*itIntN);
653 double signalPowerTxW = (*itPj);
654 rssiSum += (2 * (interfPlusNoisePowerTxW + signalPowerTxW));
655 }
656 rssiSum *= (180000.0 / 12.0);
657
658 NS_ASSERT(rbNum == (*itPss).nRB);
659 double rsrq_dB = 10 * log10((*itPss).pssPsdSum / rssiSum);
660
661 if (rsrq_dB > m_pssReceptionThreshold)
662 {
663 NS_LOG_INFO(this << " PSS RNTI " << m_rnti << " cellId " << m_cellId << " has RSRQ "
664 << rsrq_dB << " and RBnum " << rbNum);
665 // store measurements
666 auto itMeasMap = m_ueMeasurementsMap.find((*itPss).cellId);
667 if (itMeasMap != m_ueMeasurementsMap.end())
668 {
669 (*itMeasMap).second.rsrqSum += rsrq_dB;
670 (*itMeasMap).second.rsrqNum++;
671 }
672 else
673 {
674 NS_LOG_WARN("race condition of bug 2091 occurred");
675 }
676 }
677
678 itPss++;
679
680 } // end of while (itPss != m_pssList.end ())
681
682 m_pssList.clear();
683
684 } // end of if (m_pssReceived)
685
686} // end of void LteUePhy::GenerateCtrlCqiReport (const SpectrumValue& sinr)
687
688double
690{
691 NS_LOG_FUNCTION(this);
692
693 // averaged SINR among RBs
694 double sum = 0.0;
695 uint8_t rbNum = 0;
696
697 for (auto it = sinr.ConstValuesBegin(); it != sinr.ConstValuesEnd(); it++)
698 {
699 sum += (*it);
700 rbNum++;
701 }
702
703 double avrgSinr = (rbNum > 0) ? (sum / rbNum) : DBL_MAX;
704
705 return avrgSinr;
706}
707
708void
710{
711 // Not used by UE, CQI are based only on RS
712}
713
714void
716{
717 NS_LOG_FUNCTION(this);
718
719 /**
720 * We do not generate the CQI report
721 * when the UE is not synchronized to any cell.
722 *
723 * Also, the RLF is detected after the DL CTRL
724 * is received by the UE,therefore, we do not need
725 * to generate the CQI reports and the UE measurements
726 * for a CTRL for which the RLF has been detected.
727 */
728 if (m_cellId == 0)
729 {
730 return;
731 }
732
734 // NOTE: The SINR received by this method is
735 // based on CTRL, which is not used to compute
736 // PDSCH (i.e., data) based SINR. It is used
737 // for RLF detection.
738 m_ctrlSinrForRlf = sinr;
739
742 {
743 // we have a measurement of interf + noise for the denominator
744 // of SINR = S/(I+N)
745 mixedSinr /= m_dataInterferencePower;
747 NS_LOG_LOGIC("data interf measurement available, SINR = " << mixedSinr);
748 }
749 else
750 {
751 // we did not see any interference on data, so interference is
752 // there and we have only noise at the denominator of SINR
753 mixedSinr /= (*m_noisePsd);
754 NS_LOG_LOGIC("no data interf measurement available, SINR = " << mixedSinr);
755 }
756
757 /*
758 * some RBs are not used in PDSCH and their SINR is very high
759 * for example with bandwidth 25, last RB is not used
760 * it can make avgSinr value very high, what is incorrect
761 */
762 uint32_t rbgSize = GetRbgSize();
763 uint32_t modulo = m_dlBandwidth % rbgSize;
764 double avgMixedSinr = 0;
765 uint32_t usedRbgNum = 0;
766 for (uint32_t i = 0; i < (m_dlBandwidth - 1 - modulo); i++)
767 {
768 usedRbgNum++;
769 avgMixedSinr += mixedSinr[i];
770 }
771 avgMixedSinr = avgMixedSinr / usedRbgNum;
772 for (uint32_t i = 0; i < modulo; i++)
773 {
774 mixedSinr[m_dlBandwidth - 1 - i] = avgMixedSinr;
775 }
776
777 GenerateCqiRsrpRsrq(mixedSinr);
778}
779
780void
782{
783 NS_LOG_FUNCTION(this << interf);
785 m_rsInterferencePower = interf;
786}
787
788void
790{
791 NS_LOG_FUNCTION(this << interf);
792
795}
796
797void
799{
800 NS_LOG_FUNCTION(this << power);
802 m_rsReceivedPower = power;
803
805 {
806 double sum = std::reduce(m_rsReceivedPower.ConstValuesBegin(),
808 0.0);
809 double rsrp = 10 * log10(sum * 180000) + 30;
810
811 NS_LOG_INFO("RSRP: " << rsrp);
812 m_powerControl->SetRsrp(rsrp);
813 }
814}
815
818{
819 NS_LOG_FUNCTION(this);
820
821 // apply transmission mode gain
823 SpectrumValue newSinr = sinr;
824 newSinr *= m_txModeGain.at(m_transmissionMode);
825
826 // CREATE DlCqiLteControlMessage
828 CqiListElement_s dlcqi;
829 std::vector<int> cqi;
831 {
832 cqi = m_amc->CreateCqiFeedbacks(newSinr, m_dlBandwidth);
833
835 auto nbSubChannels = cqi.size();
836 double cqiSum = 0.0;
837 int activeSubChannels = 0;
838 // average the CQIs of the different RBs
839 for (std::size_t i = 0; i < nbSubChannels; i++)
840 {
841 if (cqi.at(i) != -1)
842 {
843 cqiSum += cqi.at(i);
844 activeSubChannels++;
845 }
846 NS_LOG_DEBUG(this << " subch " << i << " cqi " << cqi.at(i));
847 }
848 dlcqi.m_rnti = m_rnti;
849 dlcqi.m_ri = 1; // not yet used
850 dlcqi.m_cqiType = CqiListElement_s::P10; // Periodic CQI using PUCCH wideband
851 NS_ASSERT_MSG(nLayer > 0, " nLayer negative");
852 NS_ASSERT_MSG(nLayer < 3, " nLayer limit is 2s");
853 for (uint8_t i = 0; i < nLayer; i++)
854 {
855 if (activeSubChannels > 0)
856 {
857 dlcqi.m_wbCqi.push_back((uint16_t)cqiSum / activeSubChannels);
858 }
859 else
860 {
861 // approximate with the worst case -> CQI = 1
862 dlcqi.m_wbCqi.push_back(1);
863 }
864 }
865 // NS_LOG_DEBUG (this << " Generate P10 CQI feedback " << (uint16_t) cqiSum /
866 // activeSubChannels);
867 dlcqi.m_wbPmi = 0; // not yet used
868 // dl.cqi.m_sbMeasResult others CQI report modes: not yet implemented
869 }
871 {
872 cqi = m_amc->CreateCqiFeedbacks(newSinr, GetRbgSize());
874 auto nbSubChannels = cqi.size();
875 int rbgSize = GetRbgSize();
876 double cqiSum = 0.0;
877 int cqiNum = 0;
878 SbMeasResult_s rbgMeas;
879 // NS_LOG_DEBUG (this << " Create A30 CQI feedback, RBG " << rbgSize << " cqiNum " <<
880 // nbSubChannels << " band " << (uint16_t)m_dlBandwidth);
881 for (std::size_t i = 0; i < nbSubChannels; i++)
882 {
883 if (cqi.at(i) != -1)
884 {
885 cqiSum += cqi.at(i);
886 }
887 // else "nothing" no CQI is treated as CQI = 0 (worst case scenario)
888 cqiNum++;
889 if (cqiNum == rbgSize)
890 {
891 // average the CQIs of the different RBGs
892 // NS_LOG_DEBUG (this << " RBG CQI " << (uint16_t) cqiSum / rbgSize);
894 hlCqi.m_sbPmi = 0; // not yet used
895 for (uint8_t i = 0; i < nLayer; i++)
896 {
897 hlCqi.m_sbCqi.push_back((uint16_t)cqiSum / rbgSize);
898 }
899 rbgMeas.m_higherLayerSelected.push_back(hlCqi);
900 cqiSum = 0.0;
901 cqiNum = 0;
902 }
903 }
904 dlcqi.m_rnti = m_rnti;
905 dlcqi.m_ri = 1; // not yet used
906 dlcqi.m_cqiType = CqiListElement_s::A30; // Aperidic CQI using PUSCH
907 // dlcqi.m_wbCqi.push_back ((uint16_t) cqiSum / nbSubChannels);
908 dlcqi.m_wbPmi = 0; // not yet used
909 dlcqi.m_sbMeasResult = rbgMeas;
910 }
911
912 msg->SetDlCqi(dlcqi);
913 return msg;
914}
915
916void
918{
920 NS_LOG_DEBUG(this << " Report UE Measurements ");
921
923
924 for (auto it = m_ueMeasurementsMap.begin(); it != m_ueMeasurementsMap.end(); it++)
925 {
926 double avg_rsrp = (*it).second.rsrpSum / (double)(*it).second.rsrpNum;
927 double avg_rsrq = (*it).second.rsrqSum / (double)(*it).second.rsrqNum;
928 /*
929 * In CELL_SEARCH state, this may result in avg_rsrq = 0/0 = -nan.
930 * UE RRC must take this into account when receiving measurement reports.
931 * TODO remove this shortcoming by calculating RSRQ during CELL_SEARCH
932 */
933 NS_LOG_DEBUG(this << " CellId " << (*it).first << " RSRP " << avg_rsrp << " (nSamples "
934 << (uint16_t)(*it).second.rsrpNum << ")"
935 << " RSRQ " << avg_rsrq << " (nSamples " << (uint16_t)(*it).second.rsrqNum
936 << ")"
937 << " ComponentCarrierID " << (uint16_t)m_componentCarrierId);
938
940 newEl.m_cellId = (*it).first;
941 newEl.m_rsrp = avg_rsrp;
942 newEl.m_rsrq = avg_rsrq;
943 ret.m_ueMeasurementsList.push_back(newEl);
944 ret.m_componentCarrierId = m_componentCarrierId;
945
946 // report to UE measurements trace
948 (*it).first,
949 avg_rsrp,
950 avg_rsrq,
951 (*it).first == m_cellId,
953 }
954
955 // report to RRC
957
958 m_ueMeasurementsMap.clear();
960}
961
962void
964{
965 NS_LOG_FUNCTION(this << cqiPeriodicity);
966 m_a30CqiPeriodicity = cqiPeriodicity;
967 m_p10CqiPeriodicity = cqiPeriodicity;
968}
969
970void
977
978void
980{
981 NS_LOG_FUNCTION(this << raPreambleId);
982
983 // unlike other control messages, RACH preamble is sent ASAP
985 msg->SetRapId(raPreambleId);
986 m_raPreambleId = raPreambleId;
987 m_raRnti = raRnti;
988 m_controlMessagesQueue.at(0).emplace_back(msg);
989}
990
991void
993{
994 /**
995 * Radio link failure detection should take place only on the
996 * primary carrier to avoid errors due to multiple calls to the
997 * same methods at the RRC layer
998 */
999 if (m_componentCarrierId == 0)
1000 {
1001 m_isConnected = true;
1002 // Initialize the parameters for radio link failure detection
1004 }
1005}
1006
1007void
1009{
1010 NS_LOG_FUNCTION(this);
1011
1012 NS_LOG_DEBUG(this << " I am rnti = " << m_rnti << " and I received msgs "
1013 << (uint16_t)msgList.size());
1014 for (auto it = msgList.begin(); it != msgList.end(); it++)
1015 {
1016 Ptr<LteControlMessage> msg = (*it);
1017
1018 if (msg->GetMessageType() == LteControlMessage::DL_DCI)
1019 {
1021
1022 DlDciListElement_s dci = msg2->GetDci();
1023 if (dci.m_rnti != m_rnti)
1024 {
1025 // DCI not for me
1026 continue;
1027 }
1028
1029 if (dci.m_resAlloc != 0)
1030 {
1031 NS_FATAL_ERROR("Resource Allocation type not implemented");
1032 }
1033
1034 std::vector<int> dlRb;
1035
1036 // translate the DCI to Spectrum framework
1037 uint32_t mask = 0x1;
1038 for (int i = 0; i < 32; i++)
1039 {
1040 if (((dci.m_rbBitmap & mask) >> i) == 1)
1041 {
1042 for (int k = 0; k < GetRbgSize(); k++)
1043 {
1044 dlRb.push_back((i * GetRbgSize()) + k);
1045 // NS_LOG_DEBUG(this << " RNTI " << m_rnti << " RBG " << i << "
1046 // DL-DCI allocated PRB " << (i*GetRbgSize()) + k);
1047 }
1048 }
1049 mask = (mask << 1);
1050 }
1052 {
1053 m_powerControl->ReportTpc(dci.m_tpc);
1054 }
1055
1056 // send TB info to LteSpectrumPhy
1057 NS_LOG_DEBUG(this << " UE " << m_rnti << " DL-DCI " << dci.m_rnti << " bitmap "
1058 << dci.m_rbBitmap);
1059 for (std::size_t i = 0; i < dci.m_tbsSize.size(); i++)
1060 {
1061 m_downlinkSpectrumPhy->AddExpectedTb(dci.m_rnti,
1062 dci.m_ndi.at(i),
1063 dci.m_tbsSize.at(i),
1064 dci.m_mcs.at(i),
1065 dlRb,
1066 i,
1067 dci.m_harqProcess,
1068 dci.m_rv.at(i),
1069 true /* DL */);
1070 }
1071
1073 }
1074 else if (msg->GetMessageType() == LteControlMessage::UL_DCI)
1075 {
1076 // set the uplink bandwidth according to the UL-CQI
1078 UlDciListElement_s dci = msg2->GetDci();
1079 if (dci.m_rnti != m_rnti)
1080 {
1081 // DCI not for me
1082 continue;
1083 }
1084 NS_LOG_INFO(this << " UL DCI");
1085 std::vector<int> ulRb;
1086 ulRb.reserve(dci.m_rbLen);
1087 for (int i = 0; i < dci.m_rbLen; i++)
1088 {
1089 ulRb.push_back(i + dci.m_rbStart);
1090 // NS_LOG_DEBUG (this << " UE RB " << i + dci.m_rbStart);
1091 }
1094 // fire trace of UL Tx PHY stats
1095 HarqProcessInfoList_t harqInfoList = m_harqPhyModule->GetHarqProcessInfoUl(m_rnti, 0);
1097 params.m_cellId = m_cellId;
1098 params.m_imsi = 0; // it will be set by DlPhyTransmissionCallback in LteHelper
1099 params.m_timestamp = Simulator::Now().GetMilliSeconds() + UL_PUSCH_TTIS_DELAY;
1100 params.m_rnti = m_rnti;
1101 params.m_txMode = 0; // always SISO for UE
1102 params.m_layer = 0;
1103 params.m_mcs = dci.m_mcs;
1104 params.m_size = dci.m_tbSize;
1105 params.m_rv = harqInfoList.size();
1106 params.m_ndi = dci.m_ndi;
1107 params.m_ccId = m_componentCarrierId;
1108 m_ulPhyTransmission(params);
1109 // pass the info to the MAC
1111 }
1112 else if (msg->GetMessageType() == LteControlMessage::RAR)
1113 {
1115 if (rarMsg->GetRaRnti() == m_raRnti)
1116 {
1117 for (auto it = rarMsg->RarListBegin(); it != rarMsg->RarListEnd(); ++it)
1118 {
1119 if (it->rapId != m_raPreambleId)
1120 {
1121 // UL grant not for me
1122 continue;
1123 }
1124 else
1125 {
1126 NS_LOG_INFO("received RAR RNTI " << m_raRnti);
1127 // set the uplink bandwidth according to the UL grant
1128 std::vector<int> ulRb;
1129 ulRb.reserve(it->rarPayload.m_grant.m_rbLen);
1130 for (int i = 0; i < it->rarPayload.m_grant.m_rbLen; i++)
1131 {
1132 ulRb.push_back(i + it->rarPayload.m_grant.m_rbStart);
1133 }
1134
1136 // pass the info to the MAC
1138 // reset RACH variables with out of range values
1139 m_raPreambleId = 255;
1140 m_raRnti = 11;
1141 }
1142 }
1143 }
1144 }
1145 else if (msg->GetMessageType() == LteControlMessage::MIB)
1146 {
1147 NS_LOG_INFO("received MIB");
1148 NS_ASSERT(m_cellId > 0);
1151 }
1152 else if (msg->GetMessageType() == LteControlMessage::SIB1)
1153 {
1154 NS_LOG_INFO("received SIB1");
1155 NS_ASSERT(m_cellId > 0);
1158 }
1159 else
1160 {
1161 // pass the message to UE-MAC
1163 }
1164 }
1165}
1166
1167void
1169{
1170 NS_LOG_FUNCTION(this << cellId << (*p));
1171
1172 uint16_t nRB = p->GetValuesN();
1173 // sum PSD [W/Hz] of all bands
1174 double sum = std::reduce(p->ConstValuesBegin(), p->ConstValuesEnd(), 0.0);
1175
1176 // convert PSD [W/Hz] to linear power [W]
1177 sum *= (180000.0 / 12.0);
1178
1179 // measure instantaneous RSRP now
1180 double rsrp_dBm = 10 * log10(1000 * (sum / (double)nRB));
1181 NS_LOG_INFO(this << " PSS RNTI " << m_rnti << " cellId " << m_cellId << " has RSRP " << rsrp_dBm
1182 << " and RBnum " << nRB);
1183 // note that m_pssReceptionThreshold does not apply here
1184
1185 // store measurements
1186 auto itMeasMap = m_ueMeasurementsMap.find(cellId);
1187 if (itMeasMap == m_ueMeasurementsMap.end())
1188 {
1189 // insert new entry
1191 newEl.rsrpSum = rsrp_dBm;
1192 newEl.rsrpNum = 1;
1193 newEl.rsrqSum = 0;
1194 newEl.rsrqNum = 0;
1195 m_ueMeasurementsMap.insert(std::pair<uint16_t, UeMeasurementsElement>(cellId, newEl));
1196 }
1197 else
1198 {
1199 (*itMeasMap).second.rsrpSum += rsrp_dBm;
1200 (*itMeasMap).second.rsrpNum++;
1201 }
1202
1203 /*
1204 * Collect the PSS for later processing in GenerateCtrlCqiReport()
1205 * (to be called from ChunkProcessor after RX is finished).
1206 */
1207 m_pssReceived = true;
1208 PssElement el;
1209 el.cellId = cellId;
1210 el.pssPsdSum = sum;
1211 el.nRB = nRB;
1212 m_pssList.push_back(el);
1213
1214} // end of void LteUePhy::ReceivePss (uint16_t cellId, Ptr<SpectrumValue> p)
1215
1216void
1221
1222void
1224{
1225 NS_LOG_FUNCTION(this << frameNo << subframeNo);
1226
1227 NS_ASSERT_MSG(frameNo > 0, "the SRS index check code assumes that frameNo starts at 1");
1228
1229 // refresh internal variables
1232 m_pssReceived = false;
1233
1234 if (m_ulConfigured)
1235 {
1236 // update uplink transmission mask according to previous UL-CQIs
1237 std::vector<int> rbMask = m_subChannelsForTransmissionQueue.at(0);
1239
1240 // shift the queue
1241 for (uint8_t i = 1; i < m_macChTtiDelay; i++)
1242 {
1244 }
1246
1248 {
1249 NS_ASSERT_MSG(subframeNo > 0 && subframeNo <= 10,
1250 "the SRS index check code assumes that subframeNo starts at 1");
1251 if ((((frameNo - 1) * 10 + (subframeNo - 1)) % m_srsPeriodicity) == m_srsSubframeOffset)
1252 {
1253 NS_LOG_INFO("frame " << frameNo << " subframe " << subframeNo
1254 << " sending SRS (offset=" << m_srsSubframeOffset
1255 << ", period=" << m_srsPeriodicity << ")");
1258 }
1259 }
1260
1261 std::list<Ptr<LteControlMessage>> ctrlMsg = GetControlMessages();
1262 // send packets in queue
1263 NS_LOG_LOGIC(this << " UE - start slot for PUSCH + PUCCH - RNTI " << m_rnti << " CELLID "
1264 << m_cellId);
1265 // send the current burts of packets
1267 if (pb)
1268 {
1270 {
1271 m_txPower = m_powerControl->GetPuschTxPower(rbMask);
1273 }
1274 m_uplinkSpectrumPhy->StartTxDataFrame(pb, ctrlMsg, UL_DATA_DURATION);
1275 }
1276 else
1277 {
1278 // send only PUCCH (ideal: fake null bandwidth signal)
1279 if (!ctrlMsg.empty())
1280 {
1281 NS_LOG_LOGIC(this << " UE - start TX PUCCH (NO PUSCH)");
1282 std::vector<int> dlRb;
1283
1285 {
1286 m_txPower = m_powerControl->GetPucchTxPower(dlRb);
1287 }
1288
1290 m_uplinkSpectrumPhy->StartTxDataFrame(pb, ctrlMsg, UL_DATA_DURATION);
1291 }
1292 else
1293 {
1294 NS_LOG_LOGIC(this << " UE - UL NOTHING TO SEND");
1295 }
1296 }
1297 } // m_configured
1298
1299 // trigger the MAC
1300 m_uePhySapUser->SubframeIndication(frameNo, subframeNo);
1301
1302 m_subframeNo = subframeNo;
1303 ++subframeNo;
1304 if (subframeNo > 10)
1305 {
1306 ++frameNo;
1307 subframeNo = 1;
1308 }
1309
1310 // schedule next subframe indication
1313 this,
1314 frameNo,
1315 subframeNo);
1316}
1317
1318void
1320{
1321 NS_LOG_FUNCTION(this << " UE " << m_rnti << " start tx SRS, cell Id " << (uint32_t)m_cellId);
1322 NS_ASSERT(m_cellId > 0);
1323 // set the current tx power spectral density (full bandwidth)
1324 std::vector<int> dlRb;
1325 for (uint16_t i = 0; i < m_ulBandwidth; i++)
1326 {
1327 dlRb.push_back(i);
1328 }
1329
1331 {
1332 m_txPower = m_powerControl->GetSrsTxPower(dlRb);
1333 }
1334
1336 m_uplinkSpectrumPhy->StartTxUlSrsFrame();
1337}
1338
1339void
1341{
1342 NS_LOG_FUNCTION(this);
1343
1344 m_rnti = 0;
1345 m_cellId = 0;
1346 m_isConnected = false;
1348 m_srsPeriodicity = 0;
1349 m_srsConfigured = false;
1350 m_dlConfigured = false;
1351 m_ulConfigured = false;
1352 m_raPreambleId = 255; // value out of range
1353 m_raRnti = 11; // value out of range
1357 m_paLinear = 1;
1358
1362
1363 m_packetBurstQueue.clear();
1364 m_controlMessagesQueue.clear();
1366 for (int i = 0; i < m_macChTtiDelay; i++)
1367 {
1369 m_packetBurstQueue.push_back(pb);
1370 std::list<Ptr<LteControlMessage>> l;
1371 m_controlMessagesQueue.push_back(l);
1372 }
1373 std::vector<int> ulRb;
1375
1377 m_downlinkSpectrumPhy->Reset();
1378 m_uplinkSpectrumPhy->Reset();
1379 m_pssList.clear();
1380 /**
1381 * Call the EndRx() method of the interference model for DL control and data
1382 * to cancel any ongoing downlink reception of control and data info.
1383 */
1384 m_downlinkSpectrumPhy->m_interferenceCtrl->EndRx();
1385 m_downlinkSpectrumPhy->m_interferenceData->EndRx();
1386
1387} // end of void LteUePhy::DoReset ()
1388
1389void
1391{
1392 NS_LOG_FUNCTION(this << dlEarfcn);
1393 m_dlEarfcn = dlEarfcn;
1394 DoSetDlBandwidth(6); // configure DL for receiving PSS
1396}
1397
1398void
1400{
1401 NS_LOG_FUNCTION(this << cellId << dlEarfcn);
1402 m_dlEarfcn = dlEarfcn;
1403 DoSynchronizeWithEnb(cellId);
1404}
1405
1406void
1408{
1409 NS_LOG_FUNCTION(this << cellId);
1410
1411 if (cellId == 0)
1412 {
1413 NS_FATAL_ERROR("Cell ID shall not be zero");
1414 }
1415
1416 m_cellId = cellId;
1417 m_downlinkSpectrumPhy->SetCellId(cellId);
1418 m_uplinkSpectrumPhy->SetCellId(cellId);
1419
1420 // configure DL for receiving the BCH with the minimum bandwidth
1422
1423 m_dlConfigured = false;
1424 m_ulConfigured = false;
1425
1427}
1428
1429uint16_t
1431{
1432 return m_cellId;
1433}
1434
1437{
1438 return m_dlEarfcn;
1439}
1440
1441void
1442LteUePhy::DoSetDlBandwidth(uint16_t dlBandwidth)
1443{
1444 NS_LOG_FUNCTION(this << (uint32_t)dlBandwidth);
1445 if (m_dlBandwidth != dlBandwidth or !m_dlConfigured)
1446 {
1447 m_dlBandwidth = dlBandwidth;
1448
1449 static const int Type0AllocationRbg[4] = {
1450 10, // RBG size 1
1451 26, // RBG size 2
1452 63, // RBG size 3
1453 110, // RBG size 4
1454 }; // see table 7.1.6.1-1 of 36.213
1455 for (int i = 0; i < 4; i++)
1456 {
1457 if (dlBandwidth < Type0AllocationRbg[i])
1458 {
1459 m_rbgSize = i + 1;
1460 break;
1461 }
1462 }
1463
1467 m_downlinkSpectrumPhy->SetNoisePowerSpectralDensity(m_noisePsd);
1468 m_downlinkSpectrumPhy->GetChannel()->AddRx(m_downlinkSpectrumPhy);
1469 }
1470 m_dlConfigured = true;
1471}
1472
1473void
1474LteUePhy::DoConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth)
1475{
1476 m_ulEarfcn = ulEarfcn;
1477 m_ulBandwidth = ulBandwidth;
1478 m_ulConfigured = true;
1479}
1480
1481void
1483{
1484 NS_LOG_FUNCTION(this);
1485 m_powerControl->ConfigureReferenceSignalPower(referenceSignalPower);
1486}
1487
1488void
1490{
1491 NS_LOG_FUNCTION(this << rnti);
1492 m_rnti = rnti;
1493
1494 m_powerControl->SetCellId(m_cellId);
1495 m_powerControl->SetRnti(m_rnti);
1496}
1497
1498void
1500{
1501 NS_LOG_FUNCTION(this << (uint16_t)txMode);
1502 m_transmissionMode = txMode;
1503 m_downlinkSpectrumPhy->SetTransmissionMode(txMode);
1504}
1505
1506void
1508{
1509 NS_LOG_FUNCTION(this << srcCi);
1512 m_srsConfigured = true;
1513
1514 // a guard time is needed for the case where the SRS periodicity is changed dynamically at run
1515 // time if we use a static one, we can have a 0ms guard time
1517 NS_LOG_DEBUG(this << " UE SRS P " << m_srsPeriodicity << " RNTI " << m_rnti << " offset "
1518 << m_srsSubframeOffset << " cellId " << m_cellId << " CI " << srcCi);
1519}
1520
1521void
1523{
1524 NS_LOG_FUNCTION(this << pa);
1525 m_paLinear = pow(10, (pa / 10));
1526}
1527
1528void
1529LteUePhy::DoSetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)
1530{
1531 NS_LOG_FUNCTION(this << (uint16_t)(rsrpFilterCoefficient));
1532 m_powerControl->SetRsrpFilterCoefficient(rsrpFilterCoefficient);
1533}
1534
1535void
1537{
1538 NS_LOG_FUNCTION(this);
1539 m_downlinkSpectrumPhy->m_harqPhyModule->ClearDlHarqBuffer(m_rnti); // flush HARQ buffers
1542 m_pssReceived = false;
1543 DoReset();
1544}
1545
1546void
1553
1554void
1556{
1557 NS_LOG_FUNCTION(this);
1558 // indicates that the downlink radio link quality has to be monitored for in-sync indications
1559 m_downlinkInSync = false;
1560}
1561
1562void
1564{
1565 NS_LOG_FUNCTION(this);
1566 m_imsi = imsi;
1567}
1568
1569void
1571{
1572 NS_LOG_FUNCTION(this);
1573 m_numOfSubframes = 0;
1574 m_sinrDbFrame = 0;
1575 m_numOfFrames = 0;
1576 m_downlinkInSync = true;
1577}
1578
1579void
1581{
1582 NS_LOG_FUNCTION(this << sinrDb);
1583 m_sinrDbFrame += sinrDb;
1585 NS_LOG_LOGIC("No of Subframes: " << m_numOfSubframes
1586 << " UE synchronized: " << m_downlinkInSync);
1587 // check for out_of_sync indications first when UE is both DL and UL synchronized
1588 // m_downlinkInSync=true indicates that the evaluation is for out-of-sync indications
1590 {
1591 /**
1592 * For every frame, if the downlink radio link quality(avg SINR)
1593 * is less than the threshold Qout, then the frame cannot be decoded
1594 */
1596 {
1597 m_numOfFrames++; // increment the counter if a frame cannot be decoded
1598 NS_LOG_LOGIC("No of Frames which cannot be decoded: " << m_numOfFrames);
1599 }
1600 else
1601 {
1602 /**
1603 * If the downlink radio link quality(avg SINR) is greater
1604 * than the threshold Qout, then the frame counter is reset
1605 * since only consecutive frames should be considered.
1606 */
1607 NS_LOG_INFO("Resetting frame counter at phy. Current value = " << m_numOfFrames);
1608 m_numOfFrames = 0;
1609 // Also reset the sync indicator counter at RRC
1611 }
1612 m_numOfSubframes = 0;
1613 m_sinrDbFrame = 0;
1614 }
1615 /**
1616 * Once the number of consecutive frames which cannot be decoded equals
1617 * the Qout evaluation period (i.e 200ms), then an out-of-sync indication
1618 * is sent to the RRC layer
1619 */
1621 {
1622 NS_LOG_LOGIC("At " << Simulator::Now().As(Time::MS)
1623 << " ms UE PHY sending out of sync indication to UE RRC layer");
1625 m_numOfFrames = 0;
1626 }
1627 // check for in_sync indications when T310 timer is started
1628 // m_downlinkInSync=false indicates that the evaluation is for in-sync indications
1629 if (!m_downlinkInSync && m_numOfSubframes == 10)
1630 {
1631 /**
1632 * For every frame, if the downlink radio link quality(avg SINR)
1633 * is greater than the threshold Qin, then the frame can be
1634 * successfully decoded.
1635 */
1637 {
1638 m_numOfFrames++; // increment the counter if a frame can be decoded
1639 NS_LOG_LOGIC("No of Frames successfully decoded: " << m_numOfFrames);
1640 }
1641 else
1642 {
1643 /**
1644 * If the downlink radio link quality(avg SINR) is less
1645 * than the threshold Qin, then the frame counter is reset
1646 * since only consecutive frames should be considered
1647 */
1648 m_numOfFrames = 0;
1649 // Also reset the sync indicator counter at RRC
1651 }
1652 m_numOfSubframes = 0;
1653 m_sinrDbFrame = 0;
1654 }
1655 /**
1656 * Once the number of consecutive frames which can be decoded equals the Qin evaluation period
1657 * (i.e 100ms), then an in-sync indication is sent to the RRC layer
1658 */
1660 {
1661 NS_LOG_LOGIC("At " << Simulator::Now().As(Time::MS)
1662 << " ms UE PHY sending in sync indication to UE RRC layer");
1664 m_numOfFrames = 0;
1665 }
1666}
1667
1668void
1670{
1671 SetTxModeGain(1, gain);
1672}
1673
1674void
1676{
1677 SetTxModeGain(2, gain);
1678}
1679
1680void
1682{
1683 SetTxModeGain(3, gain);
1684}
1685
1686void
1688{
1689 SetTxModeGain(4, gain);
1690}
1691
1692void
1694{
1695 SetTxModeGain(5, gain);
1696}
1697
1698void
1700{
1701 SetTxModeGain(6, gain);
1702}
1703
1704void
1706{
1707 SetTxModeGain(7, gain);
1708}
1709
1710void
1711LteUePhy::SetTxModeGain(uint8_t txMode, double gain)
1712{
1713 NS_LOG_FUNCTION(this << gain);
1714 if (txMode > 0)
1715 {
1716 // convert to linear
1717 double gainLin = std::pow(10.0, (gain / 10.0));
1718 if (m_txModeGain.size() < txMode)
1719 {
1720 m_txModeGain.resize(txMode);
1721 }
1722 m_txModeGain.at(txMode - 1) = gainLin;
1723 }
1724 // forward the info to DL LteSpectrumPhy
1725 m_downlinkSpectrumPhy->SetTxModeGain(txMode, gain);
1726}
1727
1728void
1730{
1731 NS_LOG_FUNCTION(this);
1732 // get the feedback from LteSpectrumPhy and send it through ideal PUCCH to eNB
1734 msg->SetDlHarqFeedback(m);
1735 SetControlMessages(msg);
1736}
1737
1738void
1743
1746{
1747 NS_LOG_FUNCTION(this);
1748 return m_state;
1749}
1750
1751void
1753{
1754 NS_LOG_FUNCTION(this << newState);
1755 State oldState = m_state;
1756 m_state = newState;
1757 NS_LOG_INFO(this << " cellId=" << m_cellId << " rnti=" << m_rnti << " UePhy "
1758 << ToString(oldState) << " --> " << ToString(newState));
1759 m_stateTransitionTrace(m_cellId, m_rnti, oldState, newState);
1760}
1761
1762} // namespace ns3
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition double.h:31
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition event-id.cc:44
The LtePhy models the physical layer of LTE.
Definition lte-phy.h:40
double m_txPower
Transmission power in dBm.
Definition lte-phy.h:230
uint8_t GetRbgSize() const
Definition lte-phy.cc:169
void DoDispose() override
Destructor implementation.
Definition lte-phy.cc:65
uint16_t GetSrsPeriodicity(uint16_t srcCi) const
Definition lte-phy.cc:133
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
A queue of packet bursts to be sent.
Definition lte-phy.h:270
uint16_t m_ulBandwidth
The UL bandwidth in number of PRBs.
Definition lte-phy.h:250
Ptr< PacketBurst > GetPacketBurst()
Definition lte-phy.cc:181
Ptr< LteNetDevice > GetDevice() const
Get the device where the phy layer is attached.
Definition lte-phy.cc:86
uint8_t m_componentCarrierId
component carrier Id used to address sap
Definition lte-phy.h:292
double m_noiseFigure
Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
Definition lte-phy.h:242
uint32_t m_ulEarfcn
The uplink carrier frequency.
Definition lte-phy.h:267
uint16_t m_dlBandwidth
The DL bandwidth in number of PRBs.
Definition lte-phy.h:255
Ptr< LteSpectrumPhy > m_downlinkSpectrumPhy
The downlink LteSpectrumPhy associated to this LtePhy.
Definition lte-phy.h:219
void SetMacPdu(Ptr< Packet > p)
Definition lte-phy.cc:175
std::list< Ptr< LteControlMessage > > GetControlMessages()
Definition lte-phy.cc:207
uint16_t GetSrsSubframeOffset(uint16_t srcCi) const
Definition lte-phy.cc:151
Ptr< LteNetDevice > m_netDevice
Pointer to the NetDevice where this PHY layer is attached.
Definition lte-phy.h:213
uint16_t m_cellId
Cell identifier.
Definition lte-phy.h:289
void SetControlMessages(Ptr< LteControlMessage > m)
Definition lte-phy.cc:199
uint32_t m_dlEarfcn
The downlink carrier frequency.
Definition lte-phy.h:262
Ptr< LteSpectrumPhy > m_uplinkSpectrumPhy
The uplink LteSpectrumPhy associated to this LtePhy.
Definition lte-phy.h:224
double GetTti() const
Definition lte-phy.cc:126
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
A queue of control messages to be sent.
Definition lte-phy.h:272
uint8_t m_rbgSize
The RB group size according to the bandwidth.
Definition lte-phy.h:257
uint8_t m_macChTtiDelay
Delay between MAC and channel layer in terms of TTIs.
Definition lte-phy.h:282
static Ptr< SpectrumValue > CreateUlTxPowerSpectralDensity(uint16_t earfcn, uint16_t bandwidth, double powerTx, std::vector< int > activeRbs)
create a spectrum value representing the uplink power spectral density of a signal to be transmitted.
static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t earfcn, uint16_t bandwidth, double noiseFigure)
create a SpectrumValue that models the power spectral density of AWGN
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void NotifyInSync()=0
Send an in sync indication to UE RRC.
virtual void ReportUeMeasurements(UeMeasurementsParameters params)=0
Send a report of RSRP and RSRQ values perceived from PSS by the PHY entity (after applying layer-1 fi...
virtual void RecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock mib)=0
Relay an MIB message from the PHY entity to the RRC layer.
virtual void RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1)=0
Relay an SIB1 message from the PHY entity to the RRC layer.
virtual void NotifyOutOfSync()=0
Send an out of sync indication to UE RRC.
virtual void ResetSyncIndicationCounter()=0
Reset the sync indication counter.
The LteUeNetDevice class implements the UE net device.
The LteSpectrumPhy models the physical layer of LTE.
Definition lte-ue-phy.h:41
void SetTxMode1Gain(double gain)
Set transmit mode 1 gain function.
SpectrumValue m_dataInterferencePower
data interference power
Definition lte-ue-phy.h:716
void SetSubChannelsForTransmission(std::vector< int > mask)
Set a list of sub channels to use in TX.
void DoInitialize() override
Initialize() implementation.
friend class MemberLteUeCphySapProvider< LteUePhy >
allow MemberLteUeCphySapProvider<LteUePhy> class friend access
Definition lte-ue-phy.h:45
void SetHarqPhyModule(Ptr< LteHarqPhy > harq)
Set the HARQ PHY module.
void DoSetDlBandwidth(uint16_t dlBandwidth)
Set DL bandwidth function.
uint16_t GetNumQinEvalSf() const
Get number of Qin evaluation subframes.
void SetTxMode3Gain(double gain)
Set transmit mode 3 gain function.
uint16_t m_numOfQinEvalSf
the downlink radio link quality is estimated over this period for detecting in-syncs
Definition lte-ue-phy.h:831
LteUePhySapUser * m_uePhySapUser
UE Phy SAP user.
Definition lte-ue-phy.h:678
uint16_t DoGetCellId()
Get cell ID.
uint16_t m_rsrpSinrSampleCounter
The RsrpSinrSampleCounter attribute.
Definition lte-ue-phy.h:778
virtual void ReportDataInterference(const SpectrumValue &interf)
Create the mixed CQI report.
void QueueSubChannelsForTransmission(std::vector< int > rbMap)
Queue subchannels for transmission function.
void DoConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth)
Configure UL uplink function.
virtual void ReceivePss(uint16_t cellId, Ptr< SpectrumValue > p)
Receive PSS function.
uint16_t m_srsPeriodicity
SRS periodicity.
Definition lte-ue-phy.h:688
void DoResetPhyAfterRlf()
Reset Phy after radio link failure function.
virtual void DoNotifyConnectionSuccessful()
Notify PHY about the successful RRC connection establishment.
bool m_dlConfigured
DL configured?
Definition lte-ue-phy.h:695
LteUePhySapProvider * GetLteUePhySapProvider()
Get the PHY SAP provider.
Time m_srsStartTime
SRS start time.
Definition lte-ue-phy.h:691
double GetNoiseFigure() const
Get noise figure.
Time m_p10CqiLast
last periodic CQI
Definition lte-ue-phy.h:667
std::map< uint16_t, UeMeasurementsElement > m_ueMeasurementsMap
Store measurement results during the last layer-1 filtering period.
Definition lte-ue-phy.h:749
TracedCallback< uint16_t, Ptr< SpectrumValue > > m_reportPowerSpectralDensity
The ReportsPowerSpectralDensity trace source.
Definition lte-ue-phy.h:809
LteUePhySapProvider * m_uePhySapProvider
UE Phy SAP provider.
Definition lte-ue-phy.h:677
void ReportRsReceivedPower(const SpectrumValue &power) override
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for ...
uint16_t GetNumQoutEvalSf() const
Get number of Qout evaluation subframes.
bool m_rsInterferencePowerUpdated
RS interference power updated?
Definition lte-ue-phy.h:712
virtual void ReceiveLteControlMessageList(std::list< Ptr< LteControlMessage > > msgList)
Receive LTE control message list function.
void DoSendMacPdu(Ptr< Packet > p) override
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
Ptr< SpectrumValue > m_noisePsd
Noise power spectral density for the configured bandwidth.
Definition lte-ue-phy.h:811
void GenerateCtrlCqiReport(const SpectrumValue &sinr) override
generate a CQI report based on the given SINR of Ctrl frame
uint32_t DoGetDlEarfcn()
Get DL EARFCN.
double ComputeAvgSinr(const SpectrumValue &sinr)
Compute average SINR among the RBs.
void SetLteUePhySapUser(LteUePhySapUser *s)
Set the PHY SAP User.
virtual void DoSendRachPreamble(uint32_t prachId, uint32_t raRnti)
Send RACH preamble function.
void DoStartCellSearch(uint32_t dlEarfcn)
Start the cell search function.
void SetTxMode6Gain(double gain)
Set transmit mode 6 gain function.
LteUeCphySapProvider * m_ueCphySapProvider
UE CPhy SAP provider.
Definition lte-ue-phy.h:680
Ptr< SpectrumValue > CreateTxPowerSpectralDensity() override
Create the PSD for the TX.
std::vector< std::vector< int > > m_subChannelsForTransmissionQueue
subchannels for transmission queue
Definition lte-ue-phy.h:653
void DoReset()
Do Reset function.
void SetNumQoutEvalSf(uint16_t numSubframes)
Set number of Qout evaluation subframes.
State m_state
The current UE PHY state.
Definition lte-ue-phy.h:699
bool m_pssReceived
PSS received?
Definition lte-ue-phy.h:718
TracedCallback< uint16_t, uint16_t, double, double, uint8_t > m_reportCurrentCellRsrpSinrTrace
The ReportCurrentCellRsrpSinr trace source.
Definition lte-ue-phy.h:768
void DoSetImsi(uint64_t imsi)
Set IMSI.
void SetTxMode2Gain(double gain)
Set transmit mode 2 gain function.
void DoSetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)
Do set RSRP filter coefficient.
~LteUePhy() override
uint8_t GetMacChDelay() const
Get MAC to Channel delay.
Ptr< LteUePowerControl > m_powerControl
Pointer to UE Uplink Power Control entity.
Definition lte-ue-phy.h:663
void DoConfigureReferenceSignalPower(int8_t referenceSignalPower)
Configure reference signal power function.
std::list< PssElement > m_pssList
PSS list.
Definition lte-ue-phy.h:728
void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)
trigger from eNB the start from a new frame
Ptr< LteUePowerControl > GetUplinkPowerControl() const
Get Uplink power control.
void RlfDetection(double sinrdB)
Radio link failure detection function.
std::vector< double > m_txModeGain
the transmit mode gain
Definition lte-ue-phy.h:686
State GetState() const
Get state of the UE physical layer.
SpectrumValue m_rsReceivedPower
RS receive power.
Definition lte-ue-phy.h:710
void DoSynchronizeWithEnb(uint16_t cellId)
Synchronize with ENB function.
void DoSetSrsConfigurationIndex(uint16_t srcCi)
Set SRS configuration index function.
uint16_t m_srsSubframeOffset
SRS subframe offset.
Definition lte-ue-phy.h:689
uint8_t m_subframeNo
Definition lte-ue-phy.h:707
uint16_t m_rsrpSinrSamplePeriod
The RsrpSinrSamplePeriod attribute.
Definition lte-ue-phy.h:773
uint64_t m_imsi
the IMSI of the UE
Definition lte-ue-phy.h:842
uint16_t m_rnti
the RNTI
Definition lte-ue-phy.h:683
bool m_enableUplinkPowerControl
The EnableUplinkPowerControl attribute.
Definition lte-ue-phy.h:661
Ptr< LteSpectrumPhy > GetDlSpectrumPhy() const
Get Downlink spectrum phy.
void SetTxMode5Gain(double gain)
Set transmit mode 5 gain function.
void DoSetTransmissionMode(uint8_t txMode)
Set transmission mode function.
bool m_enableRlfDetection
Flag to enable/disable RLF detection.
Definition lte-ue-phy.h:843
Time m_a30CqiLast
last aperiodic CQI
Definition lte-ue-phy.h:675
void GenerateCqiRsrpRsrq(const SpectrumValue &sinr)
Get CQI, RSRP, and RSRQ.
SpectrumValue m_rsInterferencePower
RS interference power.
Definition lte-ue-phy.h:713
void DoResetRlfParams()
Reset radio link failure parameters.
void SetDownlinkCqiPeriodicity(Time cqiPeriodicity)
Set the periodicty for the downlink periodic wideband and aperiodic subband CQI reporting.
Ptr< LteHarqPhy > m_harqPhyModule
HARQ phy module.
Definition lte-ue-phy.h:758
EventId m_sendSrsEvent
send SRS event
Definition lte-ue-phy.h:788
double m_qIn
The 'Qin' attribute.
Definition lte-ue-phy.h:820
void SetNoiseFigure(double nf)
Set noise figure.
friend class UeMemberLteUePhySapProvider
allow UeMemberLteUePhySapProvider class friend access
Definition lte-ue-phy.h:43
void DoSetPa(double pa)
Set PA function.
Ptr< DlCqiLteControlMessage > CreateDlCqiFeedbackMessage(const SpectrumValue &sinr)
Create the DL CQI feedback from SINR values perceived at the physical layer with the signal received ...
LteUeCphySapUser * m_ueCphySapUser
UE CPhy SAP user.
Definition lte-ue-phy.h:681
void SetNumQinEvalSf(uint16_t numSubframes)
Set number of Qin evaluation subframes.
void SetLteUeCphySapUser(LteUeCphySapUser *s)
Set the CPHY SAP User.
double m_sinrDbFrame
the average SINR per radio frame
Definition lte-ue-phy.h:840
TracedCallback< uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
Definition lte-ue-phy.h:704
void DoDispose() override
Destructor implementation.
void SetSubChannelsForReception(std::vector< int > mask)
Get a list of sub channels to use in RX.
bool m_rsReceivedPowerUpdated
RS receive power updated?
Definition lte-ue-phy.h:709
void SwitchToState(State s)
Switch the UE PHY to the given state.
TracedCallback< uint16_t, uint16_t, double, double, bool, uint8_t > m_reportUeMeasurements
The ReportUeMeasurements trace source.
Definition lte-ue-phy.h:786
double m_paLinear
PA linear.
Definition lte-ue-phy.h:693
TracedCallback< PhyTransmissionStatParameters > m_ulPhyTransmission
The UlPhyTransmission trace source.
Definition lte-ue-phy.h:795
bool m_isConnected
set when UE RRC is in CONNECTED_NORMALLY state
Definition lte-ue-phy.h:814
Ptr< LteAmc > m_amc
AMC.
Definition lte-ue-phy.h:655
std::vector< int > m_subChannelsForReception
A list of sub channels to use in RX.
Definition lte-ue-phy.h:650
void InitializeRlfParams()
Initialize radio link failure parameters.
std::vector< int > GetSubChannelsForTransmission()
Get a list of sub channels to use in RX.
void PhyPduReceived(Ptr< Packet > p)
PhySpectrum received a new PHY-PDU.
LteUeCphySapProvider * GetLteUeCphySapProvider()
Get the CPHY SAP provider.
bool m_ulConfigured
UL configured?
Definition lte-ue-phy.h:696
SpectrumValue m_ctrlSinrForRlf
the CTRL SINR used for RLF detection
Definition lte-ue-phy.h:841
Time m_ueMeasurementsFilterPeriod
The UeMeasurementsFilterPeriod attribute.
Definition lte-ue-phy.h:754
bool m_srsConfigured
SRS configured.
Definition lte-ue-phy.h:690
void GenerateDataCqiReport(const SpectrumValue &sinr) override
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
uint16_t m_numOfFrames
count the number of frames for which the downlink radio link quality is estimated
Definition lte-ue-phy.h:838
bool m_downlinkInSync
when set, DL SINR evaluation for out-of-sync indications is conducted.
Definition lte-ue-phy.h:834
uint16_t m_numOfQoutEvalSf
the downlink radio link quality is estimated over this period for detecting out-of-syncs
Definition lte-ue-phy.h:829
void SetTxMode7Gain(double gain)
Set transmit mode 7 gain function.
void DoSetRnti(uint16_t rnti)
Set RNTI function.
static TypeId GetTypeId()
Get the type ID.
double GetTxPower() const
Get transmit power.
virtual void EnqueueDlHarqFeedback(DlInfoListElement_s mes)
Enqueue the downlink HARQ feedback generated by LteSpectrumPhy.
std::vector< int > m_subChannelsForTransmission
A list of sub channels to use in TX.
Definition lte-ue-phy.h:648
Time m_p10CqiPeriodicity
Wideband Periodic CQI. 2, 5, 10, 16, 20, 32, 40, 64, 80 or 160 ms.
Definition lte-ue-phy.h:666
bool m_dataInterferencePowerUpdated
data interference power updated?
Definition lte-ue-phy.h:715
void SetTxPower(double pow)
Set transmit power.
State
The states of the UE PHY entity.
Definition lte-ue-phy.h:52
uint16_t m_numOfSubframes
count the number of subframes for which the downlink radio link quality is estimated
Definition lte-ue-phy.h:836
void SetTxMode4Gain(double gain)
Set transmit mode 4 gain function.
virtual void DoSendLteControlMessage(Ptr< LteControlMessage > msg)
Send LTE control message function.
Time m_a30CqiPeriodicity
SubBand Aperiodic CQI.
Definition lte-ue-phy.h:674
TracedCallback< uint16_t, const std::vector< int > & > m_reportUlPhyResourceBlocks
The ReportUlPhyResourceBlocks trace source.
Definition lte-ue-phy.h:802
void ReportInterference(const SpectrumValue &interf) override
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
std::vector< int > GetSubChannelsForReception()
Get a list of sub channels to use in RX.
Ptr< LteSpectrumPhy > GetUlSpectrumPhy() const
Get Uplink spectrum phy.
void ReportUeMeasurements()
Layer-1 filtering of RSRP and RSRQ measurements and reporting to the RRC entity.
double m_pssReceptionThreshold
The RsrqUeMeasThreshold attribute.
Definition lte-ue-phy.h:734
uint32_t m_raPreambleId
RA preamble ID.
Definition lte-ue-phy.h:760
double m_qOut
The 'Qout' attribute.
Definition lte-ue-phy.h:827
void DoStartInSyncDetection()
Start in Sync detection function.
void SendSrs()
Send the SRS signal in the last symbols of the frame.
virtual void GenerateMixedCqiReport(const SpectrumValue &sinr)
Create the mixed CQI report.
uint8_t m_transmissionMode
the transmission mode
Definition lte-ue-phy.h:685
void SetTxModeGain(uint8_t txMode, double gain)
Set transmit mode gain function.
uint32_t m_raRnti
RA RNTI.
Definition lte-ue-phy.h:761
Service Access Point (SAP) offered by the UE-PHY to the UE-MAC.
Service Access Point (SAP) offered by the PHY to the MAC.
virtual void ReceivePhyPdu(Ptr< Packet > p)=0
Receive Phy Pdu function.
virtual void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)=0
Trigger the start from a new frame (input from Phy layer)
virtual void ReceiveLteControlMessage(Ptr< LteControlMessage > msg)=0
Receive SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
virtual void DoInitialize()
Initialize() implementation.
Definition object.cc:440
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition simulator.h:560
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
Definition simulator.h:577
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:197
Set of values corresponding to a given SpectrumModel.
Values::const_iterator ConstValuesBegin() const
uint32_t GetValuesN() const
Get the number of values stored in the array.
Values::const_iterator ConstValuesEnd() const
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
int64_t GetMilliSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition nstime.h:397
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition time.cc:404
@ MS
millisecond
Definition nstime.h:106
static uint8_t TxMode2LayerNum(uint8_t txMode)
Transmit mode 2 layer number.
a unique identifier for an interface.
Definition type-id.h:48
@ ATTR_GET
The attribute can be read.
Definition type-id.h:53
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
UeMemberLteUePhySapProvider class.
Definition lte-ue-phy.cc:62
void SendRachPreamble(uint32_t prachId, uint32_t raRnti) override
Send a preamble on the PRACH.
Definition lte-ue-phy.cc:99
void NotifyConnectionSuccessful() override
Notify PHY about the successful RRC connection establishment.
void SendLteControlMessage(Ptr< LteControlMessage > msg) override
Send SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
Definition lte-ue-phy.cc:93
void SendMacPdu(Ptr< Packet > p) override
Send the MAC PDU to the channel.
Definition lte-ue-phy.cc:87
UeMemberLteUePhySapProvider(LteUePhy *phy)
Constructor.
Definition lte-ue-phy.cc:81
Hold an unsigned integer type.
Definition uinteger.h:34
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
#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:75
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition pointer.h:248
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
Definition pointer.h:269
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition abort.h:97
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:257
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition log.h:271
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition log.h:250
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition log.h:264
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:619
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1344
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1308
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1320
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
#define UL_PUSCH_TTIS_DELAY
Definition lte-common.h:17
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static const std::string g_uePhyStateName[LteUePhy::NUM_STATES]
Map each of UE PHY states to its string representation.
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition boolean.cc:113
Ptr< const AttributeChecker > MakeUintegerChecker()
Definition uinteger.h:85
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition nstime.h:1396
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Definition uinteger.h:35
Ptr< const AttributeChecker > MakeDoubleChecker()
Definition double.h:82
static const Time UL_DATA_DURATION
Duration of the data portion of a UL subframe.
Definition lte-ue-phy.cc:48
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
Definition ptr.h:580
static const Time UL_SRS_DELAY_FROM_SUBFRAME_START
Delay from subframe start to transmission of SRS.
Definition lte-ue-phy.cc:54
std::vector< HarqProcessInfoElement_t > HarqProcessInfoList_t
HarqProcessInfoList_t typedef.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition boolean.h:70
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Definition double.h:32
static const int Type0AllocationRbg[4]
Type 0 RBG allocation.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Definition nstime.h:1416
static const std::string & ToString(EpcUeNas::State s)
Definition epc-ue-nas.cc:37
See section 4.3.24 cqiListElement.
std::vector< uint8_t > m_wbCqi
wb CQI
struct SbMeasResult_s m_sbMeasResult
sb measure result
See section 4.3.1 dlDciListElement.
std::vector< uint8_t > m_ndi
New data indicator.
uint8_t m_harqProcess
HARQ process.
uint32_t m_rbBitmap
RB bitmap.
std::vector< uint8_t > m_mcs
MCS.
uint8_t m_resAlloc
The type of resource allocation.
std::vector< uint16_t > m_tbsSize
The TBs size.
std::vector< uint8_t > m_rv
Redundancy version.
uint8_t m_tpc
Tx power control command.
See section 4.3.23 dlInfoListElement.
See section 4.3.27 higherLayerSelected.
std::vector< uint8_t > m_sbCqi
sb CQI
Parameters of the ReportUeMeasurements primitive: RSRP [dBm] and RSRQ [dB] See section 5....
UeMeasurementsParameters structure.
PssElement structure.
Definition lte-ue-phy.h:722
uint16_t cellId
cell ID
Definition lte-ue-phy.h:723
double pssPsdSum
PSS PSD sum.
Definition lte-ue-phy.h:724
uint16_t nRB
number of RB
Definition lte-ue-phy.h:725
Summary results of measuring a specific cell. Used for layer-1 filtering.
Definition lte-ue-phy.h:738
double rsrqSum
Sum of RSRQ sample values in linear unit.
Definition lte-ue-phy.h:741
uint8_t rsrpNum
Number of RSRP samples.
Definition lte-ue-phy.h:740
double rsrpSum
Sum of RSRP sample values in linear unit.
Definition lte-ue-phy.h:739
uint8_t rsrqNum
Number of RSRQ samples.
Definition lte-ue-phy.h:742
PhyTransmissionStatParameters structure.
Definition lte-common.h:177
See section 4.3.25 sbMeasResult.
std::vector< struct HigherLayerSelected_s > m_higherLayerSelected
higher layer selected
See section 4.3.2 ulDciListElement.