A Discrete-Event Network Simulator
API
lte-ffr-distributed-algorithm.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Piotr Gawlowicz
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
18  *
19  */
20 
22 
23 #include <ns3/log.h>
24 
25 namespace ns3
26 {
27 
28 NS_LOG_COMPONENT_DEFINE("LteFfrDistributedAlgorithm");
29 
30 NS_OBJECT_ENSURE_REGISTERED(LteFfrDistributedAlgorithm);
31 
33  : m_ffrSapUser(nullptr),
34  m_ffrRrcSapUser(nullptr)
35 {
36  NS_LOG_FUNCTION(this);
39 }
40 
42 {
43  NS_LOG_FUNCTION(this);
44 }
45 
46 void
48 {
49  NS_LOG_FUNCTION(this);
50  delete m_ffrSapProvider;
51  delete m_ffrRrcSapProvider;
52 }
53 
54 TypeId
56 {
57  static TypeId tid =
58  TypeId("ns3::LteFfrDistributedAlgorithm")
60  .SetGroupName("Lte")
61  .AddConstructor<LteFfrDistributedAlgorithm>()
62  .AddAttribute(
63  "CalculationInterval",
64  "Time interval between calculation of Edge sub-band, Default value 1 second",
65  TimeValue(Seconds(1)),
68  .AddAttribute(
69  "RsrqThreshold",
70  "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
71  UintegerValue(20),
73  MakeUintegerChecker<uint8_t>())
74  .AddAttribute(
75  "RsrpDifferenceThreshold",
76  "If the difference between the power of the signal received by UE from "
77  "the serving cell and the power of the signal received from the adjacent cell is "
78  "less "
79  "than a RsrpDifferenceThreshold value, the cell weight is incremented",
80  UintegerValue(20),
82  MakeUintegerChecker<uint8_t>())
83  .AddAttribute("CenterPowerOffset",
84  "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
85  UintegerValue(5),
87  MakeUintegerChecker<uint8_t>())
88  .AddAttribute("EdgePowerOffset",
89  "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
90  UintegerValue(5),
92  MakeUintegerChecker<uint8_t>())
93  .AddAttribute("EdgeRbNum",
94  "Number of RB that can be used in edge Sub-band",
95  UintegerValue(8),
97  MakeUintegerChecker<uint8_t>())
98  .AddAttribute("CenterAreaTpc",
99  "TPC value which will be set in DL-DCI for UEs in center area"
100  "Absolute mode is used, default value 1 is mapped to -1 according to"
101  "TS36.213 Table 5.1.1.1-2",
102  UintegerValue(1),
104  MakeUintegerChecker<uint8_t>())
105  .AddAttribute("EdgeAreaTpc",
106  "TPC value which will be set in DL-DCI for UEs in edge area"
107  "Absolute mode is used, default value 1 is mapped to -1 according to"
108  "TS36.213 Table 5.1.1.1-2",
109  UintegerValue(1),
111  MakeUintegerChecker<uint8_t>())
112 
113  ;
114  return tid;
115 }
116 
117 void
119 {
120  NS_LOG_FUNCTION(this << s);
121  m_ffrSapUser = s;
122 }
123 
126 {
127  NS_LOG_FUNCTION(this);
128  return m_ffrSapProvider;
129 }
130 
131 void
133 {
134  NS_LOG_FUNCTION(this << s);
135  m_ffrRrcSapUser = s;
136 }
137 
140 {
141  NS_LOG_FUNCTION(this);
142  return m_ffrRrcSapProvider;
143 }
144 
145 void
147 {
148  NS_LOG_FUNCTION(this);
150 
151  if (m_frCellTypeId != 0)
152  {
155  }
156 
157  NS_LOG_LOGIC(this << " requesting Event A1 and A4 measurements"
158  << " (threshold = 0"
159  << ")");
160  LteRrcSap::ReportConfigEutra reportConfig;
163  reportConfig.threshold1.range = 0;
167 
168  LteRrcSap::ReportConfigEutra reportConfigA4;
171  reportConfigA4.threshold1.range = 0; // intentionally very low threshold
175 
176  int rbgSize = GetRbgSize(m_dlBandwidth);
177  m_dlEdgeRbgMap.resize(m_dlBandwidth / rbgSize, false);
178  m_ulEdgeRbgMap.resize(m_ulBandwidth, false);
180 }
181 
182 void
184 {
185  NS_LOG_FUNCTION(this);
186  if (m_frCellTypeId != 0)
187  {
190  }
193  m_needReconfiguration = false;
194 }
195 
196 void
197 LteFfrDistributedAlgorithm::SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
198 {
199  NS_LOG_FUNCTION(this);
200 }
201 
202 void
203 LteFfrDistributedAlgorithm::SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
204 {
205  NS_LOG_FUNCTION(this);
206 }
207 
208 void
210 {
211  NS_LOG_FUNCTION(this);
212  m_dlRbgMap.clear();
213  int rbgSize = GetRbgSize(m_dlBandwidth);
214  m_dlRbgMap.resize(m_dlBandwidth / rbgSize, false);
215 }
216 
217 void
219 {
220  NS_LOG_FUNCTION(this);
221  m_ulRbgMap.clear();
222  m_ulRbgMap.resize(m_ulBandwidth, false);
223 }
224 
225 std::vector<bool>
227 {
228  NS_LOG_FUNCTION(this);
229 
231  {
232  Reconfigure();
233  }
234 
235  if (m_dlRbgMap.empty())
236  {
238  }
239 
240  return m_dlRbgMap;
241 }
242 
243 bool
245 {
246  NS_LOG_FUNCTION(this);
247 
248  bool edgeRbg = m_dlEdgeRbgMap[rbgId];
249 
250  auto it = m_ues.find(rnti);
251  if (it == m_ues.end())
252  {
253  m_ues.insert(std::pair<uint16_t, uint8_t>(rnti, AreaUnset));
254  return !edgeRbg;
255  }
256 
257  bool edgeUe = false;
258  if (it->second == EdgeArea)
259  {
260  edgeUe = true;
261  }
262 
263  return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
264 }
265 
266 std::vector<bool>
268 {
269  NS_LOG_FUNCTION(this);
270 
271  if (m_ulRbgMap.empty())
272  {
274  }
275 
276  return m_ulRbgMap;
277 }
278 
279 bool
281 {
282  NS_LOG_FUNCTION(this);
283 
284  if (!m_enabledInUplink)
285  {
286  return true;
287  }
288 
289  bool edgeRbg = m_ulEdgeRbgMap[rbId];
290 
291  auto it = m_ues.find(rnti);
292  if (it == m_ues.end())
293  {
294  m_ues.insert(std::pair<uint16_t, uint8_t>(rnti, AreaUnset));
295  return !edgeRbg;
296  }
297 
298  bool edgeUe = false;
299  if (it->second == EdgeArea)
300  {
301  edgeUe = true;
302  }
303 
304  return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
305 }
306 
307 void
310 {
311  NS_LOG_FUNCTION(this);
312  NS_LOG_WARN("Method should not be called, because it is empty");
313 }
314 
315 void
318 {
319  NS_LOG_FUNCTION(this);
320  NS_LOG_WARN("Method should not be called, because it is empty");
321 }
322 
323 void
324 LteFfrDistributedAlgorithm::DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap)
325 {
326  NS_LOG_FUNCTION(this);
327  NS_LOG_WARN("Method should not be called, because it is empty");
328 }
329 
330 uint8_t
332 {
333  NS_LOG_FUNCTION(this);
334 
335  if (!m_enabledInUplink)
336  {
337  return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213
338  // Table 5.1.1.1-2
339  }
340 
341  // TS36.213 Table 5.1.1.1-2
342  // TPC | Accumulated Mode | Absolute Mode
343  //------------------------------------------------
344  // 0 | -1 | -4
345  // 1 | 0 | -1
346  // 2 | 1 | 1
347  // 3 | 3 | 4
348  //------------------------------------------------
349  // here Absolute mode is used
350 
351  auto it = m_ues.find(rnti);
352  if (it == m_ues.end())
353  {
354  return 1;
355  }
356 
357  if (it->second == EdgeArea)
358  {
359  return m_edgeAreaTpc;
360  }
361  else
362  {
363  return m_centerAreaTpc;
364  }
365 
366  return 1;
367 }
368 
369 uint16_t
371 {
372  NS_LOG_FUNCTION(this);
373 
374  uint8_t minContinuousUlBandwidth = m_ulBandwidth;
375 
376  if (!m_enabledInUplink)
377  {
378  return minContinuousUlBandwidth;
379  }
380 
381  minContinuousUlBandwidth = ((m_edgeRbNum > 0) && (m_edgeRbNum < minContinuousUlBandwidth))
382  ? m_edgeRbNum
383  : minContinuousUlBandwidth;
384 
385  return minContinuousUlBandwidth;
386 }
387 
388 void
390 {
391  NS_LOG_FUNCTION(this << rnti << (uint16_t)measResults.measId);
392  NS_LOG_INFO("CellId: " << m_cellId << " RNTI :" << rnti
393  << " MeasId: " << (uint16_t)measResults.measId
394  << " RSRP: " << (uint16_t)measResults.measResultPCell.rsrpResult
395  << " RSRQ: " << (uint16_t)measResults.measResultPCell.rsrqResult);
396 
397  if (measResults.measId == m_rsrqMeasId)
398  {
399  // check if it is center or edge UE
400  auto it = m_ues.find(rnti);
401  if (it == m_ues.end())
402  {
403  m_ues.insert(std::pair<uint16_t, uint8_t>(rnti, AreaUnset));
404  }
405 
406  it = m_ues.find(rnti);
408  {
409  if (it->second != CenterArea)
410  {
411  NS_LOG_INFO("UE RNTI: " << rnti << " will be served in Center sub-band");
412  it->second = CenterArea;
413 
414  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
415  pdschConfigDedicated.pa = m_centerPowerOffset;
416  m_ffrRrcSapUser->SetPdschConfigDedicated(rnti, pdschConfigDedicated);
417  }
418  }
419  else
420  {
421  if (it->second != EdgeArea)
422  {
423  NS_LOG_INFO("UE RNTI: " << rnti << " will be served in Edge sub-band");
424  it->second = EdgeArea;
425 
426  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
427  pdschConfigDedicated.pa = m_edgePowerOffset;
428  m_ffrRrcSapUser->SetPdschConfigDedicated(rnti, pdschConfigDedicated);
429  }
430  }
431  }
432  else if (measResults.measId == m_rsrpMeasId)
433  {
434  auto it = m_ues.find(rnti);
435  if (it == m_ues.end())
436  {
437  m_ues.insert(std::pair<uint16_t, uint8_t>(rnti, AreaUnset));
438  }
439 
441  m_cellId,
442  measResults.measResultPCell.rsrpResult,
443  measResults.measResultPCell.rsrqResult);
444 
445  if (measResults.haveMeasResultNeighCells && !measResults.measResultListEutra.empty())
446  {
447  for (auto it = measResults.measResultListEutra.begin();
448  it != measResults.measResultListEutra.end();
449  ++it)
450  {
451  NS_ASSERT_MSG(it->haveRsrpResult == true,
452  "RSRP measurement is missing from cellId " << it->physCellId);
453  NS_ASSERT_MSG(it->haveRsrqResult == true,
454  "RSRQ measurement is missing from cellId " << it->physCellId);
455  UpdateNeighbourMeasurements(rnti, it->physCellId, it->rsrpResult, it->rsrqResult);
456 
457  bool found = false;
458  for (auto ncIt = m_neighborCell.begin(); ncIt != m_neighborCell.end(); ncIt++)
459  {
460  if ((*ncIt) == it->physCellId)
461  {
462  found = true;
463  }
464  }
465  if (!found)
466  {
467  m_neighborCell.push_back(it->physCellId);
468  }
469  }
470  }
471  else
472  {
473  NS_LOG_WARN(
474  this << " Event A4 received without measurement results from neighbouring cells");
475  }
476  }
477  else
478  {
479  NS_LOG_WARN("Ignoring measId " << (uint16_t)measResults.measId);
480  }
481 }
482 
483 void
485 {
486  NS_LOG_FUNCTION(this);
489 
490  int rbgSize = GetRbgSize(m_dlBandwidth);
491  uint16_t rbgNum = m_dlBandwidth / rbgSize;
492 
493  m_cellWeightMap.clear();
494  m_dlEdgeRbgMap.clear();
495  m_dlEdgeRbgMap.resize(m_dlBandwidth / rbgSize, false);
496  m_ulEdgeRbgMap.clear();
497  m_ulEdgeRbgMap.resize(m_ulBandwidth, false);
498 
499  Ptr<UeMeasure> servingCellMeasures;
500  Ptr<UeMeasure> neighbourCellMeasures;
501 
502  uint32_t edgeUeNum = 0;
503  for (auto areaIt = m_ues.begin(); areaIt != m_ues.end(); areaIt++)
504  {
505  if (areaIt->second == EdgeArea)
506  {
507  edgeUeNum++;
508  }
509  }
510 
511  if (edgeUeNum != 0)
512  {
513  for (auto it1 = m_ueMeasures.begin(); it1 != m_ueMeasures.end(); it1++)
514  {
515  auto areaIt = m_ues.find(it1->first);
516  if (areaIt->second != EdgeArea)
517  {
518  continue;
519  }
520 
521  servingCellMeasures = nullptr;
522  neighbourCellMeasures = nullptr;
523 
524  auto it2 = it1->second.find(m_cellId);
525  if (it2 != it1->second.end())
526  {
527  servingCellMeasures = it2->second;
528  }
529  else
530  {
531  continue;
532  }
533 
534  for (it2 = it1->second.begin(); it2 != it1->second.end(); it2++)
535  {
536  if (it2->first != m_cellId)
537  {
538  neighbourCellMeasures = it2->second;
539  }
540  else
541  {
542  continue;
543  }
544 
545  if (servingCellMeasures && neighbourCellMeasures)
546  {
547  int16_t rsrpDifference =
548  servingCellMeasures->m_rsrp - neighbourCellMeasures->m_rsrp;
549  NS_LOG_INFO("CellId: " << m_cellId << " UE RNTI: " << it1->first
550  << " NeighborCellId: " << neighbourCellMeasures->m_cellId
551  << " RSRP Serving: " << (int)servingCellMeasures->m_rsrp
552  << " RSRP Neighbor: "
553  << (int)neighbourCellMeasures->m_rsrp
554  << " RSRP Difference: " << (int)rsrpDifference);
555 
556  if (rsrpDifference < m_rsrpDifferenceThreshold)
557  {
558  m_cellWeightMap[neighbourCellMeasures->m_cellId]++;
559  }
560  }
561  }
562  }
563 
564  std::map<uint16_t, uint64_t> metricA;
565  for (uint16_t i = 0; i < rbgNum; i++)
566  {
567  metricA[i] = 0;
568  }
569 
570  for (auto cellIt = m_cellWeightMap.begin(); cellIt != m_cellWeightMap.end(); cellIt++)
571  {
572  NS_LOG_INFO("CellId: " << m_cellId << " NeighborCellId: " << cellIt->first
573  << " Weight: " << cellIt->second);
574 
575  auto rntpIt = m_rntp.find(cellIt->first);
576  if (rntpIt == m_rntp.end())
577  {
578  continue;
579  }
580 
581  for (uint16_t i = 0; i < rbgNum; i++)
582  {
583  if (rntpIt->second[i])
584  {
585  metricA[i] += cellIt->second;
586  }
587  }
588  }
589 
590  std::vector<uint16_t> sortedRbgByMetric;
591  std::multimap<uint64_t, uint16_t> sortedMetricA;
592  for (auto it = metricA.begin(); it != metricA.end(); ++it)
593  {
594  sortedMetricA.insert(std::pair<uint64_t, uint16_t>(it->second, it->first));
595  }
596 
597  for (auto it = sortedMetricA.begin(); it != sortedMetricA.end(); ++it)
598  {
599  sortedRbgByMetric.push_back(it->second);
600  }
601 
602  for (int i = 0; i < m_edgeRbNum / rbgSize; i++)
603  {
604  m_dlEdgeRbgMap[sortedRbgByMetric[i]] = true;
605  }
606 
607  for (int i = 0; i < m_edgeRbNum / rbgSize; i++)
608  {
609  uint32_t rbgIndex = sortedRbgByMetric[i];
610  for (int k = 0; k < rbgSize; k++)
611  {
612  uint32_t rbIndex = rbgSize * rbgIndex + k;
613  m_ulEdgeRbgMap[rbIndex] = true;
614  }
615  }
616  }
617 
618  for (auto ncIt = m_neighborCell.begin(); ncIt != m_neighborCell.end(); ncIt++)
619  {
620  SendLoadInformation(*ncIt);
621  }
622 }
623 
624 void
626 {
627  NS_LOG_FUNCTION(this);
628 
629  NS_LOG_INFO("SendLoadInformation to CellId : " << targetCellId);
630 
631  std::vector<EpcX2Sap::UlInterferenceOverloadIndicationItem>
632  m_currentUlInterferenceOverloadIndicationList;
633  std::vector<EpcX2Sap::UlHighInterferenceInformationItem>
634  m_currentUlHighInterferenceInformationList;
635  EpcX2Sap::RelativeNarrowbandTxBand m_currentRelativeNarrowbandTxBand;
636 
637  m_currentRelativeNarrowbandTxBand.rntpPerPrbList = m_dlEdgeRbgMap;
638 
640  cii.sourceCellId = m_cellId;
641  cii.ulInterferenceOverloadIndicationList = m_currentUlInterferenceOverloadIndicationList;
642  cii.ulHighInterferenceInformationList = m_currentUlHighInterferenceInformationList;
643  cii.relativeNarrowbandTxBand = m_currentRelativeNarrowbandTxBand;
644 
646  params.targetCellId = targetCellId;
647  params.cellInformationList.push_back(cii);
648 
650 }
651 
652 void
654 {
655  NS_LOG_FUNCTION(this);
656  NS_LOG_INFO("CellId: " << m_cellId << " Recv X2 message: LOAD INFORMATION from CellId:"
657  << params.cellInformationList[0].sourceCellId);
658 
659  if (params.cellInformationList[0].sourceCellId > m_cellId)
660  {
661  return;
662  }
663 
664  uint16_t neighborCellId = params.cellInformationList[0].sourceCellId;
665  auto it = m_rntp.find(neighborCellId);
666  if (it != m_rntp.end())
667  {
668  it->second = params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList;
669  }
670  else
671  {
672  m_rntp.insert(std::pair<uint16_t, std::vector<bool>>(
673  neighborCellId,
674  params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList));
675  }
676 }
677 
678 void
680  uint16_t cellId,
681  uint8_t rsrp,
682  uint8_t rsrq)
683 {
684  NS_LOG_FUNCTION(this << rnti << cellId << (uint16_t)rsrq);
685 
686  auto it1 = m_ueMeasures.find(rnti);
687 
688  if (it1 == m_ueMeasures.end())
689  {
690  // insert a new UE entry
691  MeasurementRow_t row;
692  auto ret = m_ueMeasures.insert(std::pair<uint16_t, MeasurementRow_t>(rnti, row));
693  NS_ASSERT(ret.second);
694  it1 = ret.first;
695  }
696 
697  NS_ASSERT(it1 != m_ueMeasures.end());
698  auto it2 = it1->second.find(cellId);
699 
700  if (it2 != it1->second.end())
701  {
702  it2->second->m_cellId = cellId;
703  it2->second->m_rsrp = rsrp;
704  it2->second->m_rsrq = rsrq;
705  }
706  else
707  {
708  // insert a new cell entry
709  Ptr<UeMeasure> cellMeasures = Create<UeMeasure>();
710  cellMeasures->m_cellId = cellId;
711  cellMeasures->m_rsrp = rsrp;
712  cellMeasures->m_rsrq = rsrq;
713  it1->second[cellId] = cellMeasures;
714  }
715 
716 } // end of UpdateNeighbourMeasurements
717 
718 } // end of namespace ns3
The abstract base class of a Frequency Reuse algorithm.
uint16_t m_cellId
cell ID
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
uint8_t m_ulBandwidth
uplink bandwidth in RBs
Distributed Fractional Frequency Reuse algorithm implementation.
std::map< uint16_t, Ptr< UeMeasure > > MeasurementRow_t
Cell Id is used as the key for the following map.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP Provider.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP Provider.
std::map< uint16_t, uint8_t > m_ues
UEs map.
void UpdateNeighbourMeasurements(uint16_t rnti, uint16_t cellId, uint8_t rsrp, uint8_t rsrq)
Initialize up link RGB maps function.
uint8_t m_rsrpDifferenceThreshold
RSRP difference threshold.
void DoDispose() override
Destructor implementation.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP User.
std::map< uint16_t, uint32_t > m_cellWeightMap
cell weight map
friend class MemberLteFfrSapProvider< LteFfrDistributedAlgorithm >
let the forwarder class access the protected and private members
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set up link configuration function.
void DoInitialize() override
Initialize() implementation.
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
MeasurementTable_t m_ueMeasures
UE measures.
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
std::map< uint16_t, std::vector< bool > > m_rntp
RNTP.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set down link configuration function.
std::vector< uint16_t > m_neighborCell
neighbor cell
friend class MemberLteFfrRrcSapProvider< LteFfrDistributedAlgorithm >
let the forwarder class access the protected and private members
std::vector< bool > m_ulRbgMap
UL RBG map.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
uint8_t m_edgeSubBandRsrqThreshold
edge sub band RSRQ threshold
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
static TypeId GetTypeId()
Get the type ID.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
std::vector< bool > m_dlRbgMap
DL RBG map.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
void Reconfigure() override
Automatic FR reconfiguration.
uint8_t m_centerPowerOffset
center power offset
void InitializeUplinkRbgMaps()
Initialize up link RGB maps function.
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
void SendLoadInformation(uint16_t targetCellId)
Send load information function.
void InitializeDownlinkRbgMaps()
Initialize down link RGB maps function.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
virtual void SetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated)=0
Instruct the eNodeB RRC entity to perform RrcConnectionReconfiguration to inform UE about new PdschCo...
virtual uint8_t AddUeMeasReportConfigForFfr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
virtual void SendLoadInformation(EpcX2Sap::LoadInformationParams params)=0
SendLoadInformation.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:40
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:140
virtual void DoInitialize()
Initialize() implementation.
Definition: object.cc:359
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:571
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Definition: simulator.h:605
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:931
Hold an unsigned integer type.
Definition: uinteger.h:45
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:86
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:282
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:261
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:275
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition: nstime.h:1414
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:533
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Definition: uinteger.h:46
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Cell Information Item as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:158
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:159
std::vector< UlHighInterferenceInformationItem > ulHighInterferenceInformationList
UL high interference information list.
Definition: epc-x2-sap.h:163
RelativeNarrowbandTxBand relativeNarrowbandTxBand
relative narrow transmit band
Definition: epc-x2-sap.h:164
std::vector< UlInterferenceOverloadIndicationItem > ulInterferenceOverloadIndicationList
UL interference overload indication list.
Definition: epc-x2-sap.h:161
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:306
Relative Narrowband Tx Power (RNTP) as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:144
std::vector< bool > rntpPerPrbList
RNTP per prb list.
Definition: epc-x2-sap.h:145
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
uint8_t rsrqResult
the RSRQ result
Definition: lte-rrc-sap.h:675
uint8_t rsrpResult
the RSRP result
Definition: lte-rrc-sap.h:674
MeasResults structure.
Definition: lte-rrc-sap.h:717
uint8_t measId
measure ID
Definition: lte-rrc-sap.h:718
bool haveMeasResultNeighCells
have measure result neighbor cells
Definition: lte-rrc-sap.h:720
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
Definition: lte-rrc-sap.h:721
MeasResultPCell measResultPCell
measurement result primary cell
Definition: lte-rrc-sap.h:719
PdschConfigDedicated structure.
Definition: lte-rrc-sap.h:163
Specifies criteria for triggering of an E-UTRA measurement reporting event.
Definition: lte-rrc-sap.h:373
enum ns3::LteRrcSap::ReportConfigEutra::@64 eventId
Event enumeration.
@ EVENT_A4
Event A4: Neighbour becomes better than absolute threshold.
Definition: lte-rrc-sap.h:387
@ EVENT_A1
Event A1: Serving becomes better than absolute threshold.
Definition: lte-rrc-sap.h:384
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:393
enum ns3::LteRrcSap::ReportConfigEutra::@67 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 triggerQuantity
Trigger type enumeration.
@ RSRP
Reference Signal Received Power.
Definition: lte-rrc-sap.h:425
@ RSRQ
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:426
enum ns3::LteRrcSap::ThresholdEutra::@62 choice
Threshold enumeration.
@ THRESHOLD_RSRP
RSRP is used for the threshold.
Definition: lte-rrc-sap.h:364
@ THRESHOLD_RSRQ
RSRQ is used for the threshold.
Definition: lte-rrc-sap.h:365
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:368