author | Gaurav Sathe <gaurav.sathe@tcs.com> |
Thu, 27 Nov 2014 16:01:05 +0100 | |
changeset 11168 | d09129217e78 |
parent 10652 | dc18deba4502 |
child 11169 | 5101180376fd |
permissions | -rw-r--r-- |
7886 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2011 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> (re-wrote from scratch this helper) |
|
19 |
* Giuseppe Piro <g.piro@poliba.it> (parts of the PHY & channel creation & configuration copied from the GSoC 2011 code) |
|
20 |
*/ |
|
21 |
||
22 |
||
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
23 |
#include "lte-helper.h" |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
24 |
#include <ns3/string.h> |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
25 |
#include <ns3/log.h> |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
26 |
#include <ns3/abort.h> |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
27 |
#include <ns3/pointer.h> |
7886 | 28 |
#include <ns3/lte-enb-rrc.h> |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
29 |
#include <ns3/epc-ue-nas.h> |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
30 |
#include <ns3/epc-enb-application.h> |
7886 | 31 |
#include <ns3/lte-ue-rrc.h> |
32 |
#include <ns3/lte-ue-mac.h> |
|
33 |
#include <ns3/lte-enb-mac.h> |
|
8160 | 34 |
#include <ns3/lte-enb-net-device.h> |
7887 | 35 |
#include <ns3/lte-enb-phy.h> |
36 |
#include <ns3/lte-ue-phy.h> |
|
7886 | 37 |
#include <ns3/lte-spectrum-phy.h> |
38 |
#include <ns3/lte-sinr-chunk-processor.h> |
|
9406 | 39 |
#include <ns3/multi-model-spectrum-channel.h> |
7886 | 40 |
#include <ns3/friis-spectrum-propagation-loss.h> |
10067
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
41 |
#include <ns3/trace-fading-loss-model.h> |
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
42 |
#include <ns3/isotropic-antenna-model.h> |
7887 | 43 |
#include <ns3/lte-enb-net-device.h> |
44 |
#include <ns3/lte-ue-net-device.h> |
|
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
45 |
#include <ns3/ff-mac-scheduler.h> |
10322
54f2e33137a3
Using template for forwarding classes and new names for Handover Management SAP
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10321
diff
changeset
|
46 |
#include <ns3/lte-handover-algorithm.h> |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10317
diff
changeset
|
47 |
#include <ns3/lte-anr.h> |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
48 |
#include <ns3/lte-rlc.h> |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
49 |
#include <ns3/lte-rlc-um.h> |
8451
81c6691c21a7
Add support for AM RLC in LenaHelper
Manuel Requena <manuel.requena@cttc.es>
parents:
8428
diff
changeset
|
50 |
#include <ns3/lte-rlc-am.h> |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
51 |
#include <ns3/epc-enb-s1-sap.h> |
9406 | 52 |
#include <ns3/lte-rrc-protocol-ideal.h> |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
53 |
#include <ns3/lte-rrc-protocol-real.h> |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
54 |
#include <ns3/mac-stats-calculator.h> |
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
55 |
#include <ns3/phy-stats-calculator.h> |
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
56 |
#include <ns3/phy-tx-stats-calculator.h> |
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
57 |
#include <ns3/phy-rx-stats-calculator.h> |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
58 |
#include <ns3/epc-helper.h> |
8161 | 59 |
#include <iostream> |
8190
3a2b83d7210d
Connect BuldingsMobilityModel and BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8164
diff
changeset
|
60 |
#include <ns3/buildings-propagation-loss-model.h> |
8234
ee0d91b3de95
Update LenaHelper for set the BuildingPropagationLossModel parameter automatically with earfcn parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8208
diff
changeset
|
61 |
#include <ns3/lte-spectrum-value-helper.h> |
9338 | 62 |
#include <ns3/epc-x2.h> |
8161 | 63 |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
64 |
NS_LOG_COMPONENT_DEFINE ("LteHelper"); |
7886 | 65 |
|
66 |
namespace ns3 { |
|
67 |
||
10652
dc18deba4502
[doxygen] Revert r10410, r10411, r10412
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10410
diff
changeset
|
68 |
NS_OBJECT_ENSURE_REGISTERED (LteHelper); |
7886 | 69 |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
70 |
LteHelper::LteHelper (void) |
10316
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
71 |
: m_fadingStreamsAssigned (false), |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
72 |
m_imsiCounter (0), |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
73 |
m_cellIdCounter (0) |
7886 | 74 |
{ |
7987 | 75 |
NS_LOG_FUNCTION (this); |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
76 |
m_enbNetDeviceFactory.SetTypeId (LteEnbNetDevice::GetTypeId ()); |
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
77 |
m_enbAntennaModelFactory.SetTypeId (IsotropicAntennaModel::GetTypeId ()); |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
78 |
m_ueNetDeviceFactory.SetTypeId (LteUeNetDevice::GetTypeId ()); |
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
79 |
m_ueAntennaModelFactory.SetTypeId (IsotropicAntennaModel::GetTypeId ()); |
9406 | 80 |
m_channelFactory.SetTypeId (MultiModelSpectrumChannel::GetTypeId ()); |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
81 |
} |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
82 |
|
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
83 |
void |
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9669
diff
changeset
|
84 |
LteHelper::DoInitialize (void) |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
85 |
{ |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
86 |
NS_LOG_FUNCTION (this); |
8693
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
87 |
m_downlinkChannel = m_channelFactory.Create<SpectrumChannel> (); |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
88 |
m_uplinkChannel = m_channelFactory.Create<SpectrumChannel> (); |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
89 |
|
8335
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
90 |
m_downlinkPathlossModel = m_dlPathlossModelFactory.Create (); |
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
91 |
Ptr<SpectrumPropagationLossModel> dlSplm = m_downlinkPathlossModel->GetObject<SpectrumPropagationLossModel> (); |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
92 |
if (dlSplm != 0) |
8240
b77560c84e4f
Update LenaHelper for managing Friss and Constant Spectrum Propagation models
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8234
diff
changeset
|
93 |
{ |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
94 |
NS_LOG_LOGIC (this << " using a SpectrumPropagationLossModel in DL"); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
95 |
m_downlinkChannel->AddSpectrumPropagationLossModel (dlSplm); |
8240
b77560c84e4f
Update LenaHelper for managing Friss and Constant Spectrum Propagation models
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8234
diff
changeset
|
96 |
} |
b77560c84e4f
Update LenaHelper for managing Friss and Constant Spectrum Propagation models
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8234
diff
changeset
|
97 |
else |
b77560c84e4f
Update LenaHelper for managing Friss and Constant Spectrum Propagation models
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8234
diff
changeset
|
98 |
{ |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
99 |
NS_LOG_LOGIC (this << " using a PropagationLossModel in DL"); |
8540 | 100 |
Ptr<PropagationLossModel> dlPlm = m_downlinkPathlossModel->GetObject<PropagationLossModel> (); |
101 |
NS_ASSERT_MSG (dlPlm != 0, " " << m_downlinkPathlossModel << " is neither PropagationLossModel nor SpectrumPropagationLossModel"); |
|
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
102 |
m_downlinkChannel->AddPropagationLossModel (dlPlm); |
8240
b77560c84e4f
Update LenaHelper for managing Friss and Constant Spectrum Propagation models
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8234
diff
changeset
|
103 |
} |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
104 |
|
8335
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
105 |
m_uplinkPathlossModel = m_ulPathlossModelFactory.Create (); |
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
106 |
Ptr<SpectrumPropagationLossModel> ulSplm = m_uplinkPathlossModel->GetObject<SpectrumPropagationLossModel> (); |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
107 |
if (ulSplm != 0) |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
108 |
{ |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
109 |
NS_LOG_LOGIC (this << " using a SpectrumPropagationLossModel in UL"); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
110 |
m_uplinkChannel->AddSpectrumPropagationLossModel (ulSplm); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
111 |
} |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
112 |
else |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
113 |
{ |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
114 |
NS_LOG_LOGIC (this << " using a PropagationLossModel in UL"); |
8540 | 115 |
Ptr<PropagationLossModel> ulPlm = m_uplinkPathlossModel->GetObject<PropagationLossModel> (); |
116 |
NS_ASSERT_MSG (ulPlm != 0, " " << m_uplinkPathlossModel << " is neither PropagationLossModel nor SpectrumPropagationLossModel"); |
|
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
117 |
m_uplinkChannel->AddPropagationLossModel (ulPlm); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
118 |
} |
8883
8fee8c73c2e9
Update Fading module for iter-cell interference and encaspulate the channels realization within the module itself
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8734
diff
changeset
|
119 |
if (!m_fadingModelType.empty ()) |
8287
2ac6663c67fc
Fix merge bug in LenaHelper::DoStart on TraceFadingLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8286
diff
changeset
|
120 |
{ |
8883
8fee8c73c2e9
Update Fading module for iter-cell interference and encaspulate the channels realization within the module itself
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8734
diff
changeset
|
121 |
m_fadingModule = m_fadingModelFactory.Create<SpectrumPropagationLossModel> (); |
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9669
diff
changeset
|
122 |
m_fadingModule->Initialize (); |
8287
2ac6663c67fc
Fix merge bug in LenaHelper::DoStart on TraceFadingLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8286
diff
changeset
|
123 |
m_downlinkChannel->AddSpectrumPropagationLossModel (m_fadingModule); |
2ac6663c67fc
Fix merge bug in LenaHelper::DoStart on TraceFadingLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8286
diff
changeset
|
124 |
m_uplinkChannel->AddSpectrumPropagationLossModel (m_fadingModule); |
2ac6663c67fc
Fix merge bug in LenaHelper::DoStart on TraceFadingLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8286
diff
changeset
|
125 |
} |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
126 |
m_phyStats = CreateObject<PhyStatsCalculator> (); |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
127 |
m_phyTxStats = CreateObject<PhyTxStatsCalculator> (); |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
128 |
m_phyRxStats = CreateObject<PhyRxStatsCalculator> (); |
8151
c4bf0eb55569
member variables of LenaHelper to follow naming convention
Nicola Baldo <nbaldo@cttc.es>
parents:
8149
diff
changeset
|
129 |
m_macStats = CreateObject<MacStatsCalculator> (); |
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9669
diff
changeset
|
130 |
Object::DoInitialize (); |
8540 | 131 |
|
7886 | 132 |
} |
133 |
||
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
134 |
LteHelper::~LteHelper (void) |
7886 | 135 |
{ |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
136 |
NS_LOG_FUNCTION (this); |
7886 | 137 |
} |
138 |
||
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
139 |
TypeId LteHelper::GetTypeId (void) |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
140 |
{ |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
141 |
static TypeId |
8540 | 142 |
tid = |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
143 |
TypeId ("ns3::LteHelper") |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
144 |
.SetParent<Object> () |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
145 |
.AddConstructor<LteHelper> () |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
146 |
.AddAttribute ("Scheduler", |
10078
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
147 |
"The type of scheduler to be used for eNBs. " |
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
148 |
"The allowed values for this attributes are the type names " |
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
149 |
"of any class inheriting from ns3::FfMacScheduler.", |
8056 | 150 |
StringValue ("ns3::PfFfMacScheduler"), |
10386
0156b589bf78
merge from ns-3-dev branch to GSoC branch
Budiarto Herman <mailto:budiarto.herman@magister.fi>
diff
changeset
|
151 |
MakeStringAccessor (&LteHelper::SetSchedulerType, |
0156b589bf78
merge from ns-3-dev branch to GSoC branch
Budiarto Herman <mailto:budiarto.herman@magister.fi>
diff
changeset
|
152 |
&LteHelper::GetSchedulerType), |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
153 |
MakeStringChecker ()) |
10316
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
154 |
.AddAttribute ("HandoverAlgorithm", |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
155 |
"The type of handover algorithm to be used for eNBs. " |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
156 |
"The allowed values for this attributes are the type names " |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
157 |
"of any class inheriting from ns3::HandoverAlgorithm.", |
10323
ecc27144a16e
Renamed BareHandoverAlgorithm to NoOpHandoverAlgorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
158 |
StringValue ("ns3::NoOpHandoverAlgorithm"), |
10355
e0cb29e3f4af
Fix to usage of GetHandoverAlgorithmType function in LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10339
diff
changeset
|
159 |
MakeStringAccessor (&LteHelper::SetHandoverAlgorithmType, |
e0cb29e3f4af
Fix to usage of GetHandoverAlgorithmType function in LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10339
diff
changeset
|
160 |
&LteHelper::GetHandoverAlgorithmType), |
10316
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
161 |
MakeStringChecker ()) |
8328
4564257267a3
Renaming of LenaHelper Attribute from PropagationModel to PathlossModel with related usage in files and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8309
diff
changeset
|
162 |
.AddAttribute ("PathlossModel", |
10078
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
163 |
"The type of pathloss model to be used. " |
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
164 |
"The allowed values for this attributes are the type names " |
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
165 |
"of any class inheriting from ns3::PropagationLossModel.", |
8409
220f7ef11508
Added EPC sample script. Some minor modifications on EPC user documentation. Changed default propagation model on LENA helper from Building to Friis
Jaume Nin
parents:
8396
diff
changeset
|
166 |
StringValue ("ns3::FriisPropagationLossModel"), |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
167 |
MakeStringAccessor (&LteHelper::SetPathlossModelType), |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
168 |
MakeStringChecker ()) |
8540 | 169 |
.AddAttribute ("FadingModel", |
10078
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
170 |
"The type of fading model to be used." |
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
171 |
"The allowed values for this attributes are the type names " |
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
172 |
"of any class inheriting from ns3::SpectrumPropagationLossModel." |
575c88085272
indicate allowed object types for LteHelper attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
10067
diff
changeset
|
173 |
"If the type is set to an empty string, no fading model is used.", |
9612
0f8803049d1e
improve documentation of LTE-EPC attributes
Nicola Baldo <nbaldo@cttc.es>
parents:
9562
diff
changeset
|
174 |
StringValue (""), |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
175 |
MakeStringAccessor (&LteHelper::SetFadingModel), |
8276 | 176 |
MakeStringChecker ()) |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
177 |
.AddAttribute ("UseIdealRrc", |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
178 |
"If true, LteRrcProtocolIdeal will be used for RRC signaling. " |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
179 |
"If false, LteRrcProtocolReal will be used.", |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
180 |
BooleanValue (true), |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
181 |
MakeBooleanAccessor (&LteHelper::m_useIdealRrc), |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
182 |
MakeBooleanChecker ()) |
10329
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
183 |
.AddAttribute ("AnrEnabled", |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
184 |
"Activate or deactivate Automatic Neighbour Relation function", |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
185 |
BooleanValue (true), |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
186 |
MakeBooleanAccessor (&LteHelper::m_isAnrEnabled), |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
187 |
MakeBooleanChecker ()) |
8149 | 188 |
; |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
189 |
return tid; |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
190 |
} |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
191 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
192 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
193 |
LteHelper::DoDispose () |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
194 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
195 |
NS_LOG_FUNCTION (this); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
196 |
m_downlinkChannel = 0; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
197 |
m_uplinkChannel = 0; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
198 |
Object::DoDispose (); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
199 |
} |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
200 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
201 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
202 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
203 |
LteHelper::SetEpcHelper (Ptr<EpcHelper> h) |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
204 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
205 |
NS_LOG_FUNCTION (this << h); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
206 |
m_epcHelper = h; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
207 |
} |
8540 | 208 |
|
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
209 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
210 |
LteHelper::SetSchedulerType (std::string type) |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
211 |
{ |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
212 |
NS_LOG_FUNCTION (this << type); |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
213 |
m_schedulerFactory = ObjectFactory (); |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
214 |
m_schedulerFactory.SetTypeId (type); |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
215 |
} |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
216 |
|
10088
e412f46f2dc9
made attribute ns3::LteHelper::SchedulerType gettable
Nicola Baldo <nbaldo@cttc.es>
parents:
10078
diff
changeset
|
217 |
std::string |
e412f46f2dc9
made attribute ns3::LteHelper::SchedulerType gettable
Nicola Baldo <nbaldo@cttc.es>
parents:
10078
diff
changeset
|
218 |
LteHelper::GetSchedulerType () const |
e412f46f2dc9
made attribute ns3::LteHelper::SchedulerType gettable
Nicola Baldo <nbaldo@cttc.es>
parents:
10078
diff
changeset
|
219 |
{ |
e412f46f2dc9
made attribute ns3::LteHelper::SchedulerType gettable
Nicola Baldo <nbaldo@cttc.es>
parents:
10078
diff
changeset
|
220 |
return m_schedulerFactory.GetTypeId ().GetName (); |
e412f46f2dc9
made attribute ns3::LteHelper::SchedulerType gettable
Nicola Baldo <nbaldo@cttc.es>
parents:
10078
diff
changeset
|
221 |
} |
e412f46f2dc9
made attribute ns3::LteHelper::SchedulerType gettable
Nicola Baldo <nbaldo@cttc.es>
parents:
10078
diff
changeset
|
222 |
|
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
223 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
224 |
LteHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
225 |
{ |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
226 |
NS_LOG_FUNCTION (this << n); |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
227 |
m_schedulerFactory.Set (n, v); |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
228 |
} |
7886 | 229 |
|
10339
8714c4cfdb77
Added GetHandoverAlgorithmType method to LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10329
diff
changeset
|
230 |
std::string |
8714c4cfdb77
Added GetHandoverAlgorithmType method to LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10329
diff
changeset
|
231 |
LteHelper::GetHandoverAlgorithmType () const |
8714c4cfdb77
Added GetHandoverAlgorithmType method to LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10329
diff
changeset
|
232 |
{ |
8714c4cfdb77
Added GetHandoverAlgorithmType method to LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10329
diff
changeset
|
233 |
return m_handoverAlgorithmFactory.GetTypeId ().GetName (); |
8714c4cfdb77
Added GetHandoverAlgorithmType method to LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10329
diff
changeset
|
234 |
} |
8714c4cfdb77
Added GetHandoverAlgorithmType method to LteHelper
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10329
diff
changeset
|
235 |
|
10316
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
236 |
void |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
237 |
LteHelper::SetHandoverAlgorithmType (std::string type) |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
238 |
{ |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
239 |
NS_LOG_FUNCTION (this << type); |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
240 |
m_handoverAlgorithmFactory = ObjectFactory (); |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
241 |
m_handoverAlgorithmFactory.SetTypeId (type); |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
242 |
} |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
243 |
|
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
244 |
void |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
245 |
LteHelper::SetHandoverAlgorithmAttribute (std::string n, const AttributeValue &v) |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
246 |
{ |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
247 |
NS_LOG_FUNCTION (this << n); |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
248 |
m_handoverAlgorithmFactory.Set (n, v); |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
249 |
} |
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
250 |
|
7908
b7497687ab48
LENA 56: Scheduler type configurable by the user
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7907
diff
changeset
|
251 |
|
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
252 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
253 |
LteHelper::SetPathlossModelType (std::string type) |
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
254 |
{ |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
255 |
NS_LOG_FUNCTION (this << type); |
8335
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
256 |
m_dlPathlossModelFactory = ObjectFactory (); |
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
257 |
m_dlPathlossModelFactory.SetTypeId (type); |
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
258 |
m_ulPathlossModelFactory = ObjectFactory (); |
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
259 |
m_ulPathlossModelFactory.SetTypeId (type); |
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
260 |
} |
7908
b7497687ab48
LENA 56: Scheduler type configurable by the user
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7907
diff
changeset
|
261 |
|
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
262 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
263 |
LteHelper::SetPathlossModelAttribute (std::string n, const AttributeValue &v) |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
264 |
{ |
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
265 |
NS_LOG_FUNCTION (this << n); |
8335
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
266 |
m_dlPathlossModelFactory.Set (n, v); |
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
267 |
m_ulPathlossModelFactory.Set (n, v); |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
268 |
} |
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
269 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
270 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
271 |
LteHelper::SetEnbDeviceAttribute (std::string n, const AttributeValue &v) |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
272 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
273 |
NS_LOG_FUNCTION (this); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
274 |
m_enbNetDeviceFactory.Set (n, v); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
275 |
} |
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
276 |
|
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
277 |
|
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
278 |
void |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
279 |
LteHelper::SetEnbAntennaModelType (std::string type) |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
280 |
{ |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
281 |
NS_LOG_FUNCTION (this); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
282 |
m_enbAntennaModelFactory.SetTypeId (type); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
283 |
} |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
284 |
|
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
285 |
void |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
286 |
LteHelper::SetEnbAntennaModelAttribute (std::string n, const AttributeValue &v) |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
287 |
{ |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
288 |
NS_LOG_FUNCTION (this); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
289 |
m_enbAntennaModelFactory.Set (n, v); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
290 |
} |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
291 |
|
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
292 |
void |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
293 |
LteHelper::SetUeDeviceAttribute (std::string n, const AttributeValue &v) |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
294 |
{ |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
295 |
NS_LOG_FUNCTION (this); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
296 |
m_ueNetDeviceFactory.Set (n, v); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
297 |
} |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
298 |
|
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
299 |
void |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
300 |
LteHelper::SetUeAntennaModelType (std::string type) |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
301 |
{ |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
302 |
NS_LOG_FUNCTION (this); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
303 |
m_ueAntennaModelFactory.SetTypeId (type); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
304 |
} |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
305 |
|
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
306 |
void |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
307 |
LteHelper::SetUeAntennaModelAttribute (std::string n, const AttributeValue &v) |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
308 |
{ |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
309 |
NS_LOG_FUNCTION (this); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
310 |
m_ueAntennaModelFactory.Set (n, v); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
311 |
} |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
312 |
|
8276 | 313 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
314 |
LteHelper::SetFadingModel (std::string type) |
8276 | 315 |
{ |
316 |
NS_LOG_FUNCTION (this << type); |
|
8300
c7f308f9b67d
Remove misleading initialization of Fading module in the helper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8298
diff
changeset
|
317 |
m_fadingModelType = type; |
c7f308f9b67d
Remove misleading initialization of Fading module in the helper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8298
diff
changeset
|
318 |
if (!type.empty ()) |
c7f308f9b67d
Remove misleading initialization of Fading module in the helper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8298
diff
changeset
|
319 |
{ |
c7f308f9b67d
Remove misleading initialization of Fading module in the helper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8298
diff
changeset
|
320 |
m_fadingModelFactory = ObjectFactory (); |
c7f308f9b67d
Remove misleading initialization of Fading module in the helper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8298
diff
changeset
|
321 |
m_fadingModelFactory.SetTypeId (type); |
c7f308f9b67d
Remove misleading initialization of Fading module in the helper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8298
diff
changeset
|
322 |
} |
8276 | 323 |
} |
324 |
||
325 |
void |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
326 |
LteHelper::SetFadingModelAttribute (std::string n, const AttributeValue &v) |
8276 | 327 |
{ |
328 |
m_fadingModelFactory.Set (n, v); |
|
329 |
} |
|
330 |
||
8693
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
331 |
void |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
332 |
LteHelper::SetSpectrumChannelType (std::string type) |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
333 |
{ |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
334 |
NS_LOG_FUNCTION (this << type); |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
335 |
m_channelFactory.SetTypeId (type); |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
336 |
} |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
337 |
|
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
338 |
void |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
339 |
LteHelper::SetSpectrumChannelAttribute (std::string n, const AttributeValue &v) |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
340 |
{ |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
341 |
m_channelFactory.Set (n, v); |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
342 |
} |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
343 |
|
8276 | 344 |
|
7886 | 345 |
NetDeviceContainer |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
346 |
LteHelper::InstallEnbDevice (NodeContainer c) |
7886 | 347 |
{ |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
348 |
NS_LOG_FUNCTION (this); |
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9669
diff
changeset
|
349 |
Initialize (); // will run DoInitialize () if necessary |
7886 | 350 |
NetDeviceContainer devices; |
351 |
for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
|
352 |
{ |
|
353 |
Ptr<Node> node = *i; |
|
354 |
Ptr<NetDevice> device = InstallSingleEnbDevice (node); |
|
355 |
devices.Add (device); |
|
356 |
} |
|
357 |
return devices; |
|
358 |
} |
|
359 |
||
360 |
NetDeviceContainer |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
361 |
LteHelper::InstallUeDevice (NodeContainer c) |
7886 | 362 |
{ |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7982
diff
changeset
|
363 |
NS_LOG_FUNCTION (this); |
7886 | 364 |
NetDeviceContainer devices; |
365 |
for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
|
366 |
{ |
|
367 |
Ptr<Node> node = *i; |
|
368 |
Ptr<NetDevice> device = InstallSingleUeDevice (node); |
|
369 |
devices.Add (device); |
|
370 |
} |
|
371 |
return devices; |
|
372 |
} |
|
373 |
||
374 |
||
375 |
Ptr<NetDevice> |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
376 |
LteHelper::InstallSingleEnbDevice (Ptr<Node> n) |
7886 | 377 |
{ |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
378 |
|
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
379 |
NS_ABORT_MSG_IF (m_cellIdCounter == 65535, "max num eNBs exceeded"); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
380 |
uint16_t cellId = ++m_cellIdCounter; |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
381 |
|
7886 | 382 |
Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> (); |
383 |
Ptr<LteSpectrumPhy> ulPhy = CreateObject<LteSpectrumPhy> (); |
|
8149 | 384 |
|
7980
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7952
diff
changeset
|
385 |
Ptr<LteEnbPhy> phy = CreateObject<LteEnbPhy> (dlPhy, ulPhy); |
7886 | 386 |
|
9351
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
387 |
Ptr<LteHarqPhy> harq = Create<LteHarqPhy> (); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
388 |
dlPhy->SetHarqPhyModule (harq); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
389 |
ulPhy->SetHarqPhyModule (harq); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
390 |
phy->SetHarqPhyModule (harq); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
391 |
|
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:
8734
diff
changeset
|
392 |
Ptr<LteCtrlSinrChunkProcessor> pCtrl = Create<LteCtrlSinrChunkProcessor> (phy->GetObject<LtePhy> ()); |
9039
5bdf0c1be85f
Add SRS based UL-CQI and update RR and PF schedulers for managing them
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
393 |
ulPhy->AddCtrlSinrChunkProcessor (pCtrl); // for evaluating SRS UL-CQI |
8540 | 394 |
|
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:
8734
diff
changeset
|
395 |
Ptr<LteDataSinrChunkProcessor> pData = Create<LteDataSinrChunkProcessor> (ulPhy, phy); |
9039
5bdf0c1be85f
Add SRS based UL-CQI and update RR and PF schedulers for managing them
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
396 |
ulPhy->AddDataSinrChunkProcessor (pData); // for evaluating PUSCH UL-CQI |
7927
c8d380a263ec
fixed uplink RX and interference calculation
Nicola Baldo <nbaldo@cttc.es>
parents:
7915
diff
changeset
|
397 |
|
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:
9351
diff
changeset
|
398 |
Ptr<LteInterferencePowerChunkProcessor> pInterf = Create<LteInterferencePowerChunkProcessor> (phy); |
9983
0091ab7a897c
Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9617
diff
changeset
|
399 |
ulPhy->AddInterferenceDataChunkProcessor (pInterf); // for interference power tracing |
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:
9351
diff
changeset
|
400 |
|
10294
395d7341a29c
Reverted position of SetChannel in LteHelper InstallDevice functions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10293
diff
changeset
|
401 |
dlPhy->SetChannel (m_downlinkChannel); |
395d7341a29c
Reverted position of SetChannel in LteHelper InstallDevice functions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10293
diff
changeset
|
402 |
ulPhy->SetChannel (m_uplinkChannel); |
395d7341a29c
Reverted position of SetChannel in LteHelper InstallDevice functions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10293
diff
changeset
|
403 |
|
7886 | 404 |
Ptr<MobilityModel> mm = n->GetObject<MobilityModel> (); |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
405 |
NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()"); |
7886 | 406 |
dlPhy->SetMobility (mm); |
407 |
ulPhy->SetMobility (mm); |
|
7944
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
408 |
|
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
409 |
Ptr<AntennaModel> antenna = (m_enbAntennaModelFactory.Create ())->GetObject<AntennaModel> (); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
410 |
NS_ASSERT_MSG (antenna, "error in creating the AntennaModel object"); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
411 |
dlPhy->SetAntenna (antenna); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
412 |
ulPhy->SetAntenna (antenna); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
413 |
|
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
414 |
Ptr<LteEnbMac> mac = CreateObject<LteEnbMac> (); |
8149 | 415 |
Ptr<FfMacScheduler> sched = m_schedulerFactory.Create<FfMacScheduler> (); |
10322
54f2e33137a3
Using template for forwarding classes and new names for Handover Management SAP
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10321
diff
changeset
|
416 |
Ptr<LteHandoverAlgorithm> handoverAlgorithm = m_handoverAlgorithmFactory.Create<LteHandoverAlgorithm> (); |
7915
25983be97d52
fixed broken attribute path to the eNb RLC
Nicola Baldo <nbaldo@cttc.es>
parents:
7908
diff
changeset
|
417 |
Ptr<LteEnbRrc> rrc = CreateObject<LteEnbRrc> (); |
7944
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
418 |
|
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
419 |
if (m_useIdealRrc) |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
420 |
{ |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
421 |
Ptr<LteEnbRrcProtocolIdeal> rrcProtocol = CreateObject<LteEnbRrcProtocolIdeal> (); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
422 |
rrcProtocol->SetLteEnbRrcSapProvider (rrc->GetLteEnbRrcSapProvider ()); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
423 |
rrc->SetLteEnbRrcSapUser (rrcProtocol->GetLteEnbRrcSapUser ()); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
424 |
rrc->AggregateObject (rrcProtocol); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
425 |
rrcProtocol->SetCellId (cellId); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
426 |
} |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
427 |
else |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
428 |
{ |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
429 |
Ptr<LteEnbRrcProtocolReal> rrcProtocol = CreateObject<LteEnbRrcProtocolReal> (); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
430 |
rrcProtocol->SetLteEnbRrcSapProvider (rrc->GetLteEnbRrcSapProvider ()); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
431 |
rrc->SetLteEnbRrcSapUser (rrcProtocol->GetLteEnbRrcSapUser ()); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
432 |
rrc->AggregateObject (rrcProtocol); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
433 |
rrcProtocol->SetCellId (cellId); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
434 |
} |
7944
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
435 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
436 |
if (m_epcHelper != 0) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
437 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
438 |
EnumValue epsBearerToRlcMapping; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
439 |
rrc->GetAttribute ("EpsBearerToRlcMapping", epsBearerToRlcMapping); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
440 |
// it does not make sense to use RLC/SM when also using the EPC |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
441 |
if (epsBearerToRlcMapping.Get () == LteEnbRrc::RLC_SM_ALWAYS) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
442 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
443 |
rrc->SetAttribute ("EpsBearerToRlcMapping", EnumValue (LteEnbRrc::RLC_UM_ALWAYS)); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
444 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
445 |
} |
7944
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
446 |
|
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
447 |
rrc->SetLteEnbCmacSapProvider (mac->GetLteEnbCmacSapProvider ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
448 |
mac->SetLteEnbCmacSapUser (rrc->GetLteEnbCmacSapUser ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
449 |
rrc->SetLteMacSapProvider (mac->GetLteMacSapProvider ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
450 |
|
10322
54f2e33137a3
Using template for forwarding classes and new names for Handover Management SAP
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10321
diff
changeset
|
451 |
rrc->SetLteHandoverManagementSapProvider (handoverAlgorithm->GetLteHandoverManagementSapProvider ()); |
54f2e33137a3
Using template for forwarding classes and new names for Handover Management SAP
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10321
diff
changeset
|
452 |
handoverAlgorithm->SetLteHandoverManagementSapUser (rrc->GetLteHandoverManagementSapUser ()); |
10316
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
453 |
|
7944
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
454 |
mac->SetFfMacSchedSapProvider (sched->GetFfMacSchedSapProvider ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
455 |
mac->SetFfMacCschedSapProvider (sched->GetFfMacCschedSapProvider ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
456 |
|
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
457 |
sched->SetFfMacSchedSapUser (mac->GetFfMacSchedSapUser ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
458 |
sched->SetFfMacCschedSapUser (mac->GetFfMacCschedSapUser ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
459 |
|
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
460 |
phy->SetLteEnbPhySapUser (mac->GetLteEnbPhySapUser ()); |
f7e5e0540487
connection of SAPs moved from EnbNetDevice to LenaHelper
Nicola Baldo <nicola@baldo.biz>
parents:
7929
diff
changeset
|
461 |
mac->SetLteEnbPhySapProvider (phy->GetLteEnbPhySapProvider ()); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
462 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
463 |
phy->SetLteEnbCphySapUser (rrc->GetLteEnbCphySapUser ()); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
464 |
rrc->SetLteEnbCphySapProvider (phy->GetLteEnbCphySapProvider ()); |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9431
diff
changeset
|
465 |
|
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
466 |
Ptr<LteEnbNetDevice> dev = m_enbNetDeviceFactory.Create<LteEnbNetDevice> (); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
467 |
dev->SetNode (n); |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9431
diff
changeset
|
468 |
dev->SetAttribute ("CellId", UintegerValue (cellId)); |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
469 |
dev->SetAttribute ("LteEnbPhy", PointerValue (phy)); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
470 |
dev->SetAttribute ("LteEnbMac", PointerValue (mac)); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
471 |
dev->SetAttribute ("FfMacScheduler", PointerValue (sched)); |
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
472 |
dev->SetAttribute ("LteEnbRrc", PointerValue (rrc)); |
10322
54f2e33137a3
Using template for forwarding classes and new names for Handover Management SAP
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10321
diff
changeset
|
473 |
dev->SetAttribute ("LteHandoverAlgorithm", PointerValue (handoverAlgorithm)); |
10329
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
474 |
|
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
475 |
if (m_isAnrEnabled) |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
476 |
{ |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
477 |
Ptr<LteAnr> anr = CreateObject<LteAnr> (cellId); |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
478 |
rrc->SetLteAnrSapProvider (anr->GetLteAnrSapProvider ()); |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
479 |
anr->SetLteAnrSapUser (rrc->GetLteAnrSapUser ()); |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
480 |
dev->SetAttribute ("LteAnr", PointerValue (anr)); |
e9286f613bf9
Attribute to enable/disable ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10323
diff
changeset
|
481 |
} |
8540 | 482 |
|
7886 | 483 |
phy->SetDevice (dev); |
484 |
dlPhy->SetDevice (dev); |
|
485 |
ulPhy->SetDevice (dev); |
|
486 |
||
487 |
n->AddDevice (dev); |
|
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:
8734
diff
changeset
|
488 |
ulPhy->SetLtePhyRxDataEndOkCallback (MakeCallback (&LteEnbPhy::PhyPduReceived, phy)); |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8734
diff
changeset
|
489 |
ulPhy->SetLtePhyRxCtrlEndOkCallback (MakeCallback (&LteEnbPhy::ReceiveLteControlMessageList, phy)); |
9351
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
490 |
ulPhy->SetLtePhyUlHarqFeedbackCallback (MakeCallback (&LteEnbPhy::ReceiveLteUlHarqFeedback, phy)); |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
491 |
rrc->SetForwardUpCallback (MakeCallback (&LteEnbNetDevice::Receive, dev)); |
8540 | 492 |
|
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
493 |
NS_LOG_LOGIC ("set the propagation model frequencies"); |
8734
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
494 |
double dlFreq = LteSpectrumValueHelper::GetCarrierFrequency (dev->GetDlEarfcn ()); |
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
495 |
NS_LOG_LOGIC ("DL freq: " << dlFreq); |
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
496 |
bool dlFreqOk = m_downlinkPathlossModel->SetAttributeFailSafe ("Frequency", DoubleValue (dlFreq)); |
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
497 |
if (!dlFreqOk) |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
498 |
{ |
8734
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
499 |
NS_LOG_WARN ("DL propagation model does not have a Frequency attribute"); |
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
500 |
} |
8734
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
501 |
double ulFreq = LteSpectrumValueHelper::GetCarrierFrequency (dev->GetUlEarfcn ()); |
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
502 |
NS_LOG_LOGIC ("UL freq: " << ulFreq); |
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
503 |
bool ulFreqOk = m_uplinkPathlossModel->SetAttributeFailSafe ("Frequency", DoubleValue (ulFreq)); |
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
504 |
if (!ulFreqOk) |
8234
ee0d91b3de95
Update LenaHelper for set the BuildingPropagationLossModel parameter automatically with earfcn parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8208
diff
changeset
|
505 |
{ |
8734
403c6e61d201
decouple most propagation models from buildings module
Nicola Baldo <nbaldo@cttc.es>
parents:
8693
diff
changeset
|
506 |
NS_LOG_WARN ("UL propagation model does not have a Frequency attribute"); |
8234
ee0d91b3de95
Update LenaHelper for set the BuildingPropagationLossModel parameter automatically with earfcn parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8208
diff
changeset
|
507 |
} |
10316
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
508 |
|
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9669
diff
changeset
|
509 |
dev->Initialize (); |
7886 | 510 |
|
8693
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
511 |
m_uplinkChannel->AddRx (ulPhy); |
478733ab87b7
MultiModelSpectrumChannel working with LTE
Nicola Baldo <nbaldo@cttc.es>
parents:
8692
diff
changeset
|
512 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
513 |
if (m_epcHelper != 0) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
514 |
{ |
8540 | 515 |
NS_LOG_INFO ("adding this eNB to the EPC"); |
9430
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
516 |
m_epcHelper->AddEnb (n, dev, dev->GetCellId ()); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
517 |
Ptr<EpcEnbApplication> enbApp = n->GetApplication (0)->GetObject<EpcEnbApplication> (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
518 |
NS_ASSERT_MSG (enbApp != 0, "cannot retrieve EpcEnbApplication"); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
519 |
|
9338 | 520 |
// S1 SAPs |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
521 |
rrc->SetS1SapProvider (enbApp->GetS1SapProvider ()); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
522 |
enbApp->SetS1SapUser (rrc->GetS1SapUser ()); |
10316
dc88a59d7ff2
Handover management SAP interface and A2/RSRQ-based handover algorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
523 |
|
9338 | 524 |
// X2 SAPs |
525 |
Ptr<EpcX2> x2 = n->GetObject<EpcX2> (); |
|
526 |
x2->SetEpcX2SapUser (rrc->GetEpcX2SapUser ()); |
|
527 |
rrc->SetEpcX2SapProvider (x2->GetEpcX2SapProvider ()); |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
528 |
} |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
529 |
|
7886 | 530 |
return dev; |
531 |
} |
|
532 |
||
533 |
Ptr<NetDevice> |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
534 |
LteHelper::InstallSingleUeDevice (Ptr<Node> n) |
7886 | 535 |
{ |
8329 | 536 |
NS_LOG_FUNCTION (this); |
7886 | 537 |
Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> (); |
538 |
Ptr<LteSpectrumPhy> ulPhy = CreateObject<LteSpectrumPhy> (); |
|
539 |
||
7980
f07d99163a56
LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents:
7952
diff
changeset
|
540 |
Ptr<LteUePhy> phy = CreateObject<LteUePhy> (dlPhy, ulPhy); |
7886 | 541 |
|
9351
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
542 |
Ptr<LteHarqPhy> harq = Create<LteHarqPhy> (); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
543 |
dlPhy->SetHarqPhyModule (harq); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
544 |
ulPhy->SetHarqPhyModule (harq); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
545 |
phy->SetHarqPhyModule (harq); |
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
546 |
|
9389
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9388
diff
changeset
|
547 |
Ptr<LteRsReceivedPowerChunkProcessor> pRs = Create<LteRsReceivedPowerChunkProcessor> (phy->GetObject<LtePhy> ()); |
4bd2725add01
Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9388
diff
changeset
|
548 |
dlPhy->AddRsPowerChunkProcessor (pRs); |
9983
0091ab7a897c
Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9617
diff
changeset
|
549 |
|
0091ab7a897c
Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9617
diff
changeset
|
550 |
Ptr<LteInterferencePowerChunkProcessor> pInterf = Create<LteInterferencePowerChunkProcessor> (phy); |
0091ab7a897c
Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9617
diff
changeset
|
551 |
dlPhy->AddInterferenceCtrlChunkProcessor (pInterf); // for RSRQ evaluation of UE Measurements |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
552 |
|
9043
9130e2dbe601
Add PCFICH-PDCCD Error model based on 3GPP R4-081920
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9039
diff
changeset
|
553 |
Ptr<LteCtrlSinrChunkProcessor> pCtrl = Create<LteCtrlSinrChunkProcessor> (phy->GetObject<LtePhy> (), dlPhy); |
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:
8734
diff
changeset
|
554 |
dlPhy->AddCtrlSinrChunkProcessor (pCtrl); |
8540 | 555 |
|
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:
8734
diff
changeset
|
556 |
Ptr<LteDataSinrChunkProcessor> pData = Create<LteDataSinrChunkProcessor> (dlPhy); |
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:
8734
diff
changeset
|
557 |
dlPhy->AddDataSinrChunkProcessor (pData); |
7886 | 558 |
|
10294
395d7341a29c
Reverted position of SetChannel in LteHelper InstallDevice functions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10293
diff
changeset
|
559 |
dlPhy->SetChannel (m_downlinkChannel); |
395d7341a29c
Reverted position of SetChannel in LteHelper InstallDevice functions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10293
diff
changeset
|
560 |
ulPhy->SetChannel (m_uplinkChannel); |
395d7341a29c
Reverted position of SetChannel in LteHelper InstallDevice functions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10293
diff
changeset
|
561 |
|
7886 | 562 |
Ptr<MobilityModel> mm = n->GetObject<MobilityModel> (); |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
563 |
NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()"); |
7886 | 564 |
dlPhy->SetMobility (mm); |
565 |
ulPhy->SetMobility (mm); |
|
566 |
||
8506
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
567 |
Ptr<AntennaModel> antenna = (m_ueAntennaModelFactory.Create ())->GetObject<AntennaModel> (); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
568 |
NS_ASSERT_MSG (antenna, "error in creating the AntennaModel object"); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
569 |
dlPhy->SetAntenna (antenna); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
570 |
ulPhy->SetAntenna (antenna); |
f9616c9094a5
integrated AntennaModel with LTE, including system test
Nicola Baldo <nbaldo@cttc.es>
parents:
8505
diff
changeset
|
571 |
|
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
572 |
Ptr<LteUeMac> mac = CreateObject<LteUeMac> (); |
7915
25983be97d52
fixed broken attribute path to the eNb RLC
Nicola Baldo <nbaldo@cttc.es>
parents:
7908
diff
changeset
|
573 |
Ptr<LteUeRrc> rrc = CreateObject<LteUeRrc> (); |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
574 |
|
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
575 |
if (m_useIdealRrc) |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
576 |
{ |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
577 |
Ptr<LteUeRrcProtocolIdeal> rrcProtocol = CreateObject<LteUeRrcProtocolIdeal> (); |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
578 |
rrcProtocol->SetUeRrc (rrc); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
579 |
rrc->AggregateObject (rrcProtocol); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
580 |
rrcProtocol->SetLteUeRrcSapProvider (rrc->GetLteUeRrcSapProvider ()); |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
581 |
rrc->SetLteUeRrcSapUser (rrcProtocol->GetLteUeRrcSapUser ()); |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
582 |
} |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
583 |
else |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
584 |
{ |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
585 |
Ptr<LteUeRrcProtocolReal> rrcProtocol = CreateObject<LteUeRrcProtocolReal> (); |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
586 |
rrcProtocol->SetUeRrc (rrc); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
587 |
rrc->AggregateObject (rrcProtocol); |
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
588 |
rrcProtocol->SetLteUeRrcSapProvider (rrc->GetLteUeRrcSapProvider ()); |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
589 |
rrc->SetLteUeRrcSapUser (rrcProtocol->GetLteUeRrcSapUser ()); |
9446
fcc2c9f5a011
added stub of LteRrcProtocolReal with corresponding tests
Nicola Baldo <nbaldo@cttc.es>
parents:
9439
diff
changeset
|
590 |
} |
9406 | 591 |
|
592 |
if (m_epcHelper != 0) |
|
593 |
{ |
|
594 |
rrc->SetUseRlcSm (false); |
|
595 |
} |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
596 |
Ptr<EpcUeNas> nas = CreateObject<EpcUeNas> (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
597 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
598 |
nas->SetAsSapProvider (rrc->GetAsSapProvider ()); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
599 |
rrc->SetAsSapUser (nas->GetAsSapUser ()); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
600 |
|
7945
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
601 |
rrc->SetLteUeCmacSapProvider (mac->GetLteUeCmacSapProvider ()); |
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
602 |
mac->SetLteUeCmacSapUser (rrc->GetLteUeCmacSapUser ()); |
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
603 |
rrc->SetLteMacSapProvider (mac->GetLteMacSapProvider ()); |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
604 |
|
7945
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
605 |
phy->SetLteUePhySapUser (mac->GetLteUePhySapUser ()); |
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
606 |
mac->SetLteUePhySapProvider (phy->GetLteUePhySapProvider ()); |
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
607 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
608 |
phy->SetLteUeCphySapUser (rrc->GetLteUeCphySapUser ()); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
609 |
rrc->SetLteUeCphySapProvider (phy->GetLteUeCphySapProvider ()); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
610 |
|
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
611 |
NS_ABORT_MSG_IF (m_imsiCounter >= 0xFFFFFFFF, "max num UEs exceeded"); |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9431
diff
changeset
|
612 |
uint64_t imsi = ++m_imsiCounter; |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
613 |
|
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
614 |
Ptr<LteUeNetDevice> dev = m_ueNetDeviceFactory.Create<LteUeNetDevice> (); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
615 |
dev->SetNode (n); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
616 |
dev->SetAttribute ("Imsi", UintegerValue (imsi)); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
617 |
dev->SetAttribute ("LteUePhy", PointerValue (phy)); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
618 |
dev->SetAttribute ("LteUeMac", PointerValue (mac)); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
619 |
dev->SetAttribute ("LteUeRrc", PointerValue (rrc)); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
620 |
dev->SetAttribute ("EpcUeNas", PointerValue (nas)); |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
621 |
|
7886 | 622 |
phy->SetDevice (dev); |
623 |
dlPhy->SetDevice (dev); |
|
624 |
ulPhy->SetDevice (dev); |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
625 |
nas->SetDevice (dev); |
7886 | 626 |
|
627 |
n->AddDevice (dev); |
|
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:
8734
diff
changeset
|
628 |
dlPhy->SetLtePhyRxDataEndOkCallback (MakeCallback (&LteUePhy::PhyPduReceived, phy)); |
e40974228d94
Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8734
diff
changeset
|
629 |
dlPhy->SetLtePhyRxCtrlEndOkCallback (MakeCallback (&LteUePhy::ReceiveLteControlMessageList, phy)); |
9983
0091ab7a897c
Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9617
diff
changeset
|
630 |
dlPhy->SetLtePhyRxPssCallback (MakeCallback (&LteUePhy::ReceivePss, phy)); |
9351
6e074e67a1ad
HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents:
9350
diff
changeset
|
631 |
dlPhy->SetLtePhyDlHarqFeedbackCallback (MakeCallback (&LteUePhy::ReceiveLteDlHarqFeedback, phy)); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
632 |
nas->SetForwardUpCallback (MakeCallback (&LteUeNetDevice::Receive, dev)); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
633 |
|
9430
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
634 |
if (m_epcHelper != 0) |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
635 |
{ |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
636 |
m_epcHelper->AddUe (dev, dev->GetImsi ()); |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
637 |
} |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
638 |
|
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9669
diff
changeset
|
639 |
dev->Initialize (); |
7886 | 640 |
|
641 |
return dev; |
|
642 |
} |
|
643 |
||
644 |
||
645 |
void |
|
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
646 |
LteHelper::Attach (NetDeviceContainer ueDevices) |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
647 |
{ |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
648 |
NS_LOG_FUNCTION (this); |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
649 |
for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
650 |
{ |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
651 |
Attach (*i); |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
652 |
} |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
653 |
} |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
654 |
|
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
655 |
void |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
656 |
LteHelper::Attach (Ptr<NetDevice> ueDevice) |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
657 |
{ |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
658 |
NS_LOG_FUNCTION (this); |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
659 |
|
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10297
diff
changeset
|
660 |
if (m_epcHelper == 0) |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10297
diff
changeset
|
661 |
{ |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10297
diff
changeset
|
662 |
NS_FATAL_ERROR ("This function is not valid without properly configured EPC"); |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10297
diff
changeset
|
663 |
} |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10297
diff
changeset
|
664 |
|
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
665 |
Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> (); |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
666 |
if (ueLteDevice == 0) |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
667 |
{ |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
668 |
NS_FATAL_ERROR ("The passed NetDevice must be an LteUeNetDevice"); |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
669 |
} |
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10297
diff
changeset
|
670 |
|
10312
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10310
diff
changeset
|
671 |
// initiate cell selection |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10310
diff
changeset
|
672 |
Ptr<EpcUeNas> ueNas = ueLteDevice->GetNas (); |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10310
diff
changeset
|
673 |
NS_ASSERT (ueNas != 0); |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10310
diff
changeset
|
674 |
uint16_t dlEarfcn = ueLteDevice->GetDlEarfcn (); |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10310
diff
changeset
|
675 |
ueNas->StartCellSelection (dlEarfcn); |
10310
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
676 |
|
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
677 |
// instruct UE to immediately enter CONNECTED mode after camping |
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
678 |
ueNas->Connect (); |
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
679 |
|
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
680 |
// activate default EPS bearer |
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
681 |
m_epcHelper->ActivateEpsBearer (ueDevice, ueLteDevice->GetImsi (), |
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
682 |
EpcTft::Default (), |
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
683 |
EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT)); |
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
684 |
} |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
685 |
|
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
686 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
687 |
LteHelper::Attach (NetDeviceContainer ueDevices, Ptr<NetDevice> enbDevice) |
7886 | 688 |
{ |
8652 | 689 |
NS_LOG_FUNCTION (this); |
7886 | 690 |
for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) |
691 |
{ |
|
692 |
Attach (*i, enbDevice); |
|
693 |
} |
|
694 |
} |
|
695 |
||
696 |
void |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
697 |
LteHelper::Attach (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice) |
7886 | 698 |
{ |
8652 | 699 |
NS_LOG_FUNCTION (this); |
9036 | 700 |
//enbRrc->SetCellId (enbDevice->GetObject<LteEnbNetDevice> ()->GetCellId ()); |
7886 | 701 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
702 |
Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> (); |
9430
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
703 |
Ptr<LteEnbNetDevice> enbLteDevice = enbDevice->GetObject<LteEnbNetDevice> (); |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
704 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
705 |
Ptr<EpcUeNas> ueNas = ueLteDevice->GetNas (); |
9430
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
706 |
ueNas->Connect (enbLteDevice->GetCellId (), enbLteDevice->GetDlEarfcn ()); |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
707 |
|
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
708 |
if (m_epcHelper != 0) |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
709 |
{ |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
710 |
// activate default EPS bearer |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
711 |
m_epcHelper->ActivateEpsBearer (ueDevice, ueLteDevice->GetImsi (), EpcTft::Default (), EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT)); |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
712 |
} |
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10294
diff
changeset
|
713 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
714 |
// tricks needed for the simplified LTE-only simulations |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
715 |
if (m_epcHelper == 0) |
8276 | 716 |
{ |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
717 |
ueDevice->GetObject<LteUeNetDevice> ()->SetTargetEnb (enbDevice->GetObject<LteEnbNetDevice> ()); |
8276 | 718 |
} |
7886 | 719 |
} |
720 |
||
8652 | 721 |
void |
722 |
LteHelper::AttachToClosestEnb (NetDeviceContainer ueDevices, NetDeviceContainer enbDevices) |
|
723 |
{ |
|
724 |
NS_LOG_FUNCTION (this); |
|
725 |
for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) |
|
726 |
{ |
|
727 |
AttachToClosestEnb (*i, enbDevices); |
|
728 |
} |
|
729 |
} |
|
7886 | 730 |
|
8652 | 731 |
void |
732 |
LteHelper::AttachToClosestEnb (Ptr<NetDevice> ueDevice, NetDeviceContainer enbDevices) |
|
733 |
{ |
|
734 |
NS_LOG_FUNCTION (this); |
|
735 |
NS_ASSERT_MSG (enbDevices.GetN () > 0, "empty enb device container"); |
|
736 |
Vector uepos = ueDevice->GetNode ()->GetObject<MobilityModel> ()->GetPosition (); |
|
737 |
double minDistance = std::numeric_limits<double>::infinity (); |
|
738 |
Ptr<NetDevice> closestEnbDevice; |
|
739 |
for (NetDeviceContainer::Iterator i = enbDevices.Begin (); i != enbDevices.End (); ++i) |
|
740 |
{ |
|
741 |
Vector enbpos = (*i)->GetNode ()->GetObject<MobilityModel> ()->GetPosition (); |
|
742 |
double distance = CalculateDistance (uepos, enbpos); |
|
743 |
if (distance < minDistance) |
|
744 |
{ |
|
745 |
minDistance = distance; |
|
746 |
closestEnbDevice = *i; |
|
10301
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
747 |
} |
8652 | 748 |
} |
749 |
NS_ASSERT (closestEnbDevice != 0); |
|
750 |
Attach (ueDevice, closestEnbDevice); |
|
751 |
} |
|
8380 | 752 |
|
7886 | 753 |
void |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
754 |
LteHelper::ActivateDedicatedEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<EpcTft> tft) |
7886 | 755 |
{ |
8652 | 756 |
NS_LOG_FUNCTION (this); |
7886 | 757 |
for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) |
758 |
{ |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
759 |
ActivateDedicatedEpsBearer (*i, bearer, tft); |
7886 | 760 |
} |
761 |
} |
|
762 |
||
763 |
||
764 |
void |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
765 |
LteHelper::ActivateDedicatedEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<EpcTft> tft) |
7886 | 766 |
{ |
8652 | 767 |
NS_LOG_FUNCTION (this); |
8380 | 768 |
|
10395
440310f834b8
check whether the EPC is used upon adding an X2 interface
Nicola Baldo <nbaldo@cttc.es>
parents:
10094
diff
changeset
|
769 |
NS_ASSERT_MSG (m_epcHelper != 0, "dedicated EPS bearers cannot be set up when the EPC is not used"); |
10310
acecb91f4559
Moved LteHelper::Connect functionality into LteHelper::Attach
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
770 |
|
9430
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
771 |
uint64_t imsi = ueDevice->GetObject<LteUeNetDevice> ()->GetImsi (); |
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9425
diff
changeset
|
772 |
m_epcHelper->ActivateEpsBearer (ueDevice, imsi, tft, bearer); |
7886 | 773 |
} |
774 |
||
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
775 |
class DrbActivator : public SimpleRefCount<DrbActivator> |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
776 |
{ |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
777 |
public: |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
778 |
DrbActivator (Ptr<NetDevice> ueDevice, EpsBearer bearer); |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
779 |
static void ActivateCallback (Ptr<DrbActivator> a, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti); |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
780 |
void ActivateDrb (uint64_t imsi, uint16_t cellId, uint16_t rnti); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
781 |
private: |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
782 |
bool m_active; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
783 |
Ptr<NetDevice> m_ueDevice; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
784 |
EpsBearer m_bearer; |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
785 |
uint64_t m_imsi; |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
786 |
}; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
787 |
|
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
788 |
DrbActivator::DrbActivator (Ptr<NetDevice> ueDevice, EpsBearer bearer) |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
789 |
: m_active (false), |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
790 |
m_ueDevice (ueDevice), |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
791 |
m_bearer (bearer), |
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
792 |
m_imsi (m_ueDevice->GetObject<LteUeNetDevice> ()->GetImsi ()) |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
793 |
{ |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
794 |
} |
8540 | 795 |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
796 |
void |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
797 |
DrbActivator::ActivateCallback (Ptr<DrbActivator> a, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
798 |
{ |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
799 |
NS_LOG_FUNCTION (a << context << imsi << cellId << rnti); |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
800 |
a->ActivateDrb (imsi, cellId, rnti); |
7886 | 801 |
} |
802 |
||
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
803 |
void |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
804 |
DrbActivator::ActivateDrb (uint64_t imsi, uint16_t cellId, uint16_t rnti) |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
805 |
{ |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
806 |
NS_LOG_FUNCTION (this << imsi << cellId << rnti << m_active); |
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
807 |
if ((!m_active) && (imsi == m_imsi)) |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
808 |
{ |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
809 |
Ptr<LteUeRrc> ueRrc = m_ueDevice->GetObject<LteUeNetDevice> ()->GetRrc (); |
10323
ecc27144a16e
Renamed BareHandoverAlgorithm to NoOpHandoverAlgorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
810 |
NS_ASSERT (ueRrc->GetState () == LteUeRrc::CONNECTED_NORMALLY); |
ecc27144a16e
Renamed BareHandoverAlgorithm to NoOpHandoverAlgorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
811 |
uint16_t rnti = ueRrc->GetRnti (); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
812 |
Ptr<LteEnbNetDevice> enbLteDevice = m_ueDevice->GetObject<LteUeNetDevice> ()->GetTargetEnb (); |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
813 |
Ptr<LteEnbRrc> enbRrc = enbLteDevice->GetObject<LteEnbNetDevice> ()->GetRrc (); |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
814 |
NS_ASSERT (ueRrc->GetCellId () == enbLteDevice->GetCellId ()); |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
815 |
Ptr<UeManager> ueManager = enbRrc->GetUeManager (rnti); |
11168
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
816 |
NS_ASSERT (ueManager->GetState () == UeManager::CONNECTED_NORMALLY |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
817 |
|| ueManager->GetState () == UeManager::CONNECTION_RECONFIGURATION); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
818 |
EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
819 |
params.rnti = rnti; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
820 |
params.bearer = m_bearer; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
821 |
params.bearerId = 0; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
822 |
params.gtpTeid = 0; // don't care |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
823 |
enbRrc->GetS1SapUser ()->DataRadioBearerSetupRequest (params); |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
824 |
m_active = true; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
825 |
} |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
826 |
} |
10323
ecc27144a16e
Renamed BareHandoverAlgorithm to NoOpHandoverAlgorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
827 |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
828 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
829 |
void |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
830 |
LteHelper::ActivateDataRadioBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer) |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
831 |
{ |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
832 |
NS_LOG_FUNCTION (this << ueDevice); |
10396 | 833 |
NS_ASSERT_MSG (m_epcHelper == 0, "this method must not be used when the EPC is being used"); |
10323
ecc27144a16e
Renamed BareHandoverAlgorithm to NoOpHandoverAlgorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
834 |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
835 |
// Normally it is the EPC that takes care of activating DRBs |
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9474
diff
changeset
|
836 |
// when the UE gets connected. When the EPC is not used, we achieve |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
837 |
// the same behavior by hooking a dedicated DRB activation function |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
838 |
// to the Enb RRC Connection Established trace source |
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
839 |
|
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
840 |
|
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
841 |
Ptr<LteEnbNetDevice> enbLteDevice = ueDevice->GetObject<LteUeNetDevice> ()->GetTargetEnb (); |
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
842 |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
843 |
std::ostringstream path; |
9474
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
844 |
path << "/NodeList/" << enbLteDevice->GetNode ()->GetId () |
bdb246d8dde0
defer DRB activation to rx of RRC connection setup completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9452
diff
changeset
|
845 |
<< "/DeviceList/" << enbLteDevice->GetIfIndex () |
10323
ecc27144a16e
Renamed BareHandoverAlgorithm to NoOpHandoverAlgorithm
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
846 |
<< "/LteEnbRrc/ConnectionEstablished"; |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
847 |
Ptr<DrbActivator> arg = Create<DrbActivator> (ueDevice, bearer); |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
848 |
Config::Connect (path.str (), MakeBoundCallback (&DrbActivator::ActivateCallback, arg)); |
7886 | 849 |
} |
8380 | 850 |
|
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
851 |
void |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
852 |
LteHelper::AddX2Interface (NodeContainer enbNodes) |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
853 |
{ |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
854 |
NS_LOG_FUNCTION (this); |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
855 |
|
10395
440310f834b8
check whether the EPC is used upon adding an X2 interface
Nicola Baldo <nbaldo@cttc.es>
parents:
10094
diff
changeset
|
856 |
NS_ASSERT_MSG (m_epcHelper != 0, "X2 interfaces cannot be set up when the EPC is not used"); |
440310f834b8
check whether the EPC is used upon adding an X2 interface
Nicola Baldo <nbaldo@cttc.es>
parents:
10094
diff
changeset
|
857 |
|
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
858 |
for (NodeContainer::Iterator i = enbNodes.Begin (); i != enbNodes.End (); ++i) |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
859 |
{ |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
860 |
for (NodeContainer::Iterator j = i + 1; j != enbNodes.End (); ++j) |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
861 |
{ |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
862 |
AddX2Interface (*i, *j); |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
863 |
} |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
864 |
} |
7886 | 865 |
} |
866 |
||
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
867 |
void |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
868 |
LteHelper::AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2) |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
869 |
{ |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
870 |
NS_LOG_FUNCTION (this); |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
871 |
NS_LOG_INFO ("setting up the X2 interface"); |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
872 |
|
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
873 |
m_epcHelper->AddX2Interface (enbNode1, enbNode2); |
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
874 |
} |
8451
81c6691c21a7
Add support for AM RLC in LenaHelper
Manuel Requena <manuel.requena@cttc.es>
parents:
8428
diff
changeset
|
875 |
|
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
876 |
void |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9338
diff
changeset
|
877 |
LteHelper::HandoverRequest (Time hoTime, Ptr<NetDevice> ueDev, Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev) |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
878 |
{ |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9338
diff
changeset
|
879 |
NS_LOG_FUNCTION (this << ueDev << sourceEnbDev << targetEnbDev); |
9425
b7eddbdb3a5a
added lte-x2-handover test suite
Nicola Baldo <nbaldo@cttc.es>
parents:
9414
diff
changeset
|
880 |
NS_ASSERT_MSG (m_epcHelper, "Handover requires the use of the EPC - did you forget to call LteHelper::SetEpcHelper () ?"); |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9338
diff
changeset
|
881 |
Simulator::Schedule (hoTime, &LteHelper::DoHandoverRequest, this, ueDev, sourceEnbDev, targetEnbDev); |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
882 |
} |
8451
81c6691c21a7
Add support for AM RLC in LenaHelper
Manuel Requena <manuel.requena@cttc.es>
parents:
8428
diff
changeset
|
883 |
|
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
884 |
void |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9338
diff
changeset
|
885 |
LteHelper::DoHandoverRequest (Ptr<NetDevice> ueDev, Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev) |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
886 |
{ |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9338
diff
changeset
|
887 |
NS_LOG_FUNCTION (this << ueDev << sourceEnbDev << targetEnbDev); |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
888 |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9338
diff
changeset
|
889 |
uint16_t targetCellId = targetEnbDev->GetObject<LteEnbNetDevice> ()->GetCellId (); |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9338
diff
changeset
|
890 |
Ptr<LteEnbRrc> sourceRrc = sourceEnbDev->GetObject<LteEnbNetDevice> ()->GetRrc (); |
9425
b7eddbdb3a5a
added lte-x2-handover test suite
Nicola Baldo <nbaldo@cttc.es>
parents:
9414
diff
changeset
|
891 |
uint16_t rnti = ueDev->GetObject<LteUeNetDevice> ()->GetRrc ()->GetRnti (); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10317
diff
changeset
|
892 |
sourceRrc->SendHandoverRequest (rnti, targetCellId); |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
893 |
} |
8451
81c6691c21a7
Add support for AM RLC in LenaHelper
Manuel Requena <manuel.requena@cttc.es>
parents:
8428
diff
changeset
|
894 |
|
11168
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
895 |
void |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
896 |
LteHelper::DeActivateDedicatedEpsBearer (Time deActivateTime, Ptr<NetDevice> ueDevice,Ptr<NetDevice> enbDevice, uint8_t bearerId) |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
897 |
{ |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
898 |
NS_LOG_FUNCTION (this << ueDevice << bearerId); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
899 |
NS_ASSERT_MSG (m_epcHelper != 0, "Dedicated EPS bearers cannot be de-activated when the EPC is not used"); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
900 |
NS_ASSERT_MSG (bearerId != 1, "Default bearer cannot be de-activated until and unless and UE is released"); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
901 |
|
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
902 |
Simulator::Schedule (deActivateTime, &LteHelper::DoDeActivateDedicatedEpsBearer, this, ueDevice, enbDevice, bearerId); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
903 |
} |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
904 |
|
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
905 |
void |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
906 |
LteHelper::DoDeActivateDedicatedEpsBearer (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice, uint8_t bearerId) |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
907 |
{ |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
908 |
NS_LOG_FUNCTION (this << ueDevice << bearerId); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
909 |
|
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
910 |
//Extract IMSI and rnti |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
911 |
uint64_t imsi = ueDevice->GetObject<LteUeNetDevice> ()->GetImsi (); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
912 |
uint16_t rnti = ueDevice->GetObject<LteUeNetDevice> ()->GetRrc ()->GetRnti (); |
9326
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
913 |
|
1cc7eb255f08
Add support for X2 handover in LTE Helper
Manuel Requena <manuel.requena@cttc.es>
parents:
8734
diff
changeset
|
914 |
|
11168
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
915 |
Ptr<LteEnbRrc> enbRrc = enbDevice->GetObject<LteEnbNetDevice> ()->GetRrc (); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
916 |
|
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
917 |
enbRrc->DoSendReleaseDataRadioBearer (imsi,rnti,bearerId); |
d09129217e78
added release bearer functionality
Gaurav Sathe <gaurav.sathe@tcs.com>
parents:
10652
diff
changeset
|
918 |
} |
8451
81c6691c21a7
Add support for AM RLC in LenaHelper
Manuel Requena <manuel.requena@cttc.es>
parents:
8428
diff
changeset
|
919 |
|
81c6691c21a7
Add support for AM RLC in LenaHelper
Manuel Requena <manuel.requena@cttc.es>
parents:
8428
diff
changeset
|
920 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
921 |
void |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
922 |
LteHelper::ActivateDataRadioBearer (NetDeviceContainer ueDevices, EpsBearer bearer) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
923 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
924 |
NS_LOG_FUNCTION (this); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10317
diff
changeset
|
925 |
for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
926 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8883
diff
changeset
|
927 |
ActivateDataRadioBearer (*i, bearer); |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
928 |
} |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8380
diff
changeset
|
929 |
} |
7886 | 930 |
|
931 |
void |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
932 |
LteHelper::EnableLogComponents (void) |
7886 | 933 |
{ |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
934 |
LogComponentEnable ("LteHelper", LOG_LEVEL_ALL); |
7886 | 935 |
LogComponentEnable ("LteEnbRrc", LOG_LEVEL_ALL); |
936 |
LogComponentEnable ("LteUeRrc", LOG_LEVEL_ALL); |
|
937 |
LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL); |
|
938 |
LogComponentEnable ("LteUeMac", LOG_LEVEL_ALL); |
|
939 |
LogComponentEnable ("LteRlc", LOG_LEVEL_ALL); |
|
8428 | 940 |
LogComponentEnable ("LteRlcUm", LOG_LEVEL_ALL); |
8451
81c6691c21a7
Add support for AM RLC in LenaHelper
Manuel Requena <manuel.requena@cttc.es>
parents:
8428
diff
changeset
|
941 |
LogComponentEnable ("LteRlcAm", LOG_LEVEL_ALL); |
7906
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
942 |
LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL); |
d58de34e41d3
MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7905
diff
changeset
|
943 |
LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL); |
7886 | 944 |
|
945 |
LogComponentEnable ("LtePhy", LOG_LEVEL_ALL); |
|
7887 | 946 |
LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL); |
947 |
LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL); |
|
8015 | 948 |
LogComponentEnable ("LteSpectrumValueHelper", LOG_LEVEL_ALL); |
7886 | 949 |
LogComponentEnable ("LteSpectrumPhy", LOG_LEVEL_ALL); |
950 |
LogComponentEnable ("LteInterference", LOG_LEVEL_ALL); |
|
951 |
LogComponentEnable ("LteSinrChunkProcessor", LOG_LEVEL_ALL); |
|
8055 | 952 |
|
8335
b7294e15b85a
fixed some leftover PropagationModel -> Pathloss naming issues in LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8330
diff
changeset
|
953 |
std::string propModelStr = m_dlPathlossModelFactory.GetTypeId ().GetName ().erase (0,5).c_str (); |
7886 | 954 |
LogComponentEnable ("LteNetDevice", LOG_LEVEL_ALL); |
7887 | 955 |
LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL); |
956 |
LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL); |
|
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7897
diff
changeset
|
957 |
|
8461
71ddd85a693b
RlcStatsCalculator --> RadioBearerStatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
8460
diff
changeset
|
958 |
LogComponentEnable ("RadioBearerStatsCalculator", LOG_LEVEL_ALL); |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
959 |
LogComponentEnable ("LteStatsCalculator", LOG_LEVEL_ALL); |
8266
3a30a2b5c94c
Refactoring of the statistics classes to avoid continious calls to the attribute system.
jaumenin
parents:
8261
diff
changeset
|
960 |
LogComponentEnable ("MacStatsCalculator", LOG_LEVEL_ALL); |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
961 |
LogComponentEnable ("PhyTxStatsCalculator", LOG_LEVEL_ALL); |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
962 |
LogComponentEnable ("PhyRxStatsCalculator", LOG_LEVEL_ALL); |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
963 |
LogComponentEnable ("PhyStatsCalculator", LOG_LEVEL_ALL); |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
964 |
|
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
965 |
|
7886 | 966 |
} |
967 |
||
8428 | 968 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
969 |
LteHelper::EnableTraces (void) |
8428 | 970 |
{ |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
971 |
EnablePhyTraces (); |
8428 | 972 |
EnableMacTraces (); |
973 |
EnableRlcTraces (); |
|
974 |
EnablePdcpTraces (); |
|
975 |
} |
|
7886 | 976 |
|
7988
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
977 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
978 |
LteHelper::EnableRlcTraces (void) |
7988
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
979 |
{ |
9669
eb758c67f9f2
fixed Bug 1587 - PDCP logs are always created (even if not requested)
Nicola Baldo <nbaldo@cttc.es>
parents:
9617
diff
changeset
|
980 |
NS_ASSERT_MSG (m_rlcStats == 0, "please make sure that LteHelper::EnableRlcTraces is called at most once"); |
eb758c67f9f2
fixed Bug 1587 - PDCP logs are always created (even if not requested)
Nicola Baldo <nbaldo@cttc.es>
parents:
9617
diff
changeset
|
981 |
m_rlcStats = CreateObject<RadioBearerStatsCalculator> ("RLC"); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
982 |
m_radioBearerStatsConnector.EnableRlcStats (m_rlcStats); |
7988
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
983 |
} |
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
984 |
|
8987
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
985 |
int64_t |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
986 |
LteHelper::AssignStreams (NetDeviceContainer c, int64_t stream) |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
987 |
{ |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
988 |
int64_t currentStream = stream; |
10067
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
989 |
if ((m_fadingModule != 0) && (m_fadingStreamsAssigned == false)) |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
990 |
{ |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
991 |
Ptr<TraceFadingLossModel> tflm = m_fadingModule->GetObject<TraceFadingLossModel> (); |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
992 |
if (tflm != 0) |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
993 |
{ |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
994 |
currentStream += tflm->AssignStreams (currentStream); |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
995 |
m_fadingStreamsAssigned = true; |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
996 |
} |
0d7d3b1e5d83
fixed TraceFadingLossModel::AssignStreams()
Nicola Baldo <nbaldo@cttc.es>
parents:
10063
diff
changeset
|
997 |
} |
8987
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
998 |
Ptr<NetDevice> netDevice; |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
999 |
for (NetDeviceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1000 |
{ |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1001 |
netDevice = (*i); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1002 |
Ptr<LteEnbNetDevice> lteEnb = DynamicCast<LteEnbNetDevice> (netDevice); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1003 |
if (lteEnb) |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1004 |
{ |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1005 |
Ptr<LteSpectrumPhy> dlPhy = lteEnb->GetPhy ()->GetDownlinkSpectrumPhy (); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1006 |
Ptr<LteSpectrumPhy> ulPhy = lteEnb->GetPhy ()->GetUplinkSpectrumPhy (); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1007 |
currentStream += dlPhy->AssignStreams (currentStream); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1008 |
currentStream += ulPhy->AssignStreams (currentStream); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1009 |
} |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1010 |
Ptr<LteUeNetDevice> lteUe = DynamicCast<LteUeNetDevice> (netDevice); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1011 |
if (lteUe) |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1012 |
{ |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1013 |
Ptr<LteSpectrumPhy> dlPhy = lteUe->GetPhy ()->GetDownlinkSpectrumPhy (); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1014 |
Ptr<LteSpectrumPhy> ulPhy = lteUe->GetPhy ()->GetUplinkSpectrumPhy (); |
9414 | 1015 |
Ptr<LteUeMac> ueMac = lteUe->GetMac (); |
8987
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1016 |
currentStream += dlPhy->AssignStreams (currentStream); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1017 |
currentStream += ulPhy->AssignStreams (currentStream); |
9414 | 1018 |
currentStream += ueMac->AssignStreams (currentStream); |
8987
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1019 |
} |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1020 |
} |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1021 |
return (currentStream - stream); |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1022 |
} |
03b1accee8d1
Replace src/lte usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8883
diff
changeset
|
1023 |
|
7988
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
1024 |
|
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
1025 |
void |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1026 |
LteHelper::EnablePhyTraces (void) |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1027 |
{ |
9562 | 1028 |
EnableDlPhyTraces (); |
1029 |
EnableUlPhyTraces (); |
|
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1030 |
EnableDlTxPhyTraces (); |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1031 |
EnableUlTxPhyTraces (); |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1032 |
EnableDlRxPhyTraces (); |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1033 |
EnableUlRxPhyTraces (); |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1034 |
} |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1035 |
|
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1036 |
void |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1037 |
LteHelper::EnableDlTxPhyTraces (void) |
7988
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
1038 |
{ |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1039 |
Config::Connect ("/NodeList/*/DeviceList/*/LteEnbPhy/DlPhyTransmission", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1040 |
MakeBoundCallback (&PhyTxStatsCalculator::DlPhyTransmissionCallback, m_phyTxStats)); |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1041 |
} |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1042 |
|
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1043 |
void |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1044 |
LteHelper::EnableUlTxPhyTraces (void) |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1045 |
{ |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1046 |
Config::Connect ("/NodeList/*/DeviceList/*/LteUePhy/UlPhyTransmission", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1047 |
MakeBoundCallback (&PhyTxStatsCalculator::UlPhyTransmissionCallback, m_phyTxStats)); |
7988
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
1048 |
} |
ee5607f36acd
Refactoring to align trace sinks for RLC and MAC implementations and to make them more user friendly.
jnin
parents:
7987
diff
changeset
|
1049 |
|
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1050 |
void |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1051 |
LteHelper::EnableDlRxPhyTraces (void) |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1052 |
{ |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1053 |
Config::Connect ("/NodeList/*/DeviceList/*/LteUePhy/DlSpectrumPhy/DlPhyReception", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1054 |
MakeBoundCallback (&PhyRxStatsCalculator::DlPhyReceptionCallback, m_phyRxStats)); |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1055 |
} |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1056 |
|
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1057 |
void |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1058 |
LteHelper::EnableUlRxPhyTraces (void) |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1059 |
{ |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1060 |
Config::Connect ("/NodeList/*/DeviceList/*/LteEnbPhy/UlSpectrumPhy/UlPhyReception", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1061 |
MakeBoundCallback (&PhyRxStatsCalculator::UlPhyReceptionCallback, m_phyRxStats)); |
9519
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1062 |
} |
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1063 |
|
fc6e45584ef4
Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9452
diff
changeset
|
1064 |
|
8161 | 1065 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
1066 |
LteHelper::EnableMacTraces (void) |
8161 | 1067 |
{ |
1068 |
EnableDlMacTraces (); |
|
1069 |
EnableUlMacTraces (); |
|
1070 |
} |
|
1071 |
||
1072 |
||
1073 |
void |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
1074 |
LteHelper::EnableDlMacTraces (void) |
8161 | 1075 |
{ |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1076 |
NS_LOG_FUNCTION_NOARGS (); |
8163
b42183b55d4f
fixed bug in connection of MAC and RLC traces
Nicola Baldo <nbaldo@cttc.es>
parents:
8161
diff
changeset
|
1077 |
Config::Connect ("/NodeList/*/DeviceList/*/LteEnbMac/DlScheduling", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1078 |
MakeBoundCallback (&MacStatsCalculator::DlSchedulingCallback, m_macStats)); |
8161 | 1079 |
} |
1080 |
||
1081 |
void |
|
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
1082 |
LteHelper::EnableUlMacTraces (void) |
8161 | 1083 |
{ |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1084 |
NS_LOG_FUNCTION_NOARGS (); |
8163
b42183b55d4f
fixed bug in connection of MAC and RLC traces
Nicola Baldo <nbaldo@cttc.es>
parents:
8161
diff
changeset
|
1085 |
Config::Connect ("/NodeList/*/DeviceList/*/LteEnbMac/UlScheduling", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1086 |
MakeBoundCallback (&MacStatsCalculator::UlSchedulingCallback, m_macStats)); |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1087 |
} |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1088 |
|
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1089 |
void |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1090 |
LteHelper::EnableDlPhyTraces (void) |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1091 |
{ |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1092 |
NS_LOG_FUNCTION_NOARGS (); |
9390
d51829659a57
Change RSRQ stats for average SINR ones
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9389
diff
changeset
|
1093 |
Config::Connect ("/NodeList/*/DeviceList/*/LteUePhy/ReportCurrentCellRsrpSinr", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1094 |
MakeBoundCallback (&PhyStatsCalculator::ReportCurrentCellRsrpSinrCallback, m_phyStats)); |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1095 |
} |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1096 |
|
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1097 |
void |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1098 |
LteHelper::EnableUlPhyTraces (void) |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1099 |
{ |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1100 |
NS_LOG_FUNCTION_NOARGS (); |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1101 |
Config::Connect ("/NodeList/*/DeviceList/*/LteEnbPhy/ReportUeSinr", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1102 |
MakeBoundCallback (&PhyStatsCalculator::ReportUeSinr, m_phyStats)); |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1103 |
Config::Connect ("/NodeList/*/DeviceList/*/LteEnbPhy/ReportInterference", |
10094
6dec20ed6ed1
moved stats-related callbacks from LteHelper to the appropriate StatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
10088
diff
changeset
|
1104 |
MakeBoundCallback (&PhyStatsCalculator::ReportInterference, m_phyStats)); |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1105 |
|
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1106 |
} |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9357
diff
changeset
|
1107 |
|
8461
71ddd85a693b
RlcStatsCalculator --> RadioBearerStatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
8460
diff
changeset
|
1108 |
Ptr<RadioBearerStatsCalculator> |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
1109 |
LteHelper::GetRlcStats (void) |
8007 | 1110 |
{ |
8151
c4bf0eb55569
member variables of LenaHelper to follow naming convention
Nicola Baldo <nbaldo@cttc.es>
parents:
8149
diff
changeset
|
1111 |
return m_rlcStats; |
8007 | 1112 |
} |
1113 |
||
8402 | 1114 |
void |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
1115 |
LteHelper::EnablePdcpTraces (void) |
8402 | 1116 |
{ |
9669
eb758c67f9f2
fixed Bug 1587 - PDCP logs are always created (even if not requested)
Nicola Baldo <nbaldo@cttc.es>
parents:
9617
diff
changeset
|
1117 |
NS_ASSERT_MSG (m_pdcpStats == 0, "please make sure that LteHelper::EnablePdcpTraces is called at most once"); |
eb758c67f9f2
fixed Bug 1587 - PDCP logs are always created (even if not requested)
Nicola Baldo <nbaldo@cttc.es>
parents:
9617
diff
changeset
|
1118 |
m_pdcpStats = CreateObject<RadioBearerStatsCalculator> ("PDCP"); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9446
diff
changeset
|
1119 |
m_radioBearerStatsConnector.EnablePdcpStats (m_pdcpStats); |
8402 | 1120 |
} |
1121 |
||
8461
71ddd85a693b
RlcStatsCalculator --> RadioBearerStatsCalculator
Nicola Baldo <nbaldo@cttc.es>
parents:
8460
diff
changeset
|
1122 |
Ptr<RadioBearerStatsCalculator> |
8460
fbb53bda0ec7
renamed LenaHelper --> LteHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
8451
diff
changeset
|
1123 |
LteHelper::GetPdcpStats (void) |
8402 | 1124 |
{ |
1125 |
return m_pdcpStats; |
|
1126 |
} |
|
1127 |
||
7886 | 1128 |
} // namespace ns3 |