OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2014 Piotr Gawlowicz | 3 * Copyright (c) 2014 Piotr Gawlowicz |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "lte-fr-strict-algorithm.h" | 22 #include "lte-fr-strict-algorithm.h" |
23 #include <ns3/log.h> | 23 #include <ns3/log.h> |
24 #include "ns3/boolean.h" | 24 #include "ns3/boolean.h" |
25 | 25 |
26 namespace ns3 { | 26 namespace ns3 { |
27 | 27 |
28 NS_LOG_COMPONENT_DEFINE ("LteFrStrictAlgorithm"); | 28 NS_LOG_COMPONENT_DEFINE ("LteFrStrictAlgorithm"); |
29 | 29 |
30 NS_OBJECT_ENSURE_REGISTERED (LteFrStrictAlgorithm); | 30 NS_OBJECT_ENSURE_REGISTERED (LteFrStrictAlgorithm); |
31 | 31 |
| 32 /// FrStrictDownlinkDefaultConfiguration structure |
32 static const struct FrStrictDownlinkDefaultConfiguration | 33 static const struct FrStrictDownlinkDefaultConfiguration |
33 { | 34 { |
34 uint8_t cellId; | 35 uint8_t cellId; ///< cell ID |
35 uint8_t dlBandwidth; | 36 uint8_t dlBandwidth; ///< DL bandwidth |
36 uint8_t dlCommonSubBandwidth; | 37 uint8_t dlCommonSubBandwidth; ///< DL common subbandwidth |
37 uint8_t dlEgdeSubBandOffset; | 38 uint8_t dlEdgeSubBandOffset; ///< DL edge subband offset |
38 uint8_t dlEdgeSubBandwidth; | 39 uint8_t dlEdgeSubBandwidth; ///< DL edge subbandwidth |
39 } g_frStrictDownlinkDefaultConfiguration[] = { | 40 } g_frStrictDownlinkDefaultConfiguration[] = { |
40 { 1, 15, 2, 0, 4}, | 41 { 1, 15, 2, 0, 4}, |
41 { 2, 15, 2, 4, 4}, | 42 { 2, 15, 2, 4, 4}, |
42 { 3, 15, 2, 8, 4}, | 43 { 3, 15, 2, 8, 4}, |
43 { 1, 25, 6, 0, 6}, | 44 { 1, 25, 6, 0, 6}, |
44 { 2, 25, 6, 6, 6}, | 45 { 2, 25, 6, 6, 6}, |
45 { 3, 25, 6, 12, 6}, | 46 { 3, 25, 6, 12, 6}, |
46 { 1, 50, 21, 0, 9}, | 47 { 1, 50, 21, 0, 9}, |
47 { 2, 50, 21, 9, 9}, | 48 { 2, 50, 21, 9, 9}, |
48 { 3, 50, 21, 18, 11}, | 49 { 3, 50, 21, 18, 11}, |
49 { 1, 75, 36, 0, 12}, | 50 { 1, 75, 36, 0, 12}, |
50 { 2, 75, 36, 12, 12}, | 51 { 2, 75, 36, 12, 12}, |
51 { 3, 75, 36, 24, 15}, | 52 { 3, 75, 36, 24, 15}, |
52 { 1, 100, 28, 0, 24}, | 53 { 1, 100, 28, 0, 24}, |
53 { 2, 100, 28, 24, 24}, | 54 { 2, 100, 28, 24, 24}, |
54 { 3, 100, 28, 48, 24} | 55 { 3, 100, 28, 48, 24} |
55 }; | 56 }; ///< the strict downlink default configuration |
56 | 57 |
| 58 /// FrStrictUplinkDefaultConfiguration structure |
57 static const struct FrStrictUplinkDefaultConfiguration | 59 static const struct FrStrictUplinkDefaultConfiguration |
58 { | 60 { |
59 uint8_t cellId; | 61 uint8_t cellId; ///< cell ID |
60 uint8_t ulBandwidth; | 62 uint8_t ulBandwidth; ///< UL bandwidth |
61 uint8_t ulCommonSubBandwidth; | 63 uint8_t ulCommonSubBandwidth; ///< UL common subbandwidth |
62 uint8_t ulEgdeSubBandOffset; | 64 uint8_t ulEdgeSubBandOffset; ///< UL edge subband offset |
63 uint8_t ulEdgeSubBandwidth; | 65 uint8_t ulEdgeSubBandwidth; ///< UL edge subbandwidth |
64 } g_frStrictUplinkDefaultConfiguration[] = { | 66 } g_frStrictUplinkDefaultConfiguration[] = { |
65 { 1, 15, 3, 0, 4}, | 67 { 1, 15, 3, 0, 4}, |
66 { 2, 15, 3, 4, 4}, | 68 { 2, 15, 3, 4, 4}, |
67 { 3, 15, 3, 8, 4}, | 69 { 3, 15, 3, 8, 4}, |
68 { 1, 25, 6, 0, 6}, | 70 { 1, 25, 6, 0, 6}, |
69 { 2, 25, 6, 6, 6}, | 71 { 2, 25, 6, 6, 6}, |
70 { 3, 25, 6, 12, 6}, | 72 { 3, 25, 6, 12, 6}, |
71 { 1, 50, 21, 0, 9}, | 73 { 1, 50, 21, 0, 9}, |
72 { 2, 50, 21, 9, 9}, | 74 { 2, 50, 21, 9, 9}, |
73 { 3, 50, 21, 18, 11}, | 75 { 3, 50, 21, 18, 11}, |
74 { 1, 75, 36, 0, 12}, | 76 { 1, 75, 36, 0, 12}, |
75 { 2, 75, 36, 12, 12}, | 77 { 2, 75, 36, 12, 12}, |
76 { 3, 75, 36, 24, 15}, | 78 { 3, 75, 36, 24, 15}, |
77 { 1, 100, 28, 0, 24}, | 79 { 1, 100, 28, 0, 24}, |
78 { 2, 100, 28, 24, 24}, | 80 { 2, 100, 28, 24, 24}, |
79 { 3, 100, 28, 48, 24} | 81 { 3, 100, 28, 48, 24} |
80 }; | 82 }; ///< the strict uplink default configuration |
81 | 83 |
| 84 /// number of downlink configurations |
82 const uint16_t NUM_DOWNLINK_CONFS (sizeof (g_frStrictDownlinkDefaultConfiguratio
n) / sizeof (FrStrictDownlinkDefaultConfiguration)); | 85 const uint16_t NUM_DOWNLINK_CONFS (sizeof (g_frStrictDownlinkDefaultConfiguratio
n) / sizeof (FrStrictDownlinkDefaultConfiguration)); |
| 86 /// number of uplink configurations |
83 const uint16_t NUM_UPLINK_CONFS (sizeof (g_frStrictUplinkDefaultConfiguration) /
sizeof (FrStrictUplinkDefaultConfiguration)); | 87 const uint16_t NUM_UPLINK_CONFS (sizeof (g_frStrictUplinkDefaultConfiguration) /
sizeof (FrStrictUplinkDefaultConfiguration)); |
84 | 88 |
85 | 89 |
86 LteFrStrictAlgorithm::LteFrStrictAlgorithm () | 90 LteFrStrictAlgorithm::LteFrStrictAlgorithm () |
87 : m_ffrSapUser (0), | 91 : m_ffrSapUser (0), |
88 m_ffrRrcSapUser (0), | 92 m_ffrRrcSapUser (0), |
89 m_dlEgdeSubBandOffset (0), | 93 m_dlEdgeSubBandOffset (0), |
90 m_dlEdgeSubBandwidth (0), | 94 m_dlEdgeSubBandwidth (0), |
91 m_ulEgdeSubBandOffset (0), | 95 m_ulEdgeSubBandOffset (0), |
92 m_ulEdgeSubBandwidth (0), | 96 m_ulEdgeSubBandwidth (0), |
93 m_measId (0) | 97 m_measId (0) |
94 { | 98 { |
95 NS_LOG_FUNCTION (this); | 99 NS_LOG_FUNCTION (this); |
96 m_ffrSapProvider = new MemberLteFfrSapProvider<LteFrStrictAlgorithm> (this); | 100 m_ffrSapProvider = new MemberLteFfrSapProvider<LteFrStrictAlgorithm> (this); |
97 m_ffrRrcSapProvider = new MemberLteFfrRrcSapProvider<LteFrStrictAlgorithm> (th
is); | 101 m_ffrRrcSapProvider = new MemberLteFfrRrcSapProvider<LteFrStrictAlgorithm> (th
is); |
98 } | 102 } |
99 | 103 |
100 | 104 |
101 LteFrStrictAlgorithm::~LteFrStrictAlgorithm () | 105 LteFrStrictAlgorithm::~LteFrStrictAlgorithm () |
(...skipping 19 matching lines...) Expand all Loading... |
121 .SetGroupName("Lte") | 125 .SetGroupName("Lte") |
122 .AddConstructor<LteFrStrictAlgorithm> () | 126 .AddConstructor<LteFrStrictAlgorithm> () |
123 .AddAttribute ("UlCommonSubBandwidth", | 127 .AddAttribute ("UlCommonSubBandwidth", |
124 "Uplink Common SubBandwidth Configuration in number of Resour
ce Block Groups", | 128 "Uplink Common SubBandwidth Configuration in number of Resour
ce Block Groups", |
125 UintegerValue (25), | 129 UintegerValue (25), |
126 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_ulCommonSubBan
dwidth), | 130 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_ulCommonSubBan
dwidth), |
127 MakeUintegerChecker<uint8_t> ()) | 131 MakeUintegerChecker<uint8_t> ()) |
128 .AddAttribute ("UlEdgeSubBandOffset", | 132 .AddAttribute ("UlEdgeSubBandOffset", |
129 "Uplink Edge SubBand Offset in number of Resource Block Group
s", | 133 "Uplink Edge SubBand Offset in number of Resource Block Group
s", |
130 UintegerValue (0), | 134 UintegerValue (0), |
131 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_ulEgdeSubBandO
ffset), | 135 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_ulEdgeSubBandO
ffset), |
132 MakeUintegerChecker<uint8_t> ()) | 136 MakeUintegerChecker<uint8_t> ()) |
133 .AddAttribute ("UlEdgeSubBandwidth", | 137 .AddAttribute ("UlEdgeSubBandwidth", |
134 "Uplink Edge SubBandwidth Configuration in number of Resource
Block Groups", | 138 "Uplink Edge SubBandwidth Configuration in number of Resource
Block Groups", |
135 UintegerValue (0), | 139 UintegerValue (0), |
136 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_ulEdgeSubBandw
idth), | 140 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_ulEdgeSubBandw
idth), |
137 MakeUintegerChecker<uint8_t> ()) | 141 MakeUintegerChecker<uint8_t> ()) |
138 .AddAttribute ("DlCommonSubBandwidth", | 142 .AddAttribute ("DlCommonSubBandwidth", |
139 "Downlink Common SubBandwidth Configuration in number of Reso
urce Block Groups", | 143 "Downlink Common SubBandwidth Configuration in number of Reso
urce Block Groups", |
140 UintegerValue (25), | 144 UintegerValue (25), |
141 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_dlCommonSubBan
dwidth), | 145 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_dlCommonSubBan
dwidth), |
142 MakeUintegerChecker<uint8_t> ()) | 146 MakeUintegerChecker<uint8_t> ()) |
143 .AddAttribute ("DlEdgeSubBandOffset", | 147 .AddAttribute ("DlEdgeSubBandOffset", |
144 "Downlink Edge SubBand Offset in number of Resource Block Gro
ups", | 148 "Downlink Edge SubBand Offset in number of Resource Block Gro
ups", |
145 UintegerValue (0), | 149 UintegerValue (0), |
146 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_dlEgdeSubBandO
ffset), | 150 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_dlEdgeSubBandO
ffset), |
147 MakeUintegerChecker<uint8_t> ()) | 151 MakeUintegerChecker<uint8_t> ()) |
148 .AddAttribute ("DlEdgeSubBandwidth", | 152 .AddAttribute ("DlEdgeSubBandwidth", |
149 "Downlink Edge SubBandwidth Configuration in number of Resour
ce Block Groups", | 153 "Downlink Edge SubBandwidth Configuration in number of Resour
ce Block Groups", |
150 UintegerValue (0), | 154 UintegerValue (0), |
151 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_dlEdgeSubBandw
idth), | 155 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_dlEdgeSubBandw
idth), |
152 MakeUintegerChecker<uint8_t> ()) | 156 MakeUintegerChecker<uint8_t> ()) |
153 .AddAttribute ("RsrqThreshold", | 157 .AddAttribute ("RsrqThreshold", |
154 "If the RSRQ of is worse than this threshold, UE should be se
rved in Edge sub-band", | 158 "If the RSRQ of is worse than this threshold, UE should be se
rved in Edge sub-band", |
155 UintegerValue (20), | 159 UintegerValue (20), |
156 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_egdeSubBandThr
eshold), | 160 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_edgeSubBandThr
eshold), |
157 MakeUintegerChecker<uint8_t> ()) | 161 MakeUintegerChecker<uint8_t> ()) |
158 .AddAttribute ("CenterPowerOffset", | 162 .AddAttribute ("CenterPowerOffset", |
159 "PdschConfigDedicated::Pa value for Edge Sub-band, default va
lue dB0", | 163 "PdschConfigDedicated::Pa value for Edge Sub-band, default va
lue dB0", |
160 UintegerValue (5), | 164 UintegerValue (5), |
161 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_centerAreaPowe
rOffset), | 165 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_centerAreaPowe
rOffset), |
162 MakeUintegerChecker<uint8_t> ()) | 166 MakeUintegerChecker<uint8_t> ()) |
163 .AddAttribute ("EdgePowerOffset", | 167 .AddAttribute ("EdgePowerOffset", |
164 "PdschConfigDedicated::Pa value for Edge Sub-band, default va
lue dB0", | 168 "PdschConfigDedicated::Pa value for Edge Sub-band, default va
lue dB0", |
165 UintegerValue (5), | 169 UintegerValue (5), |
166 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_edgeAreaPowerO
ffset), | 170 MakeUintegerAccessor (&LteFrStrictAlgorithm::m_edgeAreaPowerO
ffset), |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 void | 262 void |
259 LteFrStrictAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwid
th) | 263 LteFrStrictAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwid
th) |
260 { | 264 { |
261 NS_LOG_FUNCTION (this); | 265 NS_LOG_FUNCTION (this); |
262 for (uint16_t i = 0; i < NUM_DOWNLINK_CONFS; ++i) | 266 for (uint16_t i = 0; i < NUM_DOWNLINK_CONFS; ++i) |
263 { | 267 { |
264 if ((g_frStrictDownlinkDefaultConfiguration[i].cellId == cellId) | 268 if ((g_frStrictDownlinkDefaultConfiguration[i].cellId == cellId) |
265 && g_frStrictDownlinkDefaultConfiguration[i].dlBandwidth == m_dlBandwi
dth) | 269 && g_frStrictDownlinkDefaultConfiguration[i].dlBandwidth == m_dlBandwi
dth) |
266 { | 270 { |
267 m_dlCommonSubBandwidth = g_frStrictDownlinkDefaultConfiguration[i].dlC
ommonSubBandwidth; | 271 m_dlCommonSubBandwidth = g_frStrictDownlinkDefaultConfiguration[i].dlC
ommonSubBandwidth; |
268 m_dlEgdeSubBandOffset = g_frStrictDownlinkDefaultConfiguration[i].dlEg
deSubBandOffset; | 272 m_dlEdgeSubBandOffset = g_frStrictDownlinkDefaultConfiguration[i].dlEd
geSubBandOffset; |
269 m_dlEdgeSubBandwidth = g_frStrictDownlinkDefaultConfiguration[i].dlEdg
eSubBandwidth; | 273 m_dlEdgeSubBandwidth = g_frStrictDownlinkDefaultConfiguration[i].dlEdg
eSubBandwidth; |
270 } | 274 } |
271 } | 275 } |
272 } | 276 } |
273 | 277 |
274 void | 278 void |
275 LteFrStrictAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth
) | 279 LteFrStrictAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth
) |
276 { | 280 { |
277 NS_LOG_FUNCTION (this); | 281 NS_LOG_FUNCTION (this); |
278 for (uint16_t i = 0; i < NUM_UPLINK_CONFS; ++i) | 282 for (uint16_t i = 0; i < NUM_UPLINK_CONFS; ++i) |
279 { | 283 { |
280 if ((g_frStrictUplinkDefaultConfiguration[i].cellId == cellId) | 284 if ((g_frStrictUplinkDefaultConfiguration[i].cellId == cellId) |
281 && g_frStrictUplinkDefaultConfiguration[i].ulBandwidth == m_ulBandwidt
h) | 285 && g_frStrictUplinkDefaultConfiguration[i].ulBandwidth == m_ulBandwidt
h) |
282 { | 286 { |
283 m_ulCommonSubBandwidth = g_frStrictUplinkDefaultConfiguration[i].ulCom
monSubBandwidth; | 287 m_ulCommonSubBandwidth = g_frStrictUplinkDefaultConfiguration[i].ulCom
monSubBandwidth; |
284 m_ulEgdeSubBandOffset = g_frStrictUplinkDefaultConfiguration[i].ulEgde
SubBandOffset; | 288 m_ulEdgeSubBandOffset = g_frStrictUplinkDefaultConfiguration[i].ulEdge
SubBandOffset; |
285 m_ulEdgeSubBandwidth = g_frStrictUplinkDefaultConfiguration[i].ulEdgeS
ubBandwidth; | 289 m_ulEdgeSubBandwidth = g_frStrictUplinkDefaultConfiguration[i].ulEdgeS
ubBandwidth; |
286 } | 290 } |
287 } | 291 } |
288 } | 292 } |
289 | 293 |
290 void | 294 void |
291 LteFrStrictAlgorithm::InitializeDownlinkRbgMaps () | 295 LteFrStrictAlgorithm::InitializeDownlinkRbgMaps () |
292 { | 296 { |
293 m_dlRbgMap.clear (); | 297 m_dlRbgMap.clear (); |
294 m_dlEdgeRbgMap.clear (); | 298 m_dlEdgeRbgMap.clear (); |
295 | 299 |
296 int rbgSize = GetRbgSize (m_dlBandwidth); | 300 int rbgSize = GetRbgSize (m_dlBandwidth); |
297 m_dlRbgMap.resize (m_dlBandwidth / rbgSize, true); | 301 m_dlRbgMap.resize (m_dlBandwidth / rbgSize, true); |
298 m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false); | 302 m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false); |
299 | 303 |
300 NS_ASSERT_MSG (m_dlCommonSubBandwidth <= m_dlBandwidth,"DlCommonSubBandwidth h
igher than DlBandwidth"); | 304 NS_ASSERT_MSG (m_dlCommonSubBandwidth <= m_dlBandwidth,"DlCommonSubBandwidth h
igher than DlBandwidth"); |
301 NS_ASSERT_MSG (m_dlEgdeSubBandOffset <= m_dlBandwidth,"DlEgdeSubBandOffset hig
her than DlBandwidth"); | 305 NS_ASSERT_MSG (m_dlEdgeSubBandOffset <= m_dlBandwidth,"DlEdgeSubBandOffset hig
her than DlBandwidth"); |
302 NS_ASSERT_MSG (m_dlEdgeSubBandwidth <= m_dlBandwidth,"DlEdgeSubBandwidth highe
r than DlBandwidth"); | 306 NS_ASSERT_MSG (m_dlEdgeSubBandwidth <= m_dlBandwidth,"DlEdgeSubBandwidth highe
r than DlBandwidth"); |
303 NS_ASSERT_MSG ((m_dlCommonSubBandwidth + m_dlEgdeSubBandOffset + m_dlEdgeSubBa
ndwidth) <= m_dlBandwidth, | 307 NS_ASSERT_MSG ((m_dlCommonSubBandwidth + m_dlEdgeSubBandOffset + m_dlEdgeSubBa
ndwidth) <= m_dlBandwidth, |
304 "(DlCommonSubBandwidth+DlEgdeSubBandOffset+DlEdgeSubBandwidth)
higher than DlBandwidth"); | 308 "(DlCommonSubBandwidth+DlEdgeSubBandOffset+DlEdgeSubBandwidth)
higher than DlBandwidth"); |
305 | 309 |
306 for (uint8_t i = 0; i < m_dlCommonSubBandwidth / rbgSize; i++) | 310 for (uint8_t i = 0; i < m_dlCommonSubBandwidth / rbgSize; i++) |
307 { | 311 { |
308 m_dlRbgMap[i] = false; | 312 m_dlRbgMap[i] = false; |
309 | 313 |
310 } | 314 } |
311 | 315 |
312 for (uint8_t i = m_dlCommonSubBandwidth / rbgSize + m_dlEgdeSubBandOffset / rb
gSize; | 316 for (uint8_t i = m_dlCommonSubBandwidth / rbgSize + m_dlEdgeSubBandOffset / rb
gSize; |
313 i < (m_dlCommonSubBandwidth / rbgSize + m_dlEgdeSubBandOffset / rbgSize | 317 i < (m_dlCommonSubBandwidth / rbgSize + m_dlEdgeSubBandOffset / rbgSize |
314 + m_dlEdgeSubBandwidth / rbgSize); i++) | 318 + m_dlEdgeSubBandwidth / rbgSize); i++) |
315 { | 319 { |
316 m_dlRbgMap[i] = false; | 320 m_dlRbgMap[i] = false; |
317 m_dlEdgeRbgMap[i] = true; | 321 m_dlEdgeRbgMap[i] = true; |
318 } | 322 } |
319 } | 323 } |
320 | 324 |
321 void | 325 void |
322 LteFrStrictAlgorithm::InitializeUplinkRbgMaps () | 326 LteFrStrictAlgorithm::InitializeUplinkRbgMaps () |
323 { | 327 { |
324 m_ulRbgMap.clear (); | 328 m_ulRbgMap.clear (); |
325 m_ulEdgeRbgMap.clear (); | 329 m_ulEdgeRbgMap.clear (); |
326 | 330 |
327 if (!m_enabledInUplink) | 331 if (!m_enabledInUplink) |
328 { | 332 { |
329 m_ulRbgMap.resize (m_ulBandwidth, false); | 333 m_ulRbgMap.resize (m_ulBandwidth, false); |
330 return; | 334 return; |
331 } | 335 } |
332 | 336 |
333 m_ulRbgMap.resize (m_ulBandwidth, true); | 337 m_ulRbgMap.resize (m_ulBandwidth, true); |
334 m_ulEdgeRbgMap.resize (m_ulBandwidth, false); | 338 m_ulEdgeRbgMap.resize (m_ulBandwidth, false); |
335 | 339 |
336 NS_ASSERT_MSG (m_ulCommonSubBandwidth <= m_ulBandwidth,"UlCommonSubBandwidth h
igher than UlBandwidth"); | 340 NS_ASSERT_MSG (m_ulCommonSubBandwidth <= m_ulBandwidth,"UlCommonSubBandwidth h
igher than UlBandwidth"); |
337 NS_ASSERT_MSG (m_ulEgdeSubBandOffset <= m_ulBandwidth,"UlEgdeSubBandOffset hig
her than UlBandwidth"); | 341 NS_ASSERT_MSG (m_ulEdgeSubBandOffset <= m_ulBandwidth,"UlEdgeSubBandOffset hig
her than UlBandwidth"); |
338 NS_ASSERT_MSG (m_ulEdgeSubBandwidth <= m_ulBandwidth,"UlEdgeSubBandwidth highe
r than UlBandwidth"); | 342 NS_ASSERT_MSG (m_ulEdgeSubBandwidth <= m_ulBandwidth,"UlEdgeSubBandwidth highe
r than UlBandwidth"); |
339 NS_ASSERT_MSG ((m_ulCommonSubBandwidth + m_ulEgdeSubBandOffset + m_ulEdgeSubBa
ndwidth) <= m_dlBandwidth, | 343 NS_ASSERT_MSG ((m_ulCommonSubBandwidth + m_ulEdgeSubBandOffset + m_ulEdgeSubBa
ndwidth) <= m_dlBandwidth, |
340 "(UlCommonSubBandwidth+UlEgdeSubBandOffset+UlEdgeSubBandwidth)
higher than UlBandwidth"); | 344 "(UlCommonSubBandwidth+UlEdgeSubBandOffset+UlEdgeSubBandwidth)
higher than UlBandwidth"); |
341 | 345 |
342 for (uint8_t i = 0; i < m_ulCommonSubBandwidth; i++) | 346 for (uint8_t i = 0; i < m_ulCommonSubBandwidth; i++) |
343 { | 347 { |
344 m_ulRbgMap[i] = false; | 348 m_ulRbgMap[i] = false; |
345 | 349 |
346 } | 350 } |
347 | 351 |
348 for (uint8_t i = m_ulCommonSubBandwidth + m_ulEgdeSubBandOffset; | 352 for (uint8_t i = m_ulCommonSubBandwidth + m_ulEdgeSubBandOffset; |
349 i < (m_ulCommonSubBandwidth + m_ulEgdeSubBandOffset | 353 i < (m_ulCommonSubBandwidth + m_ulEdgeSubBandOffset |
350 + m_ulEdgeSubBandwidth); i++) | 354 + m_ulEdgeSubBandwidth); i++) |
351 { | 355 { |
352 m_ulRbgMap[i] = false; | 356 m_ulRbgMap[i] = false; |
353 m_ulEdgeRbgMap[i] = true; | 357 m_ulEdgeRbgMap[i] = true; |
354 } | 358 } |
355 } | 359 } |
356 | 360 |
357 | 361 |
358 std::vector <bool> | 362 std::vector <bool> |
359 LteFrStrictAlgorithm::DoGetAvailableDlRbg () | 363 LteFrStrictAlgorithm::DoGetAvailableDlRbg () |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 } | 531 } |
528 else | 532 else |
529 { | 533 { |
530 std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti); | 534 std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti); |
531 if (it == m_ues.end ()) | 535 if (it == m_ues.end ()) |
532 { | 536 { |
533 m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset)); | 537 m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset)); |
534 } | 538 } |
535 it = m_ues.find (rnti); | 539 it = m_ues.find (rnti); |
536 | 540 |
537 if (measResults.rsrqResult < m_egdeSubBandThreshold) | 541 if (measResults.rsrqResult < m_edgeSubBandThreshold) |
538 { | 542 { |
539 if (it->second != CellEdge ) | 543 if (it->second != CellEdge ) |
540 { | 544 { |
541 NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Edge sub-b
and"); | 545 NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Edge sub-b
and"); |
542 it->second = CellEdge; | 546 it->second = CellEdge; |
543 | 547 |
544 LteRrcSap::PdschConfigDedicated pdschConfigDedicated; | 548 LteRrcSap::PdschConfigDedicated pdschConfigDedicated; |
545 pdschConfigDedicated.pa = m_edgeAreaPowerOffset; | 549 pdschConfigDedicated.pa = m_edgeAreaPowerOffset; |
546 m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicat
ed); | 550 m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicat
ed); |
547 } | 551 } |
(...skipping 15 matching lines...) Expand all Loading... |
563 | 567 |
564 void | 568 void |
565 LteFrStrictAlgorithm::DoRecvLoadInformation (EpcX2Sap::LoadInformationParams par
ams) | 569 LteFrStrictAlgorithm::DoRecvLoadInformation (EpcX2Sap::LoadInformationParams par
ams) |
566 { | 570 { |
567 NS_LOG_FUNCTION (this); | 571 NS_LOG_FUNCTION (this); |
568 NS_LOG_WARN ("Method should not be called, since it is empty"); | 572 NS_LOG_WARN ("Method should not be called, since it is empty"); |
569 | 573 |
570 } | 574 } |
571 | 575 |
572 } // end of namespace ns3 | 576 } // end of namespace ns3 |
OLD | NEW |