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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 192 } |
193 InitializeDownlinkRbgMaps (); | 193 InitializeDownlinkRbgMaps (); |
194 InitializeUplinkRbgMaps (); | 194 InitializeUplinkRbgMaps (); |
195 m_needReconfiguration = false; | 195 m_needReconfiguration = false; |
196 } | 196 } |
197 | 197 |
198 void | 198 void |
199 LteFfrDistributedAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t b
andwidth) | 199 LteFfrDistributedAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t b
andwidth) |
200 { | 200 { |
201 NS_LOG_FUNCTION (this); | 201 NS_LOG_FUNCTION (this); |
202 NS_UNUSED(cellId); | 202 NS_UNUSED (cellId); |
203 NS_UNUSED(bandwidth); | 203 NS_UNUSED (bandwidth); |
204 } | 204 } |
205 | 205 |
206 void | 206 void |
207 LteFfrDistributedAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t ban
dwidth) | 207 LteFfrDistributedAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t ban
dwidth) |
208 { | 208 { |
209 NS_LOG_FUNCTION (this); | 209 NS_LOG_FUNCTION (this); |
210 NS_UNUSED(cellId); | 210 NS_UNUSED (cellId); |
211 NS_UNUSED(bandwidth); | 211 NS_UNUSED (bandwidth); |
212 } | 212 } |
213 | 213 |
214 void | 214 void |
215 LteFfrDistributedAlgorithm::InitializeDownlinkRbgMaps () | 215 LteFfrDistributedAlgorithm::InitializeDownlinkRbgMaps () |
216 { | 216 { |
217 NS_LOG_FUNCTION (this); | 217 NS_LOG_FUNCTION (this); |
218 m_dlRbgMap.clear (); | 218 m_dlRbgMap.clear (); |
219 int rbgSize = GetRbgSize (m_dlBandwidth); | 219 int rbgSize = GetRbgSize (m_dlBandwidth); |
220 m_dlRbgMap.resize (m_dlBandwidth / rbgSize, false); | 220 m_dlRbgMap.resize (m_dlBandwidth / rbgSize, false); |
221 } | 221 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 } | 308 } |
309 | 309 |
310 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe); | 310 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe); |
311 } | 311 } |
312 | 312 |
313 void | 313 void |
314 LteFfrDistributedAlgorithm::DoReportDlCqiInfo (const struct FfMacSchedSapProvide
r::SchedDlCqiInfoReqParameters& params) | 314 LteFfrDistributedAlgorithm::DoReportDlCqiInfo (const struct FfMacSchedSapProvide
r::SchedDlCqiInfoReqParameters& params) |
315 { | 315 { |
316 NS_LOG_FUNCTION (this); | 316 NS_LOG_FUNCTION (this); |
317 NS_LOG_WARN ("Method should not be called, because it is empty"); | 317 NS_LOG_WARN ("Method should not be called, because it is empty"); |
318 NS_UNUSED(params); | 318 NS_UNUSED (params); |
319 } | 319 } |
320 | 320 |
321 void | 321 void |
322 LteFfrDistributedAlgorithm::DoReportUlCqiInfo (const struct FfMacSchedSapProvide
r::SchedUlCqiInfoReqParameters& params) | 322 LteFfrDistributedAlgorithm::DoReportUlCqiInfo (const struct FfMacSchedSapProvide
r::SchedUlCqiInfoReqParameters& params) |
323 { | 323 { |
324 NS_LOG_FUNCTION (this); | 324 NS_LOG_FUNCTION (this); |
325 NS_LOG_WARN ("Method should not be called, because it is empty"); | 325 NS_LOG_WARN ("Method should not be called, because it is empty"); |
326 NS_UNUSED(params); | 326 NS_UNUSED (params); |
327 } | 327 } |
328 | 328 |
329 void | 329 void |
330 LteFfrDistributedAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <
double> > ulCqiMap) | 330 LteFfrDistributedAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <
double> > ulCqiMap) |
331 { | 331 { |
332 NS_LOG_FUNCTION (this); | 332 NS_LOG_FUNCTION (this); |
333 NS_LOG_WARN ("Method should not be called, because it is empty"); | 333 NS_LOG_WARN ("Method should not be called, because it is empty"); |
334 } | 334 } |
335 | 335 |
336 uint8_t | 336 uint8_t |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 NS_LOG_WARN ("Ignoring measId " << (uint16_t) measResults.measId); | 480 NS_LOG_WARN ("Ignoring measId " << (uint16_t) measResults.measId); |
481 } | 481 } |
482 } | 482 } |
483 | 483 |
484 void | 484 void |
485 LteFfrDistributedAlgorithm::Calculate () | 485 LteFfrDistributedAlgorithm::Calculate () |
486 { | 486 { |
487 NS_LOG_FUNCTION (this); | 487 NS_LOG_FUNCTION (this); |
488 m_calculationEvent = Simulator::Schedule (m_calculationInterval, &LteFfrDistri
butedAlgorithm::Calculate, this); | 488 m_calculationEvent = Simulator::Schedule (m_calculationInterval, &LteFfrDistri
butedAlgorithm::Calculate, this); |
489 | 489 |
490 uint16_t rbgSize = static_cast<uint16_t>(GetRbgSize (m_dlBandwidth)); | 490 uint16_t rbgSize = static_cast<uint16_t> (GetRbgSize (m_dlBandwidth)); |
491 uint16_t rbgNum = m_dlBandwidth / rbgSize; | 491 uint16_t rbgNum = m_dlBandwidth / rbgSize; |
492 | 492 |
493 m_cellWeightMap.clear (); | 493 m_cellWeightMap.clear (); |
494 m_dlEdgeRbgMap.clear (); | 494 m_dlEdgeRbgMap.clear (); |
495 m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false); | 495 m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false); |
496 m_ulEdgeRbgMap.clear (); | 496 m_ulEdgeRbgMap.clear (); |
497 m_ulEdgeRbgMap.resize (m_ulBandwidth, false); | 497 m_ulEdgeRbgMap.resize (m_ulBandwidth, false); |
498 | 498 |
499 MeasurementTable_t::iterator it1; | 499 MeasurementTable_t::iterator it1; |
500 MeasurementRow_t::iterator it2; | 500 MeasurementRow_t::iterator it2; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 cellMeasures = Create<UeMeasure> (); | 708 cellMeasures = Create<UeMeasure> (); |
709 cellMeasures->m_cellId = cellId; | 709 cellMeasures->m_cellId = cellId; |
710 cellMeasures->m_rsrp = rsrp; | 710 cellMeasures->m_rsrp = rsrp; |
711 cellMeasures->m_rsrq = rsrq; | 711 cellMeasures->m_rsrq = rsrq; |
712 it1->second[cellId] = cellMeasures; | 712 it1->second[cellId] = cellMeasures; |
713 } | 713 } |
714 | 714 |
715 } // end of UpdateNeighbourMeasurements | 715 } // end of UpdateNeighbourMeasurements |
716 | 716 |
717 } // end of namespace ns3 | 717 } // end of namespace ns3 |
LEFT | RIGHT |