12#include "ns3/boolean.h"
86 : m_ffrSapUser(nullptr),
87 m_ffrRrcSapUser(nullptr),
88 m_dlEdgeSubBandOffset(0),
89 m_dlEdgeSubBandwidth(0),
90 m_ulEdgeSubBandOffset(0),
91 m_ulEdgeSubBandwidth(0),
116 TypeId(
"ns3::LteFrSoftAlgorithm")
120 .AddAttribute(
"UlEdgeSubBandOffset",
121 "Uplink Edge SubBand Offset in number of Resource Block Groups",
126 "UlEdgeSubBandwidth",
127 "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
131 .AddAttribute(
"DlEdgeSubBandOffset",
132 "Downlink Edge SubBand Offset in number of Resource Block Groups",
137 "DlEdgeSubBandwidth",
138 "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
142 .AddAttribute(
"AllowCenterUeUseEdgeSubBand",
143 "If true center UEs can receive on Edge SubBand RBGs",
149 "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
153 .AddAttribute(
"CenterPowerOffset",
154 "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
158 .AddAttribute(
"EdgePowerOffset",
159 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
163 .AddAttribute(
"CenterAreaTpc",
164 "TPC value which will be set in DL-DCI for UEs in center area"
165 "Absolute mode is used, default value 1 is mapped to -1 according to"
166 "TS36.213 Table 5.1.1.1-2",
170 .AddAttribute(
"EdgeAreaTpc",
171 "TPC value which will be set in DL-DCI for UEs in edge area"
172 "Absolute mode is used, default value 1 is mapped to -1 according to"
173 "TS36.213 Table 5.1.1.1-2",
223 NS_LOG_LOGIC(
this <<
" requesting Event A1 measurements"
290 "DlEdgeSubBandOffset higher than DlBandwidth");
292 "DlEdgeSubBandwidth higher than DlBandwidth");
294 "(DlEdgeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
314 "UlEdgeSubBandOffset higher than DlBandwidth");
316 "UlEdgeSubBandwidth higher than DlBandwidth");
318 "(UlEdgeSubBandOffset+UlEdgeSubBandwidth) higher than DlBandwidth");
351 auto it =
m_ues.find(rnti);
352 if (it ==
m_ues.end())
369 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
397 auto it =
m_ues.find(rnti);
398 if (it ==
m_ues.end())
415 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
423 NS_LOG_WARN(
"Method should not be called, because it is empty");
431 NS_LOG_WARN(
"Method should not be called, because it is empty");
438 NS_LOG_WARN(
"Method should not be called, because it is empty");
462 auto it =
m_ues.find(rnti);
463 if (it ==
m_ues.end())
489 return minContinuousUlBandwidth;
496 minContinuousUlBandwidth = ((leftBandwidth > 0) && (leftBandwidth < minContinuousUlBandwidth))
498 : minContinuousUlBandwidth;
500 minContinuousUlBandwidth =
501 ((centerBandwidth > 0) && (centerBandwidth < minContinuousUlBandwidth))
503 : minContinuousUlBandwidth;
505 minContinuousUlBandwidth = ((rightBandwidth > 0) && (rightBandwidth < minContinuousUlBandwidth))
507 : minContinuousUlBandwidth;
509 NS_LOG_INFO(
"minContinuousUlBandwidth: " << (
int)minContinuousUlBandwidth);
511 return minContinuousUlBandwidth;
528 auto it =
m_ues.find(rnti);
529 if (it ==
m_ues.end())
533 it =
m_ues.find(rnti);
539 NS_LOG_INFO(
"UE RNTI: " << rnti <<
" will be served in Edge sub-band");
551 NS_LOG_INFO(
"UE RNTI: " << rnti <<
" will be served in Center sub-band");
566 NS_LOG_WARN(
"Method should not be called, because it is empty");
The abstract base class of a Frequency Reuse algorithm.
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
uint8_t m_ulBandwidth
uplink bandwidth in RBs
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
virtual void SetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated)=0
Instruct the eNodeB RRC entity to perform RrcConnectionReconfiguration to inform UE about new PdschCo...
virtual uint8_t AddUeMeasReportConfigForFfr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Soft Frequency Reuse algorithm implementation.
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
void Reconfigure() override
Automatic FR reconfiguration.
uint8_t m_centerPowerOffset
center power offset
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
void DoDispose() override
Destructor implementation.
~LteFrSoftAlgorithm() override
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
std::vector< bool > m_dlRbgMap
DL RBG map.
uint8_t m_edgeAreaTpc
edge area tpc
static TypeId GetTypeId()
Get the type ID.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
friend class MemberLteFfrSapProvider< LteFrSoftAlgorithm >
let the forwarder class access the protected and private members
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
uint8_t m_edgeSubBandThreshold
Edge subband threshold.
friend class MemberLteFfrRrcSapProvider< LteFrSoftAlgorithm >
let the forwarder class access the protected and private members
uint8_t m_centerAreaTpc
center area tpc
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
std::map< uint16_t, uint8_t > m_ues
UEs.
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
uint8_t m_edgePowerOffset
edge power offset
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms) override
DoReportDlCqiInfo.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
void DoInitialize() override
Initialize() implementation.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms) override
DoReportUlCqiInfo.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
LteFrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
std::vector< bool > m_ulRbgMap
UL RBG map.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
uint8_t m_measId
The expected measurement identity.
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
bool m_isEdgeSubBandForCenterUe
is edge subband for center UE?
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
virtual void DoInitialize()
Initialize() implementation.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeChecker > MakeUintegerChecker()
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
const uint16_t NUM_UPLINK_CONFS(sizeof(g_ffrEnhancedUplinkDefaultConfiguration)/sizeof(FfrEnhancedUplinkDefaultConfiguration))
static const FrSoftDownlinkDefaultConfiguration g_frSoftDownlinkDefaultConfiguration[]
Soft downlink default configuration.
static const FrSoftUplinkDefaultConfiguration g_frSoftUplinkDefaultConfiguration[]
Soft uplink default configuration.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
FrSoftDownlinkDefaultConfiguration structure.
uint8_t dlEdgeSubBandOffset
DL edge subband offset.
uint8_t dlEdgeSubBandwidth
Dl edge subbandwidth.
uint8_t dlBandwidth
DL bandwidth.
soft uplink default configuration
uint8_t ulEdgeSubBandOffset
UL edge subband offset.
uint8_t ulEdgeSubBandwidth
UL edge subbandwidth.
uint8_t ulBandwidth
UL bandwidth.
uint8_t rsrqResult
the RSRQ result
uint8_t rsrpResult
the RSRP result
MeasResultPCell measResultPCell
measurement result primary cell
PdschConfigDedicated structure.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
enum ns3::LteRrcSap::ReportConfigEutra::@62 eventId
Event enumeration.
@ RSRQ
Reference Signal Received Quality.
@ EVENT_A1
Event A1: Serving becomes better than absolute threshold.
enum ns3::LteRrcSap::ReportConfigEutra::@65 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@63 triggerQuantity
Trigger type enumeration.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
@ THRESHOLD_RSRQ
RSRQ is used for the threshold.
enum ns3::LteRrcSap::ThresholdEutra::@60 choice
Threshold enumeration.
uint8_t range
Value range used in RSRP/RSRQ threshold.