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 uint16_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 */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::LteFfrSimple::SetPdschConfigDedicated
void SetPdschConfigDedicated(LteRrcSap::PdschConfigDedicated pdschConfigDedicated)
Set PDSCH config dedicated function.
Definition: lte-ffr-simple.cc:165
ns3::LteFfrSimple::DoGetMinContinuousUlBandwidth
virtual uint16_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
Definition: lte-ffr-simple.cc:274
ns3::LteFfrSimple::GetLteFfrRrcSapProvider
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
Definition: lte-ffr-simple.cc:126
ns3::LteFfrSimple::m_dlSubBand
uint8_t m_dlSubBand
DL subband.
Definition: lte-ffr-simple.h:136
ns3::LteFfrSimple::DoIsUlRbgAvailableForUe
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
Definition: lte-ffr-simple.cc:224
ns3::LteFfrSapUser
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:139
ns3::LteFfrSimple::m_dlRbgMap
std::vector< bool > m_dlRbgMap
DL RBG map.
Definition: lte-ffr-simple.h:141
ns3::LteFfrSimple::PdschTracedCallback
void(* PdschTracedCallback)(uint16_t rnti, uint8_t pdschPa)
TracedCallback signature for change of PdschConfigDedicated.
Definition: lte-ffr-simple.h:98
ns3::FfMacSchedSapProvider::SchedDlCqiInfoReqParameters
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Definition: ff-mac-sched-sap.h:125
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteFfrSimple::m_ues
std::map< uint16_t, LteRrcSap::PdschConfigDedicated > m_ues
UEs.
Definition: lte-ffr-simple.h:144
ns3::LteFfrSimple::m_ffrRrcSapUser
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
Definition: lte-ffr-simple.h:132
ns3::LteFfrSimple::m_changePdschConfigDedicatedTrace
TracedCallback< uint16_t, uint8_t > m_changePdschConfigDedicatedTrace
PDSCH config dedicated change trace callback.
Definition: lte-ffr-simple.h:153
ns3::FfMacSchedSapProvider::SchedUlCqiInfoReqParameters
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
Definition: ff-mac-sched-sap.h:186
ns3::LteFfrSimple::~LteFfrSimple
virtual ~LteFfrSimple()
Definition: lte-ffr-simple.cc:52
ns3::LteFfrSimple::m_ulSubBand
uint8_t m_ulSubBand
UL subband.
Definition: lte-ffr-simple.h:139
ns3::LteFfrSimple::DoGetAvailableUlRbg
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
Definition: lte-ffr-simple.cc:206
ns3::LteFfrSimple::m_ffrSapUser
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
Definition: lte-ffr-simple.h:128
ns3::LteFfrSimple::DoReportUlCqiInfo
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.
Definition: lte-ffr-simple.cc:237
ns3::LteFfrSimple::m_ffrSapProvider
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
Definition: lte-ffr-simple.h:129
ns3::LteRrcSap::PdschConfigDedicated
PdschConfigDedicated structure.
Definition: lte-rrc-sap.h:155
ns3::LteFfrSimple::SetTpc
void SetTpc(uint32_t tpc, uint32_t num, bool acculumatedMode)
Set transmission power control.
Definition: lte-ffr-simple.cc:171
ns3::LteFfrSimple::DoIsDlRbgAvailableForUe
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
Definition: lte-ffr-simple.cc:199
ns3::MemberLteFfrRrcSapProvider
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
Definition: lte-ffr-rrc-sap.h:144
ns3::LteFfrSimple::SetLteFfrRrcSapUser
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
Definition: lte-ffr-simple.cc:118
ns3::LteFfrRrcSapUser
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-rrc-sap.h:89
ns3::LteFfrSimple::m_tpc
uint32_t m_tpc
transmission power control to be used
Definition: lte-ffr-simple.h:157
ns3::LteFfrSimple::DoReportDlCqiInfo
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
Definition: lte-ffr-simple.cc:231
ns3::LteFfrSimple::DoGetTpc
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
Definition: lte-ffr-simple.cc:249
ns3::LteFfrSapProvider
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:40
ns3::LteFfrSimple::m_pdschConfigDedicated
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
PDSCH config dedicated.
Definition: lte-ffr-simple.h:151
ns3::LteFfrSimple::m_changePdschConfigDedicated
bool m_changePdschConfigDedicated
PDSCH config dedicate changed?
Definition: lte-ffr-simple.h:149
ns3::LteFfrSimple::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: lte-ffr-simple.cc:68
ns3::LteFfrSimple::DoReportUeMeas
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
Definition: lte-ffr-simple.cc:281
ns3::LteFfrSimple::ChangePdschConfigDedicated
void ChangePdschConfigDedicated(bool change)
Callback function that is used to be connected to trace ChangePdschConfigDedicated.
Definition: lte-ffr-simple.cc:159
ns3::LteFfrSimple::m_tpcNum
uint32_t m_tpcNum
number of TPC configurations
Definition: lte-ffr-simple.h:158
ns3::LteFfrSimple::GetLteFfrSapProvider
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
Definition: lte-ffr-simple.cc:111
ns3::LteRrcSap::MeasResults
MeasResults structure.
Definition: lte-rrc-sap.h:679
ns3::LteFfrSimple::m_ffrRrcSapProvider
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
Definition: lte-ffr-simple.h:133
ns3::EpcX2Sap::LoadInformationParams
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:304
ns3::LteFfrSimple::Reconfigure
virtual void Reconfigure()
Automatic FR reconfiguration.
Definition: lte-ffr-simple.cc:153
ns3::LteFfrSimple::UpdatePdschConfigDedicated
void UpdatePdschConfigDedicated()
Update PDSCH config dedicated function.
Definition: lte-ffr-simple.cc:305
ns3::LteFfrSimple::DoRecvLoadInformation
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
Definition: lte-ffr-simple.cc:322
ns3::LteFfrSimple::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: lte-ffr-simple.cc:59
ns3::LteFfrSimple::m_measId
uint8_t m_measId
measure ID
Definition: lte-ffr-simple.h:147
ns3::LteFfrSimple::LteFfrSimple
LteFfrSimple()
Creates a trivial ffr algorithm instance.
Definition: lte-ffr-simple.cc:33
ns3::LteFfrSimple::DoInitialize
virtual void DoInitialize()
Initialize() implementation.
Definition: lte-ffr-simple.cc:134
ns3::LteFfrSimple::SetLteFfrSapUser
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
Definition: lte-ffr-simple.cc:103
ns3::LteFfrAlgorithm
The abstract base class of a Frequency Reuse algorithm.
Definition: lte-ffr-algorithm.h:58
ns3::LteFfrSimple::DoGetAvailableDlRbg
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
Definition: lte-ffr-simple.cc:179
ns3::LteFfrSimple::m_ulRbgMap
std::vector< bool > m_ulRbgMap
UL RBG map.
Definition: lte-ffr-simple.h:142
ns3::TracedCallback< uint16_t, uint8_t >
ns3::MemberLteFfrSapProvider
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
ns3::LteFfrSimple::m_dlOffset
uint8_t m_dlOffset
DL offset.
Definition: lte-ffr-simple.h:135
ns3::LteFfrSimple
Simple Frequency Reuse algorithm implementation which uses only 1 sub-band.
Definition: lte-ffr-simple.h:46
ns3::LteFfrRrcSapProvider
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Definition: lte-ffr-rrc-sap.h:39
ns3::LteFfrSimple::m_accumulatedMode
bool m_accumulatedMode
whether to use the TPC accumulated mode
Definition: lte-ffr-simple.h:159
ns3::LteFfrSimple::m_ulOffset
uint8_t m_ulOffset
UL offset.
Definition: lte-ffr-simple.h:138