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) 2009, 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:
8514
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:
8514
diff
changeset
|
20 |
* (move from CQI to Ctrl and Data SINR Chunk processors) |
7886 | 21 |
*/ |
22 |
||
23 |
||
24 |
#ifndef LTE_SINR_CHUNK_PROCESSOR_H |
|
25 |
#define LTE_SINR_CHUNK_PROCESSOR_H |
|
26 |
||
27 |
#include <ns3/spectrum-value.h> |
|
28 |
#include <ns3/ptr.h> |
|
29 |
#include <ns3/packet.h> |
|
30 |
#include <ns3/nstime.h> |
|
31 |
#include <ns3/object.h> |
|
32 |
#include <ns3/lte-phy.h> |
|
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
33 |
#include <ns3/lte-spectrum-phy.h> |
7886 | 34 |
|
35 |
namespace ns3 { |
|
36 |
||
37 |
||
38 |
||
39 |
/** |
|
40 |
* This abstract class is used to process the time-vs-frequency SINR chunk |
|
41 |
* of a received LTE signal which was calculated by the |
|
42 |
* LteInterference object. |
|
43 |
* |
|
44 |
*/ |
|
45 |
class LteSinrChunkProcessor : public SimpleRefCount<LteSinrChunkProcessor> |
|
46 |
{ |
|
47 |
public: |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
48 |
virtual ~LteSinrChunkProcessor (); |
7886 | 49 |
virtual void Start () = 0; |
50 |
virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration) = 0; |
|
51 |
virtual void End () = 0; |
|
52 |
}; |
|
53 |
||
54 |
||
55 |
||
56 |
||
57 |
/** |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9035
diff
changeset
|
58 |
* The LteCtrlSinrChunkProcessor averages the calculated SINR over time |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9035
diff
changeset
|
59 |
* for the Ctrl frame and therefore in charge of generating the CQI starting |
9043
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9038
diff
changeset
|
60 |
* from the reference signals and the sinr values used for evaluating the |
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9038
diff
changeset
|
61 |
* decodification error probability of the control channels (PCFICH + PDCCH) |
7886 | 62 |
* |
63 |
*/ |
|
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:
8514
diff
changeset
|
64 |
class LteCtrlSinrChunkProcessor : public LteSinrChunkProcessor |
7886 | 65 |
{ |
66 |
public: |
|
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:
8514
diff
changeset
|
67 |
virtual ~LteCtrlSinrChunkProcessor (); |
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:
8514
diff
changeset
|
68 |
LteCtrlSinrChunkProcessor (Ptr<LtePhy> p); |
9043
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9038
diff
changeset
|
69 |
LteCtrlSinrChunkProcessor (Ptr<LtePhy> p, Ptr<LteSpectrumPhy> s); |
7886 | 70 |
virtual void Start (); |
71 |
virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration); |
|
72 |
virtual void End (); |
|
73 |
private: |
|
74 |
Ptr<SpectrumValue> m_sumSinr; |
|
75 |
Time m_totDuration; |
|
76 |
Ptr<LtePhy> m_phy; |
|
9043
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9038
diff
changeset
|
77 |
Ptr<LteSpectrumPhy> m_spectrumPhy; |
7886 | 78 |
}; |
79 |
||
80 |
||
81 |
||
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
82 |
/** |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9035
diff
changeset
|
83 |
* The LteDataSinrChunkProcessor averages the calculated SINR over time for |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9035
diff
changeset
|
84 |
* data frame and therefore in charge of generating the sinr values for |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9035
diff
changeset
|
85 |
* evaluating the errors of data packets. Might be used also for generating |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9035
diff
changeset
|
86 |
* CQI based on data in case any LtePhy is attached. |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
87 |
* |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
88 |
*/ |
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:
8514
diff
changeset
|
89 |
class LteDataSinrChunkProcessor : public LteSinrChunkProcessor |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
90 |
{ |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
91 |
public: |
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:
8514
diff
changeset
|
92 |
virtual ~LteDataSinrChunkProcessor (); |
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:
8514
diff
changeset
|
93 |
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:
8514
diff
changeset
|
94 |
LteDataSinrChunkProcessor (Ptr<LteSpectrumPhy> s, Ptr<LtePhy> p); |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
95 |
virtual void Start (); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
96 |
virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
97 |
virtual void End (); |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
98 |
private: |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
99 |
Ptr<SpectrumValue> m_sumSinr; |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
100 |
Time m_totDuration; |
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:
8514
diff
changeset
|
101 |
Ptr<LteSpectrumPhy> 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:
8514
diff
changeset
|
102 |
Ptr<LtePhy> m_phy; |
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
103 |
}; |
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
104 |
|
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
105 |
|
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
|
106 |
/** |
9389
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
107 |
* The LteRsReceivedPowerChunkProcessor averages the received signal power |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
108 |
* over time for data frame and therefore in charge of generating the |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
109 |
* power linear values for generating the RSRP tracing at eNB side |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
110 |
* |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
111 |
*/ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
112 |
class LteRsReceivedPowerChunkProcessor : public LteSinrChunkProcessor |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
113 |
{ |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
114 |
public: |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
115 |
virtual ~LteRsReceivedPowerChunkProcessor (); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
116 |
LteRsReceivedPowerChunkProcessor (Ptr<LtePhy> p); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
117 |
virtual void Start (); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
118 |
virtual void 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
|
119 |
virtual void End (); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
120 |
private: |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
121 |
Ptr<SpectrumValue> m_sumSinr; |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
122 |
Time m_totDuration; |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
123 |
Ptr<LtePhy> m_phy; |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
124 |
}; |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
125 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
126 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
127 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
128 |
|
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9357
diff
changeset
|
129 |
/** |
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
|
130 |
* The LteInterferencePowerChunkProcessor averages the interference power |
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
|
131 |
* over time for data frame and therefore in charge of generating the |
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
|
132 |
* interference power linear values for generating the interference power |
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
|
133 |
* tracing at eNB side |
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
|
134 |
* |
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
|
135 |
*/ |
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
|
136 |
class LteInterferencePowerChunkProcessor : public LteSinrChunkProcessor |
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
|
137 |
{ |
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
|
138 |
public: |
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
|
139 |
virtual ~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
|
140 |
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
|
141 |
virtual void 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
|
142 |
virtual void 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
|
143 |
virtual void 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
|
144 |
private: |
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
|
145 |
Ptr<SpectrumValue> m_sumSinr; |
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
|
146 |
Time m_totDuration; |
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
|
147 |
Ptr<LtePhy> 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
|
148 |
}; |
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
|
149 |
|
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
|
150 |
|
8514
6480a3cc31f2
Add LtePemSinrChunkProcessor and connect it to LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
151 |
|
7886 | 152 |
|
153 |
||
154 |
} // namespace ns3 |
|
155 |
||
156 |
||
157 |
||
158 |
#endif /* LTE_SINR_PROCESSOR_H */ |