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 
103 
109 
114  virtual void ReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap ) = 0;
115 
121  virtual uint8_t GetTpc (uint16_t rnti) = 0;
122 
127  virtual uint16_t GetMinContinuousUlBandwidth () = 0;
128 }; // end of class LteFfrSapProvider
129 
130 
139 {
140 public:
141  virtual ~LteFfrSapUser ();
142 
143 }; // end of class LteFfrSapUser
144 
145 
151 template <class C>
153 {
154 public:
160  MemberLteFfrSapProvider (C* owner);
161 
162  // inherited from LteFfrSapProvider
163  virtual std::vector <bool> GetAvailableDlRbg ();
164  virtual bool IsDlRbgAvailableForUe (int i, uint16_t rnti);
165  virtual std::vector <bool> GetAvailableUlRbg ();
166  virtual bool IsUlRbgAvailableForUe (int i, uint16_t rnti);
167  virtual void ReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params);
168  virtual void ReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params);
169  virtual void ReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap );
170  virtual uint8_t GetTpc (uint16_t rnti);
171  virtual uint16_t GetMinContinuousUlBandwidth ();
172 private:
174  C* m_owner;
175 
176 }; // end of class MemberLteFfrSapProvider
177 
178 
179 template <class C>
181  : m_owner (owner)
182 {
183 }
184 
185 
186 template <class C>
187 std::vector <bool>
189 {
190  return m_owner->DoGetAvailableDlRbg ();
191 }
192 
193 template <class C>
194 bool
196 {
197  return m_owner->DoIsDlRbgAvailableForUe (i,rnti);
198 }
199 
200 template <class C>
201 std::vector <bool>
203 {
204  return m_owner->DoGetAvailableUlRbg ();
205 }
206 
207 template <class C>
208 bool
210 {
211  return m_owner->DoIsUlRbgAvailableForUe (i,rnti);
212 }
213 
214 template <class C>
215 void
217 {
218  m_owner->DoReportDlCqiInfo (params);
219 }
220 
221 template <class C>
222 void
224 {
225  m_owner->DoReportUlCqiInfo (params);
226 }
227 
228 template <class C>
229 void
230 MemberLteFfrSapProvider<C>::ReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap )
231 {
232  m_owner->DoReportUlCqiInfo (ulCqiMap);
233 }
234 
235 template <class C>
236 uint8_t
238 {
239  return m_owner->DoGetTpc (rnti);
240 }
241 
242 template <class C>
243 uint16_t
245 {
246  return m_owner->DoGetMinContinuousUlBandwidth ();
247 }
248 
254 template <class C>
256 {
257 public:
263  MemberLteFfrSapUser (C* owner);
264 
265  // inherited from LteFfrSapUser
266 private:
268  C* m_owner;
269 
270 }; // end of class LteFfrSapUser
271 
272 template <class C>
274  : m_owner (owner)
275 {
276 }
277 
278 } // end of namespace ns3
279 
280 
281 #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 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:28
virtual void ReportUlCqiInfo(std::map< uint16_t, std::vector< double > > ulCqiMap)=0
ReportUlCqiInfo.
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.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:139
virtual ~LteFfrSapUser()
Definition: lte-ffr-sap.cc:33
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
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:209
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:195
virtual std::vector< bool > GetAvailableDlRbg()
Get vector of available RBG in DL for this Cell.
Definition: lte-ffr-sap.h:188
virtual void ReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
ReportUlCqiInfo.
Definition: lte-ffr-sap.h:223
C * m_owner
the owner class
Definition: lte-ffr-sap.h:174
virtual uint8_t GetTpc(uint16_t rnti)
GetTpc.
Definition: lte-ffr-sap.h:237
virtual std::vector< bool > GetAvailableUlRbg()
Get vector of available RB in UL for this Cell.
Definition: lte-ffr-sap.h:202
virtual uint16_t GetMinContinuousUlBandwidth()
Get the minimum continuous Ul bandwidth.
Definition: lte-ffr-sap.h:244
virtual void ReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
ReportDlCqiInfo.
Definition: lte-ffr-sap.h:216
Template for the implementation of the LteFfrSapUser as a member of an owner class of type C to which...
Definition: lte-ffr-sap.h:256
C * m_owner
the owner class
Definition: lte-ffr-sap.h:268
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.