author | Nicola Baldo <nbaldo@cttc.es> |
Fri, 04 Nov 2011 13:29:20 +0000 | |
changeset 8389 | cb215987eb77 |
parent 8156 | 7933ae8fcfc6 |
child 8390 | fb2bef5bb0e2 |
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> |
|
19 |
*/ |
|
20 |
||
21 |
#include <ns3/fatal-error.h> |
|
22 |
#include <ns3/log.h> |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
23 |
#include <ns3/abort.h> |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
24 |
#include "ns3/pointer.h" |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
25 |
#include "ns3/object-map.h" |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
26 |
#include "ns3/object-factory.h" |
7886 | 27 |
|
28 |
#include "lte-enb-rrc.h" |
|
29 |
#include "lte-rlc.h" |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
30 |
#include "lte-pdcp.h" |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
31 |
#include "lte-pdcp-sap.h" |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
32 |
#include "lte-radio-bearer-info.h" |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
33 |
#include "lte-mac-tag.h" |
7886 | 34 |
|
35 |
NS_LOG_COMPONENT_DEFINE ("LteEnbRrc"); |
|
36 |
||
37 |
namespace ns3 { |
|
38 |
||
39 |
||
40 |
||
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
41 |
|
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
42 |
|
7886 | 43 |
// /////////////////////////// |
44 |
// CMAC SAP forwarder |
|
45 |
// /////////////////////////// |
|
46 |
||
7888 | 47 |
class EnbRrcMemberLteEnbCmacSapUser : public LteEnbCmacSapUser |
7886 | 48 |
{ |
49 |
public: |
|
7888 | 50 |
EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc); |
7886 | 51 |
|
52 |
virtual void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success); |
|
53 |
||
54 |
private: |
|
55 |
LteEnbRrc* m_rrc; |
|
56 |
}; |
|
57 |
||
7888 | 58 |
EnbRrcMemberLteEnbCmacSapUser::EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc) |
7886 | 59 |
: m_rrc (rrc) |
60 |
{ |
|
61 |
} |
|
62 |
||
63 |
void |
|
7888 | 64 |
EnbRrcMemberLteEnbCmacSapUser::NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) |
7886 | 65 |
{ |
66 |
m_rrc->DoNotifyLcConfigResult (rnti, lcid, success); |
|
67 |
} |
|
68 |
||
69 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
70 |
//////////////////////////////// |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
71 |
// PDCP SAP Forwarder |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
72 |
//////////////////////////////// |
7886 | 73 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
74 |
// not needed any more if the template works |
7886 | 75 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
76 |
// class EnbRrcMemberLtePdcpSapUser : public LtePdcpSapUser |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
77 |
// { |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
78 |
// public: |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
79 |
// MemberLtePdcpSapUser (LteEnbRrc* rrc); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
80 |
// virtual void ReceiveRrcPdu (Ptr<Packet> p); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
81 |
// private: |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
82 |
// LteEnbRrc* m_rrc; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
83 |
// }; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
84 |
|
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
85 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
86 |
// EnbRrcMemberLtePdcpSapUser::EnbRrcMemberLtePdcpSapUser (LteEnbRrc* rrc) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
87 |
// : m_rrc (rrc) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
88 |
// { |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
89 |
// } |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
90 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
91 |
// void EnbRrcMemberLtePdcpSapUser::ReceiveRrcPdu (Ptr<Packet> p) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
92 |
// { |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
93 |
// m_rrc->DoReceiveRrcPdu (p); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
94 |
// } |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
95 |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
96 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
97 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
98 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
99 |
/////////////////////////////////////////// |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
100 |
// UeInfo |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
101 |
/////////////////////////////////////////// |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
102 |
|
7886 | 103 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
104 |
NS_OBJECT_ENSURE_REGISTERED (UeInfo); |
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
105 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
106 |
UeInfo::UeInfo (void) |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
107 |
: m_lastAllocatedId (0) |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
108 |
{ |
8007 | 109 |
m_imsi = 0; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
110 |
} |
7886 | 111 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
112 |
UeInfo::UeInfo (uint64_t imsi) |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
113 |
: m_lastAllocatedId (0) |
8007 | 114 |
{ |
115 |
m_imsi = imsi; |
|
116 |
} |
|
117 |
||
118 |
||
119 |
||
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
120 |
UeInfo::~UeInfo (void) |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
121 |
{ |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
122 |
// Nothing to do here |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
123 |
} |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
124 |
|
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
125 |
TypeId UeInfo::GetTypeId (void) |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
126 |
{ |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
127 |
static TypeId tid = TypeId ("ns3::UeInfo") |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
128 |
.SetParent<Object> () |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
129 |
.AddConstructor<UeInfo> () |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
130 |
.AddAttribute ("RadioBearerMap", "List of UE RadioBearerInfo by LCID.", |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
131 |
ObjectMapValue (), |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
132 |
MakeObjectMapAccessor (&UeInfo::m_rbMap), |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
133 |
MakeObjectMapChecker<LteRadioBearerInfo> ()) |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
134 |
; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
135 |
return tid; |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
136 |
} |
7886 | 137 |
|
8007 | 138 |
uint64_t |
139 |
UeInfo::GetImsi (void) |
|
140 |
{ |
|
141 |
return m_imsi; |
|
142 |
} |
|
143 |
||
7886 | 144 |
uint8_t |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
145 |
UeInfo::AddRadioBearer (Ptr<LteRadioBearerInfo> rbi) |
7886 | 146 |
{ |
147 |
NS_LOG_FUNCTION (this); |
|
148 |
for (uint8_t lcid = m_lastAllocatedId; lcid != m_lastAllocatedId - 1; ++lcid) |
|
149 |
{ |
|
150 |
if (lcid != 0) |
|
151 |
{ |
|
152 |
if (m_rbMap.find (lcid) == m_rbMap.end ()) |
|
153 |
{ |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
154 |
m_rbMap.insert (std::pair<uint8_t, Ptr<LteRadioBearerInfo> > (lcid, rbi)); |
7886 | 155 |
m_lastAllocatedId = lcid; |
156 |
return lcid; |
|
157 |
} |
|
158 |
} |
|
159 |
} |
|
160 |
NS_LOG_WARN ("no more logical channel ids available"); |
|
161 |
return 0; |
|
162 |
} |
|
163 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
164 |
Ptr<LteRadioBearerInfo> |
8152
325396a9f9bf
fixed misspelling in UeInfo::GetRadioBearer
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
165 |
UeInfo::GetRadioBearer (uint8_t lcid) |
7886 | 166 |
{ |
167 |
NS_LOG_FUNCTION (this << (uint32_t) lcid); |
|
168 |
NS_ASSERT (0 != lcid); |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
169 |
std::map<uint8_t, Ptr<LteRadioBearerInfo> >::iterator it = m_rbMap.find (lcid); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
170 |
NS_ABORT_IF (it == m_rbMap.end ()); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
171 |
return it->second; |
7886 | 172 |
} |
173 |
||
174 |
||
175 |
void |
|
176 |
UeInfo::RemoveRadioBearer (uint8_t lcid) |
|
177 |
{ |
|
178 |
NS_LOG_FUNCTION (this << (uint32_t) lcid); |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
179 |
std::map <uint8_t, Ptr<LteRadioBearerInfo> >::iterator it = m_rbMap.find (lcid); |
7886 | 180 |
NS_ASSERT_MSG (it != m_rbMap.end (), "request to remove radio bearer with unknown lcid " << lcid); |
181 |
m_rbMap.erase (it); |
|
182 |
} |
|
183 |
||
184 |
||
185 |
||
186 |
||
187 |
||
188 |
// /////////////////////////// |
|
189 |
// eNB RRC methods |
|
190 |
// /////////////////////////// |
|
191 |
||
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
192 |
NS_OBJECT_ENSURE_REGISTERED (LteEnbRrc); |
7886 | 193 |
|
194 |
LteEnbRrc::LteEnbRrc () |
|
195 |
: m_cmacSapProvider (0), |
|
196 |
m_ffMacSchedSapProvider (0), |
|
197 |
m_macSapProvider (0), |
|
198 |
m_configured (false), |
|
199 |
m_lastAllocatedRnti (0) |
|
200 |
{ |
|
201 |
NS_LOG_FUNCTION (this); |
|
7888 | 202 |
m_cmacSapUser = new EnbRrcMemberLteEnbCmacSapUser (this); |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
203 |
m_pdcpSapUser = new LtePdcpSpecificLtePdcpSapUser<LteEnbRrc> (this); |
7886 | 204 |
} |
205 |
||
206 |
||
207 |
LteEnbRrc::~LteEnbRrc () |
|
208 |
{ |
|
209 |
NS_LOG_FUNCTION (this); |
|
210 |
} |
|
211 |
||
212 |
||
213 |
void |
|
214 |
LteEnbRrc::DoDispose () |
|
215 |
{ |
|
216 |
NS_LOG_FUNCTION (this); |
|
217 |
delete m_cmacSapUser; |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
218 |
delete m_pdcpSapUser; |
7886 | 219 |
} |
220 |
||
221 |
TypeId |
|
222 |
LteEnbRrc::GetTypeId (void) |
|
223 |
{ |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
224 |
NS_LOG_FUNCTION ("LteEnbRrc::GetTypeId"); |
7886 | 225 |
static TypeId tid = TypeId ("ns3::LteEnbRrc") |
226 |
.SetParent<Object> () |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
227 |
.AddConstructor<LteEnbRrc> () |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
228 |
.AddAttribute ("UeMap", "List of UE Info by C-RNTI.", |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
229 |
ObjectMapValue (), |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
230 |
MakeObjectMapAccessor (&LteEnbRrc::m_ueMap), |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
231 |
MakeObjectMapChecker<UeInfo> ()) |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
232 |
; |
7886 | 233 |
return tid; |
234 |
} |
|
235 |
||
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
236 |
uint16_t |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
237 |
LteEnbRrc::GetLastAllocatedRnti () const |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
238 |
{ |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
239 |
NS_LOG_FUNCTION (this); |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
240 |
return m_lastAllocatedRnti; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
241 |
} |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
242 |
std::map<uint16_t,Ptr<UeInfo> > LteEnbRrc::GetUeMap (void) const |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
243 |
{ |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
244 |
return m_ueMap; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
245 |
} |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
246 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
247 |
void LteEnbRrc::SetUeMap (std::map<uint16_t,Ptr<UeInfo> > ueMap) |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
248 |
{ |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
249 |
this->m_ueMap = ueMap; |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
250 |
} |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
251 |
|
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
252 |
|
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
253 |
void |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
254 |
LteEnbRrc::SetLastAllocatedRnti (uint16_t lastAllocatedRnti) |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
255 |
{ |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
256 |
NS_LOG_FUNCTION (this << lastAllocatedRnti); |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
257 |
m_lastAllocatedRnti = lastAllocatedRnti; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
258 |
} |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
259 |
|
7886 | 260 |
|
261 |
||
262 |
void |
|
263 |
LteEnbRrc::SetLteEnbCmacSapProvider (LteEnbCmacSapProvider * s) |
|
264 |
{ |
|
265 |
NS_LOG_FUNCTION (this << s); |
|
266 |
m_cmacSapProvider = s; |
|
267 |
} |
|
268 |
||
269 |
LteEnbCmacSapUser* |
|
270 |
LteEnbRrc::GetLteEnbCmacSapUser () |
|
271 |
{ |
|
272 |
NS_LOG_FUNCTION (this); |
|
273 |
return m_cmacSapUser; |
|
274 |
} |
|
275 |
||
276 |
void |
|
277 |
LteEnbRrc::SetFfMacSchedSapProvider (FfMacSchedSapProvider * s) |
|
278 |
{ |
|
279 |
NS_LOG_FUNCTION (this); |
|
280 |
m_ffMacSchedSapProvider = s; |
|
281 |
} |
|
282 |
||
283 |
||
284 |
void |
|
285 |
LteEnbRrc::SetLteMacSapProvider (LteMacSapProvider * s) |
|
286 |
{ |
|
287 |
NS_LOG_FUNCTION (this); |
|
288 |
m_macSapProvider = s; |
|
289 |
} |
|
290 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
291 |
LtePdcpSapProvider* |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
292 |
LteEnbRrc::GetLtePdcpSapProvider (uint16_t rnti, uint8_t lcid) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
293 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
294 |
return GetUeInfo (rnti)->GetRadioBearer (lcid)->m_pdcp->GetLtePdcpSapProvider (); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
295 |
} |
7886 | 296 |
|
297 |
void |
|
298 |
LteEnbRrc::ConfigureCell (uint8_t ulBandwidth, uint8_t dlBandwidth) |
|
299 |
{ |
|
300 |
NS_LOG_FUNCTION (this); |
|
301 |
NS_ASSERT (!m_configured); |
|
302 |
m_cmacSapProvider->ConfigureMac (ulBandwidth, dlBandwidth); |
|
303 |
m_configured = true; |
|
304 |
} |
|
305 |
||
306 |
uint16_t |
|
8007 | 307 |
LteEnbRrc::AddUe (uint64_t imsi) |
7886 | 308 |
{ |
8032 | 309 |
NS_LOG_FUNCTION (this << imsi); |
7886 | 310 |
// no Call Admission Control for now |
8007 | 311 |
uint16_t rnti = CreateUeInfo (imsi); // side effect: create UeInfo for this UE |
7886 | 312 |
NS_ASSERT_MSG (rnti != 0, "CreateUeInfo returned RNTI==0"); |
313 |
m_cmacSapProvider->AddUe (rnti); |
|
314 |
return rnti; |
|
315 |
} |
|
316 |
||
317 |
void |
|
318 |
LteEnbRrc::RemoveUe (uint16_t rnti) |
|
319 |
{ |
|
320 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
321 |
RemoveUeInfo (rnti); |
|
322 |
NS_FATAL_ERROR ("missing RemoveUe method in CMAC SAP"); |
|
323 |
} |
|
324 |
||
325 |
uint8_t |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
326 |
LteEnbRrc::SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId) |
7886 | 327 |
{ |
328 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
329 |
Ptr<UeInfo> ueInfo = GetUeInfo (rnti); |
|
330 |
||
331 |
// create RLC instance |
|
332 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
333 |
ObjectFactory rlcObjectFactory; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
334 |
rlcObjectFactory.SetTypeId (rlcTypeId); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
335 |
Ptr<LteRlc> rlc = rlcObjectFactory.Create ()->GetObject<LteRlc> (); |
7886 | 336 |
rlc->SetLteMacSapProvider (m_macSapProvider); |
337 |
rlc->SetRnti (rnti); |
|
338 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
339 |
Ptr<LteRadioBearerInfo> rbInfo = CreateObject<LteRadioBearerInfo> (); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
340 |
rbInfo->m_rlc = rlc; |
7886 | 341 |
uint8_t lcid = ueInfo->AddRadioBearer (rbInfo); |
342 |
rlc->SetLcId (lcid); |
|
343 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
344 |
// we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
345 |
// if we are using RLC/SM we don't care of anything above RLC |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
346 |
if (rlcTypeId != LteRlcSm::GetTypeId ()) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
347 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
348 |
Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
349 |
pdcp->SetRnti (rnti); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
350 |
pdcp->SetLcId (lcid); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
351 |
pdcp->SetLtePdcpSapUser (m_pdcpSapUser); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
352 |
pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
353 |
rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
354 |
rbInfo->m_pdcp = pdcp; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
355 |
} |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
356 |
|
7886 | 357 |
LteEnbCmacSapProvider::LcInfo lcinfo; |
358 |
lcinfo.rnti = rnti; |
|
359 |
lcinfo.lcId = lcid; |
|
360 |
lcinfo.lcGroup = 0; // TBD |
|
361 |
lcinfo.qci = bearer.qci; |
|
362 |
lcinfo.isGbr = bearer.IsGbr (); |
|
363 |
lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl; |
|
364 |
lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl; |
|
365 |
lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl; |
|
366 |
lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl; |
|
367 |
m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
|
368 |
||
369 |
return lcid; |
|
370 |
} |
|
371 |
||
372 |
void |
|
373 |
LteEnbRrc::ReleaseRadioBearer (uint16_t rnti, uint8_t lcId) |
|
374 |
{ |
|
375 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
376 |
Ptr<UeInfo> ueInfo = GetUeInfo (rnti); |
|
377 |
ueInfo->RemoveRadioBearer (lcId); |
|
378 |
} |
|
379 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
380 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
381 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
382 |
bool |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
383 |
LteEnbRrc::Send (Ptr<Packet> packet) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
384 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
385 |
NS_LOG_FUNCTION (this << packet); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
386 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
387 |
LteMacTag tag; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
388 |
bool found = packet->RemovePacketTag (tag); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
389 |
NS_ASSERT (found); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
390 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
391 |
LtePdcpSapProvider::TransmitRrcPduParameters params; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
392 |
params.rrcPdu = packet; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
393 |
params.rnti = tag.GetRnti (); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
394 |
params.lcid = tag.GetLcid (); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
395 |
LtePdcpSapProvider* pdcpSapProvider = GetLtePdcpSapProvider (tag.GetRnti (), tag.GetLcid ()); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
396 |
pdcpSapProvider->TransmitRrcPdu (params); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
397 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
398 |
return true; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
399 |
} |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
400 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
401 |
void |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
402 |
LteEnbRrc::SetForwardUpCallback (Callback <void, Ptr<Packet> > cb) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
403 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
404 |
m_forwardUpCallback = cb; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
405 |
} |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
406 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
407 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
408 |
void |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
409 |
LteEnbRrc::DoReceiveRrcPdu (LtePdcpSapUser::ReceiveRrcPduParameters params) |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
410 |
{ |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
411 |
NS_LOG_FUNCTION (this); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
412 |
// this tag is needed by the EpcEnbApplication to determine the S1 bearer that corresponds to this radio bearer |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
413 |
LteMacTag tag; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
414 |
tag.SetRnti (params.rnti); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
415 |
tag.SetLcid (params.lcid); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
416 |
params.rrcPdu->AddPacketTag (tag); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
417 |
m_forwardUpCallback (params.rrcPdu); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
418 |
} |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
419 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
420 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
421 |
|
7886 | 422 |
void |
423 |
LteEnbRrc::DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) |
|
424 |
{ |
|
425 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
426 |
NS_FATAL_ERROR ("not implemented"); |
|
427 |
} |
|
428 |
||
429 |
||
430 |
||
431 |
// ///////////////////////////////////////// |
|
432 |
// management of multiple UE info instances |
|
433 |
// ///////////////////////////////////////// |
|
434 |
||
435 |
||
436 |
uint16_t |
|
8007 | 437 |
LteEnbRrc::CreateUeInfo (uint64_t imsi) |
7886 | 438 |
{ |
8032 | 439 |
NS_LOG_FUNCTION (this << imsi); |
7886 | 440 |
for (uint16_t rnti = m_lastAllocatedRnti; rnti != m_lastAllocatedRnti - 1; ++rnti) |
441 |
{ |
|
442 |
if (rnti != 0) |
|
443 |
{ |
|
444 |
if (m_ueMap.find (rnti) == m_ueMap.end ()) |
|
445 |
{ |
|
446 |
m_lastAllocatedRnti = rnti; |
|
8007 | 447 |
m_ueMap.insert (std::pair<uint16_t, Ptr<UeInfo> > (rnti, CreateObject<UeInfo> (imsi))); |
7886 | 448 |
return rnti; |
449 |
} |
|
450 |
} |
|
451 |
} |
|
452 |
return 0; |
|
453 |
} |
|
454 |
||
455 |
Ptr<UeInfo> |
|
456 |
LteEnbRrc::GetUeInfo (uint16_t rnti) |
|
457 |
{ |
|
458 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
459 |
NS_ASSERT (0 != rnti); |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
460 |
std::map<uint16_t, Ptr<UeInfo> >::iterator it = m_ueMap.find (rnti); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
461 |
NS_ABORT_IF (it == m_ueMap.end ()); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
462 |
return it->second; |
7886 | 463 |
} |
464 |
||
465 |
void |
|
466 |
LteEnbRrc::RemoveUeInfo (uint16_t rnti) |
|
467 |
{ |
|
468 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
469 |
std::map <uint16_t, Ptr<UeInfo> >::iterator it = m_ueMap.find (rnti); |
|
470 |
NS_ASSERT_MSG (it != m_ueMap.end (), "request to remove UE info with unknown rnti " << rnti); |
|
471 |
m_ueMap.erase (it); |
|
472 |
} |
|
473 |
||
474 |
||
475 |
||
476 |
||
477 |
||
478 |
} // namespace ns3 |
|
479 |