A Discrete-Event Network Simulator
API
lte-ffr-sap.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_SAP_H
22 #define LTE_FFR_SAP_H
23 
24 #include <ns3/ff-mac-sched-sap.h>
25 #include <ns3/lte-rrc-sap.h>
26 
27 #include <map>
28 
29 namespace ns3
30 {
31 
41 {
42  public:
43  virtual ~LteFfrSapProvider();
44 
55  virtual std::vector<bool> GetAvailableDlRbg() = 0;
56 
70  virtual bool IsDlRbgAvailableForUe(int i, uint16_t rnti) = 0;
71 
82  virtual std::vector<bool> GetAvailableUlRbg() = 0;
83 
97  virtual bool IsUlRbgAvailableForUe(int i, uint16_t rnti) = 0;
98 
103  virtual void ReportDlCqiInfo(
105 
110  virtual void ReportUlCqiInfo(
112 
117  virtual void ReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) = 0;
118 
124  virtual uint8_t GetTpc(uint16_t rnti) = 0;
125 
130  virtual uint16_t GetMinContinuousUlBandwidth() = 0;
131 }; // end of class LteFfrSapProvider
132 
141 {
142  public:
143  virtual ~LteFfrSapUser();
144 
145 }; // end of class LteFfrSapUser
146 
152 template <class C>
154 {
155  public:
161  MemberLteFfrSapProvider(C* owner);
162 
163  // Delete default constructor to avoid misuse
165 
166  // inherited from LteFfrSapProvider
167  std::vector<bool> GetAvailableDlRbg() override;
168  bool IsDlRbgAvailableForUe(int i, uint16_t rnti) override;
169  std::vector<bool> GetAvailableUlRbg() override;
170  bool IsUlRbgAvailableForUe(int i, uint16_t rnti) override;
171  void ReportDlCqiInfo(
173  void ReportUlCqiInfo(
175  void ReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
176  uint8_t GetTpc(uint16_t rnti) override;
177  uint16_t GetMinContinuousUlBandwidth() override;
178 
179  private:
180  C* m_owner;
181 
182 }; // end of class MemberLteFfrSapProvider
183 
184 template <class C>
186  : m_owner(owner)
187 {
188 }
189 
190 template <class C>
191 std::vector<bool>
193 {
194  return m_owner->DoGetAvailableDlRbg();
195 }
196 
197 template <class C>
198 bool
200 {
201  return m_owner->DoIsDlRbgAvailableForUe(i, rnti);
202 }
203 
204 template <class C>
205 std::vector<bool>
207 {
208  return m_owner->DoGetAvailableUlRbg();
209 }
210 
211 template <class C>
212 bool
214 {
215  return m_owner->DoIsUlRbgAvailableForUe(i, rnti);
216 }
217 
218 template <class C>
219 void
222 {
223  m_owner->DoReportDlCqiInfo(params);
224 }
225 
226 template <class C>
227 void
230 {
231  m_owner->DoReportUlCqiInfo(params);
232 }
233 
234 template <class C>
235 void
236 MemberLteFfrSapProvider<C>::ReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap)
237 {
238  m_owner->DoReportUlCqiInfo(ulCqiMap);
239 }
240 
241 template <class C>
242 uint8_t
244 {
245  return m_owner->DoGetTpc(rnti);
246 }
247 
248 template <class C>
249 uint16_t
251 {
252  return m_owner->DoGetMinContinuousUlBandwidth();
253 }
254 
260 template <class C>
262 {
263  public:
269  MemberLteFfrSapUser(C* owner);
270 
271  // Delete default constructor to avoid misuse
273 
274  private:
275  C* m_owner;
276 
277 }; // end of class LteFfrSapUser
278 
279 template <class C>
281  : m_owner(owner)
282 {
283 }
284 
285 } // end of namespace ns3
286 
287 #endif /* LTE_FFR_SAP_H */
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:41
virtual uint8_t GetTpc(uint16_t rnti)=0
GetTpc.
virtual void ReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)=0
ReportUlCqiInfo.
virtual bool IsUlRbgAvailableForUe(int i, uint16_t rnti)=0
Check if UE can be served on i-th RB in UL.
virtual uint16_t GetMinContinuousUlBandwidth()=0
Get the minimum continuous Ul bandwidth.
virtual bool IsDlRbgAvailableForUe(int i, uint16_t rnti)=0
Check if UE can be served on i-th RB in DL.
virtual ~LteFfrSapProvider()
Definition: lte-ffr-sap.cc:26
virtual void ReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)=0
ReportDlCqiInfo.
virtual std::vector< bool > GetAvailableUlRbg()=0
Get vector of available RB in UL for this Cell.
virtual std::vector< bool > GetAvailableDlRbg()=0
Get vector of available RBG in DL for this Cell.
virtual void ReportUlCqiInfo(std::map< uint16_t, std::vector< double >> ulCqiMap)=0
ReportUlCqiInfo.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:141
virtual ~LteFfrSapUser()
Definition: lte-ffr-sap.cc:30
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:154
std::vector< bool > GetAvailableDlRbg() override
Get vector of available RBG in DL for this Cell.
Definition: lte-ffr-sap.h:192
bool IsDlRbgAvailableForUe(int i, uint16_t rnti) override
Check if UE can be served on i-th RB in DL.
Definition: lte-ffr-sap.h:199
uint8_t GetTpc(uint16_t rnti) override
GetTpc.
Definition: lte-ffr-sap.h:243
uint16_t GetMinContinuousUlBandwidth() override
Get the minimum continuous Ul bandwidth.
Definition: lte-ffr-sap.h:250
C * m_owner
the owner class
Definition: lte-ffr-sap.h:180
bool IsUlRbgAvailableForUe(int i, uint16_t rnti) override
Check if UE can be served on i-th RB in UL.
Definition: lte-ffr-sap.h:213
std::vector< bool > GetAvailableUlRbg() override
Get vector of available RB in UL for this Cell.
Definition: lte-ffr-sap.h:206
void ReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
ReportUlCqiInfo.
Definition: lte-ffr-sap.h:228
void ReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
ReportDlCqiInfo.
Definition: lte-ffr-sap.h:220
Template for the implementation of the LteFfrSapUser as a member of an owner class of type C to which...
Definition: lte-ffr-sap.h:262
C * m_owner
the owner class
Definition: lte-ffr-sap.h:275
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 SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.