A Discrete-Event Network Simulator
API
lte-ffr-simple.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_SIMPLE_H
23 #define LTE_FFR_SIMPLE_H
24 
25 #include <ns3/lte-ffr-algorithm.h>
26 #include <ns3/lte-ffr-sap.h>
27 #include <ns3/lte-ffr-rrc-sap.h>
28 #include <ns3/lte-rrc-sap.h>
29 
30 #include <ns3/traced-callback.h>
31 #include <map>
32 
33 namespace ns3 {
34 
35 
46 {
47 public:
51  LteFfrSimple ();
52 
53  virtual ~LteFfrSimple ();
54 
59  static TypeId GetTypeId ();
60 
65  void ChangePdschConfigDedicated (bool change);
70  void SetPdschConfigDedicated (LteRrcSap::PdschConfigDedicated pdschConfigDedicated);
71 
78  void SetTpc (uint32_t tpc, uint32_t num, bool acculumatedMode);
79 
80  // inherited from LteFfrAlgorithm
81  virtual void SetLteFfrSapUser (LteFfrSapUser* s);
83 
84  virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s);
86 
91 
98  typedef void (* PdschTracedCallback)(uint16_t rnti, uint8_t pdschPa);
99 
100 protected:
101  // inherited from Object
102  virtual void DoInitialize ();
103  virtual void DoDispose ();
104 
105  virtual void Reconfigure ();
106 
107  // FFR SAP PROVIDER IMPLEMENTATION
108  virtual std::vector <bool> DoGetAvailableDlRbg ();
109  virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti);
110  virtual std::vector <bool> DoGetAvailableUlRbg ();
111  virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti);
112  virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params);
113  virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params);
114  virtual void DoReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap );
115  virtual uint8_t DoGetTpc (uint16_t rnti);
116  virtual uint8_t DoGetMinContinuousUlBandwidth ();
117 
118  // FFR SAP RRC PROVIDER IMPLEMENTATION
119  virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);
121 
122 private:
123 
126 
127  // FFR SAP
130 
131  // FFR RRF SAP
134 
135  uint8_t m_dlOffset;
136  uint8_t m_dlSubBand;
137 
138  uint8_t m_ulOffset;
139  uint8_t m_ulSubBand;
140 
141  std::vector <bool> m_dlRbgMap;
142  std::vector <bool> m_ulRbgMap;
143 
144  std::map <uint16_t, LteRrcSap::PdschConfigDedicated> m_ues;
145 
146  // The expected measurement identity
147  uint8_t m_measId;
148 
150 
152 
154 
155 
156  // Uplink Power Control
157  uint32_t m_tpc;
158  uint32_t m_tpcNum;
160 
161 }; // end of class LteFfrSimple
162 
163 
164 } // end of namespace ns3
165 
166 
167 #endif /* LTE_FFR_SIMPLE_H */
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:138
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.
uint8_t m_ulOffset
UL offset.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
void SetTpc(uint32_t tpc, uint32_t num, bool acculumatedMode)
Set transmission power control.
std::map< uint16_t, LteRrcSap::PdschConfigDedicated > m_ues
UEs.
uint8_t m_dlOffset
DL offset.
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
std::vector< bool > m_dlRbgMap
DL RBG map.
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
PDSCH config dedicated.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:152
void(* PdschTracedCallback)(uint16_t rnti, uint8_t pdschPa)
TracedCallback signature for change of PdschConfigDedicated.
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
static TypeId GetTypeId()
Get the type ID.
MeasResults structure.
Definition: lte-rrc-sap.h:671
void ChangePdschConfigDedicated(bool change)
Callback function that is used to be connected to trace ChangePdschConfigDedicated.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:39
bool m_accumulatedMode
whether to use the TPC accumulated mode
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint32_t m_tpcNum
number of TPC configurations
virtual void DoDispose()
Destructor implementation.
Simple Frequency Reuse algorithm implementation which uses only 1 sub-band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Reconfigure()
Automatic FR reconfiguration.
The abstract base class of a Frequency Reuse algorithm.
std::vector< bool > m_ulRbgMap
UL RBG map.
uint8_t m_ulSubBand
UL subband.
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
uint8_t m_dlSubBand
DL subband.
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
uint8_t m_measId
measure ID
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
LteFfrSimple()
Creates a trivial ffr algorithm instance.
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:303
void SetPdschConfigDedicated(LteRrcSap::PdschConfigDedicated pdschConfigDedicated)
Set PDSCH config dedicated function.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
TracedCallback< uint16_t, uint8_t > m_changePdschConfigDedicatedTrace
PDSCH config dedicated change trace callback.
void UpdatePdschConfigDedicated()
Update PDSCH config dedicated function.
PdschConfigDedicated structure.
Definition: lte-rrc-sap.h:154
uint32_t m_tpc
transmission power control to be used
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
a unique identifier for an interface.
Definition: type-id.h:58
virtual void DoInitialize()
Initialize() implementation.
bool m_changePdschConfigDedicated
PDSCH config dedicate changed?
virtual ~LteFfrSimple()