A Discrete-Event Network Simulator
API
lte-ffr-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_ALGORITHM_H
22 #define LTE_FFR_ALGORITHM_H
23 
24 #include <ns3/epc-x2-sap.h>
25 #include <ns3/ff-mac-sched-sap.h>
26 #include <ns3/lte-rrc-sap.h>
27 #include <ns3/object.h>
28 
29 #include <map>
30 
31 namespace ns3
32 {
33 
34 class LteFfrSapUser;
35 class LteFfrSapProvider;
36 
37 class LteFfrRrcSapUser;
38 class LteFfrRrcSapProvider;
39 
58 class LteFfrAlgorithm : public Object
59 {
60  public:
62  ~LteFfrAlgorithm() override;
63 
68  static TypeId GetTypeId();
69 
76  virtual void SetLteFfrSapUser(LteFfrSapUser* s) = 0;
77 
84  virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) = 0;
85 
92 
99 
103  uint16_t GetUlBandwidth() const;
104 
108  void SetUlBandwidth(uint16_t bw);
109 
113  uint16_t GetDlBandwidth() const;
114 
118  void SetDlBandwidth(uint16_t bw);
119 
123  void SetFrCellTypeId(uint8_t cellTypeId);
124 
128  uint8_t GetFrCellTypeId() const;
129 
130  protected:
131  // inherited from Object
132  void DoDispose() override;
133 
137  virtual void Reconfigure() = 0;
138 
139  // FFR SAP PROVIDER IMPLEMENTATION
140 
146  virtual std::vector<bool> DoGetAvailableDlRbg() = 0;
147 
155  virtual bool DoIsDlRbgAvailableForUe(int rbId, uint16_t rnti) = 0;
156 
162  virtual std::vector<bool> DoGetAvailableUlRbg() = 0;
163 
171  virtual bool DoIsUlRbgAvailableForUe(int rbId, uint16_t rnti) = 0;
172 
178  virtual void DoReportDlCqiInfo(
180 
186  virtual void DoReportUlCqiInfo(
188 
194  virtual void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) = 0;
195 
201  virtual uint8_t DoGetTpc(uint16_t rnti) = 0;
202 
207  virtual uint16_t DoGetMinContinuousUlBandwidth() = 0;
208 
209  // FFR SAP RRC PROVIDER IMPLEMENTATION
210 
215  virtual void DoSetCellId(uint16_t cellId);
216 
222  virtual void DoSetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth);
223 
230  virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
231 
238 
244  int GetRbgSize(int dlbandwidth);
245 
246  uint16_t m_cellId;
248  uint8_t m_dlBandwidth;
249  uint8_t m_ulBandwidth;
251  uint8_t m_frCellTypeId;
257 }; // end of class LteFfrAlgorithm
258 
259 } // end of namespace ns3
260 
261 #endif /* LTE_FFR_ALGORITHM_H */
The abstract base class of a Frequency Reuse algorithm.
virtual std::vector< bool > DoGetAvailableUlRbg()=0
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
virtual bool DoIsUlRbgAvailableForUe(int rbId, uint16_t rnti)=0
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint16_t m_cellId
cell ID
static TypeId GetTypeId()
Get the type ID.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)=0
DoRecvLoadInformation.
virtual bool DoIsDlRbgAvailableForUe(int rbId, uint16_t rnti)=0
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
virtual uint8_t DoGetTpc(uint16_t rnti)=0
DoGetTpc for UE.
virtual void SetLteFfrSapUser(LteFfrSapUser *s)=0
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
void SetFrCellTypeId(uint8_t cellTypeId)
uint8_t GetFrCellTypeId() const
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)=0
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
void DoDispose() override
Destructor implementation.
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
virtual void Reconfigure()=0
Automatic FR reconfiguration.
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)=0
DoReportUlCqiInfo.
virtual void DoSetCellId(uint16_t cellId)
SetCellId.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
uint16_t GetUlBandwidth() const
void SetDlBandwidth(uint16_t bw)
virtual LteFfrSapProvider * GetLteFfrSapProvider()=0
Export the "provider" part of the LteFfrSap interface.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
virtual void DoReportUlCqiInfo(std::map< uint16_t, std::vector< double >> ulCqiMap)=0
DoReportUlCqiInfo.
virtual uint16_t DoGetMinContinuousUlBandwidth()=0
DoGetMinContinuousUlBandwidth in number of RB.
virtual std::vector< bool > DoGetAvailableDlRbg()=0
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)=0
DoReportDlCqiInfo.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
virtual void DoSetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)
Implementation of LteFfrRrcSapProvider::SetBandwidth.
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()=0
Export the "provider" part of the LteFfrRrcSap interface.
void SetUlBandwidth(uint16_t bw)
uint16_t GetDlBandwidth() const
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:41
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:141
A base class which provides memory management and object aggregation.
Definition: object.h:89
a unique identifier for an interface.
Definition: type-id.h:60
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:305
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