A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 NS_LOG_COMPONENT_DEFINE ("LteFfrDistributedAlgorithm");
26 
27 namespace ns3 {
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  .AddConstructor<LteFfrDistributedAlgorithm> ()
63  .AddAttribute ("CalculationInterval",
64  "Time interval between calculation of Edge sub-band, Default value 1 second",
65  TimeValue (Seconds (1)),
67  MakeTimeChecker ())
68  .AddAttribute ("RsrqThreshold",
69  "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
70  UintegerValue (20),
72  MakeUintegerChecker<uint8_t> ())
73  .AddAttribute ("RsrpDifferenceThreshold",
74  "If the difference between the power of the signal received by UE from "
75  "the serving cell and the power of the signal received from the adjacent cell is less "
76  "than a RsrpDifferenceThreshold value, the cell weight is incremented",
77  UintegerValue (20),
79  MakeUintegerChecker<uint8_t> ())
80  .AddAttribute ("CenterPowerOffset",
81  "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
82  UintegerValue (5),
84  MakeUintegerChecker<uint8_t> ())
85  .AddAttribute ("EdgePowerOffset",
86  "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
87  UintegerValue (5),
88  MakeUintegerAccessor (&LteFfrDistributedAlgorithm::m_edgePowerOffset),
89  MakeUintegerChecker<uint8_t> ())
90  .AddAttribute ("EdgeRbNum",
91  "Number of RB that can be used in edge Sub-band",
92  UintegerValue (8),
93  MakeUintegerAccessor (&LteFfrDistributedAlgorithm::m_edgeRbNum),
94  MakeUintegerChecker<uint8_t> ())
95  .AddAttribute ("CenterAreaTpc",
96  "TPC value which will be set in DL-DCI for UEs in center area"
97  "Absolute mode is used, default value 1 is mapped to -1 according to"
98  "TS36.213 Table 5.1.1.1-2",
99  UintegerValue (1),
100  MakeUintegerAccessor (&LteFfrDistributedAlgorithm::m_centerAreaTpc),
101  MakeUintegerChecker<uint8_t> ())
102  .AddAttribute ("EdgeAreaTpc",
103  "TPC value which will be set in DL-DCI for UEs in edge area"
104  "Absolute mode is used, default value 1 is mapped to -1 according to"
105  "TS36.213 Table 5.1.1.1-2",
106  UintegerValue (1),
107  MakeUintegerAccessor (&LteFfrDistributedAlgorithm::m_edgeAreaTpc),
108  MakeUintegerChecker<uint8_t> ())
109 
110  ;
111  return tid;
112 }
113 
114 
115 void
117 {
118  NS_LOG_FUNCTION (this << s);
119  m_ffrSapUser = s;
120 }
121 
122 
125 {
126  NS_LOG_FUNCTION (this);
127  return m_ffrSapProvider;
128 }
129 
130 void
132 {
133  NS_LOG_FUNCTION (this << s);
134  m_ffrRrcSapUser = s;
135 }
136 
137 
140 {
141  NS_LOG_FUNCTION (this);
142  return m_ffrRrcSapProvider;
143 }
144 
145 
146 void
148 {
149  NS_LOG_FUNCTION (this);
151 
152  if (m_frCellTypeId != 0)
153  {
156  }
157 
158  NS_LOG_LOGIC (this << " requesting Event A1 and A4 measurements"
159  << " (threshold = 0" << ")");
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 
183 void
185 {
186  NS_LOG_FUNCTION (this);
187  if (m_frCellTypeId != 0)
188  {
191  }
194  m_needReconfiguration = false;
195 }
196 
197 void
198 LteFfrDistributedAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth)
199 {
200  NS_LOG_FUNCTION (this);
201 }
202 
203 void
204 LteFfrDistributedAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth)
205 {
206  NS_LOG_FUNCTION (this);
207 }
208 
209 void
211 {
212  NS_LOG_FUNCTION (this);
213  m_dlRbgMap.clear ();
214  int rbgSize = GetRbgSize (m_dlBandwidth);
215  m_dlRbgMap.resize (m_dlBandwidth / rbgSize, false);
216 }
217 
218 void
220 {
221  NS_LOG_FUNCTION (this);
222  m_ulRbgMap.clear ();
223  m_ulRbgMap.resize (m_ulBandwidth, false);
224 }
225 
226 std::vector <bool>
228 {
229  NS_LOG_FUNCTION (this);
230 
232  {
233  Reconfigure ();
234  }
235 
236  if (m_dlRbgMap.empty ())
237  {
239  }
240 
241  return m_dlRbgMap;
242 }
243 
244 bool
246 {
247  NS_LOG_FUNCTION (this);
248 
249  bool edgeRbg = m_dlEdgeRbgMap[rbgId];
250 
251  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
252  if (it == m_ues.end ())
253  {
254  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
255  return !edgeRbg;
256  }
257 
258  bool edgeUe = false;
259  if (it->second == EdgeArea )
260  {
261  edgeUe = true;
262  }
263 
264  return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
265 }
266 
267 std::vector <bool>
269 {
270  NS_LOG_FUNCTION (this);
271 
272  if (m_ulRbgMap.empty ())
273  {
275  }
276 
277  return m_ulRbgMap;
278 }
279 
280 bool
282 {
283  NS_LOG_FUNCTION (this);
284 
285  if (!m_enabledInUplink)
286  {
287  return true;
288  }
289 
290  bool edgeRbg = m_ulEdgeRbgMap[rbId];
291 
292  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
293  if (it == m_ues.end ())
294  {
295  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
296  return !edgeRbg;
297  }
298 
299  bool edgeUe = false;
300  if (it->second == EdgeArea )
301  {
302  edgeUe = true;
303  }
304 
305  return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
306 }
307 
308 void
310 {
311  NS_LOG_FUNCTION (this);
312  NS_LOG_WARN ("Method should not be called, because it is empty");
313 }
314 
315 void
317 {
318  NS_LOG_FUNCTION (this);
319  NS_LOG_WARN ("Method should not be called, because it is empty");
320 }
321 
322 void
323 LteFfrDistributedAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double> > ulCqiMap)
324 {
325  NS_LOG_FUNCTION (this);
326  NS_LOG_WARN ("Method should not be called, because it is empty");
327 }
328 
329 uint8_t
331 {
332  NS_LOG_FUNCTION (this);
333 
334  if (!m_enabledInUplink)
335  {
336  return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213 Table 5.1.1.1-2
337  }
338 
339  //TS36.213 Table 5.1.1.1-2
340  // TPC | Accumulated Mode | Absolute Mode
341  //------------------------------------------------
342  // 0 | -1 | -4
343  // 1 | 0 | -1
344  // 2 | 1 | 1
345  // 3 | 3 | 4
346  //------------------------------------------------
347  // here Absolute mode is used
348 
349  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
350  if (it == m_ues.end ())
351  {
352  return 1;
353  }
354 
355  if (it->second == EdgeArea )
356  {
357  return m_edgeAreaTpc;
358  }
359  else
360  {
361  return m_centerAreaTpc;
362  }
363 
364  return 1;
365 }
366 
367 uint8_t
369 {
370  NS_LOG_FUNCTION (this);
371 
372  uint8_t minContinuousUlBandwidth = m_ulBandwidth;
373 
374  if (!m_enabledInUplink)
375  {
376  return minContinuousUlBandwidth;
377  }
378 
379  minContinuousUlBandwidth =
380  ((m_edgeRbNum > 0 ) && (m_edgeRbNum < minContinuousUlBandwidth)) ? m_edgeRbNum : minContinuousUlBandwidth;
381 
382  return minContinuousUlBandwidth;
383 }
384 
385 void
387  LteRrcSap::MeasResults measResults)
388 {
389  NS_LOG_FUNCTION (this << rnti << (uint16_t) measResults.measId);
390  NS_LOG_INFO ("CellId: " << m_cellId << " RNTI :" << rnti << " MeasId: " << (uint16_t) measResults.measId
391  << " RSRP: " << (uint16_t)measResults.rsrpResult
392  << " RSRQ: " << (uint16_t)measResults.rsrqResult);
393 
394  if (measResults.measId == m_rsrqMeasId)
395  {
396  //check if it is center or edge UE
397  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
398  if (it == m_ues.end ())
399  {
400  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
401  }
402 
403  it = m_ues.find (rnti);
404  if (measResults.rsrqResult >= m_egdeSubBandRsrqThreshold)
405  {
406  if (it->second != CenterArea)
407  {
408  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Center sub-band");
409  it->second = CenterArea;
410 
411  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
412  pdschConfigDedicated.pa = m_centerPowerOffset;
413  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
414  }
415  }
416  else
417  {
418  if (it->second != EdgeArea )
419  {
420  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Edge sub-band");
421  it->second = EdgeArea;
422 
423  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
424  pdschConfigDedicated.pa = m_edgePowerOffset;
425  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
426  }
427  }
428  }
429  else if (measResults.measId == m_rsrpMeasId)
430  {
431  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
432  if (it == m_ues.end ())
433  {
434  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
435  }
436 
437  UpdateNeighbourMeasurements (rnti, m_cellId, measResults.rsrpResult, measResults.rsrqResult);
438 
439  if (measResults.haveMeasResultNeighCells
440  && !measResults.measResultListEutra.empty ())
441  {
442  for (std::list <LteRrcSap::MeasResultEutra>::iterator it = measResults.measResultListEutra.begin ();
443  it != measResults.measResultListEutra.end ();
444  ++it)
445  {
446  NS_ASSERT_MSG (it->haveRsrpResult == true,
447  "RSRP measurement is missing from cellId " << it->physCellId);
448  NS_ASSERT_MSG (it->haveRsrqResult == true,
449  "RSRQ measurement is missing from cellId " << it->physCellId);
450  UpdateNeighbourMeasurements (rnti, it->physCellId, it->rsrpResult, it->rsrqResult);
451 
452  bool found = false;
453  for (std::vector<uint16_t>::iterator ncIt = m_neigborCell.begin (); ncIt != m_neigborCell.end (); ncIt++)
454  {
455  if ((*ncIt) == it->physCellId)
456  {
457  found = true;
458  }
459  }
460  if (found == false)
461  {
462  m_neigborCell.push_back (it->physCellId);
463  }
464  }
465  }
466  else
467  {
468  NS_LOG_WARN (this << " Event A4 received without measurement results from neighbouring cells");
469  }
470  }
471  else
472  {
473  NS_LOG_WARN ("Ignoring measId " << (uint16_t) measResults.measId);
474  }
475 }
476 
477 void
479 {
480  NS_LOG_FUNCTION (this);
482 
483  int rbgSize = GetRbgSize (m_dlBandwidth);
484  uint16_t rbgNum = m_dlBandwidth / rbgSize;
485 
486  m_cellWeightMap.clear ();
487  m_dlEdgeRbgMap.clear ();
488  m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false);
489  m_ulEdgeRbgMap.clear ();
490  m_ulEdgeRbgMap.resize (m_ulBandwidth, false);
491 
492  MeasurementTable_t::iterator it1;
493  MeasurementRow_t::iterator it2;
494  Ptr<UeMeasure> servingCellMeasures;
495  Ptr<UeMeasure> neighbourCellMeasures;
496 
497  uint32_t edgeUeNum = 0;
498  std::map< uint16_t, uint8_t >::iterator areaIt;
499  for (areaIt = m_ues.begin (); areaIt != m_ues.end (); areaIt++)
500  {
501  if (areaIt->second == EdgeArea)
502  {
503  edgeUeNum++;
504  }
505  }
506 
507  if (edgeUeNum != 0)
508  {
509  for (it1 = m_ueMeasures.begin (); it1 != m_ueMeasures.end (); it1++)
510  {
511  std::map< uint16_t, uint8_t >::iterator areaIt = m_ues.find (it1->first);
512  if (areaIt->second != EdgeArea)
513  {
514  continue;
515  }
516 
517  servingCellMeasures = 0;
518  neighbourCellMeasures = 0;
519 
520  it2 = it1->second.find (m_cellId);
521  if (it2 != it1->second.end ())
522  {
523  servingCellMeasures = it2->second;
524  }
525  else
526  {
527  continue;
528  }
529 
530  for (it2 = it1->second.begin (); it2 != it1->second.end (); it2++)
531  {
532  if (it2->first != m_cellId)
533  {
534  neighbourCellMeasures = it2->second;
535  }
536  else
537  {
538  continue;
539  }
540 
541  if (servingCellMeasures && neighbourCellMeasures)
542  {
543  int16_t rsrpDifference = servingCellMeasures->m_rsrp - neighbourCellMeasures->m_rsrp;
544  NS_LOG_INFO ("CellId: " << m_cellId << " UE RNTI: " << it1->first
545  << " NeighborCellId: " << neighbourCellMeasures->m_cellId
546  << " RSRP Serving: " << (int)servingCellMeasures->m_rsrp
547  << " RSRP Neighbor: " << (int)neighbourCellMeasures->m_rsrp
548  << " RSRP Difference: " << (int)rsrpDifference);
549 
550  if (rsrpDifference < m_rsrpDifferenceThreshold)
551  {
552  m_cellWeightMap[neighbourCellMeasures->m_cellId]++;
553  }
554  }
555  }
556  }
557 
558  std::map< uint16_t, uint64_t > metricA;
559  for (uint16_t i = 0; i < rbgNum; i++)
560  {
561  metricA[i] = 0;
562  }
563 
564  std::map<uint16_t, uint32_t>::iterator cellIt;
565  for (cellIt = m_cellWeightMap.begin (); cellIt != m_cellWeightMap.end (); cellIt++)
566  {
567  NS_LOG_INFO ("CellId: " << m_cellId << " NeighborCellId: " << cellIt->first << " Weight: " << cellIt->second);
568 
569  std::map<uint16_t, std::vector <bool> >::iterator rntpIt = m_rntp.find (cellIt->first);
570  if (rntpIt == m_rntp.end ())
571  {
572  continue;
573  }
574 
575  for (uint8_t i = 0; i < rbgNum; i++)
576  {
577  metricA[i] += cellIt->second * rntpIt->second[i];
578  }
579  }
580 
581  std::vector<uint16_t> sortedRbgByMetric;
582  std::multimap< uint64_t, uint16_t > sortedMetricA;
583  for (std::map<uint16_t, uint64_t>::const_iterator it = metricA.begin (); it != metricA.end (); ++it)
584  {
585  sortedMetricA.insert (std::pair<uint64_t, uint16_t> (it->second, it->first));
586  }
587 
588  for (std::multimap< uint64_t, uint16_t >::const_iterator it = sortedMetricA.begin ();
589  it != sortedMetricA.end (); ++it)
590  {
591  sortedRbgByMetric.push_back (it->second);
592  }
593 
594  for (int i = 0; i < m_edgeRbNum / rbgSize; i++)
595  {
596  m_dlEdgeRbgMap[ sortedRbgByMetric[i] ] = true;
597  }
598 
599  for (int i = 0; i < m_edgeRbNum / rbgSize; i++)
600  {
601  uint32_t rbgIndex = sortedRbgByMetric[i];
602  for (int k = 0; k < rbgSize; k++)
603  {
604  uint32_t rbIndex = rbgSize * rbgIndex + k;
605  m_ulEdgeRbgMap[ rbIndex ] = true;
606  }
607  }
608  }
609 
610  for (std::vector<uint16_t>::iterator ncIt = m_neigborCell.begin (); ncIt != m_neigborCell.end (); ncIt++)
611  {
612  SendLoadInformation ((*ncIt));
613  }
614 }
615 
616 void
618 {
619  NS_LOG_FUNCTION (this);
620 
621  NS_LOG_INFO ("SendLoadInformation to CellId : " << targetCellId );
622 
623  std::vector<EpcX2Sap::UlInterferenceOverloadIndicationItem> m_currentUlInterferenceOverloadIndicationList;
624  std::vector <EpcX2Sap::UlHighInterferenceInformationItem> m_currentUlHighInterferenceInformationList;
625  EpcX2Sap::RelativeNarrowbandTxBand m_currentRelativeNarrowbandTxBand;
626 
627  m_currentRelativeNarrowbandTxBand.rntpPerPrbList = m_dlEdgeRbgMap;
628 
630  cii.sourceCellId = m_cellId;
631  cii.ulInterferenceOverloadIndicationList = m_currentUlInterferenceOverloadIndicationList;
632  cii.ulHighInterferenceInformationList = m_currentUlHighInterferenceInformationList;
633  cii.relativeNarrowbandTxBand = m_currentRelativeNarrowbandTxBand;
634 
636  params.targetCellId = targetCellId;
637  params.cellInformationList.push_back (cii);
638 
640 }
641 
642 void
644 {
645  NS_LOG_FUNCTION (this);
646  NS_LOG_INFO ("CellId: " << m_cellId
647  << " Recv X2 message: LOAD INFORMATION from CellId:" << params.cellInformationList[0].sourceCellId);
648 
649  if (params.cellInformationList[0].sourceCellId > m_cellId)
650  {
651  return;
652  }
653 
654  uint16_t neighborCellId = params.cellInformationList[0].sourceCellId;
655  std::map<uint16_t, std::vector <bool> >::iterator it = m_rntp.find (neighborCellId);
656  if (it != m_rntp.end ())
657  {
658  it->second = params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList;
659  }
660  else
661  {
662  m_rntp.insert (std::pair<uint16_t, std::vector <bool> > (neighborCellId, params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList));
663  }
664 }
665 
666 void
668  uint16_t cellId,
669  uint8_t rsrp,
670  uint8_t rsrq)
671 {
672  NS_LOG_FUNCTION (this << rnti << cellId << (uint16_t) rsrq);
673 
674  MeasurementTable_t::iterator it1;
675  it1 = m_ueMeasures.find (rnti);
676 
677  if (it1 == m_ueMeasures.end ())
678  {
679  // insert a new UE entry
680  MeasurementRow_t row;
681  std::pair<MeasurementTable_t::iterator, bool> ret;
682  ret = m_ueMeasures.insert (std::pair<uint16_t, MeasurementRow_t> (rnti, row));
683  NS_ASSERT (ret.second);
684  it1 = ret.first;
685  }
686 
687  NS_ASSERT (it1 != m_ueMeasures.end ());
688  Ptr<UeMeasure> cellMeasures;
689  std::map<uint16_t, Ptr<UeMeasure> >::iterator it2;
690  it2 = it1->second.find (cellId);
691 
692  if (it2 != it1->second.end ())
693  {
694  cellMeasures = it2->second;
695  cellMeasures->m_cellId = cellId;
696  cellMeasures->m_rsrp = rsrp;
697  cellMeasures->m_rsrq = rsrq;
698  }
699  else
700  {
701  // insert a new cell entry
702  cellMeasures = Create<UeMeasure> ();
703  cellMeasures->m_cellId = cellId;
704  cellMeasures->m_rsrp = rsrp;
705  cellMeasures->m_rsrq = rsrq;
706  it1->second[cellId] = cellMeasures;
707  }
708 
709 } // end of UpdateNeighbourMeasurements
710 
711 } // end of namespace ns3
RSRQ is used for the threshold.
Definition: lte-rrc-sap.h:315
RelativeNarrowbandTxBand relativeNarrowbandTxBand
Definition: epc-x2-sap.h:159
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:60
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:132
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
Definition: object-base.h:38
std::list< MeasResultEutra > measResultListEutra
Definition: lte-rrc-sap.h:582
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:339
Specifies criteria for triggering of an E-UTRA measurement reporting event.
Definition: lte-rrc-sap.h:321
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:61
void SendLoadInformation(uint16_t targetCellId)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
std::vector< UlInterferenceOverloadIndicationItem > ulInterferenceOverloadIndicationList
Definition: epc-x2-sap.h:157
std::map< uint16_t, std::vector< bool > > m_rntp
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:223
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
Definition: simulator.h:825
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
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:444
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...
Event A4: Neighbour becomes better than absolute threshold.
Definition: lte-rrc-sap.h:334
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:146
Attribute for objects of type ns3::Time.
Definition: nstime.h:912
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:46
Ptr< SampleEmitter > s
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
Definition: epc-x2-sap.h:303
uint8_t m_dlBandwidth
downlink bandwidth in RBs
virtual void SendLoadInformation(EpcX2Sap::LoadInformationParams params)=0
SendLoadInformation.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:233
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
std::vector< UlHighInterferenceInformationItem > ulHighInterferenceInformationList
Definition: epc-x2-sap.h:158
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.
Event A1: Serving becomes better than absolute threshold.
Definition: lte-rrc-sap.h:331
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...
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
enum ns3::LteRrcSap::ReportConfigEutra::@73 eventId
Choice of E-UTRA event triggered reporting criteria.
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:317
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Definition: simulator.h:986
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
#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:84
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)
enum ns3::LteRrcSap::ReportConfigEutra::@77 reportInterval
Indicates the interval between periodical reports.
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:203
enum ns3::LteRrcSap::ReportConfigEutra::@75 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:845
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:300
Reference Signal Received Power.
Definition: lte-rrc-sap.h:362
std::map< uint16_t, uint32_t > m_cellWeightMap
Cell Information Item as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:154
std::map< uint16_t, Ptr< UeMeasure > > MeasurementRow_t
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:363
RSRP is used for the threshold.
Definition: lte-rrc-sap.h:314
Relative Narrowband Tx Power (RNTP) as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:140
enum ns3::LteRrcSap::ThresholdEutra::@71 choice
virtual void DoInitialize()
This method is called only once by Object::Initialize.
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
a unique identifier for an interface.
Definition: type-id.h:49
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Definition: object.cc:342
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.