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  std::map<uint16_t, uint8_t>::iterator 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  std::map<uint16_t, uint8_t>::iterator 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  std::map<uint16_t, uint8_t>::iterator 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  std::map<uint16_t, uint8_t>::iterator 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  std::map<uint16_t, uint8_t>::iterator 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 (std::list<LteRrcSap::MeasResultEutra>::iterator it =
448  measResults.measResultListEutra.begin();
449  it != measResults.measResultListEutra.end();
450  ++it)
451  {
452  NS_ASSERT_MSG(it->haveRsrpResult == true,
453  "RSRP measurement is missing from cellId " << it->physCellId);
454  NS_ASSERT_MSG(it->haveRsrqResult == true,
455  "RSRQ measurement is missing from cellId " << it->physCellId);
456  UpdateNeighbourMeasurements(rnti, it->physCellId, it->rsrpResult, it->rsrqResult);
457 
458  bool found = false;
459  for (std::vector<uint16_t>::iterator ncIt = m_neighborCell.begin();
460  ncIt != m_neighborCell.end();
461  ncIt++)
462  {
463  if ((*ncIt) == it->physCellId)
464  {
465  found = true;
466  }
467  }
468  if (found == false)
469  {
470  m_neighborCell.push_back(it->physCellId);
471  }
472  }
473  }
474  else
475  {
476  NS_LOG_WARN(
477  this << " Event A4 received without measurement results from neighbouring cells");
478  }
479  }
480  else
481  {
482  NS_LOG_WARN("Ignoring measId " << (uint16_t)measResults.measId);
483  }
484 }
485 
486 void
488 {
489  NS_LOG_FUNCTION(this);
492 
493  int rbgSize = GetRbgSize(m_dlBandwidth);
494  uint16_t rbgNum = m_dlBandwidth / rbgSize;
495 
496  m_cellWeightMap.clear();
497  m_dlEdgeRbgMap.clear();
498  m_dlEdgeRbgMap.resize(m_dlBandwidth / rbgSize, false);
499  m_ulEdgeRbgMap.clear();
500  m_ulEdgeRbgMap.resize(m_ulBandwidth, false);
501 
502  MeasurementTable_t::iterator it1;
503  MeasurementRow_t::iterator it2;
504  Ptr<UeMeasure> servingCellMeasures;
505  Ptr<UeMeasure> neighbourCellMeasures;
506 
507  uint32_t edgeUeNum = 0;
508  std::map<uint16_t, uint8_t>::iterator areaIt;
509  for (areaIt = m_ues.begin(); areaIt != m_ues.end(); areaIt++)
510  {
511  if (areaIt->second == EdgeArea)
512  {
513  edgeUeNum++;
514  }
515  }
516 
517  if (edgeUeNum != 0)
518  {
519  for (it1 = m_ueMeasures.begin(); it1 != m_ueMeasures.end(); it1++)
520  {
521  std::map<uint16_t, uint8_t>::iterator areaIt = m_ues.find(it1->first);
522  if (areaIt->second != EdgeArea)
523  {
524  continue;
525  }
526 
527  servingCellMeasures = nullptr;
528  neighbourCellMeasures = nullptr;
529 
530  it2 = it1->second.find(m_cellId);
531  if (it2 != it1->second.end())
532  {
533  servingCellMeasures = it2->second;
534  }
535  else
536  {
537  continue;
538  }
539 
540  for (it2 = it1->second.begin(); it2 != it1->second.end(); it2++)
541  {
542  if (it2->first != m_cellId)
543  {
544  neighbourCellMeasures = it2->second;
545  }
546  else
547  {
548  continue;
549  }
550 
551  if (servingCellMeasures && neighbourCellMeasures)
552  {
553  int16_t rsrpDifference =
554  servingCellMeasures->m_rsrp - neighbourCellMeasures->m_rsrp;
555  NS_LOG_INFO("CellId: " << m_cellId << " UE RNTI: " << it1->first
556  << " NeighborCellId: " << neighbourCellMeasures->m_cellId
557  << " RSRP Serving: " << (int)servingCellMeasures->m_rsrp
558  << " RSRP Neighbor: "
559  << (int)neighbourCellMeasures->m_rsrp
560  << " RSRP Difference: " << (int)rsrpDifference);
561 
562  if (rsrpDifference < m_rsrpDifferenceThreshold)
563  {
564  m_cellWeightMap[neighbourCellMeasures->m_cellId]++;
565  }
566  }
567  }
568  }
569 
570  std::map<uint16_t, uint64_t> metricA;
571  for (uint16_t i = 0; i < rbgNum; i++)
572  {
573  metricA[i] = 0;
574  }
575 
576  std::map<uint16_t, uint32_t>::iterator cellIt;
577  for (cellIt = m_cellWeightMap.begin(); cellIt != m_cellWeightMap.end(); cellIt++)
578  {
579  NS_LOG_INFO("CellId: " << m_cellId << " NeighborCellId: " << cellIt->first
580  << " Weight: " << cellIt->second);
581 
582  std::map<uint16_t, std::vector<bool>>::iterator rntpIt = m_rntp.find(cellIt->first);
583  if (rntpIt == m_rntp.end())
584  {
585  continue;
586  }
587 
588  for (uint16_t i = 0; i < rbgNum; i++)
589  {
590  metricA[i] += cellIt->second * rntpIt->second[i];
591  }
592  }
593 
594  std::vector<uint16_t> sortedRbgByMetric;
595  std::multimap<uint64_t, uint16_t> sortedMetricA;
596  for (std::map<uint16_t, uint64_t>::const_iterator it = metricA.begin(); it != metricA.end();
597  ++it)
598  {
599  sortedMetricA.insert(std::pair<uint64_t, uint16_t>(it->second, it->first));
600  }
601 
602  for (std::multimap<uint64_t, uint16_t>::const_iterator it = sortedMetricA.begin();
603  it != sortedMetricA.end();
604  ++it)
605  {
606  sortedRbgByMetric.push_back(it->second);
607  }
608 
609  for (int i = 0; i < m_edgeRbNum / rbgSize; i++)
610  {
611  m_dlEdgeRbgMap[sortedRbgByMetric[i]] = true;
612  }
613 
614  for (int i = 0; i < m_edgeRbNum / rbgSize; i++)
615  {
616  uint32_t rbgIndex = sortedRbgByMetric[i];
617  for (int k = 0; k < rbgSize; k++)
618  {
619  uint32_t rbIndex = rbgSize * rbgIndex + k;
620  m_ulEdgeRbgMap[rbIndex] = true;
621  }
622  }
623  }
624 
625  for (std::vector<uint16_t>::iterator ncIt = m_neighborCell.begin();
626  ncIt != m_neighborCell.end();
627  ncIt++)
628  {
629  SendLoadInformation((*ncIt));
630  }
631 }
632 
633 void
635 {
636  NS_LOG_FUNCTION(this);
637 
638  NS_LOG_INFO("SendLoadInformation to CellId : " << targetCellId);
639 
640  std::vector<EpcX2Sap::UlInterferenceOverloadIndicationItem>
641  m_currentUlInterferenceOverloadIndicationList;
642  std::vector<EpcX2Sap::UlHighInterferenceInformationItem>
643  m_currentUlHighInterferenceInformationList;
644  EpcX2Sap::RelativeNarrowbandTxBand m_currentRelativeNarrowbandTxBand;
645 
646  m_currentRelativeNarrowbandTxBand.rntpPerPrbList = m_dlEdgeRbgMap;
647 
649  cii.sourceCellId = m_cellId;
650  cii.ulInterferenceOverloadIndicationList = m_currentUlInterferenceOverloadIndicationList;
651  cii.ulHighInterferenceInformationList = m_currentUlHighInterferenceInformationList;
652  cii.relativeNarrowbandTxBand = m_currentRelativeNarrowbandTxBand;
653 
655  params.targetCellId = targetCellId;
656  params.cellInformationList.push_back(cii);
657 
659 }
660 
661 void
663 {
664  NS_LOG_FUNCTION(this);
665  NS_LOG_INFO("CellId: " << m_cellId << " Recv X2 message: LOAD INFORMATION from CellId:"
666  << params.cellInformationList[0].sourceCellId);
667 
668  if (params.cellInformationList[0].sourceCellId > m_cellId)
669  {
670  return;
671  }
672 
673  uint16_t neighborCellId = params.cellInformationList[0].sourceCellId;
674  std::map<uint16_t, std::vector<bool>>::iterator it = m_rntp.find(neighborCellId);
675  if (it != m_rntp.end())
676  {
677  it->second = params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList;
678  }
679  else
680  {
681  m_rntp.insert(std::pair<uint16_t, std::vector<bool>>(
682  neighborCellId,
683  params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList));
684  }
685 }
686 
687 void
689  uint16_t cellId,
690  uint8_t rsrp,
691  uint8_t rsrq)
692 {
693  NS_LOG_FUNCTION(this << rnti << cellId << (uint16_t)rsrq);
694 
695  MeasurementTable_t::iterator it1;
696  it1 = m_ueMeasures.find(rnti);
697 
698  if (it1 == m_ueMeasures.end())
699  {
700  // insert a new UE entry
701  MeasurementRow_t row;
702  std::pair<MeasurementTable_t::iterator, bool> ret;
703  ret = m_ueMeasures.insert(std::pair<uint16_t, MeasurementRow_t>(rnti, row));
704  NS_ASSERT(ret.second);
705  it1 = ret.first;
706  }
707 
708  NS_ASSERT(it1 != m_ueMeasures.end());
709  Ptr<UeMeasure> cellMeasures;
710  std::map<uint16_t, Ptr<UeMeasure>>::iterator it2;
711  it2 = it1->second.find(cellId);
712 
713  if (it2 != it1->second.end())
714  {
715  cellMeasures = it2->second;
716  cellMeasures->m_cellId = cellId;
717  cellMeasures->m_rsrp = rsrp;
718  cellMeasures->m_rsrq = rsrq;
719  }
720  else
721  {
722  // insert a new cell entry
723  cellMeasures = Create<UeMeasure>();
724  cellMeasures->m_cellId = cellId;
725  cellMeasures->m_rsrp = rsrp;
726  cellMeasures->m_rsrq = rsrq;
727  it1->second[cellId] = cellMeasures;
728  }
729 
730 } // end of UpdateNeighbourMeasurements
731 
732 } // 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.
void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
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 DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
void DoInitialize() override
Initialize() implementation.
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 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:41
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:141
virtual void DoInitialize()
Initialize() implementation.
Definition: object.cc:360
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:568
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Definition: simulator.h:606
AttributeValue implementation for Time.
Definition: nstime.h:1423
a unique identifier for an interface.
Definition: type-id.h:60
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:935
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
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: nstime.h:1424
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: uinteger.h:46
#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:1336
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:535
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:157
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:158
std::vector< UlHighInterferenceInformationItem > ulHighInterferenceInformationList
UL high interference information list.
Definition: epc-x2-sap.h:162
RelativeNarrowbandTxBand relativeNarrowbandTxBand
relative narrow transmit band
Definition: epc-x2-sap.h:163
std::vector< UlInterferenceOverloadIndicationItem > ulInterferenceOverloadIndicationList
UL interference overload indication list.
Definition: epc-x2-sap.h:160
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:305
Relative Narrowband Tx Power (RNTP) as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:143
std::vector< bool > rntpPerPrbList
RNTP per prb list.
Definition: epc-x2-sap.h:144
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
@ 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::ReportConfigEutra::@68 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 eventId
Event enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@66 triggerQuantity
Trigger type enumeration.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:393
@ 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
@ 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
enum ns3::LteRrcSap::ThresholdEutra::@63 choice
Threshold enumeration.