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 "ff-mac-sched-sap.h"
25 
26 #include <map>
27 
28 namespace ns3
29 {
30 
40 {
41  public:
42  virtual ~LteFfrSapProvider();
43 
54  virtual std::vector<bool> GetAvailableDlRbg() = 0;
55 
69  virtual bool IsDlRbgAvailableForUe(int i, uint16_t rnti) = 0;
70 
81  virtual std::vector<bool> GetAvailableUlRbg() = 0;
82 
96  virtual bool IsUlRbgAvailableForUe(int i, uint16_t rnti) = 0;
97 
102  virtual void ReportDlCqiInfo(
104 
109  virtual void ReportUlCqiInfo(
111 
116  virtual void ReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) = 0;
117 
123  virtual uint8_t GetTpc(uint16_t rnti) = 0;
124 
129  virtual uint16_t GetMinContinuousUlBandwidth() = 0;
130 }; // end of class LteFfrSapProvider
131 
140 {
141  public:
142  virtual ~LteFfrSapUser();
143 
144 }; // end of class LteFfrSapUser
145 
151 template <class C>
153 {
154  public:
160  MemberLteFfrSapProvider(C* owner);
161 
162  // Delete default constructor to avoid misuse
164 
165  // inherited from LteFfrSapProvider
166  std::vector<bool> GetAvailableDlRbg() override;
167  bool IsDlRbgAvailableForUe(int i, uint16_t rnti) override;
168  std::vector<bool> GetAvailableUlRbg() override;
169  bool IsUlRbgAvailableForUe(int i, uint16_t rnti) override;
172  void ReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
173  uint8_t GetTpc(uint16_t rnti) override;
174  uint16_t GetMinContinuousUlBandwidth() override;
175 
176  private:
177  C* m_owner;
178 
179 }; // end of class MemberLteFfrSapProvider
180 
181 template <class C>
183  : m_owner(owner)
184 {
185 }
186 
187 template <class C>
188 std::vector<bool>
190 {
191  return m_owner->DoGetAvailableDlRbg();
192 }
193 
194 template <class C>
195 bool
197 {
198  return m_owner->DoIsDlRbgAvailableForUe(i, rnti);
199 }
200 
201 template <class C>
202 std::vector<bool>
204 {
205  return m_owner->DoGetAvailableUlRbg();
206 }
207 
208 template <class C>
209 bool
211 {
212  return m_owner->DoIsUlRbgAvailableForUe(i, rnti);
213 }
214 
215 template <class C>
216 void
219 {
220  m_owner->DoReportDlCqiInfo(params);
221 }
222 
223 template <class C>
224 void
227 {
228  m_owner->DoReportUlCqiInfo(params);
229 }
230 
231 template <class C>
232 void
233 MemberLteFfrSapProvider<C>::ReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap)
234 {
235  m_owner->DoReportUlCqiInfo(ulCqiMap);
236 }
237 
238 template <class C>
239 uint8_t
241 {
242  return m_owner->DoGetTpc(rnti);
243 }
244 
245 template <class C>
246 uint16_t
248 {
249  return m_owner->DoGetMinContinuousUlBandwidth();
250 }
251 
257 template <class C>
259 {
260  public:
266  MemberLteFfrSapUser(C* owner);
267 
268  // Delete default constructor to avoid misuse
270 
271  private:
272  C* m_owner;
273 
274 }; // end of class LteFfrSapUser
275 
276 template <class C>
278  : m_owner(owner)
279 {
280 }
281 
282 } // end of namespace ns3
283 
284 #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:40
virtual uint8_t GetTpc(uint16_t rnti)=0
GetTpc.
virtual void ReportUlCqiInfo(const 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 void ReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)=0
ReportDlCqiInfo.
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 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:140
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:153
void ReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
ReportUlCqiInfo.
Definition: lte-ffr-sap.h:225
std::vector< bool > GetAvailableDlRbg() override
Get vector of available RBG in DL for this Cell.
Definition: lte-ffr-sap.h:189
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:196
uint8_t GetTpc(uint16_t rnti) override
GetTpc.
Definition: lte-ffr-sap.h:240
void ReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
ReportDlCqiInfo.
Definition: lte-ffr-sap.h:217
uint16_t GetMinContinuousUlBandwidth() override
Get the minimum continuous Ul bandwidth.
Definition: lte-ffr-sap.h:247
C * m_owner
the owner class
Definition: lte-ffr-sap.h:177
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:210
std::vector< bool > GetAvailableUlRbg() override
Get vector of available RB in UL for this Cell.
Definition: lte-ffr-sap.h:203
Template for the implementation of the LteFfrSapUser as a member of an owner class of type C to which...
Definition: lte-ffr-sap.h:259
C * m_owner
the owner class
Definition: lte-ffr-sap.h:272
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.