author | Peter D. Barnes, Jr. <barnes26@llnl.gov> |
Fri, 26 Sep 2014 15:51:00 -0700 | |
changeset 10968 | 2d29fee2b7b8 |
parent 10652 | dc18deba4502 |
permissions | -rw-r--r-- |
6705 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License version 2 as |
|
7 |
* published by the Free Software Foundation; |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
* |
|
18 |
* Author: Giuseppe Piro <g.piro@poliba.it> |
|
7886 | 19 |
* Nicola Baldo <nbaldo@cttc.es> |
20 |
* Marco Miozzo <mmiozzo@cttc.es> |
|
6705 | 21 |
*/ |
22 |
||
23 |
#include "ns3/llc-snap-header.h" |
|
24 |
#include "ns3/simulator.h" |
|
25 |
#include "ns3/callback.h" |
|
26 |
#include "ns3/node.h" |
|
27 |
#include "ns3/packet.h" |
|
28 |
#include "lte-net-device.h" |
|
29 |
#include "ns3/packet-burst.h" |
|
30 |
#include "ns3/uinteger.h" |
|
31 |
#include "ns3/trace-source-accessor.h" |
|
32 |
#include "ns3/pointer.h" |
|
33 |
#include "ns3/enum.h" |
|
9327
6f8d10f0fb94
Add CellId info to X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8395
diff
changeset
|
34 |
#include "ns3/lte-enb-net-device.h" |
7887 | 35 |
#include "lte-ue-net-device.h" |
7886 | 36 |
#include "lte-ue-mac.h" |
37 |
#include "lte-ue-rrc.h" |
|
6705 | 38 |
#include "ns3/ipv4-header.h" |
39 |
#include "ns3/ipv4.h" |
|
7887 | 40 |
#include "lte-amc.h" |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
41 |
#include "lte-ue-phy.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
42 |
#include "epc-ue-nas.h" |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8167
diff
changeset
|
43 |
#include <ns3/ipv4-l3-protocol.h> |
8256
629982ba48a8
removed some useless inclusions of log.h
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
44 |
#include <ns3/log.h> |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
45 |
#include "epc-tft.h" |
6705 | 46 |
|
10968
2d29fee2b7b8
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10652
diff
changeset
|
47 |
namespace ns3 { |
6705 | 48 |
|
10968
2d29fee2b7b8
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10652
diff
changeset
|
49 |
NS_LOG_COMPONENT_DEFINE ("LteUeNetDevice"); |
6705 | 50 |
|
10652
dc18deba4502
[doxygen] Revert r10410, r10411, r10412
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10410
diff
changeset
|
51 |
NS_OBJECT_ENSURE_REGISTERED ( LteUeNetDevice); |
6705 | 52 |
|
53 |
||
7887 | 54 |
TypeId LteUeNetDevice::GetTypeId (void) |
6705 | 55 |
{ |
56 |
static TypeId |
|
7252
c8200621e252
rerun check-style.py with uncrustify-0.58
Tom Henderson <tomh@tomh.org>
parents:
6852
diff
changeset
|
57 |
tid = |
7887 | 58 |
TypeId ("ns3::LteUeNetDevice") |
7954 | 59 |
.SetParent<LteNetDevice> () |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10289
diff
changeset
|
60 |
.AddConstructor<LteUeNetDevice> () |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10289
diff
changeset
|
61 |
.AddAttribute ("EpcUeNas", |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10289
diff
changeset
|
62 |
"The NAS associated to this UeNetDevice", |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10289
diff
changeset
|
63 |
PointerValue (), |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10289
diff
changeset
|
64 |
MakePointerAccessor (&LteUeNetDevice::m_nas), |
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10289
diff
changeset
|
65 |
MakePointerChecker <EpcUeNas> ()) |
7954 | 66 |
.AddAttribute ("LteUeRrc", |
67 |
"The RRC associated to this UeNetDevice", |
|
68 |
PointerValue (), |
|
69 |
MakePointerAccessor (&LteUeNetDevice::m_rrc), |
|
70 |
MakePointerChecker <LteUeRrc> ()) |
|
8329 | 71 |
.AddAttribute ("LteUeMac", |
72 |
"The MAC associated to this UeNetDevice", |
|
73 |
PointerValue (), |
|
74 |
MakePointerAccessor (&LteUeNetDevice::m_mac), |
|
75 |
MakePointerChecker <LteUeMac> ()) |
|
76 |
.AddAttribute ("LteUePhy", |
|
77 |
"The PHY associated to this UeNetDevice", |
|
78 |
PointerValue (), |
|
79 |
MakePointerAccessor (&LteUeNetDevice::m_phy), |
|
80 |
MakePointerChecker <LteUePhy> ()) |
|
9172
2d6235af7a36
uncommented LteUeNetDevice::Imsi attribute
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
81 |
.AddAttribute ("Imsi", |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
82 |
"International Mobile Subscriber Identity assigned to this UE", |
10297
83fa90a74a4a
Using ObjectFactory in LteHelper for LteUeNetDevice
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10289
diff
changeset
|
83 |
UintegerValue (0), |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
84 |
MakeUintegerAccessor (&LteUeNetDevice::m_imsi), |
9172
2d6235af7a36
uncommented LteUeNetDevice::Imsi attribute
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
85 |
MakeUintegerChecker<uint64_t> ()) |
10289
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
86 |
.AddAttribute ("DlEarfcn", |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
87 |
"Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) " |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
88 |
"as per 3GPP 36.101 Section 5.7.3. ", |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
89 |
UintegerValue (100), |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
90 |
MakeUintegerAccessor (&LteUeNetDevice::SetDlEarfcn, |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
91 |
&LteUeNetDevice::GetDlEarfcn), |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
92 |
MakeUintegerChecker<uint16_t> (0, 6149)) |
10382
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
93 |
.AddAttribute ("CsgId", |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
94 |
"The Closed Subscriber Group (CSG) identity that this UE is associated with, " |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
95 |
"i.e., giving the UE access to cells which belong to this particular CSG. " |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
96 |
"This restriction only applies to initial cell selection and EPC-enabled simulation. " |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
97 |
"This does not revoke the UE's access to non-CSG cells. ", |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
98 |
UintegerValue (0), |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
99 |
MakeUintegerAccessor (&LteUeNetDevice::SetCsgId, |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
100 |
&LteUeNetDevice::GetCsgId), |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
101 |
MakeUintegerChecker<uint32_t> ()) |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
102 |
; |
7954 | 103 |
|
6705 | 104 |
return tid; |
105 |
} |
|
106 |
||
107 |
||
7887 | 108 |
LteUeNetDevice::LteUeNetDevice (void) |
10382
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
109 |
: m_isConstructed (false) |
6705 | 110 |
{ |
111 |
NS_LOG_FUNCTION (this); |
|
112 |
} |
|
113 |
||
7887 | 114 |
LteUeNetDevice::~LteUeNetDevice (void) |
6705 | 115 |
{ |
116 |
NS_LOG_FUNCTION (this); |
|
6710
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6709
diff
changeset
|
117 |
} |
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6709
diff
changeset
|
118 |
|
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6709
diff
changeset
|
119 |
void |
7887 | 120 |
LteUeNetDevice::DoDispose (void) |
6710
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6709
diff
changeset
|
121 |
{ |
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6709
diff
changeset
|
122 |
NS_LOG_FUNCTION (this); |
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6709
diff
changeset
|
123 |
m_targetEnb = 0; |
7921 | 124 |
m_mac->Dispose (); |
125 |
m_mac = 0; |
|
126 |
m_rrc->Dispose (); |
|
127 |
m_rrc = 0; |
|
128 |
m_phy->Dispose (); |
|
129 |
m_phy = 0; |
|
9370
3d5962a58440
Dispose EpcUeNas within LteUeNetDevice
Nicola Baldo <nbaldo@cttc.es>
parents:
9338
diff
changeset
|
130 |
m_nas->Dispose (); |
3d5962a58440
Dispose EpcUeNas within LteUeNetDevice
Nicola Baldo <nbaldo@cttc.es>
parents:
9338
diff
changeset
|
131 |
m_nas = 0; |
6709
4f3100141560
fixed some valgrind errors
Giuseppe Piro <g.piro@poliba.it>
parents:
6705
diff
changeset
|
132 |
LteNetDevice::DoDispose (); |
6705 | 133 |
} |
134 |
||
135 |
void |
|
7945
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7924
diff
changeset
|
136 |
LteUeNetDevice::UpdateConfig (void) |
6705 | 137 |
{ |
138 |
NS_LOG_FUNCTION (this); |
|
10382
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
139 |
|
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
140 |
if (m_isConstructed) |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
141 |
{ |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
142 |
NS_LOG_LOGIC (this << " Updating configuration: IMSI " << m_imsi |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
143 |
<< " CSG ID " << m_csgId); |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
144 |
m_nas->SetImsi (m_imsi); |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
145 |
m_rrc->SetImsi (m_imsi); |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
146 |
m_nas->SetCsgId (m_csgId); // this also handles propagation to RRC |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
147 |
} |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
148 |
else |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
149 |
{ |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
150 |
/* |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
151 |
* NAS and RRC instances are not be ready yet, so do nothing now and |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
152 |
* expect ``DoInitialize`` to re-invoke this function. |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
153 |
*/ |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
154 |
} |
6705 | 155 |
} |
156 |
||
157 |
||
7886 | 158 |
|
159 |
Ptr<LteUeMac> |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
160 |
LteUeNetDevice::GetMac (void) const |
6705 | 161 |
{ |
162 |
NS_LOG_FUNCTION (this); |
|
7886 | 163 |
return m_mac; |
6705 | 164 |
} |
165 |
||
166 |
||
7886 | 167 |
Ptr<LteUeRrc> |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
168 |
LteUeNetDevice::GetRrc (void) const |
6705 | 169 |
{ |
170 |
NS_LOG_FUNCTION (this); |
|
7886 | 171 |
return m_rrc; |
6705 | 172 |
} |
173 |
||
174 |
||
7887 | 175 |
Ptr<LteUePhy> |
176 |
LteUeNetDevice::GetPhy (void) const |
|
7886 | 177 |
{ |
178 |
NS_LOG_FUNCTION (this); |
|
179 |
return m_phy; |
|
180 |
} |
|
181 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
182 |
Ptr<EpcUeNas> |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
183 |
LteUeNetDevice::GetNas (void) const |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
184 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
185 |
NS_LOG_FUNCTION (this); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
186 |
return m_nas; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
187 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
188 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
189 |
uint64_t |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
190 |
LteUeNetDevice::GetImsi () const |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
191 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
192 |
NS_LOG_FUNCTION (this); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
193 |
return m_imsi; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
194 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
195 |
|
10289
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
196 |
uint16_t |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
197 |
LteUeNetDevice::GetDlEarfcn () const |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
198 |
{ |
10372
c334a429efaa
Added missing NS_LOG_FUNCTION to some LTE module files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
199 |
NS_LOG_FUNCTION (this); |
10289
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
200 |
return m_dlEarfcn; |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
201 |
} |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
202 |
|
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
203 |
void |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
204 |
LteUeNetDevice::SetDlEarfcn (uint16_t earfcn) |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
205 |
{ |
10372
c334a429efaa
Added missing NS_LOG_FUNCTION to some LTE module files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
206 |
NS_LOG_FUNCTION (this << earfcn); |
10289
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
207 |
m_dlEarfcn = earfcn; |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
208 |
} |
c2a694b5598c
DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9703
diff
changeset
|
209 |
|
10382
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
210 |
uint32_t |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
211 |
LteUeNetDevice::GetCsgId () const |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
212 |
{ |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
213 |
NS_LOG_FUNCTION (this); |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
214 |
return m_csgId; |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
215 |
} |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
216 |
|
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
217 |
void |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
218 |
LteUeNetDevice::SetCsgId (uint32_t csgId) |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
219 |
{ |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
220 |
NS_LOG_FUNCTION (this << csgId); |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
221 |
m_csgId = csgId; |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
222 |
UpdateConfig (); // propagate the change down to NAS and RRC |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
223 |
} |
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
224 |
|
6705 | 225 |
void |
7887 | 226 |
LteUeNetDevice::SetTargetEnb (Ptr<LteEnbNetDevice> enb) |
6705 | 227 |
{ |
228 |
NS_LOG_FUNCTION (this << enb); |
|
229 |
m_targetEnb = enb; |
|
230 |
} |
|
231 |
||
232 |
||
7887 | 233 |
Ptr<LteEnbNetDevice> |
234 |
LteUeNetDevice::GetTargetEnb (void) |
|
6705 | 235 |
{ |
236 |
NS_LOG_FUNCTION (this); |
|
237 |
return m_targetEnb; |
|
238 |
} |
|
239 |
||
7976
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7955
diff
changeset
|
240 |
void |
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9653
diff
changeset
|
241 |
LteUeNetDevice::DoInitialize (void) |
7976
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7955
diff
changeset
|
242 |
{ |
8032 | 243 |
NS_LOG_FUNCTION (this); |
10382
0b19dd1e94f7
Converted CSG ID and CSG indication as attributes to LTE devices
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10372
diff
changeset
|
244 |
m_isConstructed = true; |
7976
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7955
diff
changeset
|
245 |
UpdateConfig (); |
9703
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9653
diff
changeset
|
246 |
m_phy->Initialize (); |
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9653
diff
changeset
|
247 |
m_mac->Initialize (); |
681f35b212ff
Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Miletić <rivanvx@gmail.com>
parents:
9653
diff
changeset
|
248 |
m_rrc->Initialize (); |
7976
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7955
diff
changeset
|
249 |
} |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7955
diff
changeset
|
250 |
|
6705 | 251 |
bool |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8167
diff
changeset
|
252 |
LteUeNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber) |
6705 | 253 |
{ |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8167
diff
changeset
|
254 |
NS_LOG_FUNCTION (this << dest << protocolNumber); |
9888
ba0cc8987365
log msg instead of fail when non-IPv4 pkt is sent over LteUeNetDevice
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents:
9703
diff
changeset
|
255 |
if (protocolNumber != Ipv4L3Protocol::PROT_NUMBER) |
ba0cc8987365
log msg instead of fail when non-IPv4 pkt is sent over LteUeNetDevice
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents:
9703
diff
changeset
|
256 |
{ |
ba0cc8987365
log msg instead of fail when non-IPv4 pkt is sent over LteUeNetDevice
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents:
9703
diff
changeset
|
257 |
NS_LOG_INFO("unsupported protocol " << protocolNumber << ", only IPv4 is supported"); |
ba0cc8987365
log msg instead of fail when non-IPv4 pkt is sent over LteUeNetDevice
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents:
9703
diff
changeset
|
258 |
return true; |
ba0cc8987365
log msg instead of fail when non-IPv4 pkt is sent over LteUeNetDevice
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents:
9703
diff
changeset
|
259 |
} |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8395
diff
changeset
|
260 |
return m_nas->Send (packet); |
6705 | 261 |
} |
262 |
||
263 |
||
264 |
} // namespace ns3 |