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),
119 static TypeId tid =
TypeId (
"ns3::LteFrStrictAlgorithm")
121 .AddConstructor<LteFrStrictAlgorithm> ()
122 .AddAttribute (
"UlCommonSubBandwidth",
123 "Uplink 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 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 (
"RsrqThreshold",
153 "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
156 MakeUintegerChecker<uint8_t> ())
157 .AddAttribute (
"CenterPowerOffset",
158 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
161 MakeUintegerChecker<uint8_t> ())
162 .AddAttribute (
"EdgePowerOffset",
163 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
166 MakeUintegerChecker<uint8_t> ())
167 .AddAttribute (
"CenterAreaTpc",
168 "TPC value which will be set in DL-DCI for UEs in center 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> ())
174 .AddAttribute (
"EdgeAreaTpc",
175 "TPC value which will be set in DL-DCI for UEs in edge area"
176 "Absolute mode is used, default value 1 is mapped to -1 according to"
177 "TS36.213 Table 5.1.1.1-2",
180 MakeUintegerChecker<uint8_t> ())
232 NS_LOG_LOGIC (
this <<
" requesting Event A1 measurements"
233 <<
" (threshold = 0" <<
")");
303 "(DlCommonSubBandwidth+DlEgdeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
339 "(UlCommonSubBandwidth+UlEgdeSubBandOffset+UlEdgeSubBandwidth) higher than UlBandwidth");
382 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
383 if (it ==
m_ues.end ())
395 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
423 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
424 if (it ==
m_ues.end ())
436 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
443 NS_LOG_WARN (
"Method should not be called, because it is empty");
450 NS_LOG_WARN (
"Method should not be called, because it is empty");
457 NS_LOG_WARN (
"Method should not be called, because it is empty");
480 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
481 if (it ==
m_ues.end ())
509 NS_LOG_INFO (
"minContinuousUlBandwidth: " << (
int)minContinuousUlBandwidth);
511 return minContinuousUlBandwidth;
520 <<
" RSRP: " << (uint16_t)measResults.
rsrpResult
521 <<
" RSRQ: " << (uint16_t)measResults.
rsrqResult);
529 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
530 if (it ==
m_ues.end ())
534 it =
m_ues.find (rnti);
540 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Edge sub-band");
552 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Center sub-band");
567 NS_LOG_WARN (
"Method should not be called, since it is empty");
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 "...
LteFfrSapUser * m_ffrSapUser
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
uint8_t dlEdgeSubBandwidth
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
uint8_t ulCommonSubBandwidth
uint8_t m_ulBandwidth
uplink bandwidth in RBs
uint8_t dlCommonSubBandwidth
enum ns3::LteRrcSap::ReportConfigEutra::@72 eventId
Choice of E-UTRA event triggered reporting criteria.
uint8_t dlEgdeSubBandOffset
LteFfrRrcSapUser * m_ffrRrcSapUser
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint8_t m_ulEdgeSubBandwidth
virtual ~LteFrStrictAlgorithm()
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
enum ns3::LteRrcSap::ReportConfigEutra::@76 reportInterval
Indicates the interval between periodical reports.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
RSRQ is used for the threshold.
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 DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
DoReportDlCqiInfo.
uint8_t m_edgeAreaPowerOffset
virtual void SetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated)=0
Instruct the eNodeB RRC entity to perform RrcConnectionReconfiguration to inform UE about new PdschCo...
LteFrStrictAlgorithm()
Creates a trivial ffr algorithm instance.
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
LteFfrSapProvider * m_ffrSapProvider
uint8_t m_ulCommonSubBandwidth
Reference Signal Received Quality.
static TypeId GetTypeId()
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
uint8_t m_ulEgdeSubBandOffset
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.
uint8_t m_dlEgdeSubBandOffset
uint8_t m_dlEdgeSubBandwidth
uint8_t m_dlBandwidth
downlink bandwidth in RBs
uint8_t m_centerAreaPowerOffset
virtual void DoDispose()
Destructor implementation.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
virtual void Reconfigure()
Automatic FR reconfiguration.
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
void InitializeDownlinkRbgMaps()
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
uint8_t m_dlCommonSubBandwidth
virtual void DoInitialize()
Initialize() implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The abstract base class of a Frequency Reuse algorithm.
enum ns3::LteRrcSap::ThresholdEutra::@70 choice
uint8_t range
Value range used in RSRP/RSRQ threshold.
std::map< uint16_t, uint8_t > m_ues
uint8_t m_egdeSubBandThreshold
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...
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
enum ns3::LteRrcSap::ReportConfigEutra::@74 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
static const struct ns3::FrStrictDownlinkDefaultConfiguration g_frStrictDownlinkDefaultConfiguration[]
uint8_t ulEdgeSubBandwidth
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
std::vector< bool > m_ulRbgMap
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
std::vector< bool > m_ulEdgeRbgMap
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)
DoReportUlCqiInfo.
std::vector< bool > m_dlRbgMap
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
Event A1: Serving becomes better than absolute threshold.
a unique identifier for an interface.
static const struct ns3::FrStrictUplinkDefaultConfiguration g_frStrictUplinkDefaultConfiguration[]
TypeId SetParent(TypeId tid)
std::vector< bool > m_dlEdgeRbgMap
uint8_t ulEgdeSubBandOffset
const uint16_t NUM_UPLINK_CONFS(sizeof(g_ffrEnhancedUplinkDefaultConfiguration)/sizeof(FfrEnhancedUplinkDefaultConfiguration))
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
virtual void DoInitialize(void)
Initialize() implementation.
void InitializeUplinkRbgMaps()
LteFfrRrcSapProvider * m_ffrRrcSapProvider