A Discrete-Event Network Simulator
API
lte-ffr-soft-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 
22 #include "lte-ffr-soft-algorithm.h"
23 #include <ns3/log.h>
24 #include "ns3/boolean.h"
25 
26 namespace ns3 {
27 
28 NS_LOG_COMPONENT_DEFINE ("LteFfrSoftAlgorithm");
29 
30 NS_OBJECT_ENSURE_REGISTERED (LteFfrSoftAlgorithm);
31 
33 {
34  uint8_t cellId;
35  uint8_t dlBandwidth;
40  { 1, 15, 2, 0, 4},
41  { 2, 15, 2, 4, 4},
42  { 3, 15, 2, 8, 4},
43  { 1, 25, 6, 0, 6},
44  { 2, 25, 6, 6, 6},
45  { 3, 25, 6, 12, 6},
46  { 1, 50, 21, 0, 9},
47  { 2, 50, 21, 9, 9},
48  { 3, 50, 21, 18, 11},
49  { 1, 75, 36, 0, 12},
50  { 2, 75, 36, 12, 12},
51  { 3, 75, 36, 24, 15},
52  { 1, 100, 28, 0, 24},
53  { 2, 100, 28, 24, 24},
54  { 3, 100, 28, 48, 24}
55 };
56 
58 {
59  uint8_t cellId;
60  uint8_t ulBandwidth;
65  { 1, 15, 3, 0, 4},
66  { 2, 15, 3, 4, 4},
67  { 3, 15, 3, 8, 4},
68  { 1, 25, 6, 0, 6},
69  { 2, 25, 6, 6, 6},
70  { 3, 25, 6, 12, 6},
71  { 1, 50, 21, 0, 9},
72  { 2, 50, 21, 9, 9},
73  { 3, 50, 21, 18, 11},
74  { 1, 75, 36, 0, 12},
75  { 2, 75, 36, 12, 12},
76  { 3, 75, 36, 24, 15},
77  { 1, 100, 28, 0, 24},
78  { 2, 100, 28, 24, 24},
79  { 3, 100, 28, 48, 24}
80 };
81 
82 const uint16_t NUM_DOWNLINK_CONFS (sizeof (g_ffrSoftDownlinkDefaultConfiguration) / sizeof (FfrSoftDownlinkDefaultConfiguration));
83 const uint16_t NUM_UPLINK_CONFS (sizeof (g_ffrSoftUplinkDefaultConfiguration) / sizeof (FfrSoftUplinkDefaultConfiguration));
84 
85 
87  : m_ffrSapUser (0),
88  m_ffrRrcSapUser (0),
89  m_dlEgdeSubBandOffset (0),
90  m_dlEdgeSubBandwidth (0),
91  m_ulEgdeSubBandOffset (0),
92  m_ulEdgeSubBandwidth (0),
93  m_measId (0)
94 {
95  NS_LOG_FUNCTION (this);
98 }
99 
100 
102 {
103  NS_LOG_FUNCTION (this);
104 }
105 
106 
107 void
109 {
110  NS_LOG_FUNCTION (this);
111  delete m_ffrSapProvider;
112  delete m_ffrRrcSapProvider;
113 }
114 
115 
116 TypeId
118 {
119  static TypeId tid = TypeId ("ns3::LteFfrSoftAlgorithm")
121  .SetGroupName("Lte")
122  .AddConstructor<LteFfrSoftAlgorithm> ()
123  .AddAttribute ("UlCommonSubBandwidth",
124  "Uplink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
125  UintegerValue (6),
127  MakeUintegerChecker<uint8_t> ())
128  .AddAttribute ("UlEdgeSubBandOffset",
129  "Uplink Edge SubBand Offset in number of Resource Block Groups",
130  UintegerValue (0),
132  MakeUintegerChecker<uint8_t> ())
133  .AddAttribute ("UlEdgeSubBandwidth",
134  "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
135  UintegerValue (6),
137  MakeUintegerChecker<uint8_t> ())
138  .AddAttribute ("DlCommonSubBandwidth",
139  "Downlink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
140  UintegerValue (6),
142  MakeUintegerChecker<uint8_t> ())
143  .AddAttribute ("DlEdgeSubBandOffset",
144  "Downlink Edge SubBand Offset in number of Resource Block Groups",
145  UintegerValue (0),
147  MakeUintegerChecker<uint8_t> ())
148  .AddAttribute ("DlEdgeSubBandwidth",
149  "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
150  UintegerValue (0),
152  MakeUintegerChecker<uint8_t> ())
153  .AddAttribute ("CenterRsrqThreshold",
154  "If the RSRQ of is worse than this threshold, UE should be served in Medium sub-band",
155  UintegerValue (30),
157  MakeUintegerChecker<uint8_t> ())
158  .AddAttribute ("EdgeRsrqThreshold",
159  "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
160  UintegerValue (20),
162  MakeUintegerChecker<uint8_t> ())
163  .AddAttribute ("CenterAreaPowerOffset",
164  "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
165  UintegerValue (5),
167  MakeUintegerChecker<uint8_t> ())
168  .AddAttribute ("MediumAreaPowerOffset",
169  "PdschConfigDedicated::Pa value for Medium Sub-band, default value dB0",
170  UintegerValue (5),
172  MakeUintegerChecker<uint8_t> ())
173  .AddAttribute ("EdgeAreaPowerOffset",
174  "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
175  UintegerValue (5),
177  MakeUintegerChecker<uint8_t> ())
178  .AddAttribute ("CenterAreaTpc",
179  "TPC value which will be set in DL-DCI for UEs in center area"
180  "Absolute mode is used, default value 1 is mapped to -1 according to"
181  "TS36.213 Table 5.1.1.1-2",
182  UintegerValue (1),
184  MakeUintegerChecker<uint8_t> ())
185  .AddAttribute ("MediumAreaTpc",
186  "TPC value which will be set in DL-DCI for UEs in medium area"
187  "Absolute mode is used, default value 1 is mapped to -1 according to"
188  "TS36.213 Table 5.1.1.1-2",
189  UintegerValue (1),
191  MakeUintegerChecker<uint8_t> ())
192  .AddAttribute ("EdgeAreaTpc",
193  "TPC value which will be set in DL-DCI for UEs in edge area"
194  "Absolute mode is used, default value 1 is mapped to -1 according to"
195  "TS36.213 Table 5.1.1.1-2",
196  UintegerValue (1),
198  MakeUintegerChecker<uint8_t> ())
199  ;
200  return tid;
201 }
202 
203 
204 void
206 {
207  NS_LOG_FUNCTION (this << s);
208  m_ffrSapUser = s;
209 }
210 
211 
214 {
215  NS_LOG_FUNCTION (this);
216  return m_ffrSapProvider;
217 }
218 
219 void
221 {
222  NS_LOG_FUNCTION (this << s);
223  m_ffrRrcSapUser = s;
224 }
225 
226 
229 {
230  NS_LOG_FUNCTION (this);
231  return m_ffrRrcSapProvider;
232 }
233 
234 
235 void
237 {
238  NS_LOG_FUNCTION (this);
240 
241  NS_ASSERT_MSG (m_dlBandwidth > 14,"DlBandwidth must be at least 15 to use FFR algorithms");
242  NS_ASSERT_MSG (m_ulBandwidth > 14,"UlBandwidth must be at least 15 to use FFR algorithms");
243 
244  if (m_frCellTypeId != 0)
245  {
248  }
249 
250  NS_LOG_LOGIC (this << " requesting Event A1 measurements"
251  << " (threshold = 0" << ")");
252  LteRrcSap::ReportConfigEutra reportConfig;
255  reportConfig.threshold1.range = 0;
259 }
260 
261 void
263 {
264  NS_LOG_FUNCTION (this);
265  if (m_frCellTypeId != 0)
266  {
269  }
272  m_needReconfiguration = false;
273 }
274 
275 void
276 LteFfrSoftAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth)
277 {
278  NS_LOG_FUNCTION (this);
279  for (uint16_t i = 0; i < NUM_DOWNLINK_CONFS; ++i)
280  {
281  if ((g_ffrSoftDownlinkDefaultConfiguration[i].cellId == cellId)
283  {
287  }
288  }
289 }
290 
291 void
292 LteFfrSoftAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth)
293 {
294  NS_LOG_FUNCTION (this);
295  for (uint16_t i = 0; i < NUM_UPLINK_CONFS; ++i)
296  {
297  if ((g_ffrSoftUplinkDefaultConfiguration[i].cellId == cellId)
299  {
303  }
304  }
305 }
306 
307 void
309 {
310  m_dlRbgMap.clear ();
311  m_dlCenterRbgMap.clear ();
312  m_dlMediumRbgMap.clear ();
313  m_dlEdgeRbgMap.clear ();
314 
315  int rbgSize = GetRbgSize (m_dlBandwidth);
316  m_dlRbgMap.resize (m_dlBandwidth / rbgSize, false);
317  m_dlCenterRbgMap.resize (m_dlBandwidth / rbgSize, true);
318  m_dlMediumRbgMap.resize (m_dlBandwidth / rbgSize, false);
319  m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false);
320 
321  NS_ASSERT_MSG (m_dlCommonSubBandwidth <= m_dlBandwidth,"DlCommonSubBandwidth higher than DlBandwidth");
323  "DlCommonSubBandwidth + DlEgdeSubBandOffset higher than DlBandwidth");
324  NS_ASSERT_MSG (m_dlEgdeSubBandOffset <= m_dlBandwidth,"DlEgdeSubBandOffset higher than DlBandwidth");
325  NS_ASSERT_MSG (m_dlEdgeSubBandwidth <= m_dlBandwidth,"DlEdgeSubBandwidth higher than DlBandwidth");
327  "(DlCommonSubBandwidth + DlEgdeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
328 
329  for (uint8_t i = 0;
330  i < m_dlCommonSubBandwidth / rbgSize; i++)
331  {
332  m_dlMediumRbgMap[i] = true;
333  m_dlCenterRbgMap[i] = false;
334  }
335 
336  for (uint8_t i = (m_dlCommonSubBandwidth + m_dlEgdeSubBandOffset) / rbgSize;
338  {
339  m_dlEdgeRbgMap[i] = true;
340  m_dlCenterRbgMap[i] = false;
341  }
342 }
343 
344 
345 void
347 {
348  m_ulRbgMap.clear ();
349  m_ulCenterRbgMap.clear ();
350  m_ulMediumRbgMap.clear ();
351  m_ulEdgeRbgMap.clear ();
352 
353  m_ulRbgMap.resize (m_ulBandwidth, false);
354  m_ulCenterRbgMap.resize (m_ulBandwidth, true);
355  m_ulMediumRbgMap.resize (m_ulBandwidth, false);
356  m_ulEdgeRbgMap.resize (m_ulBandwidth, false);
357 
358  NS_ASSERT_MSG (m_ulCommonSubBandwidth <= m_ulBandwidth,"UlCommonSubBandwidth higher than UlBandwidth");
360  "UlCommonSubBandwidth + UlEgdeSubBandOffset higher than UlBandwidth");
361  NS_ASSERT_MSG (m_ulEgdeSubBandOffset <= m_ulBandwidth,"UlEgdeSubBandOffset higher than UlBandwidth");
362  NS_ASSERT_MSG (m_ulEdgeSubBandwidth <= m_ulBandwidth,"UlEdgeSubBandwidth higher than UlBandwidth");
364  "(UlCommonSubBandwidth + UlEgdeSubBandOffset+UlEdgeSubBandwidth) higher than UlBandwidth");
365 
366  for (uint8_t i = 0;
367  i < m_ulCommonSubBandwidth; i++)
368  {
369  m_ulMediumRbgMap[i] = true;
370  m_ulCenterRbgMap[i] = false;
371  }
372 
373  for (uint8_t i = (m_ulCommonSubBandwidth + m_ulEgdeSubBandOffset);
374  i < (m_ulCommonSubBandwidth + m_ulEgdeSubBandOffset + m_ulEdgeSubBandwidth); i++)
375  {
376  m_ulEdgeRbgMap[i] = true;
377  m_ulCenterRbgMap[i] = false;
378  }
379 }
380 
381 std::vector <bool>
383 {
384  NS_LOG_FUNCTION (this);
385 
387  {
388  Reconfigure ();
389  }
390 
391  if (m_dlRbgMap.empty ())
392  {
394  }
395 
396  return m_dlRbgMap;
397 }
398 
399 bool
401 {
402  NS_LOG_FUNCTION (this);
403 
404  bool isCenterRbg = m_dlCenterRbgMap[rbgId];
405  bool isMediumRbg = m_dlMediumRbgMap[rbgId];
406  bool isEdgeRbg = m_dlEdgeRbgMap[rbgId];
407 
408  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
409  if (it == m_ues.end ())
410  {
411  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
412  }
413 
414  it = m_ues.find (rnti);
415 
416  //if UE area is unknown, serve UE in medium (common) RBGs
417  if (it->second == AreaUnset)
418  {
419  return isMediumRbg;
420  }
421 
422 
423  bool isCenterUe = false;
424  bool isMediumUe = false;
425  bool isEdgeUe = false;
426 
427  if (it->second == CenterArea )
428  {
429  isCenterUe = true;
430  }
431  else if (it->second == MediumArea)
432  {
433  isMediumUe = true;
434  }
435  else if (it->second == EdgeArea)
436  {
437  isEdgeUe = true;
438  }
439 
440  return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
441 }
442 
443 std::vector <bool>
445 {
446  NS_LOG_FUNCTION (this);
447 
448  if (m_ulRbgMap.empty ())
449  {
451  }
452 
453  return m_ulRbgMap;
454 }
455 
456 bool
458 {
459  NS_LOG_FUNCTION (this);
460 
461  if (!m_enabledInUplink)
462  {
463  return true;
464  }
465 
466  bool isCenterRbg = m_ulCenterRbgMap[rbgId];
467  bool isMediumRbg = m_ulMediumRbgMap[rbgId];
468  bool isEdgeRbg = m_ulEdgeRbgMap[rbgId];
469 
470  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
471  if (it == m_ues.end ())
472  {
473  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
474  }
475 
476  it = m_ues.find (rnti);
477 
478  //if UE area is unknown, serve UE in medium (common) RBGs
479  if (it->second == AreaUnset)
480  {
481  return isMediumRbg;
482  }
483 
484 
485  bool isCenterUe = false;
486  bool isMediumUe = false;
487  bool isEdgeUe = false;
488 
489  if (it->second == CenterArea )
490  {
491  isCenterUe = true;
492  }
493  else if (it->second == MediumArea)
494  {
495  isMediumUe = true;
496  }
497  else if (it->second == EdgeArea)
498  {
499  isEdgeUe = true;
500  }
501 
502  return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
503 }
504 
505 void
507 {
508  NS_LOG_FUNCTION (this);
509  NS_LOG_WARN ("Method should not be called, because it is empty");
510 }
511 
512 void
514 {
515  NS_LOG_FUNCTION (this);
516  NS_LOG_WARN ("Method should not be called, because it is empty");
517 }
518 
519 void
520 LteFfrSoftAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double> > ulCqiMap)
521 {
522  NS_LOG_FUNCTION (this);
523  NS_LOG_WARN ("Method should not be called, because it is empty");
524 }
525 
526 uint8_t
528 {
529  NS_LOG_FUNCTION (this);
530 
531  if (!m_enabledInUplink)
532  {
533  return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213 Table 5.1.1.1-2
534  }
535 
536  //TS36.213 Table 5.1.1.1-2
537  // TPC | Accumulated Mode | Absolute Mode
538  //------------------------------------------------
539  // 0 | -1 | -4
540  // 1 | 0 | -1
541  // 2 | 1 | 1
542  // 3 | 3 | 4
543  //------------------------------------------------
544  // here Absolute mode is used
545 
546  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
547  if (it == m_ues.end ())
548  {
549  return 1;
550  }
551 
552  if (it->second == CenterArea )
553  {
554  return m_centerAreaTpc;
555  }
556  else if (it->second == MediumArea)
557  {
558  return m_mediumAreaTpc;
559  }
560  else if (it->second == EdgeArea)
561  {
562  return m_edgeAreaTpc;
563  }
564 
565  return 1;
566 }
567 
568 uint8_t
570 {
571  NS_LOG_FUNCTION (this);
572 
573  if (!m_enabledInUplink)
574  {
575  return m_ulBandwidth;
576  }
577 
578  uint8_t centerSubBandwidth = 0;
579  uint8_t mediumSubBandwidth = 0;
580  uint8_t edgeSubBandwidth = 0;
581 
582  for (uint8_t i = 0; i < m_ulCenterRbgMap.size (); i++)
583  {
584  if ( m_ulCenterRbgMap[i] == true)
585  {
586  centerSubBandwidth++;
587  }
588  }
589 
590  for (uint8_t i = 0; i < m_ulMediumRbgMap.size (); i++)
591  {
592  if ( m_ulMediumRbgMap[i] == true)
593  {
594  mediumSubBandwidth++;
595  }
596  }
597 
598  for (uint8_t i = 0; i < m_ulEdgeRbgMap.size (); i++)
599  {
600  if ( m_ulEdgeRbgMap[i] == true)
601  {
602  edgeSubBandwidth++;
603  }
604  }
605 
606  uint8_t minContinuousUlBandwidth = m_ulBandwidth;
607 
608  minContinuousUlBandwidth =
609  ((centerSubBandwidth > 0 ) && (centerSubBandwidth < minContinuousUlBandwidth)) ? centerSubBandwidth : minContinuousUlBandwidth;
610 
611  minContinuousUlBandwidth =
612  ((mediumSubBandwidth > 0 ) && (mediumSubBandwidth < minContinuousUlBandwidth)) ? mediumSubBandwidth : minContinuousUlBandwidth;
613 
614  minContinuousUlBandwidth =
615  ((edgeSubBandwidth > 0 ) && (edgeSubBandwidth < minContinuousUlBandwidth)) ? edgeSubBandwidth : minContinuousUlBandwidth;
616 
617  NS_LOG_INFO ("minContinuousUlBandwidth: " << (int)minContinuousUlBandwidth);
618 
619  return minContinuousUlBandwidth;
620 }
621 
622 void
624  LteRrcSap::MeasResults measResults)
625 {
626  NS_LOG_FUNCTION (this << rnti << (uint16_t) measResults.measId);
627  NS_LOG_INFO ("RNTI :" << rnti << " MeasId: " << (uint16_t) measResults.measId
628  << " RSRP: " << (uint16_t)measResults.rsrpResult
629  << " RSRQ: " << (uint16_t)measResults.rsrqResult);
630 
632  "CenterSubBandThreshold must be higher than EgdeSubBandThreshold");
633 
634  if (measResults.measId != m_measId)
635  {
636  NS_LOG_WARN ("Ignoring measId " << (uint16_t) measResults.measId);
637  }
638  else
639  {
640 
641  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
642  if (it == m_ues.end ())
643  {
644  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
645  }
646 
647  it = m_ues.find (rnti);
648  if (measResults.rsrqResult >= m_centerSubBandThreshold)
649  {
650  if (it->second != CenterArea)
651  {
652  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Center sub-band");
653  it->second = CenterArea;
654 
655  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
656  pdschConfigDedicated.pa = m_centerAreaPowerOffset;
657  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
658  }
659  }
660  else if (measResults.rsrqResult < m_egdeSubBandThreshold)
661  {
662  if (it->second != EdgeArea )
663  {
664  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Edge sub-band");
665  it->second = EdgeArea;
666 
667  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
668  pdschConfigDedicated.pa = m_edgeAreaPowerOffset;
669  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
670  }
671  }
672  else
673  {
674  if (it->second != MediumArea)
675  {
676  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Medium sub-band");
677  it->second = MediumArea;
678 
679  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
680  pdschConfigDedicated.pa = m_mediumAreaPowerOffset;
681  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
682  }
683  }
684  }
685 }
686 
687 void
689 {
690  NS_LOG_FUNCTION (this);
691  NS_LOG_WARN ("Method should not be called, because it is empty");
692 }
693 
694 } // end of namespace ns3
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...
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 "...
std::vector< bool > m_ulEdgeRbgMap
std::vector< bool > m_dlCenterRbgMap
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
enum ns3::LteRrcSap::ReportConfigEutra::@73 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
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
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
enum ns3::LteRrcSap::ReportConfigEutra::@71 eventId
Choice of E-UTRA event triggered reporting criteria.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:244
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
enum ns3::LteRrcSap::ThresholdEutra::@69 choice
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 SetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated)=0
Instruct the eNodeB RRC entity to perform RrcConnectionReconfiguration to inform UE about new PdschCo...
std::vector< bool > m_ulCenterRbgMap
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
static const struct ns3::FfrSoftDownlinkDefaultConfiguration g_ffrSoftDownlinkDefaultConfiguration[]
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:39
Soft Fractional Frequency Reuse algorithm implementation.
Hold an unsigned integer type.
Definition: uinteger.h:44
std::vector< bool > m_dlEdgeRbgMap
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
std::vector< bool > m_ulMediumRbgMap
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:252
virtual void Reconfigure()
Automatic FR reconfiguration.
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The abstract base class of a Frequency Reuse algorithm.
enum ns3::LteRrcSap::ReportConfigEutra::@75 reportInterval
Indicates the interval between periodical reports.
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:317
virtual void DoInitialize()
Initialize() implementation.
std::map< uint16_t, uint8_t > m_ues
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:90
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
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:228
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
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
virtual void DoDispose()
Destructor implementation.
std::vector< bool > m_dlMediumRbgMap
LteFfrRrcSapProvider * m_ffrRrcSapProvider
RSRQ is used for the threshold.
Definition: lte-rrc-sap.h:315
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
LteFfrSapProvider * m_ffrSapProvider
static const struct ns3::FfrSoftUplinkDefaultConfiguration g_ffrSoftUplinkDefaultConfiguration[]
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
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
a unique identifier for an interface.
Definition: type-id.h:58
LteFfrRrcSapUser * m_ffrRrcSapUser
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:904
Event A1: Serving becomes better than absolute threshold.
Definition: lte-rrc-sap.h:331
LteFfrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
const uint16_t NUM_UPLINK_CONFS(sizeof(g_ffrEnhancedUplinkDefaultConfiguration)/sizeof(FfrEnhancedUplinkDefaultConfiguration))
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:363