A Discrete-Event Network Simulator
API
lte-ffr-soft-algorithm.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Piotr Gawlowicz
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
18  *
19  */
20 
21 #ifndef LTE_FFR_SOFT_ALGORITHM_H
22 #define LTE_FFR_SOFT_ALGORITHM_H
23 
24 #include "lte-ffr-algorithm.h"
25 #include "lte-ffr-rrc-sap.h"
26 #include "lte-ffr-sap.h"
27 #include "lte-rrc-sap.h"
28 
29 #include <map>
30 
31 namespace ns3
32 {
33 
38 {
39  public:
44 
45  ~LteFfrSoftAlgorithm() override;
46 
51  static TypeId GetTypeId();
52 
53  // inherited from LteFfrAlgorithm
54  void SetLteFfrSapUser(LteFfrSapUser* s) override;
56 
57  void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
59 
64 
65  protected:
66  // inherited from Object
67  void DoInitialize() override;
68  void DoDispose() override;
69 
70  void Reconfigure() override;
71 
72  // FFR SAP PROVIDER IMPLEMENTATION
73  std::vector<bool> DoGetAvailableDlRbg() override;
74  bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
75  std::vector<bool> DoGetAvailableUlRbg() override;
76  bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
77  void DoReportDlCqiInfo(
79  void DoReportUlCqiInfo(
81  void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
82  uint8_t DoGetTpc(uint16_t rnti) override;
83  uint16_t DoGetMinContinuousUlBandwidth() override;
84 
85  // FFR SAP RRC PROVIDER IMPLEMENTATION
86  void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
88 
89  private:
96  void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth);
103  void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth);
112 
113  // FFR SAP
116 
117  // FFR RRF SAP
120 
124 
128 
129  std::vector<bool> m_dlRbgMap;
130  std::vector<bool> m_ulRbgMap;
131 
132  std::vector<bool> m_dlCenterRbgMap;
133  std::vector<bool> m_ulCenterRbgMap;
134 
135  std::vector<bool> m_dlMediumRbgMap;
136  std::vector<bool> m_ulMediumRbgMap;
137 
138  std::vector<bool> m_dlEdgeRbgMap;
139  std::vector<bool> m_ulEdgeRbgMap;
140 
143  {
147  EdgeArea
148  };
149 
150  std::map<uint16_t, uint8_t> m_ues;
151 
154 
158 
159  uint8_t m_centerAreaTpc;
160  uint8_t m_mediumAreaTpc;
161  uint8_t m_edgeAreaTpc;
162 
164  uint8_t m_measId;
165 
166 }; // end of class LteFfrSoftAlgorithm
167 
168 } // end of namespace ns3
169 
170 #endif /* LTE_FFR_SOFT_ALGORITHM_H */
The abstract base class of a Frequency Reuse algorithm.
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...
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:40
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:140
Soft Fractional Frequency Reuse algorithm implementation.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration function.
std::vector< bool > m_dlRbgMap
DL RBG Map.
LteFfrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
void DoInitialize() override
Initialize() implementation.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
std::vector< bool > m_ulMediumRbgMap
UL medium RBG map.
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
uint8_t m_centerAreaTpc
center area tpc
std::vector< bool > m_ulRbgMap
UL RBG map.
void DoDispose() override
Destructor implementation.
std::vector< bool > m_dlMediumRbgMap
DL medium RBG map.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint8_t m_mediumAreaPowerOffset
medium area power offset
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
uint8_t m_edgeAreaPowerOffset
edge area power offset
std::vector< bool > m_dlCenterRbgMap
DL center RBG map.
uint8_t m_mediumAreaTpc
medium area tpc
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps function.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
uint8_t m_edgeSubBandThreshold
edge subband threshold
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
std::vector< bool > m_ulCenterRbgMap
UL center RBG map.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration function.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
uint8_t m_ulCommonSubBandwidth
UL common subbandwidth.
void Reconfigure() override
Automatic FR reconfiguration.
UePosition
UE position enumeration.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
uint8_t m_centerAreaPowerOffset
center area power offset
uint8_t m_centerSubBandThreshold
center subband threshold
uint8_t m_measId
The expected measurement identity.
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
uint8_t m_dlCommonSubBandwidth
DL common subbandwidth.
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps function.
std::map< uint16_t, uint8_t > m_ues
UEs.
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
uint8_t m_edgeAreaTpc
edge area tpc
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
static TypeId GetTypeId()
Get the type ID.
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:153
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:306
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
MeasResults structure.
Definition: lte-rrc-sap.h:717