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