LEFT | RIGHT |
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 249 } |
250 InitializeDownlinkRbgMaps (); | 250 InitializeDownlinkRbgMaps (); |
251 InitializeUplinkRbgMaps (); | 251 InitializeUplinkRbgMaps (); |
252 m_needReconfiguration = false; | 252 m_needReconfiguration = false; |
253 } | 253 } |
254 | 254 |
255 void | 255 void |
256 LteFrSoftAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth
) | 256 LteFrSoftAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth
) |
257 { | 257 { |
258 NS_LOG_FUNCTION (this); | 258 NS_LOG_FUNCTION (this); |
259 NS_UNUSED(bandwidth); | 259 NS_UNUSED (bandwidth); |
260 for (uint16_t i = 0; i < NUM_DOWNLINK_CONFS; ++i) | 260 for (uint16_t i = 0; i < NUM_DOWNLINK_CONFS; ++i) |
261 { | 261 { |
262 if ((g_frSoftDownlinkDefaultConfiguration[i].cellId == cellId) | 262 if ((g_frSoftDownlinkDefaultConfiguration[i].cellId == cellId) |
263 && g_frSoftDownlinkDefaultConfiguration[i].dlBandwidth == m_dlBandwidt
h) | 263 && g_frSoftDownlinkDefaultConfiguration[i].dlBandwidth == m_dlBandwidt
h) |
264 { | 264 { |
265 m_dlEdgeSubBandOffset = g_frSoftDownlinkDefaultConfiguration[i].dlEdge
SubBandOffset; | 265 m_dlEdgeSubBandOffset = g_frSoftDownlinkDefaultConfiguration[i].dlEdge
SubBandOffset; |
266 m_dlEdgeSubBandwidth = g_frSoftDownlinkDefaultConfiguration[i].dlEdgeS
ubBandwidth; | 266 m_dlEdgeSubBandwidth = g_frSoftDownlinkDefaultConfiguration[i].dlEdgeS
ubBandwidth; |
267 } | 267 } |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 void | 271 void |
272 LteFrSoftAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth) | 272 LteFrSoftAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth) |
273 { | 273 { |
274 NS_LOG_FUNCTION (this); | 274 NS_LOG_FUNCTION (this); |
275 NS_UNUSED(bandwidth); | 275 NS_UNUSED (bandwidth); |
276 for (uint16_t i = 0; i < NUM_UPLINK_CONFS; ++i) | 276 for (uint16_t i = 0; i < NUM_UPLINK_CONFS; ++i) |
277 { | 277 { |
278 if ((g_frSoftUplinkDefaultConfiguration[i].cellId == cellId) | 278 if ((g_frSoftUplinkDefaultConfiguration[i].cellId == cellId) |
279 && g_frSoftUplinkDefaultConfiguration[i].ulBandwidth == m_ulBandwidth) | 279 && g_frSoftUplinkDefaultConfiguration[i].ulBandwidth == m_ulBandwidth) |
280 { | 280 { |
281 m_ulEdgeSubBandOffset = g_frSoftUplinkDefaultConfiguration[i].ulEdgeSu
bBandOffset; | 281 m_ulEdgeSubBandOffset = g_frSoftUplinkDefaultConfiguration[i].ulEdgeSu
bBandOffset; |
282 m_ulEdgeSubBandwidth = g_frSoftUplinkDefaultConfiguration[i].ulEdgeSub
Bandwidth; | 282 m_ulEdgeSubBandwidth = g_frSoftUplinkDefaultConfiguration[i].ulEdgeSub
Bandwidth; |
283 } | 283 } |
284 } | 284 } |
285 } | 285 } |
286 | 286 |
287 void | 287 void |
288 LteFrSoftAlgorithm::InitializeDownlinkRbgMaps () | 288 LteFrSoftAlgorithm::InitializeDownlinkRbgMaps () |
289 { | 289 { |
290 m_dlRbgMap.clear (); | 290 m_dlRbgMap.clear (); |
291 m_dlEdgeRbgMap.clear (); | 291 m_dlEdgeRbgMap.clear (); |
292 | 292 |
293 int rbgSize = GetRbgSize (m_dlBandwidth); | 293 int rbgSize = GetRbgSize (m_dlBandwidth); |
294 m_dlRbgMap.resize (m_dlBandwidth / rbgSize, false); | 294 m_dlRbgMap.resize (m_dlBandwidth / rbgSize, false); |
295 m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false); | 295 m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false); |
296 | 296 |
297 NS_ASSERT_MSG (m_dlEdgeSubBandOffset <= m_dlBandwidth,"DlEdgeSubBandOffset hig
her than DlBandwidth"); | 297 NS_ASSERT_MSG (m_dlEdgeSubBandOffset <= m_dlBandwidth,"DlEdgeSubBandOffset hig
her than DlBandwidth"); |
298 NS_ASSERT_MSG (m_dlEdgeSubBandwidth <= m_dlBandwidth,"DlEdgeSubBandwidth highe
r than DlBandwidth"); | 298 NS_ASSERT_MSG (m_dlEdgeSubBandwidth <= m_dlBandwidth,"DlEdgeSubBandwidth highe
r than DlBandwidth"); |
299 NS_ASSERT_MSG ((m_dlEdgeSubBandOffset + m_dlEdgeSubBandwidth) <= m_dlBandwidth
, | 299 NS_ASSERT_MSG ((m_dlEdgeSubBandOffset + m_dlEdgeSubBandwidth) <= m_dlBandwidth
, |
300 "(DlEdgeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwid
th"); | 300 "(DlEdgeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwid
th"); |
301 | 301 |
302 for (uint8_t i = static_cast<uint8_t>(m_dlEdgeSubBandOffset / rbgSize); | 302 for (uint8_t i = static_cast<uint8_t> (m_dlEdgeSubBandOffset / rbgSize); |
303 i < static_cast<uint8_t>(m_dlEdgeSubBandOffset + m_dlEdgeSubBandwidth) /
rbgSize; i++) | 303 i < static_cast<uint8_t> (m_dlEdgeSubBandOffset + m_dlEdgeSubBandwidth) /
rbgSize; i++) |
304 { | 304 { |
305 m_dlEdgeRbgMap[i] = true; | 305 m_dlEdgeRbgMap[i] = true; |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
309 void | 309 void |
310 LteFrSoftAlgorithm::InitializeUplinkRbgMaps () | 310 LteFrSoftAlgorithm::InitializeUplinkRbgMaps () |
311 { | 311 { |
312 m_ulRbgMap.clear (); | 312 m_ulRbgMap.clear (); |
313 m_ulEdgeRbgMap.clear (); | 313 m_ulEdgeRbgMap.clear (); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 } | 416 } |
417 | 417 |
418 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe); | 418 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe); |
419 } | 419 } |
420 | 420 |
421 void | 421 void |
422 LteFrSoftAlgorithm::DoReportDlCqiInfo (const struct FfMacSchedSapProvider::Sched
DlCqiInfoReqParameters& params) | 422 LteFrSoftAlgorithm::DoReportDlCqiInfo (const struct FfMacSchedSapProvider::Sched
DlCqiInfoReqParameters& params) |
423 { | 423 { |
424 NS_LOG_FUNCTION (this); | 424 NS_LOG_FUNCTION (this); |
425 NS_LOG_WARN ("Method should not be called, because it is empty"); | 425 NS_LOG_WARN ("Method should not be called, because it is empty"); |
426 NS_UNUSED(params); | 426 NS_UNUSED (params); |
427 } | 427 } |
428 | 428 |
429 void | 429 void |
430 LteFrSoftAlgorithm::DoReportUlCqiInfo (const struct FfMacSchedSapProvider::Sched
UlCqiInfoReqParameters& params) | 430 LteFrSoftAlgorithm::DoReportUlCqiInfo (const struct FfMacSchedSapProvider::Sched
UlCqiInfoReqParameters& params) |
431 { | 431 { |
432 NS_LOG_FUNCTION (this); | 432 NS_LOG_FUNCTION (this); |
433 NS_LOG_WARN ("Method should not be called, because it is empty"); | 433 NS_LOG_WARN ("Method should not be called, because it is empty"); |
434 NS_UNUSED(params); | 434 NS_UNUSED (params); |
435 } | 435 } |
436 | 436 |
437 void | 437 void |
438 LteFrSoftAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double>
> ulCqiMap) | 438 LteFrSoftAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double>
> ulCqiMap) |
439 { | 439 { |
440 NS_LOG_FUNCTION (this); | 440 NS_LOG_FUNCTION (this); |
441 NS_LOG_WARN ("Method should not be called, because it is empty"); | 441 NS_LOG_WARN ("Method should not be called, because it is empty"); |
442 } | 442 } |
443 | 443 |
444 uint8_t | 444 uint8_t |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 559 } |
560 | 560 |
561 void | 561 void |
562 LteFrSoftAlgorithm::DoRecvLoadInformation (EpcX2Sap::LoadInformationParams param
s) | 562 LteFrSoftAlgorithm::DoRecvLoadInformation (EpcX2Sap::LoadInformationParams param
s) |
563 { | 563 { |
564 NS_LOG_FUNCTION (this); | 564 NS_LOG_FUNCTION (this); |
565 NS_LOG_WARN ("Method should not be called, because it is empty"); | 565 NS_LOG_WARN ("Method should not be called, because it is empty"); |
566 } | 566 } |
567 | 567 |
568 } // end of namespace ns3 | 568 } // end of namespace ns3 |
LEFT | RIGHT |