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