A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 NS_LOG_COMPONENT_DEFINE ("LteFfrSoftAlgorithm");
27 
28 namespace ns3 {
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  .AddConstructor<LteFfrSoftAlgorithm> ()
122  .AddAttribute ("UlCommonSubBandwidth",
123  "Uplink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
124  UintegerValue (6),
125  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_ulCommonSubBandwidth),
126  MakeUintegerChecker<uint8_t> ())
127  .AddAttribute ("UlEdgeSubBandOffset",
128  "Uplink Edge SubBand Offset in number of Resource Block Groups",
129  UintegerValue (0),
130  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_ulEgdeSubBandOffset),
131  MakeUintegerChecker<uint8_t> ())
132  .AddAttribute ("UlEdgeSubBandwidth",
133  "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
134  UintegerValue (6),
135  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_ulEdgeSubBandwidth),
136  MakeUintegerChecker<uint8_t> ())
137  .AddAttribute ("DlCommonSubBandwidth",
138  "Downlink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
139  UintegerValue (6),
140  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_dlCommonSubBandwidth),
141  MakeUintegerChecker<uint8_t> ())
142  .AddAttribute ("DlEdgeSubBandOffset",
143  "Downlink Edge SubBand Offset in number of Resource Block Groups",
144  UintegerValue (0),
145  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_dlEgdeSubBandOffset),
146  MakeUintegerChecker<uint8_t> ())
147  .AddAttribute ("DlEdgeSubBandwidth",
148  "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
149  UintegerValue (0),
150  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_dlEdgeSubBandwidth),
151  MakeUintegerChecker<uint8_t> ())
152  .AddAttribute ("CenterRsrqThreshold",
153  "If the RSRQ of is worse than this threshold, UE should be served in Medium sub-band",
154  UintegerValue (30),
155  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_centerSubBandThreshold),
156  MakeUintegerChecker<uint8_t> ())
157  .AddAttribute ("EdgeRsrqThreshold",
158  "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
159  UintegerValue (20),
160  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_egdeSubBandThreshold),
161  MakeUintegerChecker<uint8_t> ())
162  .AddAttribute ("CenterAreaPowerOffset",
163  "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
164  UintegerValue (5),
165  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_centerAreaPowerOffset),
166  MakeUintegerChecker<uint8_t> ())
167  .AddAttribute ("MediumAreaPowerOffset",
168  "PdschConfigDedicated::Pa value for Medium Sub-band, default value dB0",
169  UintegerValue (5),
170  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_mediumAreaPowerOffset),
171  MakeUintegerChecker<uint8_t> ())
172  .AddAttribute ("EdgeAreaPowerOffset",
173  "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
174  UintegerValue (5),
175  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_edgeAreaPowerOffset),
176  MakeUintegerChecker<uint8_t> ())
177  .AddAttribute ("CenterAreaTpc",
178  "TPC value which will be set in DL-DCI for UEs in center area"
179  "Absolute mode is used, default value 1 is mapped to -1 according to"
180  "TS36.213 Table 5.1.1.1-2",
181  UintegerValue (1),
182  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_centerAreaTpc),
183  MakeUintegerChecker<uint8_t> ())
184  .AddAttribute ("MediumAreaTpc",
185  "TPC value which will be set in DL-DCI for UEs in medium area"
186  "Absolute mode is used, default value 1 is mapped to -1 according to"
187  "TS36.213 Table 5.1.1.1-2",
188  UintegerValue (1),
189  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_mediumAreaTpc),
190  MakeUintegerChecker<uint8_t> ())
191  .AddAttribute ("EdgeAreaTpc",
192  "TPC value which will be set in DL-DCI for UEs in edge area"
193  "Absolute mode is used, default value 1 is mapped to -1 according to"
194  "TS36.213 Table 5.1.1.1-2",
195  UintegerValue (1),
196  MakeUintegerAccessor (&LteFfrSoftAlgorithm::m_edgeAreaTpc),
197  MakeUintegerChecker<uint8_t> ())
198  ;
199  return tid;
200 }
201 
202 
203 void
205 {
206  NS_LOG_FUNCTION (this << s);
207  m_ffrSapUser = s;
208 }
209 
210 
213 {
214  NS_LOG_FUNCTION (this);
215  return m_ffrSapProvider;
216 }
217 
218 void
220 {
221  NS_LOG_FUNCTION (this << s);
222  m_ffrRrcSapUser = s;
223 }
224 
225 
228 {
229  NS_LOG_FUNCTION (this);
230  return m_ffrRrcSapProvider;
231 }
232 
233 
234 void
236 {
237  NS_LOG_FUNCTION (this);
239 
240  NS_ASSERT_MSG (m_dlBandwidth > 14,"DlBandwidth must be at least 15 to use FFR algorithms");
241  NS_ASSERT_MSG (m_ulBandwidth > 14,"UlBandwidth must be at least 15 to use FFR algorithms");
242 
243  if (m_frCellTypeId != 0)
244  {
247  }
248 
249  NS_LOG_LOGIC (this << " requesting Event A1 measurements"
250  << " (threshold = 0" << ")");
251  LteRrcSap::ReportConfigEutra reportConfig;
254  reportConfig.threshold1.range = 0;
258 }
259 
260 void
262 {
263  NS_LOG_FUNCTION (this);
264  if (m_frCellTypeId != 0)
265  {
268  }
271  m_needReconfiguration = false;
272 }
273 
274 void
275 LteFfrSoftAlgorithm::SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth)
276 {
277  NS_LOG_FUNCTION (this);
278  for (uint16_t i = 0; i < NUM_DOWNLINK_CONFS; ++i)
279  {
280  if ((g_ffrSoftDownlinkDefaultConfiguration[i].cellId == cellId)
282  {
286  }
287  }
288 }
289 
290 void
291 LteFfrSoftAlgorithm::SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth)
292 {
293  NS_LOG_FUNCTION (this);
294  for (uint16_t i = 0; i < NUM_UPLINK_CONFS; ++i)
295  {
296  if ((g_ffrSoftUplinkDefaultConfiguration[i].cellId == cellId)
298  {
302  }
303  }
304 }
305 
306 void
308 {
309  m_dlRbgMap.clear ();
310  m_dlCenterRbgMap.clear ();
311  m_dlMediumRbgMap.clear ();
312  m_dlEdgeRbgMap.clear ();
313 
314  int rbgSize = GetRbgSize (m_dlBandwidth);
315  m_dlRbgMap.resize (m_dlBandwidth / rbgSize, false);
316  m_dlCenterRbgMap.resize (m_dlBandwidth / rbgSize, true);
317  m_dlMediumRbgMap.resize (m_dlBandwidth / rbgSize, false);
318  m_dlEdgeRbgMap.resize (m_dlBandwidth / rbgSize, false);
319 
320  NS_ASSERT_MSG (m_dlCommonSubBandwidth <= m_dlBandwidth,"DlCommonSubBandwidth higher than DlBandwidth");
322  "DlCommonSubBandwidth + DlEgdeSubBandOffset higher than DlBandwidth");
323  NS_ASSERT_MSG (m_dlEgdeSubBandOffset <= m_dlBandwidth,"DlEgdeSubBandOffset higher than DlBandwidth");
324  NS_ASSERT_MSG (m_dlEdgeSubBandwidth <= m_dlBandwidth,"DlEdgeSubBandwidth higher than DlBandwidth");
326  "(DlCommonSubBandwidth + DlEgdeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
327 
328  for (uint8_t i = 0;
329  i < m_dlCommonSubBandwidth / rbgSize; i++)
330  {
331  m_dlMediumRbgMap[i] = true;
332  m_dlCenterRbgMap[i] = false;
333  }
334 
335  for (uint8_t i = (m_dlCommonSubBandwidth + m_dlEgdeSubBandOffset) / rbgSize;
337  {
338  m_dlEdgeRbgMap[i] = true;
339  m_dlCenterRbgMap[i] = false;
340  }
341 }
342 
343 
344 void
346 {
347  m_ulRbgMap.clear ();
348  m_ulCenterRbgMap.clear ();
349  m_ulMediumRbgMap.clear ();
350  m_ulEdgeRbgMap.clear ();
351 
352  m_ulRbgMap.resize (m_ulBandwidth, false);
353  m_ulCenterRbgMap.resize (m_ulBandwidth, true);
354  m_ulMediumRbgMap.resize (m_ulBandwidth, false);
355  m_ulEdgeRbgMap.resize (m_ulBandwidth, false);
356 
357  NS_ASSERT_MSG (m_ulCommonSubBandwidth <= m_ulBandwidth,"UlCommonSubBandwidth higher than UlBandwidth");
359  "UlCommonSubBandwidth + UlEgdeSubBandOffset higher than UlBandwidth");
360  NS_ASSERT_MSG (m_ulEgdeSubBandOffset <= m_ulBandwidth,"UlEgdeSubBandOffset higher than UlBandwidth");
361  NS_ASSERT_MSG (m_ulEdgeSubBandwidth <= m_ulBandwidth,"UlEdgeSubBandwidth higher than UlBandwidth");
363  "(UlCommonSubBandwidth + UlEgdeSubBandOffset+UlEdgeSubBandwidth) higher than UlBandwidth");
364 
365  for (uint8_t i = 0;
366  i < m_ulCommonSubBandwidth; i++)
367  {
368  m_ulMediumRbgMap[i] = true;
369  m_ulCenterRbgMap[i] = false;
370  }
371 
372  for (uint8_t i = (m_ulCommonSubBandwidth + m_ulEgdeSubBandOffset);
373  i < (m_ulCommonSubBandwidth + m_ulEgdeSubBandOffset + m_ulEdgeSubBandwidth); i++)
374  {
375  m_ulEdgeRbgMap[i] = true;
376  m_ulCenterRbgMap[i] = false;
377  }
378 }
379 
380 std::vector <bool>
382 {
383  NS_LOG_FUNCTION (this);
384 
386  {
387  Reconfigure ();
388  }
389 
390  if (m_dlRbgMap.empty ())
391  {
393  }
394 
395  return m_dlRbgMap;
396 }
397 
398 bool
400 {
401  NS_LOG_FUNCTION (this);
402 
403  bool isCenterRbg = m_dlCenterRbgMap[rbgId];
404  bool isMediumRbg = m_dlMediumRbgMap[rbgId];
405  bool isEdgeRbg = m_dlEdgeRbgMap[rbgId];
406 
407  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
408  if (it == m_ues.end ())
409  {
410  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
411  }
412 
413  it = m_ues.find (rnti);
414 
415  //if UE area is unknown, serve UE in medium (common) RBGs
416  if (it->second == AreaUnset)
417  {
418  return isMediumRbg;
419  }
420 
421 
422  bool isCenterUe = false;
423  bool isMediumUe = false;
424  bool isEdgeUe = false;
425 
426  if (it->second == CenterArea )
427  {
428  isCenterUe = true;
429  }
430  else if (it->second == MediumArea)
431  {
432  isMediumUe = true;
433  }
434  else if (it->second == EdgeArea)
435  {
436  isEdgeUe = true;
437  }
438 
439  return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
440 }
441 
442 std::vector <bool>
444 {
445  NS_LOG_FUNCTION (this);
446 
447  if (m_ulRbgMap.empty ())
448  {
450  }
451 
452  return m_ulRbgMap;
453 }
454 
455 bool
457 {
458  NS_LOG_FUNCTION (this);
459 
460  if (!m_enabledInUplink)
461  {
462  return true;
463  }
464 
465  bool isCenterRbg = m_ulCenterRbgMap[rbgId];
466  bool isMediumRbg = m_ulMediumRbgMap[rbgId];
467  bool isEdgeRbg = m_ulEdgeRbgMap[rbgId];
468 
469  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
470  if (it == m_ues.end ())
471  {
472  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
473  }
474 
475  it = m_ues.find (rnti);
476 
477  //if UE area is unknown, serve UE in medium (common) RBGs
478  if (it->second == AreaUnset)
479  {
480  return isMediumRbg;
481  }
482 
483 
484  bool isCenterUe = false;
485  bool isMediumUe = false;
486  bool isEdgeUe = false;
487 
488  if (it->second == CenterArea )
489  {
490  isCenterUe = true;
491  }
492  else if (it->second == MediumArea)
493  {
494  isMediumUe = true;
495  }
496  else if (it->second == EdgeArea)
497  {
498  isEdgeUe = true;
499  }
500 
501  return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
502 }
503 
504 void
506 {
507  NS_LOG_FUNCTION (this);
508  NS_LOG_WARN ("Method should not be called, because it is empty");
509 }
510 
511 void
513 {
514  NS_LOG_FUNCTION (this);
515  NS_LOG_WARN ("Method should not be called, because it is empty");
516 }
517 
518 void
519 LteFfrSoftAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double> > ulCqiMap)
520 {
521  NS_LOG_FUNCTION (this);
522  NS_LOG_WARN ("Method should not be called, because it is empty");
523 }
524 
525 uint8_t
527 {
528  NS_LOG_FUNCTION (this);
529 
530  if (!m_enabledInUplink)
531  {
532  return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213 Table 5.1.1.1-2
533  }
534 
535  //TS36.213 Table 5.1.1.1-2
536  // TPC | Accumulated Mode | Absolute Mode
537  //------------------------------------------------
538  // 0 | -1 | -4
539  // 1 | 0 | -1
540  // 2 | 1 | 1
541  // 3 | 3 | 4
542  //------------------------------------------------
543  // here Absolute mode is used
544 
545  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
546  if (it == m_ues.end ())
547  {
548  return 1;
549  }
550 
551  if (it->second == CenterArea )
552  {
553  return m_centerAreaTpc;
554  }
555  else if (it->second == MediumArea)
556  {
557  return m_mediumAreaTpc;
558  }
559  else if (it->second == EdgeArea)
560  {
561  return m_edgeAreaTpc;
562  }
563 
564  return 1;
565 }
566 
567 uint8_t
569 {
570  NS_LOG_FUNCTION (this);
571 
572  if (!m_enabledInUplink)
573  {
574  return m_ulBandwidth;
575  }
576 
577  uint8_t centerSubBandwidth = 0;
578  uint8_t mediumSubBandwidth = 0;
579  uint8_t edgeSubBandwidth = 0;
580 
581  for (uint8_t i = 0; i < m_ulCenterRbgMap.size (); i++)
582  {
583  if ( m_ulCenterRbgMap[i] == true)
584  {
585  centerSubBandwidth++;
586  }
587  }
588 
589  for (uint8_t i = 0; i < m_ulMediumRbgMap.size (); i++)
590  {
591  if ( m_ulMediumRbgMap[i] == true)
592  {
593  mediumSubBandwidth++;
594  }
595  }
596 
597  for (uint8_t i = 0; i < m_ulEdgeRbgMap.size (); i++)
598  {
599  if ( m_ulEdgeRbgMap[i] == true)
600  {
601  edgeSubBandwidth++;
602  }
603  }
604 
605  uint8_t minContinuousUlBandwidth = m_ulBandwidth;
606 
607  minContinuousUlBandwidth =
608  ((centerSubBandwidth > 0 ) && (centerSubBandwidth < minContinuousUlBandwidth)) ? centerSubBandwidth : minContinuousUlBandwidth;
609 
610  minContinuousUlBandwidth =
611  ((mediumSubBandwidth > 0 ) && (mediumSubBandwidth < minContinuousUlBandwidth)) ? mediumSubBandwidth : minContinuousUlBandwidth;
612 
613  minContinuousUlBandwidth =
614  ((edgeSubBandwidth > 0 ) && (edgeSubBandwidth < minContinuousUlBandwidth)) ? edgeSubBandwidth : minContinuousUlBandwidth;
615 
616  NS_LOG_INFO ("minContinuousUlBandwidth: " << (int)minContinuousUlBandwidth);
617 
618  return minContinuousUlBandwidth;
619 }
620 
621 void
623  LteRrcSap::MeasResults measResults)
624 {
625  NS_LOG_FUNCTION (this << rnti << (uint16_t) measResults.measId);
626  NS_LOG_INFO ("RNTI :" << rnti << " MeasId: " << (uint16_t) measResults.measId
627  << " RSRP: " << (uint16_t)measResults.rsrpResult
628  << " RSRQ: " << (uint16_t)measResults.rsrqResult);
629 
631  "CenterSubBandThreshold must be higher than EgdeSubBandThreshold");
632 
633  if (measResults.measId != m_measId)
634  {
635  NS_LOG_WARN ("Ignoring measId " << (uint16_t) measResults.measId);
636  }
637  else
638  {
639 
640  std::map< uint16_t, uint8_t >::iterator it = m_ues.find (rnti);
641  if (it == m_ues.end ())
642  {
643  m_ues.insert (std::pair< uint16_t, uint8_t > (rnti, AreaUnset));
644  }
645 
646  it = m_ues.find (rnti);
647  if (measResults.rsrqResult >= m_centerSubBandThreshold)
648  {
649  if (it->second != CenterArea)
650  {
651  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Center sub-band");
652  it->second = CenterArea;
653 
654  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
655  pdschConfigDedicated.pa = m_centerAreaPowerOffset;
656  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
657  }
658  }
659  else if (measResults.rsrqResult < m_egdeSubBandThreshold)
660  {
661  if (it->second != EdgeArea )
662  {
663  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Edge sub-band");
664  it->second = EdgeArea;
665 
666  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
667  pdschConfigDedicated.pa = m_edgeAreaPowerOffset;
668  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
669  }
670  }
671  else
672  {
673  if (it->second != MediumArea)
674  {
675  NS_LOG_INFO ("UE RNTI: " << rnti << " will be served in Medium sub-band");
676  it->second = MediumArea;
677 
678  LteRrcSap::PdschConfigDedicated pdschConfigDedicated;
679  pdschConfigDedicated.pa = m_mediumAreaPowerOffset;
680  m_ffrRrcSapUser->SetPdschConfigDedicated (rnti, pdschConfigDedicated);
681  }
682  }
683  }
684 }
685 
686 void
688 {
689  NS_LOG_FUNCTION (this);
690  NS_LOG_WARN ("Method should not be called, because it is empty");
691 }
692 
693 } // end of namespace ns3
RSRQ is used for the threshold.
Definition: lte-rrc-sap.h:315
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...
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 the class in the ns-3 factory.
Definition: object-base.h:38
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:170
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:223
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.
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
Hold an unsigned integer type.
Definition: uinteger.h:46
Ptr< SampleEmitter > s
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:233
virtual void Reconfigure()
Automatic FR reconfiguration.
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
Event A1: Serving becomes better than absolute threshold.
Definition: lte-rrc-sap.h:331
The abstract base class of a Frequency Reuse algorithm.
enum ns3::LteRrcSap::ReportConfigEutra::@73 eventId
Choice of E-UTRA event triggered reporting criteria.
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()
This method is called only once by Object::Initialize.
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:84
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.
enum ns3::LteRrcSap::ReportConfigEutra::@77 reportInterval
Indicates the interval between periodical reports.
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:203
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
enum ns3::LteRrcSap::ReportConfigEutra::@75 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
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()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
std::vector< bool > m_dlMediumRbgMap
LteFfrRrcSapProvider * m_ffrRrcSapProvider
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:363
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
LteFfrSapProvider * m_ffrSapProvider
enum ns3::LteRrcSap::ThresholdEutra::@71 choice
static const struct ns3::FfrSoftUplinkDefaultConfiguration g_ffrSoftUplinkDefaultConfiguration[]
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
a unique identifier for an interface.
Definition: type-id.h:49
LteFfrRrcSapUser * m_ffrRrcSapUser
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
LteFfrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
const uint16_t NUM_UPLINK_CONFS(sizeof(g_ffrEnhancedUplinkDefaultConfiguration)/sizeof(FfrEnhancedUplinkDefaultConfiguration))
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Definition: object.cc:342