24 #include "ns3/boolean.h"
53 { 2, 100, 28, 24, 24},
78 { 2, 100, 28, 24, 24},
89 m_dlEgdeSubBandOffset (0),
90 m_dlEdgeSubBandwidth (0),
91 m_ulEgdeSubBandOffset (0),
92 m_ulEdgeSubBandwidth (0),
121 .AddConstructor<LteFfrSoftAlgorithm> ()
122 .AddAttribute (
"UlCommonSubBandwidth",
123 "Uplink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
126 MakeUintegerChecker<uint8_t> ())
127 .AddAttribute (
"UlEdgeSubBandOffset",
128 "Uplink Edge SubBand Offset in number of Resource Block Groups",
131 MakeUintegerChecker<uint8_t> ())
132 .AddAttribute (
"UlEdgeSubBandwidth",
133 "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
136 MakeUintegerChecker<uint8_t> ())
137 .AddAttribute (
"DlCommonSubBandwidth",
138 "Downlink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
141 MakeUintegerChecker<uint8_t> ())
142 .AddAttribute (
"DlEdgeSubBandOffset",
143 "Downlink Edge SubBand Offset in number of Resource Block Groups",
146 MakeUintegerChecker<uint8_t> ())
147 .AddAttribute (
"DlEdgeSubBandwidth",
148 "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
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",
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",
161 MakeUintegerChecker<uint8_t> ())
162 .AddAttribute (
"CenterAreaPowerOffset",
163 "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
166 MakeUintegerChecker<uint8_t> ())
167 .AddAttribute (
"MediumAreaPowerOffset",
168 "PdschConfigDedicated::Pa value for Medium Sub-band, default value dB0",
171 MakeUintegerChecker<uint8_t> ())
172 .AddAttribute (
"EdgeAreaPowerOffset",
173 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
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",
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",
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",
197 MakeUintegerChecker<uint8_t> ())
249 NS_LOG_LOGIC (
this <<
" requesting Event A1 measurements"
250 <<
" (threshold = 0" <<
")");
322 "DlCommonSubBandwidth + DlEgdeSubBandOffset higher than DlBandwidth");
326 "(DlCommonSubBandwidth + DlEgdeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
359 "UlCommonSubBandwidth + UlEgdeSubBandOffset higher than UlBandwidth");
363 "(UlCommonSubBandwidth + UlEgdeSubBandOffset+UlEdgeSubBandwidth) higher than UlBandwidth");
407 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
408 if (it ==
m_ues.end ())
413 it =
m_ues.find (rnti);
422 bool isCenterUe =
false;
423 bool isMediumUe =
false;
424 bool isEdgeUe =
false;
439 return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
469 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
470 if (it ==
m_ues.end ())
475 it =
m_ues.find (rnti);
484 bool isCenterUe =
false;
485 bool isMediumUe =
false;
486 bool isEdgeUe =
false;
501 return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
508 NS_LOG_WARN (
"Method should not be called, because it is empty");
515 NS_LOG_WARN (
"Method should not be called, because it is empty");
522 NS_LOG_WARN (
"Method should not be called, because it is empty");
545 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
546 if (it ==
m_ues.end ())
577 uint8_t centerSubBandwidth = 0;
578 uint8_t mediumSubBandwidth = 0;
579 uint8_t edgeSubBandwidth = 0;
585 centerSubBandwidth++;
593 mediumSubBandwidth++;
607 minContinuousUlBandwidth =
608 ((centerSubBandwidth > 0 ) && (centerSubBandwidth < minContinuousUlBandwidth)) ? centerSubBandwidth : minContinuousUlBandwidth;
610 minContinuousUlBandwidth =
611 ((mediumSubBandwidth > 0 ) && (mediumSubBandwidth < minContinuousUlBandwidth)) ? mediumSubBandwidth : minContinuousUlBandwidth;
613 minContinuousUlBandwidth =
614 ((edgeSubBandwidth > 0 ) && (edgeSubBandwidth < minContinuousUlBandwidth)) ? edgeSubBandwidth : minContinuousUlBandwidth;
616 NS_LOG_INFO (
"minContinuousUlBandwidth: " << (
int)minContinuousUlBandwidth);
618 return minContinuousUlBandwidth;
627 <<
" RSRP: " << (uint16_t)measResults.
rsrpResult
628 <<
" RSRQ: " << (uint16_t)measResults.
rsrqResult);
631 "CenterSubBandThreshold must be higher than EgdeSubBandThreshold");
640 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
641 if (it ==
m_ues.end ())
646 it =
m_ues.find (rnti);
651 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Center sub-band");
663 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Edge sub-band");
675 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Medium sub-band");
690 NS_LOG_WARN (
"Method should not be called, because it is empty");
RSRQ is used for the threshold.
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...
#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.
void InitializeDownlinkRbgMaps()
uint8_t m_ulCommonSubBandwidth
void InitializeUplinkRbgMaps()
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.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
uint8_t m_dlEdgeSubBandwidth
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
uint8_t dlEdgeSubBandwidth
#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.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
uint8_t m_centerSubBandThreshold
uint8_t dlCommonSubBandwidth
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...
static const struct ns3::FfrSoftDownlinkDefaultConfiguration g_ffrSoftDownlinkDefaultConfiguration[]
uint8_t m_centerAreaPowerOffset
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...
std::vector< bool > m_ulRbgMap
Hold an unsigned integer type.
std::vector< bool > m_dlRbgMap
std::vector< bool > m_dlEdgeRbgMap
uint8_t ulEdgeSubBandwidth
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
uint8_t m_dlEgdeSubBandOffset
std::vector< bool > m_ulMediumRbgMap
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
DoReportDlCqiInfo.
uint8_t m_dlCommonSubBandwidth
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.
virtual void Reconfigure()
Automatic FR reconfiguration.
LteFfrSapUser * m_ffrSapUser
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
Event A1: Serving becomes better than absolute threshold.
The abstract base class of a Frequency Reuse algorithm.
uint8_t m_edgeAreaPowerOffset
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.
virtual void DoInitialize()
This method is called only once by Object::Initialize.
std::map< uint16_t, uint8_t > m_ues
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.
enum ns3::LteRrcSap::ReportConfigEutra::@77 reportInterval
Indicates the interval between periodical reports.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
uint8_t m_egdeSubBandThreshold
uint8_t ulEgdeSubBandOffset
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)
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...
uint8_t m_ulEgdeSubBandOffset
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
std::vector< bool > m_dlMediumRbgMap
uint8_t ulCommonSubBandwidth
LteFfrRrcSapProvider * m_ffrRrcSapProvider
static TypeId GetTypeId()
Reference Signal Received Quality.
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
LteFfrSapProvider * m_ffrSapProvider
uint8_t dlEgdeSubBandOffset
enum ns3::LteRrcSap::ThresholdEutra::@71 choice
static const struct ns3::FfrSoftUplinkDefaultConfiguration g_ffrSoftUplinkDefaultConfiguration[]
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
uint8_t m_ulEdgeSubBandwidth
uint8_t m_mediumAreaPowerOffset
a unique identifier for an interface.
LteFfrRrcSapUser * m_ffrRrcSapUser
TypeId SetParent(TypeId tid)
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.