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