A Discrete-Event Network Simulator
API
lte-ffr-sap.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Piotr Gawlowicz
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
19  *
20  */
21 
22 #ifndef LTE_FFR_SAP_H
23 #define LTE_FFR_SAP_H
24 
25 #include <ns3/lte-rrc-sap.h>
26 #include <ns3/ff-mac-sched-sap.h>
27 #include <map>
28 
29 namespace ns3 {
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 
101  virtual void ReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) = 0;
102 
106  virtual void ReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) = 0;
107 
111  virtual void ReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap ) = 0;
112 
116  virtual uint8_t GetTpc (uint16_t rnti) = 0;
117 
121  virtual uint8_t GetMinContinuousUlBandwidth () = 0;
122 }; // end of class LteFfrSapProvider
123 
124 
133 {
134 public:
135  virtual ~LteFfrSapUser ();
136 
137 }; // end of class LteFfrSapUser
138 
139 
145 template <class C>
147 {
148 public:
149  MemberLteFfrSapProvider (C* owner);
150 
151  // inherited from LteFfrSapProvider
152  virtual std::vector <bool> GetAvailableDlRbg ();
153  virtual bool IsDlRbgAvailableForUe (int i, uint16_t rnti);
154  virtual std::vector <bool> GetAvailableUlRbg ();
155  virtual bool IsUlRbgAvailableForUe (int i, uint16_t rnti);
156  virtual void ReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params);
157  virtual void ReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params);
158  virtual void ReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap );
159  virtual uint8_t GetTpc (uint16_t rnti);
160  virtual uint8_t GetMinContinuousUlBandwidth ();
161 private:
164 
165 }; // end of class MemberLteFfrSapProvider
166 
167 
168 template <class C>
170  : m_owner (owner)
171 {
172 }
173 
174 
175 template <class C>
176 std::vector <bool>
178 {
179  return m_owner->DoGetAvailableDlRbg ();
180 }
181 
182 template <class C>
183 bool
185 {
186  return m_owner->DoIsDlRbgAvailableForUe (i,rnti);
187 }
188 
189 template <class C>
190 std::vector <bool>
192 {
193  return m_owner->DoGetAvailableUlRbg ();
194 }
195 
196 template <class C>
197 bool
199 {
200  return m_owner->DoIsUlRbgAvailableForUe (i,rnti);
201 }
202 
203 template <class C>
204 void
206 {
207  m_owner->DoReportDlCqiInfo (params);
208 }
209 
210 template <class C>
211 void
213 {
214  m_owner->DoReportUlCqiInfo (params);
215 }
216 
217 template <class C>
218 void
219 MemberLteFfrSapProvider<C>::ReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap )
220 {
221  m_owner->DoReportUlCqiInfo (ulCqiMap);
222 }
223 
224 template <class C>
225 uint8_t
227 {
228  return m_owner->DoGetTpc (rnti);
229 }
230 
231 template <class C>
232 uint8_t
234 {
235  return m_owner->DoGetMinContinuousUlBandwidth ();
236 }
237 
243 template <class C>
245 {
246 public:
247  MemberLteFfrSapUser (C* owner);
248 
249  // inherited from LteFfrSapUser
250 private:
253 
254 }; // end of class LteFfrSapUser
255 
256 template <class C>
258  : m_owner (owner)
259 {
260 }
261 
262 } // end of namespace ns3
263 
264 
265 #endif /* LTE_FFR_SAP_H */
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:132
virtual void ReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)=0
ReportUlCqiInfo.
virtual bool IsDlRbgAvailableForUe(int i, uint16_t rnti)=0
Check if UE can be served on i-th RB in DL.
virtual bool IsUlRbgAvailableForUe(int i, uint16_t rnti)=0
Check if UE can be served on i-th RB in UL.
virtual bool IsDlRbgAvailableForUe(int i, uint16_t rnti)
Check if UE can be served on i-th RB in DL.
Definition: lte-ffr-sap.h:184
virtual bool IsUlRbgAvailableForUe(int i, uint16_t rnti)
Check if UE can be served on i-th RB in UL.
Definition: lte-ffr-sap.h:198
virtual uint8_t GetTpc(uint16_t rnti)
GetTpc.
Definition: lte-ffr-sap.h:226
virtual void ReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
ReportUlCqiInfo.
Definition: lte-ffr-sap.h:212
virtual uint8_t GetTpc(uint16_t rnti)=0
GetTpc.
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:146
virtual std::vector< bool > GetAvailableUlRbg()
Get vector of available RB in UL for this Cell.
Definition: lte-ffr-sap.h:191
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:39
virtual void ReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)=0
ReportDlCqiInfo.
virtual std::vector< bool > GetAvailableDlRbg()
Get vector of available RBG in DL for this Cell.
Definition: lte-ffr-sap.h:177
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual std::vector< bool > GetAvailableUlRbg()=0
Get vector of available RB in UL for this Cell.
virtual uint8_t GetMinContinuousUlBandwidth()=0
GetMinContinuousUlBandwidth.
virtual uint8_t GetMinContinuousUlBandwidth()
GetMinContinuousUlBandwidth.
Definition: lte-ffr-sap.h:233
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
Template for the implementation of the LteFfrSapUser as a member of an owner class of type C to which...
Definition: lte-ffr-sap.h:244
virtual std::vector< bool > GetAvailableDlRbg()=0
Get vector of available RBG in DL for this Cell.
virtual ~LteFfrSapUser()
Definition: lte-ffr-sap.cc:33
virtual void ReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
ReportDlCqiInfo.
Definition: lte-ffr-sap.h:205
virtual ~LteFfrSapProvider()
Definition: lte-ffr-sap.cc:28