author | Marco Miozzo <marco.miozzo@cttc.es> |
Fri, 23 Mar 2012 11:36:49 +0100 | |
changeset 8715 | 736f0318fc8a |
parent 8714 | 398bbcbb3f42 |
child 8720 | d5a4b1c4d7c9 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
6852
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6705 | 2 |
/* |
3 |
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
|
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: Giuseppe Piro <g.piro@poliba.it> |
|
7886 | 19 |
* Marco Miozzo <marco.miozzo@cttc.es> |
20 |
* Nicola Baldo <nbaldo@cttc.es> |
|
6705 | 21 |
*/ |
22 |
||
23 |
#include <ns3/object-factory.h> |
|
24 |
#include <ns3/log.h> |
|
25 |
#include <math.h> |
|
26 |
#include <ns3/simulator.h> |
|
7949 | 27 |
#include <ns3/double.h> |
7887 | 28 |
#include "lte-ue-phy.h" |
29 |
#include "lte-enb-phy.h" |
|
6705 | 30 |
#include "lte-net-device.h" |
7887 | 31 |
#include "lte-ue-net-device.h" |
32 |
#include "lte-enb-net-device.h" |
|
6705 | 33 |
#include "lte-spectrum-value-helper.h" |
7887 | 34 |
#include "lte-amc.h" |
7886 | 35 |
#include "lte-ue-mac.h" |
36 |
#include "ff-mac-common.h" |
|
37 |
#include "lte-sinr-chunk-processor.h" |
|
38 |
||
6705 | 39 |
|
7887 | 40 |
NS_LOG_COMPONENT_DEFINE ("LteUePhy"); |
6705 | 41 |
|
42 |
namespace ns3 { |
|
43 |
||
7886 | 44 |
//////////////////////////////////////// |
45 |
// member SAP forwarders |
|
46 |
//////////////////////////////////////// |
|
47 |
||
48 |
||
7887 | 49 |
class UeMemberLteUePhySapProvider : public LteUePhySapProvider |
7886 | 50 |
{ |
51 |
public: |
|
7887 | 52 |
UeMemberLteUePhySapProvider (LteUePhy* phy); |
7886 | 53 |
|
54 |
// inherited from LtePhySapProvider |
|
55 |
virtual void SendMacPdu (Ptr<Packet> p); |
|
56 |
virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth); |
|
57 |
virtual void SendIdealControlMessage (Ptr<IdealControlMessage> msg); |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
58 |
virtual void SetTransmissionMode (uint8_t txMode); |
7886 | 59 |
|
60 |
private: |
|
7887 | 61 |
LteUePhy* m_phy; |
7886 | 62 |
}; |
63 |
||
7887 | 64 |
UeMemberLteUePhySapProvider::UeMemberLteUePhySapProvider (LteUePhy* phy) : m_phy (phy) |
7886 | 65 |
{ |
66 |
||
67 |
} |
|
68 |
||
69 |
||
70 |
void |
|
7887 | 71 |
UeMemberLteUePhySapProvider::SendMacPdu (Ptr<Packet> p) |
7886 | 72 |
{ |
73 |
m_phy->DoSendMacPdu (p); |
|
74 |
} |
|
75 |
||
76 |
void |
|
7887 | 77 |
UeMemberLteUePhySapProvider::SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth) |
7886 | 78 |
{ |
79 |
m_phy->DoSetBandwidth (ulBandwidth, dlBandwidth); |
|
80 |
} |
|
81 |
||
82 |
void |
|
7887 | 83 |
UeMemberLteUePhySapProvider::SendIdealControlMessage (Ptr<IdealControlMessage> msg) |
7886 | 84 |
{ |
85 |
m_phy->DoSendIdealControlMessage (msg); |
|
86 |
} |
|
87 |
||
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
88 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
89 |
UeMemberLteUePhySapProvider::SetTransmissionMode (uint8_t txMode) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
90 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
91 |
m_phy->DoSetTransmissionMode (txMode); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
92 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
93 |
|
7886 | 94 |
|
95 |
||
96 |
//////////////////////////////////////// |
|
7887 | 97 |
// generic LteUePhy methods |
7886 | 98 |
//////////////////////////////////////// |
99 |
||
6705 | 100 |
|
7887 | 101 |
NS_OBJECT_ENSURE_REGISTERED (LteUePhy); |
6705 | 102 |
|
103 |
||
7887 | 104 |
LteUePhy::LteUePhy () |
7980
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7949
diff
changeset
|
105 |
{ |
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7949
diff
changeset
|
106 |
NS_LOG_FUNCTION (this); |
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7949
diff
changeset
|
107 |
NS_FATAL_ERROR ("This constructor should not be called"); |
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7949
diff
changeset
|
108 |
} |
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7949
diff
changeset
|
109 |
|
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7949
diff
changeset
|
110 |
LteUePhy::LteUePhy (Ptr<LteSpectrumPhy> dlPhy, Ptr<LteSpectrumPhy> ulPhy) |
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7949
diff
changeset
|
111 |
: LtePhy (dlPhy, ulPhy), |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
112 |
m_p10CqiPeriocity (MilliSeconds (1)), |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
113 |
// ideal behavior |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
114 |
m_p10CqiLast (MilliSeconds (0)), |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
115 |
m_a30CqiPeriocity (MilliSeconds (1)), |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
116 |
// ideal behavior |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
117 |
m_a30CqiLast (MilliSeconds (0)) |
6705 | 118 |
{ |
8522
795ea37db2ff
Change LteAmc* to Ptr<LteAmc> in LteUePhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8517
diff
changeset
|
119 |
m_amc = CreateObject <LteAmc> (); |
7887 | 120 |
m_uePhySapProvider = new UeMemberLteUePhySapProvider (this); |
6705 | 121 |
} |
122 |
||
123 |
||
7887 | 124 |
LteUePhy::~LteUePhy () |
6705 | 125 |
{ |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
126 |
m_txModeGain.clear (); |
6705 | 127 |
} |
128 |
||
7886 | 129 |
void |
7887 | 130 |
LteUePhy::DoDispose () |
7886 | 131 |
{ |
7913
ed3a9f8a76d7
added DoDispose to lte-phy and lte-spectrum-phy
Nicola Baldo <nbaldo@cttc.es>
parents:
7895
diff
changeset
|
132 |
NS_LOG_FUNCTION (this); |
7930
ccb40542ae88
fixed memory leak in PHY SAP usage
Nicola Baldo <nbaldo@cttc.es>
parents:
7928
diff
changeset
|
133 |
delete m_uePhySapProvider; |
7913
ed3a9f8a76d7
added DoDispose to lte-phy and lte-spectrum-phy
Nicola Baldo <nbaldo@cttc.es>
parents:
7895
diff
changeset
|
134 |
LtePhy::DoDispose (); |
7886 | 135 |
} |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
136 |
|
7886 | 137 |
|
6705 | 138 |
|
139 |
TypeId |
|
7887 | 140 |
LteUePhy::GetTypeId (void) |
6705 | 141 |
{ |
7887 | 142 |
static TypeId tid = TypeId ("ns3::LteUePhy") |
6707
2ac68a0381ca
improved module after Tom's review
Giuseppe Piro <g.piro@poliba.it>
parents:
6705
diff
changeset
|
143 |
.SetParent<LtePhy> () |
7887 | 144 |
.AddConstructor<LteUePhy> () |
7949 | 145 |
.AddAttribute ("TxPower", |
146 |
"Transmission power in dBm", |
|
147 |
DoubleValue (10.0), |
|
148 |
MakeDoubleAccessor (&LteUePhy::SetTxPower, |
|
149 |
&LteUePhy::GetTxPower), |
|
150 |
MakeDoubleChecker<double> ()) |
|
7981 | 151 |
.AddAttribute ("NoiseFigure", |
152 |
"Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver." |
|
153 |
" According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is " |
|
154 |
"\"the difference in decibels (dB) between" |
|
155 |
" the noise output of the actual receiver to the noise output of an " |
|
156 |
" ideal receiver with the same overall gain and bandwidth when the receivers " |
|
157 |
" are connected to sources at the standard noise temperature T0.\" " |
|
158 |
"In this model, we consider T0 = 290K.", |
|
159 |
DoubleValue (9.0), |
|
160 |
MakeDoubleAccessor (&LteUePhy::SetNoiseFigure, |
|
161 |
&LteUePhy::GetNoiseFigure), |
|
162 |
MakeDoubleChecker<double> ()) |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
163 |
.AddAttribute ("TxMode1Gain", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
164 |
"Transmission mode 1 gain in dBm", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
165 |
DoubleValue (0.0), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
166 |
MakeDoubleAccessor (&LteUePhy::SetTxMode1Gain ), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
167 |
MakeDoubleChecker<double> ()) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
168 |
.AddAttribute ("TxMode2Gain", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
169 |
"Transmission mode 2 gain in dBm", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
170 |
DoubleValue (4.2), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
171 |
MakeDoubleAccessor (&LteUePhy::SetTxMode2Gain ), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
172 |
MakeDoubleChecker<double> ()) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
173 |
.AddAttribute ("TxMode3Gain", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
174 |
"Transmission mode 3 gain in dBm", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
175 |
DoubleValue (-2.8), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
176 |
MakeDoubleAccessor (&LteUePhy::SetTxMode3Gain ), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
177 |
MakeDoubleChecker<double> ()) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
178 |
.AddAttribute ("TxMode4Gain", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
179 |
"Transmission mode 4 gain in dBm", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
180 |
DoubleValue (0.0), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
181 |
MakeDoubleAccessor (&LteUePhy::SetTxMode4Gain ), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
182 |
MakeDoubleChecker<double> ()) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
183 |
.AddAttribute ("TxMode5Gain", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
184 |
"Transmission mode 5 gain in dBm", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
185 |
DoubleValue (0.0), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
186 |
MakeDoubleAccessor (&LteUePhy::SetTxMode5Gain ), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
187 |
MakeDoubleChecker<double> ()) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
188 |
.AddAttribute ("TxMode6Gain", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
189 |
"Transmission mode 6 gain in dBm", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
190 |
DoubleValue (0.0), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
191 |
MakeDoubleAccessor (&LteUePhy::SetTxMode6Gain ), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
192 |
MakeDoubleChecker<double> ()) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
193 |
.AddAttribute ("TxMode7Gain", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
194 |
"Transmission mode 7 gain in dBm", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
195 |
DoubleValue (0.0), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
196 |
MakeDoubleAccessor (&LteUePhy::SetTxMode7Gain ), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
197 |
MakeDoubleChecker<double> ()) |
6705 | 198 |
; |
199 |
return tid; |
|
200 |
} |
|
201 |
||
8015 | 202 |
void |
203 |
LteUePhy::DoStart () |
|
204 |
{ |
|
205 |
NS_LOG_FUNCTION (this); |
|
206 |
Ptr<SpectrumValue> noisePsd = LteSpectrumValueHelper::CreateNoisePowerSpectralDensity (m_dlEarfcn, m_dlBandwidth, m_noiseFigure); |
|
207 |
m_downlinkSpectrumPhy->SetNoisePowerSpectralDensity (noisePsd); |
|
208 |
LtePhy::DoStart (); |
|
209 |
} |
|
6705 | 210 |
|
7886 | 211 |
void |
7887 | 212 |
LteUePhy::SetLteUePhySapUser (LteUePhySapUser* s) |
6705 | 213 |
{ |
7913
ed3a9f8a76d7
added DoDispose to lte-phy and lte-spectrum-phy
Nicola Baldo <nbaldo@cttc.es>
parents:
7895
diff
changeset
|
214 |
NS_LOG_FUNCTION (this); |
7886 | 215 |
m_uePhySapUser = s; |
216 |
} |
|
217 |
||
218 |
LteUePhySapProvider* |
|
7887 | 219 |
LteUePhy::GetLteUePhySapProvider () |
7886 | 220 |
{ |
7913
ed3a9f8a76d7
added DoDispose to lte-phy and lte-spectrum-phy
Nicola Baldo <nbaldo@cttc.es>
parents:
7895
diff
changeset
|
221 |
NS_LOG_FUNCTION (this); |
7886 | 222 |
return (m_uePhySapProvider); |
6705 | 223 |
} |
224 |
||
7949 | 225 |
void |
7981 | 226 |
LteUePhy::SetNoiseFigure (double nf) |
227 |
{ |
|
228 |
NS_LOG_FUNCTION (this << nf); |
|
229 |
m_noiseFigure = nf; |
|
230 |
} |
|
231 |
||
232 |
double |
|
233 |
LteUePhy::GetNoiseFigure () const |
|
234 |
{ |
|
235 |
NS_LOG_FUNCTION (this); |
|
236 |
return m_noiseFigure; |
|
237 |
} |
|
238 |
||
239 |
void |
|
7949 | 240 |
LteUePhy::SetTxPower (double pow) |
241 |
{ |
|
242 |
NS_LOG_FUNCTION (this << pow); |
|
243 |
m_txPower = pow; |
|
244 |
} |
|
245 |
||
246 |
double |
|
247 |
LteUePhy::GetTxPower () const |
|
248 |
{ |
|
249 |
NS_LOG_FUNCTION (this); |
|
250 |
return m_txPower; |
|
251 |
} |
|
6705 | 252 |
|
7886 | 253 |
void |
7887 | 254 |
LteUePhy::DoSendMacPdu (Ptr<Packet> p) |
6705 | 255 |
{ |
256 |
NS_LOG_FUNCTION (this); |
|
7886 | 257 |
|
258 |
SetMacPdu (p); |
|
6705 | 259 |
} |
260 |
||
261 |
||
262 |
void |
|
7887 | 263 |
LteUePhy::PhyPduReceived (Ptr<Packet> p) |
7886 | 264 |
{ |
265 |
m_uePhySapUser->ReceivePhyPdu (p); |
|
266 |
} |
|
267 |
||
268 |
void |
|
7887 | 269 |
LteUePhy::DoSetUplinkSubChannels () |
6705 | 270 |
{ |
271 |
NS_LOG_FUNCTION (this); |
|
272 |
||
273 |
/* |
|
274 |
* XXX: the uplink scheduler is not implemented yet! |
|
275 |
* Now, all uplink sub channels can be used for uplink transmission |
|
276 |
*/ |
|
277 |
SetSubChannelsForTransmission (GetUplinkSubChannels ()); |
|
278 |
} |
|
279 |
||
280 |
||
281 |
void |
|
7887 | 282 |
LteUePhy::SetSubChannelsForTransmission (std::vector <int> mask) |
6705 | 283 |
{ |
284 |
NS_LOG_FUNCTION (this); |
|
285 |
||
286 |
m_subChannelsForTransmission = mask; |
|
287 |
||
288 |
Ptr<SpectrumValue> txPsd = CreateTxPowerSpectralDensity (); |
|
7928
b736f63e9bdf
removed LtePhy::Get{Up,Down}linkSpectrumPhy methods which are evil
Nicola Baldo <nbaldo@cttc.es>
parents:
7913
diff
changeset
|
289 |
m_uplinkSpectrumPhy->SetTxPowerSpectralDensity (txPsd); |
6705 | 290 |
} |
291 |
||
292 |
||
293 |
void |
|
7887 | 294 |
LteUePhy::SetSubChannelsForReception (std::vector <int> mask) |
6705 | 295 |
{ |
296 |
NS_LOG_FUNCTION (this); |
|
297 |
m_subChannelsForReception = mask; |
|
298 |
} |
|
299 |
||
300 |
||
301 |
std::vector <int> |
|
7887 | 302 |
LteUePhy::GetSubChannelsForTransmission () |
6705 | 303 |
{ |
304 |
NS_LOG_FUNCTION (this); |
|
305 |
return m_subChannelsForTransmission; |
|
306 |
} |
|
307 |
||
308 |
||
309 |
std::vector <int> |
|
7887 | 310 |
LteUePhy::GetSubChannelsForReception () |
6705 | 311 |
{ |
312 |
NS_LOG_FUNCTION (this); |
|
313 |
return m_subChannelsForReception; |
|
314 |
} |
|
315 |
||
316 |
||
317 |
Ptr<SpectrumValue> |
|
7887 | 318 |
LteUePhy::CreateTxPowerSpectralDensity () |
6705 | 319 |
{ |
320 |
NS_LOG_FUNCTION (this); |
|
321 |
LteSpectrumValueHelper psdHelper; |
|
8015 | 322 |
Ptr<SpectrumValue> psd = psdHelper.CreateTxPowerSpectralDensity (m_ulEarfcn, m_ulBandwidth, m_txPower, GetSubChannelsForTransmission ()); |
6705 | 323 |
|
324 |
return psd; |
|
325 |
} |
|
326 |
||
327 |
void |
|
7887 | 328 |
LteUePhy::GenerateCqiFeedback (const SpectrumValue& sinr) |
7886 | 329 |
{ |
330 |
NS_LOG_FUNCTION (this); |
|
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
331 |
// check periodic wideband CQI |
7886 | 332 |
if (Simulator::Now () > m_p10CqiLast + m_p10CqiPeriocity) |
333 |
{ |
|
7887 | 334 |
Ptr<LteUeNetDevice> thisDevice = GetDevice ()->GetObject<LteUeNetDevice> (); |
7886 | 335 |
Ptr<DlCqiIdealControlMessage> msg = CreateDlCqiFeedbackMessage (sinr); |
336 |
DoSendIdealControlMessage (msg); |
|
337 |
m_p10CqiLast = Simulator::Now (); |
|
338 |
} |
|
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
339 |
// check aperiodic high-layer configured subband CQI |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
340 |
if (Simulator::Now () > m_a30CqiLast + m_a30CqiPeriocity) |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
341 |
{ |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
342 |
Ptr<LteUeNetDevice> thisDevice = GetDevice ()->GetObject<LteUeNetDevice> (); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
343 |
Ptr<DlCqiIdealControlMessage> msg = CreateDlCqiFeedbackMessage (sinr); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
344 |
DoSendIdealControlMessage (msg); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
345 |
m_a30CqiLast = Simulator::Now (); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
346 |
} |
7886 | 347 |
} |
348 |
||
349 |
||
350 |
||
351 |
Ptr<DlCqiIdealControlMessage> |
|
7887 | 352 |
LteUePhy::CreateDlCqiFeedbackMessage (const SpectrumValue& sinr) |
6705 | 353 |
{ |
354 |
NS_LOG_FUNCTION (this); |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
355 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
356 |
// apply transmission mode gain |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
357 |
NS_LOG_DEBUG (this << " txMode " << (uint16_t)m_transmissionMode << " gain " << m_txModeGain.at (m_transmissionMode)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
358 |
NS_ASSERT (m_transmissionMode < m_txModeGain.size ()); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
359 |
SpectrumValue newSinr = sinr; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
360 |
newSinr *= m_txModeGain.at (m_transmissionMode); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
361 |
std::vector<int> cqi = m_amc->CreateCqiFeedbacks (newSinr); |
7886 | 362 |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
363 |
|
7886 | 364 |
|
8170
5be3dcd75840
removed unused CqiIdealControlMessage and UlCqiIdealControlMessage
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
365 |
// CREATE DlCqiIdealControlMessage |
7886 | 366 |
Ptr<DlCqiIdealControlMessage> msg = Create<DlCqiIdealControlMessage> (); |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
367 |
CqiListElement_s dlcqi; |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
368 |
|
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
369 |
if (Simulator::Now () > m_p10CqiLast + m_p10CqiPeriocity) |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
370 |
{ |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
371 |
int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode); |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
372 |
int nbSubChannels = cqi.size (); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
373 |
double cqiSum = 0.0; |
8019
3f88f08f0e55
LENA-93 DL CQI averaged over active RBs only in UE PHY
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7981
diff
changeset
|
374 |
int activeSubChannels = 0; |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
375 |
// average the CQIs of the different RBs |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
376 |
for (int i = 0; i < nbSubChannels; i++) |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
377 |
{ |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
378 |
if (cqi.at (i) != -1) |
8019
3f88f08f0e55
LENA-93 DL CQI averaged over active RBs only in UE PHY
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7981
diff
changeset
|
379 |
{ |
3f88f08f0e55
LENA-93 DL CQI averaged over active RBs only in UE PHY
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7981
diff
changeset
|
380 |
cqiSum += cqi.at (i); |
3f88f08f0e55
LENA-93 DL CQI averaged over active RBs only in UE PHY
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7981
diff
changeset
|
381 |
activeSubChannels++; |
3f88f08f0e55
LENA-93 DL CQI averaged over active RBs only in UE PHY
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7981
diff
changeset
|
382 |
} |
8042
874d9e7e652b
LteUePhy::CreateDlCqiFeedbackMessage fix bug on computation of CQI (no control on activeSubChannels!=0)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8022
diff
changeset
|
383 |
NS_LOG_DEBUG (this << " subch " << i << " cqi " << cqi.at (i)); |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
384 |
} |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
385 |
dlcqi.m_rnti = m_rnti; |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
386 |
dlcqi.m_ri = 1; // not yet used |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
387 |
dlcqi.m_cqiType = CqiListElement_s::P10; // Peridic CQI using PUCCH wideband |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
388 |
NS_ASSERT_MSG (nLayer > 0, " nLayer negative"); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
389 |
NS_ASSERT_MSG (nLayer < 3, " nLayer limit is 2s"); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
390 |
for (int i = 0; i < nLayer; i++) |
8042
874d9e7e652b
LteUePhy::CreateDlCqiFeedbackMessage fix bug on computation of CQI (no control on activeSubChannels!=0)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8022
diff
changeset
|
391 |
{ |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
392 |
if (activeSubChannels > 0) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
393 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
394 |
dlcqi.m_wbCqi.push_back ((uint16_t) cqiSum / activeSubChannels); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
395 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
396 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
397 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
398 |
// approximate with the worst case -> CQI = 1 |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
399 |
dlcqi.m_wbCqi.push_back (1); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
400 |
} |
8042
874d9e7e652b
LteUePhy::CreateDlCqiFeedbackMessage fix bug on computation of CQI (no control on activeSubChannels!=0)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8022
diff
changeset
|
401 |
} |
8019
3f88f08f0e55
LENA-93 DL CQI averaged over active RBs only in UE PHY
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7981
diff
changeset
|
402 |
//NS_LOG_DEBUG (this << " Generate P10 CQI feedback " << (uint16_t) cqiSum / activeSubChannels); |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
403 |
dlcqi.m_wbPmi = 0; // not yet used |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
404 |
// dl.cqi.m_sbMeasResult others CQI report modes: not yet implemented |
7886 | 405 |
} |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
406 |
else if (Simulator::Now () > m_a30CqiLast + m_a30CqiPeriocity) |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
407 |
{ |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
408 |
int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode); |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
409 |
int nbSubChannels = cqi.size (); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
410 |
int rbgSize = GetRbgSize (); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
411 |
double cqiSum = 0.0; |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
412 |
int cqiNum = 0; |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
413 |
SbMeasResult_s rbgMeas; |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
414 |
//NS_LOG_DEBUG (this << " Create A30 CQI feedback, RBG " << rbgSize << " cqiNum " << nbSubChannels << " band " << (uint16_t)m_dlBandwidth); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
415 |
for (int i = 0; i < nbSubChannels; i++) |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
416 |
{ |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
417 |
if (cqi.at (i) != -1) |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
418 |
{ |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
419 |
cqiSum += cqi.at (i); |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
420 |
} |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
421 |
// else "nothing" no CQI is treated as CQI = 0 (worst case scenario) |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
422 |
cqiNum++; |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
423 |
if (cqiNum == rbgSize) |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
424 |
{ |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
425 |
// average the CQIs of the different RBGs |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
426 |
//NS_LOG_DEBUG (this << " RBG CQI " << (uint16_t) cqiSum / rbgSize); |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
427 |
HigherLayerSelected_s hlCqi; |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
428 |
hlCqi.m_sbPmi = 0; // not yet used |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
429 |
for (int i = 0; i < nLayer; i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
430 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
431 |
hlCqi.m_sbCqi.push_back ((uint16_t) cqiSum / rbgSize); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
432 |
} |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
433 |
rbgMeas.m_higherLayerSelected.push_back (hlCqi); |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
434 |
cqiSum = 0.0; |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
435 |
cqiNum = 0; |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
436 |
} |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
437 |
} |
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
438 |
dlcqi.m_rnti = m_rnti; |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
439 |
dlcqi.m_ri = 1; // not yet used |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
440 |
dlcqi.m_cqiType = CqiListElement_s::A30; // Aperidic CQI using PUSCH |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
441 |
//dlcqi.m_wbCqi.push_back ((uint16_t) cqiSum / nbSubChannels); |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
442 |
dlcqi.m_wbPmi = 0; // not yet used |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
443 |
dlcqi.m_sbMeasResult = rbgMeas; |
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7893
diff
changeset
|
444 |
} |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
445 |
|
7886 | 446 |
msg->SetDlCqi (dlcqi); |
447 |
return msg; |
|
6705 | 448 |
} |
449 |
||
7886 | 450 |
|
451 |
||
6705 | 452 |
void |
7887 | 453 |
LteUePhy::DoSendIdealControlMessage (Ptr<IdealControlMessage> msg) |
6705 | 454 |
{ |
455 |
NS_LOG_FUNCTION (this << msg); |
|
7887 | 456 |
Ptr<LteUeNetDevice> thisDevice = GetDevice ()->GetObject<LteUeNetDevice> (); |
457 |
Ptr<LteEnbNetDevice> remoteDevice = thisDevice->GetTargetEnb (); |
|
7886 | 458 |
msg->SetSourceDevice (thisDevice); |
459 |
msg->SetDestinationDevice (remoteDevice); |
|
460 |
SetControlMessages (msg); |
|
6705 | 461 |
} |
462 |
||
463 |
||
464 |
void |
|
7887 | 465 |
LteUePhy::ReceiveIdealControlMessage (Ptr<IdealControlMessage> msg) |
6705 | 466 |
{ |
467 |
NS_LOG_FUNCTION (this << msg); |
|
468 |
||
7886 | 469 |
if (msg->GetMessageType () == IdealControlMessage::DL_DCI) |
6705 | 470 |
{ |
7886 | 471 |
Ptr<DlDciIdealControlMessage> msg2 = DynamicCast<DlDciIdealControlMessage> (msg); |
6705 | 472 |
|
7886 | 473 |
DlDciListElement_s dci = msg2->GetDci (); |
6705 | 474 |
|
7886 | 475 |
if (dci.m_resAlloc != 0) |
6705 | 476 |
{ |
7886 | 477 |
NS_FATAL_ERROR ("Resource Allocation type not implemented"); |
478 |
} |
|
479 |
||
480 |
std::vector <int> dlRb; |
|
6705 | 481 |
|
7886 | 482 |
// translate the DCI to Spectrum framework |
483 |
uint32_t mask = 0x1; |
|
484 |
for (int i = 0; i < 32; i++) |
|
485 |
{ |
|
486 |
if (((dci.m_rbBitmap & mask) >> i) == 1) |
|
6705 | 487 |
{ |
7886 | 488 |
for (int k = 0; k < GetRbgSize (); k++) |
6705 | 489 |
{ |
7886 | 490 |
dlRb.push_back ((i * GetRbgSize ()) + k); |
491 |
//NS_LOG_DEBUG(this << "DL-DCI allocated PRB " << (i*GetRbgSize()) + k); |
|
6705 | 492 |
} |
493 |
} |
|
7886 | 494 |
mask = (mask << 1); |
6705 | 495 |
} |
8511
46046bbb2a5c
Add info in LteSpectrumPhy on TB from DCI elaborated by LteEnbPhy and LteUePhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
496 |
|
46046bbb2a5c
Add info in LteSpectrumPhy on TB from DCI elaborated by LteEnbPhy and LteUePhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
497 |
// send TB info to LteSpectrumPhy |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
498 |
NS_LOG_DEBUG (this << " UE " << m_rnti << " DCI " << dci.m_rnti << " bitmap " << dci.m_rbBitmap); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
499 |
for (uint8_t i = 0; i < dci.m_tbsSize.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
500 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
501 |
m_downlinkSpectrumPhy->AddExpectedTb (dci.m_rnti, dci.m_tbsSize.at (i), dci.m_mcs.at (i), dlRb, i); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
502 |
} |
6705 | 503 |
|
7886 | 504 |
SetSubChannelsForReception (dlRb); |
505 |
||
6705 | 506 |
|
507 |
} |
|
7886 | 508 |
else if (msg->GetMessageType () == IdealControlMessage::UL_DCI) |
509 |
{ |
|
510 |
// set the uplink bandwidht according to the UL-CQI |
|
511 |
Ptr<UlDciIdealControlMessage> msg2 = DynamicCast<UlDciIdealControlMessage> (msg); |
|
512 |
UlDciListElement_s dci = msg2->GetDci (); |
|
513 |
std::vector <int> ulRb; |
|
514 |
for (int i = 0; i < dci.m_rbLen; i++) |
|
515 |
{ |
|
516 |
ulRb.push_back (i + dci.m_rbStart); |
|
517 |
//NS_LOG_DEBUG (this << " UE RB " << i + dci.m_rbStart); |
|
518 |
} |
|
519 |
SetSubChannelsForTransmission (ulRb); |
|
520 |
// pass the info to the MAC |
|
521 |
m_uePhySapUser->ReceiveIdealControlMessage (msg); |
|
522 |
} |
|
6705 | 523 |
else |
524 |
{ |
|
7886 | 525 |
// pass the message to UE-MAC |
526 |
m_uePhySapUser->ReceiveIdealControlMessage (msg); |
|
6705 | 527 |
} |
528 |
||
529 |
||
530 |
} |
|
531 |
||
532 |
||
7886 | 533 |
void |
7887 | 534 |
LteUePhy::SubframeIndication (uint32_t frameNo, uint32_t subframeNo) |
7886 | 535 |
{ |
536 |
// trigger from eNB |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
537 |
|
7886 | 538 |
// send control messages |
539 |
std::list<Ptr<IdealControlMessage> > ctrlMsg = GetControlMessages (); |
|
540 |
if (ctrlMsg.size () > 0) |
|
541 |
{ |
|
7887 | 542 |
Ptr<LtePhy> phy = GetDevice ()->GetObject<LteUeNetDevice> ()->GetTargetEnb ()->GetPhy (); |
7886 | 543 |
std::list<Ptr<IdealControlMessage> >::iterator it; |
544 |
it = ctrlMsg.begin (); |
|
545 |
while (it != ctrlMsg.end ()) |
|
546 |
{ |
|
547 |
Ptr<IdealControlMessage> msg = (*it); |
|
548 |
phy->ReceiveIdealControlMessage (msg); |
|
549 |
ctrlMsg.pop_front (); |
|
550 |
it = ctrlMsg.begin (); |
|
551 |
} |
|
552 |
} |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
553 |
|
7886 | 554 |
// send packets in queue |
555 |
// send the current burts of packets |
|
556 |
Ptr<PacketBurst> pb = GetPacketBurst (); |
|
557 |
if (pb) |
|
558 |
{ |
|
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8415
diff
changeset
|
559 |
NS_LOG_LOGIC (this << " start TX"); |
7928
b736f63e9bdf
removed LtePhy::Get{Up,Down}linkSpectrumPhy methods which are evil
Nicola Baldo <nbaldo@cttc.es>
parents:
7913
diff
changeset
|
560 |
m_uplinkSpectrumPhy->StartTx (pb); |
7886 | 561 |
} |
8415
e9a27a8c6331
Uplink scheduler with multiple bearers (LCs) allocates in a Round Robin fashion the active ones
mmiozzo
parents:
8253
diff
changeset
|
562 |
|
e9a27a8c6331
Uplink scheduler with multiple bearers (LCs) allocates in a Round Robin fashion the active ones
mmiozzo
parents:
8253
diff
changeset
|
563 |
// trigger the MAC |
e9a27a8c6331
Uplink scheduler with multiple bearers (LCs) allocates in a Round Robin fashion the active ones
mmiozzo
parents:
8253
diff
changeset
|
564 |
m_uePhySapUser->SubframeIndication (frameNo, subframeNo); |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8042
diff
changeset
|
565 |
|
7886 | 566 |
} |
567 |
||
568 |
||
569 |
void |
|
7893 | 570 |
LteUePhy::SetEnbCellId (uint16_t cellId) |
7886 | 571 |
{ |
7893 | 572 |
m_enbCellId = cellId; |
573 |
m_downlinkSpectrumPhy->SetCellId (cellId); |
|
574 |
m_uplinkSpectrumPhy->SetCellId (cellId); |
|
7886 | 575 |
} |
576 |
||
577 |
||
578 |
||
579 |
void |
|
7887 | 580 |
LteUePhy::SetRnti (uint16_t rnti) |
7886 | 581 |
{ |
582 |
NS_LOG_FUNCTION (this << rnti); |
|
583 |
m_rnti = rnti; |
|
584 |
} |
|
585 |
||
586 |
||
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
587 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
588 |
LteUePhy::DoSetTransmissionMode (uint8_t txMode) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
589 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
590 |
NS_LOG_FUNCTION (this << (uint16_t)txMode); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
591 |
m_transmissionMode = txMode; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
592 |
m_downlinkSpectrumPhy->SetTransmissionMode (txMode); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
593 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
594 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
595 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
596 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
597 |
LteUePhy::SetTxMode1Gain (double gain) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
598 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
599 |
NS_LOG_FUNCTION (this << gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
600 |
// convert to linear |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
601 |
double gainLin = pow (10.0, (gain / 10.0)); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
602 |
if (m_txModeGain.size () < 1) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
603 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
604 |
m_txModeGain.resize (1); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
605 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
606 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
607 |
std::vector <double> temp; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
608 |
temp = m_txModeGain; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
609 |
m_txModeGain.clear (); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
610 |
for (uint8_t i = 0; i < temp.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
611 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
612 |
if (i==0) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
613 |
{ |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
614 |
m_txModeGain.push_back (gainLin); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
615 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
616 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
617 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
618 |
m_txModeGain.push_back (temp.at (i)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
619 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
620 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
621 |
// forward the info to DL LteSpectrumPhy |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
622 |
m_downlinkSpectrumPhy->SetTxMode1Gain (gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
623 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
624 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
625 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
626 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
627 |
LteUePhy::SetTxMode2Gain (double gain) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
628 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
629 |
NS_LOG_FUNCTION (this << gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
630 |
// convert to linear |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
631 |
double gainLin = pow (10.0, (gain / 10.0)); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
632 |
if (m_txModeGain.size () < 2) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
633 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
634 |
m_txModeGain.resize (2); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
635 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
636 |
std::vector <double> temp; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
637 |
temp = m_txModeGain; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
638 |
m_txModeGain.clear (); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
639 |
for (uint8_t i = 0; i < temp.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
640 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
641 |
if (i==1) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
642 |
{ |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
643 |
m_txModeGain.push_back (gainLin); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
644 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
645 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
646 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
647 |
m_txModeGain.push_back (temp.at (i)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
648 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
649 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
650 |
// forward the info to DL LteSpectrumPhy |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
651 |
m_downlinkSpectrumPhy->SetTxMode2Gain (gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
652 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
653 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
654 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
655 |
LteUePhy::SetTxMode3Gain (double gain) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
656 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
657 |
NS_LOG_FUNCTION (this << gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
658 |
// convert to linear |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
659 |
double gainLin = pow (10.0, (gain / 10.0)); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
660 |
if (m_txModeGain.size () < 3) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
661 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
662 |
m_txModeGain.resize (3); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
663 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
664 |
std::vector <double> temp; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
665 |
temp = m_txModeGain; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
666 |
m_txModeGain.clear (); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
667 |
for (uint8_t i = 0; i < temp.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
668 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
669 |
if (i==2) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
670 |
{ |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
671 |
m_txModeGain.push_back (gainLin); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
672 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
673 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
674 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
675 |
m_txModeGain.push_back (temp.at (i)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
676 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
677 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
678 |
// forward the info to DL LteSpectrumPhy |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
679 |
m_downlinkSpectrumPhy->SetTxMode3Gain (gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
680 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
681 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
682 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
683 |
LteUePhy::SetTxMode4Gain (double gain) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
684 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
685 |
NS_LOG_FUNCTION (this << gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
686 |
// convert to linear |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
687 |
double gainLin = pow (10.0, (gain / 10.0)); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
688 |
if (m_txModeGain.size () < 4) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
689 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
690 |
m_txModeGain.resize (4); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
691 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
692 |
std::vector <double> temp; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
693 |
temp = m_txModeGain; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
694 |
m_txModeGain.clear (); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
695 |
for (uint8_t i = 0; i < temp.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
696 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
697 |
if (i==3) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
698 |
{ |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
699 |
m_txModeGain.push_back (gainLin); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
700 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
701 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
702 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
703 |
m_txModeGain.push_back (temp.at (i)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
704 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
705 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
706 |
// forward the info to DL LteSpectrumPhy |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
707 |
m_downlinkSpectrumPhy->SetTxMode4Gain (gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
708 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
709 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
710 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
711 |
LteUePhy::SetTxMode5Gain (double gain) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
712 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
713 |
NS_LOG_FUNCTION (this << gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
714 |
// convert to linear |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
715 |
double gainLin = pow (10.0, (gain / 10.0)); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
716 |
if (m_txModeGain.size () < 5) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
717 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
718 |
m_txModeGain.resize (5); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
719 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
720 |
std::vector <double> temp; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
721 |
temp = m_txModeGain; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
722 |
m_txModeGain.clear (); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
723 |
for (uint8_t i = 0; i < temp.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
724 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
725 |
if (i==4) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
726 |
{ |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
727 |
m_txModeGain.push_back (gainLin); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
728 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
729 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
730 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
731 |
m_txModeGain.push_back (temp.at (i)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
732 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
733 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
734 |
// forward the info to DL LteSpectrumPhy |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
735 |
m_downlinkSpectrumPhy->SetTxMode5Gain (gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
736 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
737 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
738 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
739 |
LteUePhy::SetTxMode6Gain (double gain) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
740 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
741 |
NS_LOG_FUNCTION (this << gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
742 |
// convert to linear |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
743 |
double gainLin = pow (10.0, (gain / 10.0)); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
744 |
if (m_txModeGain.size () < 6) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
745 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
746 |
m_txModeGain.resize (6); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
747 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
748 |
std::vector <double> temp; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
749 |
temp = m_txModeGain; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
750 |
m_txModeGain.clear (); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
751 |
for (uint8_t i = 0; i < temp.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
752 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
753 |
if (i==5) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
754 |
{ |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
755 |
m_txModeGain.push_back (gainLin); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
756 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
757 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
758 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
759 |
m_txModeGain.push_back (temp.at (i)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
760 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
761 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
762 |
// forward the info to DL LteSpectrumPhy |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
763 |
m_downlinkSpectrumPhy->SetTxMode6Gain (gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
764 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
765 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
766 |
void |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
767 |
LteUePhy::SetTxMode7Gain (double gain) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
768 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
769 |
NS_LOG_FUNCTION (this << gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
770 |
// convert to linear |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
771 |
double gainLin = pow (10.0, (gain / 10.0)); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
772 |
if (m_txModeGain.size () < 7) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
773 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
774 |
m_txModeGain.resize (7); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
775 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
776 |
std::vector <double> temp; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
777 |
temp = m_txModeGain; |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
778 |
m_txModeGain.clear (); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
779 |
for (uint8_t i = 0; i < temp.size (); i++) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
780 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
781 |
if (i==6) |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
782 |
{ |
8715
736f0318fc8a
Bug-fix tx mode gain exchange from LteUePhy and LteSpectrumPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8714
diff
changeset
|
783 |
m_txModeGain.push_back (gainLin); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
784 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
785 |
else |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
786 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
787 |
m_txModeGain.push_back (temp.at (i)); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
788 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
789 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
790 |
// forward the info to DL LteSpectrumPhy |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
791 |
m_downlinkSpectrumPhy->SetTxMode7Gain (gain); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
792 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
793 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
794 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8538
diff
changeset
|
795 |
|
7886 | 796 |
|
6705 | 797 |
} // namespace ns3 |