author | Nicola Baldo <nbaldo@cttc.es> |
Mon, 04 Feb 2013 18:47:25 +0100 | |
changeset 9653 | 382d27da8905 |
parent 9389 | 4bd2725add01 |
permissions | -rw-r--r-- |
7886 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2010 Centre Tecnologic de Telecomunicacions de Catalunya (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> |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
19 |
* Modified by : Marco Miozzo <mmiozzo@cttc.es> |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
20 |
* (move from CQI to Ctrl and Data SINR Chunk processors |
7886 | 21 |
*/ |
22 |
||
23 |
||
24 |
#include <ns3/log.h> |
|
25 |
||
26 |
#include "lte-sinr-chunk-processor.h" |
|
27 |
||
28 |
NS_LOG_COMPONENT_DEFINE ("LteSinrChunkProcessor"); |
|
29 |
||
30 |
namespace ns3 { |
|
31 |
||
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
32 |
LteSinrChunkProcessor::~LteSinrChunkProcessor () |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
33 |
{ |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
34 |
NS_LOG_FUNCTION (this); |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
35 |
} |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
36 |
|
7886 | 37 |
|
9357
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
38 |
// ------------- LteCtrlSinrChunkProcessor ------------------------------ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
39 |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
40 |
LteCtrlSinrChunkProcessor::LteCtrlSinrChunkProcessor (Ptr<LtePhy> p) |
9043
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
41 |
: m_phy (p), |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
42 |
m_spectrumPhy (0) |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
7909
diff
changeset
|
43 |
{ |
7886 | 44 |
NS_LOG_FUNCTION (this << p); |
45 |
NS_ASSERT (m_phy); |
|
46 |
} |
|
47 |
||
9043
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
48 |
LteCtrlSinrChunkProcessor::LteCtrlSinrChunkProcessor (Ptr<LtePhy> p, Ptr<LteSpectrumPhy> s) |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
49 |
: m_phy (p), |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
50 |
m_spectrumPhy (s) |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
51 |
{ |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
52 |
NS_LOG_FUNCTION (this << p); |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
53 |
NS_ASSERT (m_phy); |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
54 |
NS_ASSERT (m_spectrumPhy); |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
55 |
} |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
56 |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
57 |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
58 |
LteCtrlSinrChunkProcessor::~LteCtrlSinrChunkProcessor () |
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
59 |
{ |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
60 |
NS_LOG_FUNCTION (this); |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
61 |
} |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
62 |
|
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
63 |
|
7886 | 64 |
void |
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
65 |
LteCtrlSinrChunkProcessor::Start () |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
7909
diff
changeset
|
66 |
{ |
7886 | 67 |
NS_LOG_FUNCTION (this); |
68 |
m_sumSinr = 0; |
|
69 |
m_totDuration = MicroSeconds (0); |
|
70 |
} |
|
71 |
||
72 |
||
73 |
void |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
74 |
LteCtrlSinrChunkProcessor::EvaluateSinrChunk (const SpectrumValue& sinr, Time duration) |
7886 | 75 |
{ |
76 |
NS_LOG_FUNCTION (this << sinr << duration); |
|
77 |
if (m_sumSinr == 0) |
|
78 |
{ |
|
79 |
m_sumSinr = Create<SpectrumValue> (sinr.GetSpectrumModel ()); |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
7909
diff
changeset
|
80 |
} |
7886 | 81 |
(*m_sumSinr) += sinr * duration.GetSeconds (); |
82 |
m_totDuration += duration; |
|
83 |
} |
|
84 |
||
85 |
void |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
86 |
LteCtrlSinrChunkProcessor::End () |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
7909
diff
changeset
|
87 |
{ |
7886 | 88 |
NS_LOG_FUNCTION (this); |
89 |
if (m_totDuration.GetSeconds () > 0) |
|
90 |
{ |
|
9036 | 91 |
m_phy->GenerateCtrlCqiReport ((*m_sumSinr) / m_totDuration.GetSeconds ()); |
9043
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
92 |
if (m_spectrumPhy) |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
93 |
{ |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
94 |
m_spectrumPhy->UpdateSinrPerceived ((*m_sumSinr) / m_totDuration.GetSeconds ()); |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
95 |
} |
7886 | 96 |
} |
97 |
else |
|
98 |
{ |
|
99 |
NS_LOG_WARN ("m_numSinr == 0"); |
|
100 |
} |
|
101 |
} |
|
102 |
||
103 |
||
9357
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
104 |
// ------------- LteDataSinrChunkProcessor ------------------------------ |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
105 |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
106 |
LteDataSinrChunkProcessor::LteDataSinrChunkProcessor (Ptr<LteSpectrumPhy> s, Ptr<LtePhy> p) |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
107 |
: m_spectrumPhy (s), |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
108 |
m_phy (p) |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
109 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
110 |
NS_LOG_FUNCTION (this << p); |
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
111 |
NS_ASSERT (m_spectrumPhy); |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
112 |
NS_ASSERT (m_phy); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
113 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
114 |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
115 |
LteDataSinrChunkProcessor::LteDataSinrChunkProcessor (Ptr<LteSpectrumPhy> p) |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
116 |
: m_spectrumPhy (p), |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
117 |
m_phy (0) |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
118 |
{ |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
119 |
NS_LOG_FUNCTION (this << p); |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
120 |
NS_ASSERT (m_spectrumPhy); |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
121 |
|
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
122 |
} |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
123 |
|
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
124 |
|
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
125 |
|
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
126 |
LteDataSinrChunkProcessor::~LteDataSinrChunkProcessor () |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
127 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
128 |
NS_LOG_FUNCTION (this); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
129 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
130 |
|
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
131 |
|
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
132 |
void |
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
133 |
LteDataSinrChunkProcessor::Start () |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
134 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
135 |
NS_LOG_FUNCTION (this); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
136 |
m_sumSinr = 0; |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
137 |
m_totDuration = MicroSeconds (0); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
138 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
139 |
|
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
140 |
|
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
141 |
void |
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
142 |
LteDataSinrChunkProcessor::EvaluateSinrChunk (const SpectrumValue& sinr, Time duration) |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
143 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
144 |
NS_LOG_FUNCTION (this << sinr << duration); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
145 |
if (m_sumSinr == 0) |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
146 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
147 |
m_sumSinr = Create<SpectrumValue> (sinr.GetSpectrumModel ()); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
148 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
149 |
(*m_sumSinr) += sinr * duration.GetSeconds (); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
150 |
m_totDuration += duration; |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
151 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
152 |
|
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
153 |
void |
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
154 |
LteDataSinrChunkProcessor::End () |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
155 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
156 |
NS_LOG_FUNCTION (this); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
157 |
if (m_totDuration.GetSeconds () > 0) |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
158 |
{ |
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
159 |
m_spectrumPhy->UpdateSinrPerceived ((*m_sumSinr) / m_totDuration.GetSeconds ()); |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
160 |
if (m_phy) |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
161 |
{ |
9036 | 162 |
m_phy->GenerateDataCqiReport ((*m_sumSinr) / m_totDuration.GetSeconds ()); |
9035
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8664
diff
changeset
|
163 |
} |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
164 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
165 |
else |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
166 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
167 |
NS_LOG_WARN ("m_numSinr == 0"); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
168 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
169 |
} |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
170 |
|
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8148
diff
changeset
|
171 |
|
9389
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
172 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
173 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
174 |
// ------------- LteRsReceivedPowerChunkProcessor ------------------------------ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
175 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
176 |
LteRsReceivedPowerChunkProcessor::LteRsReceivedPowerChunkProcessor (Ptr<LtePhy> p) |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
177 |
: m_phy (p) |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
178 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
179 |
NS_LOG_FUNCTION (this << p); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
180 |
NS_ASSERT (m_phy); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
181 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
182 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
183 |
LteRsReceivedPowerChunkProcessor::~LteRsReceivedPowerChunkProcessor () |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
184 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
185 |
NS_LOG_FUNCTION (this); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
186 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
187 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
188 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
189 |
void |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
190 |
LteRsReceivedPowerChunkProcessor::Start () |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
191 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
192 |
NS_LOG_FUNCTION (this); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
193 |
m_sumSinr = 0; |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
194 |
m_totDuration = MicroSeconds (0); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
195 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
196 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
197 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
198 |
void |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
199 |
LteRsReceivedPowerChunkProcessor::EvaluateSinrChunk (const SpectrumValue& sinr, Time duration) |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
200 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
201 |
NS_LOG_FUNCTION (this << sinr << duration); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
202 |
if (m_sumSinr == 0) |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
203 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
204 |
m_sumSinr = Create<SpectrumValue> (sinr.GetSpectrumModel ()); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
205 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
206 |
(*m_sumSinr) += sinr * duration.GetSeconds (); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
207 |
m_totDuration += duration; |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
208 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
209 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
210 |
void |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
211 |
LteRsReceivedPowerChunkProcessor::End () |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
212 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
213 |
NS_LOG_FUNCTION (this); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
214 |
if (m_totDuration.GetSeconds () > 0) |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
215 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
216 |
m_phy->ReportRsReceivedPower ((*m_sumSinr) / m_totDuration.GetSeconds ()); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
217 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
218 |
else |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
219 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
220 |
NS_LOG_WARN ("m_numSinr == 0"); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
221 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
222 |
} |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
223 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
224 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
225 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
226 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
227 |
|
9357
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
228 |
// ------------- LteInterferencePowerChunkProcessor ------------------------------ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
229 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
230 |
LteInterferencePowerChunkProcessor::LteInterferencePowerChunkProcessor (Ptr<LtePhy> p) |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
231 |
: m_phy (p) |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
232 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
233 |
NS_LOG_FUNCTION (this << p); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
234 |
NS_ASSERT (m_phy); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
235 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
236 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
237 |
LteInterferencePowerChunkProcessor::~LteInterferencePowerChunkProcessor () |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
238 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
239 |
NS_LOG_FUNCTION (this); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
240 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
241 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
242 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
243 |
void |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
244 |
LteInterferencePowerChunkProcessor::Start () |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
245 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
246 |
NS_LOG_FUNCTION (this); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
247 |
m_sumSinr = 0; |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
248 |
m_totDuration = MicroSeconds (0); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
249 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
250 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
251 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
252 |
void |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
253 |
LteInterferencePowerChunkProcessor::EvaluateSinrChunk (const SpectrumValue& sinr, Time duration) |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
254 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
255 |
NS_LOG_FUNCTION (this << sinr << duration); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
256 |
if (m_sumSinr == 0) |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
257 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
258 |
m_sumSinr = Create<SpectrumValue> (sinr.GetSpectrumModel ()); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
259 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
260 |
(*m_sumSinr) += sinr * duration.GetSeconds (); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
261 |
m_totDuration += duration; |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
262 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
263 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
264 |
void |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
265 |
LteInterferencePowerChunkProcessor::End () |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
266 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
267 |
NS_LOG_FUNCTION (this); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
268 |
if (m_totDuration.GetSeconds () > 0) |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
269 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
270 |
m_phy->ReportInterference ((*m_sumSinr) / m_totDuration.GetSeconds ()); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
271 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
272 |
else |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
273 |
{ |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
274 |
NS_LOG_WARN ("m_numSinr == 0"); |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
275 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
276 |
} |
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
277 |
|
d52b94f66fe7
Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9043
diff
changeset
|
278 |
|
7886 | 279 |
} // namespace ns3 |