24 #include "ns3/boolean.h"    54   { 2, 100, 28, 24, 24},
    80   { 2, 100, 28, 24, 24},
    93     m_dlEdgeSubBandOffset (0),
    94     m_dlEdgeSubBandwidth (0),
    95     m_ulEdgeSubBandOffset (0),
    96     m_ulEdgeSubBandwidth (0),
   127     .AddAttribute (
"UlCommonSubBandwidth",
   128                    "Uplink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
   131                    MakeUintegerChecker<uint8_t> ())
   132     .AddAttribute (
"UlEdgeSubBandOffset",
   133                    "Uplink Edge SubBand Offset in number of Resource Block Groups",
   136                    MakeUintegerChecker<uint8_t> ())
   137     .AddAttribute (
"UlEdgeSubBandwidth",
   138                    "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
   141                    MakeUintegerChecker<uint8_t> ())
   142     .AddAttribute (
"DlCommonSubBandwidth",
   143                    "Downlink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
   146                    MakeUintegerChecker<uint8_t> ())
   147     .AddAttribute (
"DlEdgeSubBandOffset",
   148                    "Downlink Edge SubBand Offset in number of Resource Block Groups",
   151                    MakeUintegerChecker<uint8_t> ())
   152     .AddAttribute (
"DlEdgeSubBandwidth",
   153                    "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
   156                    MakeUintegerChecker<uint8_t> ())
   157     .AddAttribute (
"CenterRsrqThreshold",
   158                    "If the RSRQ of is worse than this threshold, UE should be served in Medium sub-band",
   161                    MakeUintegerChecker<uint8_t> ())
   162     .AddAttribute (
"EdgeRsrqThreshold",
   163                    "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
   166                    MakeUintegerChecker<uint8_t> ())
   167     .AddAttribute (
"CenterAreaPowerOffset",
   168                    "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
   171                    MakeUintegerChecker<uint8_t> ())
   172     .AddAttribute (
"MediumAreaPowerOffset",
   173                    "PdschConfigDedicated::Pa value for Medium Sub-band, default value dB0",
   176                    MakeUintegerChecker<uint8_t> ())
   177     .AddAttribute (
"EdgeAreaPowerOffset",
   178                    "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
   181                    MakeUintegerChecker<uint8_t> ())
   182     .AddAttribute (
"CenterAreaTpc",
   183                    "TPC value which will be set in DL-DCI for UEs in center area"   184                    "Absolute mode is used, default value 1 is mapped to -1 according to"   185                    "TS36.213 Table 5.1.1.1-2",
   188                    MakeUintegerChecker<uint8_t> ())
   189     .AddAttribute (
"MediumAreaTpc",
   190                    "TPC value which will be set in DL-DCI for UEs in medium area"   191                    "Absolute mode is used, default value 1 is mapped to -1 according to"   192                    "TS36.213 Table 5.1.1.1-2",
   195                    MakeUintegerChecker<uint8_t> ())
   196     .AddAttribute (
"EdgeAreaTpc",
   197                    "TPC value which will be set in DL-DCI for UEs in edge area"   198                    "Absolute mode is used, default value 1 is mapped to -1 according to"   199                    "TS36.213 Table 5.1.1.1-2",
   202                    MakeUintegerChecker<uint8_t> ())
   254   NS_LOG_LOGIC (
this << 
" requesting Event A1 measurements"   255                      << 
" (threshold = 0" << 
")");
   327                  "DlCommonSubBandwidth + DlEdgeSubBandOffset higher than DlBandwidth");
   331                  "(DlCommonSubBandwidth + DlEdgeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
   364                  "UlCommonSubBandwidth + UlEdgeSubBandOffset higher than UlBandwidth");
   368                  "(UlCommonSubBandwidth + UlEdgeSubBandOffset+UlEdgeSubBandwidth) higher than UlBandwidth");
   412   std::map< uint16_t, uint8_t >::iterator it = 
m_ues.find (rnti);
   413   if (it == 
m_ues.end ())
   418   it = 
m_ues.find (rnti);
   427   bool isCenterUe = 
false;
   428   bool isMediumUe = 
false;
   429   bool isEdgeUe   = 
false;
   444   return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
   474   std::map< uint16_t, uint8_t >::iterator it = 
m_ues.find (rnti);
   475   if (it == 
m_ues.end ())
   480   it = 
m_ues.find (rnti);
   489   bool isCenterUe = 
false;
   490   bool isMediumUe = 
false;
   491   bool isEdgeUe   = 
false;
   506   return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
   513   NS_LOG_WARN (
"Method should not be called, because it is empty");
   520   NS_LOG_WARN (
"Method should not be called, because it is empty");
   527   NS_LOG_WARN (
"Method should not be called, because it is empty");
   550   std::map< uint16_t, uint8_t >::iterator it = 
m_ues.find (rnti);
   551   if (it == 
m_ues.end ())
   582   uint8_t centerSubBandwidth = 0;
   583   uint8_t mediumSubBandwidth = 0;
   584   uint8_t edgeSubBandwidth = 0;
   590           centerSubBandwidth++;
   598           mediumSubBandwidth++;
   612   minContinuousUlBandwidth =
   613     ((centerSubBandwidth > 0 ) && (centerSubBandwidth < minContinuousUlBandwidth)) ? centerSubBandwidth : minContinuousUlBandwidth;
   615   minContinuousUlBandwidth =
   616     ((mediumSubBandwidth > 0 ) && (mediumSubBandwidth < minContinuousUlBandwidth)) ? mediumSubBandwidth : minContinuousUlBandwidth;
   618   minContinuousUlBandwidth =
   619     ((edgeSubBandwidth > 0 ) && (edgeSubBandwidth < minContinuousUlBandwidth)) ? edgeSubBandwidth : minContinuousUlBandwidth;
   621   NS_LOG_INFO (
"minContinuousUlBandwidth: " << (
int)minContinuousUlBandwidth);
   623   return minContinuousUlBandwidth;
   632                         << 
" RSRP: " << (uint16_t)measResults.
rsrpResult   633                         << 
" RSRQ: " << (uint16_t)measResults.
rsrqResult);
   636                  "CenterSubBandThreshold must be higher than EdgeSubBandThreshold");
   645       std::map< uint16_t, uint8_t >::iterator it = 
m_ues.find (rnti);
   646       if (it == 
m_ues.end ())
   651       it = 
m_ues.find (rnti);
   656               NS_LOG_INFO (
"UE RNTI: " << rnti << 
" will be served in Center sub-band");
   668               NS_LOG_INFO (
"UE RNTI: " << rnti << 
" will be served in Edge sub-band");
   680               NS_LOG_INFO (
"UE RNTI: " << rnti << 
" will be served in Medium sub-band");
   695   NS_LOG_WARN (
"Method should not be called, because it is empty");
 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 uint16_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB. 
virtual void DoInitialize(void)
Initialize() implementation. 
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...
#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
UL edge RBG map. 
std::vector< bool > m_dlCenterRbgMap
DL center RBG map. 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps function. 
uint8_t m_ulCommonSubBandwidth
UL common subbandwidth. 
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps function. 
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5. 
Specifies criteria for triggering of an E-UTRA measurement reporting event. 
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface. 
uint8_t ulBandwidth
UL bandwidth. 
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe. 
uint8_t m_ulBandwidth
uplink bandwidth in RBs 
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth. 
uint8_t dlBandwidth
DL bandwidth. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation. 
uint8_t m_mediumAreaTpc
medium area tpc 
uint8_t dlEdgeSubBandwidth
DL edge subbandwidth. 
uint8_t m_edgeSubBandThreshold
edge subband threshold 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
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. 
enum ns3::LteRrcSap::ReportConfigEutra::@66 triggerQuantity
Trigger type enumeration. 
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas. 
Reference Signal Received Quality. 
uint8_t m_centerSubBandThreshold
center subband threshold 
uint8_t dlCommonSubBandwidth
DL common subbandwidth. 
virtual uint8_t AddUeMeasReportConfigForFfr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity...
uint8_t m_centerAreaTpc
center area tpc 
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
UL center RBG map. 
uint8_t rsrpResult
RSRP result. 
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
static const struct ns3::FfrSoftDownlinkDefaultConfiguration g_ffrSoftDownlinkDefaultConfiguration[]
the soft downlink default configuration 
uint8_t m_centerAreaPowerOffset
center area power offset 
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE. 
FfrSoftUplinkDefaultConfiguration structure. 
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
std::vector< bool > m_ulRbgMap
UL RBG map. 
Soft Fractional Frequency Reuse algorithm implementation. 
Hold an unsigned integer type. 
std::vector< bool > m_dlRbgMap
DL RBG Map. 
uint8_t m_edgeAreaTpc
edge area tpc 
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map. 
uint8_t ulEdgeSubBandwidth
edge subbandwidth 
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
UL medium RBG map. 
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
DoReportDlCqiInfo. 
uint8_t m_dlCommonSubBandwidth
DL common subbandwidth. 
uint8_t m_dlBandwidth
downlink bandwidth in RBs 
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface. 
enum ns3::LteRrcSap::ReportConfigEutra::@68 reportInterval
Report interval enumeration. 
enum ns3::LteRrcSap::ReportConfigEutra::@65 eventId
Event enumeration. 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
virtual void Reconfigure()
Automatic FR reconfiguration. 
LteFfrSapUser * m_ffrSapUser
FFR SAP user. 
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg. 
uint8_t dlEdgeSubBandOffset
DL edge subband offset. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
The abstract base class of a Frequency Reuse algorithm. 
uint8_t m_edgeAreaPowerOffset
edge area power offset 
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg. 
uint8_t range
Value range used in RSRP/RSRQ threshold. 
virtual void DoInitialize()
Initialize() implementation. 
std::map< uint16_t, uint8_t > m_ues
UEs. 
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset. 
virtual ~LteFfrSoftAlgorithm()
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...
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)
DoReportUlCqiInfo. 
Parameters of the SCHED_DL_CQI_INFO_REQ primitive. 
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration. 
uint8_t m_measId
The expected measurement identity. 
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration function. 
FfrSoftDownlinkDefaultConfiguration structure. 
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. 
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration function. 
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. 
uint8_t ulEdgeSubBandOffset
UL edge subband offset. 
virtual void DoDispose()
Destructor implementation. 
std::vector< bool > m_dlMediumRbgMap
DL medium RBG map. 
uint8_t ulCommonSubBandwidth
UL common subbandwidth. 
Event A1: Serving becomes better than absolute threshold. 
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider. 
RSRQ is used for the threshold. 
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset. 
static TypeId GetTypeId()
Get the type ID. 
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider. 
uint8_t rsrqResult
RSRQ result. 
PdschConfigDedicated structure. 
static const struct ns3::FfrSoftUplinkDefaultConfiguration g_ffrSoftUplinkDefaultConfiguration[]
the soft uplink default configuration 
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth. 
uint8_t m_mediumAreaPowerOffset
medium area power offset 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
 Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface. 
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user. 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
LteFfrSoftAlgorithm()
Creates a trivial ffr algorithm instance. 
const uint16_t NUM_UPLINK_CONFS(sizeof(g_ffrEnhancedUplinkDefaultConfiguration)/sizeof(FfrEnhancedUplinkDefaultConfiguration))