24 #include "ns3/boolean.h"
87 m_dlEgdeSubBandOffset (0),
88 m_dlEdgeSubBandwidth (0),
89 m_ulEgdeSubBandOffset (0),
90 m_ulEdgeSubBandwidth (0),
119 .AddConstructor<LteFrSoftAlgorithm> ()
120 .AddAttribute (
"UlEdgeSubBandOffset",
121 "Uplink Edge SubBand Offset in number of Resource Block Groups",
124 MakeUintegerChecker<uint8_t> ())
125 .AddAttribute (
"UlEdgeSubBandwidth",
126 "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
129 MakeUintegerChecker<uint8_t> ())
130 .AddAttribute (
"DlEdgeSubBandOffset",
131 "Downlink Edge SubBand Offset in number of Resource Block Groups",
134 MakeUintegerChecker<uint8_t> ())
135 .AddAttribute (
"DlEdgeSubBandwidth",
136 "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
139 MakeUintegerChecker<uint8_t> ())
140 .AddAttribute (
"AllowCenterUeUseEdgeSubBand",
141 "If true center UEs can receive on Edge SubBand RBGs",
144 MakeBooleanChecker ())
145 .AddAttribute (
"RsrqThreshold",
146 "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
149 MakeUintegerChecker<uint8_t> ())
150 .AddAttribute (
"CenterPowerOffset",
151 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
154 MakeUintegerChecker<uint8_t> ())
155 .AddAttribute (
"EdgePowerOffset",
156 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
159 MakeUintegerChecker<uint8_t> ())
160 .AddAttribute (
"CenterAreaTpc",
161 "TPC value which will be set in DL-DCI for UEs in center area"
162 "Absolute mode is used, default value 1 is mapped to -1 according to"
163 "TS36.213 Table 5.1.1.1-2",
166 MakeUintegerChecker<uint8_t> ())
167 .AddAttribute (
"EdgeAreaTpc",
168 "TPC value which will be set in DL-DCI for UEs in edge area"
169 "Absolute mode is used, default value 1 is mapped to -1 according to"
170 "TS36.213 Table 5.1.1.1-2",
173 MakeUintegerChecker<uint8_t> ())
225 NS_LOG_LOGIC (
this <<
" requesting Event A1 measurements"
226 <<
" (threshold = 0" <<
")");
293 "(DlEgdeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
314 "(UlEgdeSubBandOffset+UlEdgeSubBandwidth) higher than DlBandwidth");
347 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
348 if (it ==
m_ues.end ())
365 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
393 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
394 if (it ==
m_ues.end ())
411 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
418 NS_LOG_WARN (
"Method should not be called, because it is empty");
425 NS_LOG_WARN (
"Method should not be called, because it is empty");
432 NS_LOG_WARN (
"Method should not be called, because it is empty");
455 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
456 if (it ==
m_ues.end ())
482 return minContinuousUlBandwidth;
489 minContinuousUlBandwidth =
490 ((leftBandwidth > 0 ) && (leftBandwidth < minContinuousUlBandwidth)) ? leftBandwidth : minContinuousUlBandwidth;
492 minContinuousUlBandwidth =
493 ((centerBandwidth > 0 ) && (centerBandwidth < minContinuousUlBandwidth)) ? centerBandwidth : minContinuousUlBandwidth;
495 minContinuousUlBandwidth =
496 ((rightBandwidth > 0 ) && (rightBandwidth < minContinuousUlBandwidth)) ? rightBandwidth : minContinuousUlBandwidth;
498 NS_LOG_INFO (
"minContinuousUlBandwidth: " << (
int)minContinuousUlBandwidth);
500 return minContinuousUlBandwidth;
509 <<
" RSRP: " << (uint16_t)measResults.
rsrpResult
510 <<
" RSRQ: " << (uint16_t)measResults.
rsrqResult);
518 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
519 if (it ==
m_ues.end ())
523 it =
m_ues.find (rnti);
529 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Edge sub-band");
541 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Center sub-band");
556 NS_LOG_WARN (
"Method should not be called, because it is empty");
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
RSRQ is used for the threshold.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
uint8_t dlEgdeSubBandOffset
uint8_t dlEdgeSubBandwidth
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 "...
static const struct ns3::FrSoftUplinkDefaultConfiguration g_frSoftUplinkDefaultConfiguration[]
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
DoReportDlCqiInfo.
void InitializeDownlinkRbgMaps()
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
void InitializeUplinkRbgMaps()
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
LteFrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint8_t ulEdgeSubBandwidth
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
LteFfrSapUser * m_ffrSapUser
uint8_t m_ulEdgeSubBandwidth
LteFfrRrcSapProvider * m_ffrRrcSapProvider
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_dlRbgMap
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
LteFfrSapProvider * m_ffrSapProvider
LteFfrRrcSapUser * m_ffrRrcSapUser
static TypeId GetTypeId()
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Hold an unsigned integer type.
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
virtual void Reconfigure()
Automatic FR reconfiguration.
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
std::vector< bool > m_dlEdgeRbgMap
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
virtual ~LteFrSoftAlgorithm()
uint8_t m_edgePowerOffset
Event A1: Serving becomes better than absolute threshold.
The abstract base class of a Frequency Reuse algorithm.
static const struct ns3::FrSoftDownlinkDefaultConfiguration g_frSoftDownlinkDefaultConfiguration[]
std::map< uint16_t, uint8_t > m_ues
enum ns3::LteRrcSap::ReportConfigEutra::@73 eventId
Choice of E-UTRA event triggered reporting criteria.
uint8_t range
Value range used in RSRP/RSRQ threshold.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
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.
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.
std::vector< bool > m_ulEdgeRbgMap
enum ns3::LteRrcSap::ReportConfigEutra::@75 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
virtual void DoInitialize()
This method is called only once by Object::Initialize.
uint8_t m_egdeSubBandThreshold
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
bool m_isEdgeSubBandForCenterUe
Reference Signal Received Quality.
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
uint8_t m_centerPowerOffset
enum ns3::LteRrcSap::ThresholdEutra::@71 choice
uint8_t ulEgdeSubBandOffset
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)
DoReportUlCqiInfo.
const uint16_t NUM_UPLINK_CONFS(sizeof(g_ffrEnhancedUplinkDefaultConfiguration)/sizeof(FfrEnhancedUplinkDefaultConfiguration))
uint8_t m_dlEdgeSubBandwidth
std::vector< bool > m_ulRbgMap
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
uint8_t m_ulEgdeSubBandOffset
uint8_t m_dlEgdeSubBandOffset
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.