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")
123 .AddAttribute (
"UlCommonSubBandwidth",
124 "Uplink Common SubBandwidth Configuration in number of Resource Block Groups",
127 MakeUintegerChecker<uint8_t> ())
128 .AddAttribute (
"UlEdgeSubBandOffset",
129 "Uplink Edge SubBand Offset in number of Resource Block Groups",
132 MakeUintegerChecker<uint8_t> ())
133 .AddAttribute (
"UlEdgeSubBandwidth",
134 "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
137 MakeUintegerChecker<uint8_t> ())
138 .AddAttribute (
"DlCommonSubBandwidth",
139 "Downlink Common SubBandwidth Configuration in number of Resource Block Groups",
142 MakeUintegerChecker<uint8_t> ())
143 .AddAttribute (
"DlEdgeSubBandOffset",
144 "Downlink Edge SubBand Offset in number of Resource Block Groups",
147 MakeUintegerChecker<uint8_t> ())
148 .AddAttribute (
"DlEdgeSubBandwidth",
149 "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
152 MakeUintegerChecker<uint8_t> ())
153 .AddAttribute (
"RsrqThreshold",
154 "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
157 MakeUintegerChecker<uint8_t> ())
158 .AddAttribute (
"CenterPowerOffset",
159 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
162 MakeUintegerChecker<uint8_t> ())
163 .AddAttribute (
"EdgePowerOffset",
164 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
167 MakeUintegerChecker<uint8_t> ())
168 .AddAttribute (
"CenterAreaTpc",
169 "TPC value which will be set in DL-DCI for UEs in center area"
170 "Absolute mode is used, default value 1 is mapped to -1 according to"
171 "TS36.213 Table 5.1.1.1-2",
174 MakeUintegerChecker<uint8_t> ())
175 .AddAttribute (
"EdgeAreaTpc",
176 "TPC value which will be set in DL-DCI for UEs in edge area"
177 "Absolute mode is used, default value 1 is mapped to -1 according to"
178 "TS36.213 Table 5.1.1.1-2",
181 MakeUintegerChecker<uint8_t> ())
233 NS_LOG_LOGIC (
this <<
" requesting Event A1 measurements"
234 <<
" (threshold = 0" <<
")");
304 "(DlCommonSubBandwidth+DlEgdeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
340 "(UlCommonSubBandwidth+UlEgdeSubBandOffset+UlEdgeSubBandwidth) higher than UlBandwidth");
383 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
384 if (it ==
m_ues.end ())
396 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
424 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
425 if (it ==
m_ues.end ())
437 return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
444 NS_LOG_WARN (
"Method should not be called, because it is empty");
451 NS_LOG_WARN (
"Method should not be called, because it is empty");
458 NS_LOG_WARN (
"Method should not be called, because it is empty");
481 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
482 if (it ==
m_ues.end ())
510 NS_LOG_INFO (
"minContinuousUlBandwidth: " << (
int)minContinuousUlBandwidth);
512 return minContinuousUlBandwidth;
521 <<
" RSRP: " << (uint16_t)measResults.
rsrpResult
522 <<
" RSRQ: " << (uint16_t)measResults.
rsrqResult);
530 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
531 if (it ==
m_ues.end ())
535 it =
m_ues.find (rnti);
541 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Edge sub-band");
553 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Center sub-band");
568 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...
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 "...
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.
enum ns3::LteRrcSap::ReportConfigEutra::@70 eventId
Choice of E-UTRA event triggered reporting criteria.
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
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.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
virtual uint8_t AddUeMeasReportConfigForFfr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity...
Strict Frequency Reuse algorithm implementation.
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
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.
The abstract base class of a Frequency Reuse algorithm.
uint8_t range
Value range used in RSRP/RSRQ threshold.
std::map< uint16_t, uint8_t > m_ues
Reference Signal Received Quality.
uint8_t m_egdeSubBandThreshold
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
enum ns3::LteRrcSap::ReportConfigEutra::@72 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
#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.
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.
enum ns3::LteRrcSap::ThresholdEutra::@68 choice
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
enum ns3::LteRrcSap::ReportConfigEutra::@74 reportInterval
Indicates the interval between periodical reports.
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...
a unique identifier for an interface.
static const struct ns3::FrStrictUplinkDefaultConfiguration g_frStrictUplinkDefaultConfiguration[]
TypeId SetParent(TypeId tid)
Set the parent TypeId.
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.
void InitializeUplinkRbgMaps()
RSRQ is used for the threshold.
Event A1: Serving becomes better than absolute threshold.
LteFfrRrcSapProvider * m_ffrRrcSapProvider