A Discrete-Event Network Simulator
API
lte-ffr-simple.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Piotr Gawlowicz
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
18 *
19 */
20
21#ifndef LTE_FFR_SIMPLE_H
22#define LTE_FFR_SIMPLE_H
23
24#include <ns3/lte-ffr-algorithm.h>
25#include <ns3/lte-ffr-rrc-sap.h>
26#include <ns3/lte-ffr-sap.h>
27#include <ns3/lte-rrc-sap.h>
28#include <ns3/traced-callback.h>
29
30#include <map>
31
32namespace ns3
33{
34
45{
46 public:
51
52 ~LteFfrSimple() override;
53
58 static TypeId GetTypeId();
59
64 void ChangePdschConfigDedicated(bool change);
70
77 void SetTpc(uint32_t tpc, uint32_t num, bool acculumatedMode);
78
79 // inherited from LteFfrAlgorithm
80 void SetLteFfrSapUser(LteFfrSapUser* s) override;
82
83 void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
85
90
97 typedef void (*PdschTracedCallback)(uint16_t rnti, uint8_t pdschPa);
98
99 protected:
100 // inherited from Object
101 void DoInitialize() override;
102 void DoDispose() override;
103
104 void Reconfigure() override;
105
106 // FFR SAP PROVIDER IMPLEMENTATION
107 std::vector<bool> DoGetAvailableDlRbg() override;
108 bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
109 std::vector<bool> DoGetAvailableUlRbg() override;
110 bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
112 const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override;
114 const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override;
115 void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
116 uint8_t DoGetTpc(uint16_t rnti) override;
117 uint16_t DoGetMinContinuousUlBandwidth() override;
118
119 // FFR SAP RRC PROVIDER IMPLEMENTATION
120 void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
122
123 private:
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
155
156 // Uplink Power Control
160
161}; // end of class LteFfrSimple
162
163} // end of namespace ns3
164
165#endif /* LTE_FFR_SIMPLE_H */
The abstract base class of a Frequency Reuse algorithm.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:41
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:141
Simple Frequency Reuse algorithm implementation which uses only 1 sub-band.
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
PDSCH config dedicated.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
void DoInitialize() override
Initialize() implementation.
void SetTpc(uint32_t tpc, uint32_t num, bool acculumatedMode)
Set transmission power control.
void ChangePdschConfigDedicated(bool change)
Callback function that is used to be connected to trace ChangePdschConfigDedicated.
uint8_t m_measId
measure ID
void SetPdschConfigDedicated(LteRrcSap::PdschConfigDedicated pdschConfigDedicated)
Set PDSCH config dedicated function.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
uint32_t m_tpc
transmission power control to be used
uint8_t m_dlSubBand
DL subband.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
std::vector< bool > m_dlRbgMap
DL RBG map.
uint8_t m_dlOffset
DL offset.
void Reconfigure() override
Automatic FR reconfiguration.
std::map< uint16_t, LteRrcSap::PdschConfigDedicated > m_ues
UEs.
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
uint32_t m_tpcNum
number of TPC configurations
void(* PdschTracedCallback)(uint16_t rnti, uint8_t pdschPa)
TracedCallback signature for change of PdschConfigDedicated.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
bool m_accumulatedMode
whether to use the TPC accumulated mode
void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
std::vector< bool > m_ulRbgMap
UL RBG map.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
LteFfrSimple()
Creates a trivial ffr algorithm instance.
~LteFfrSimple() override
void DoDispose() override
Destructor implementation.
uint8_t m_ulSubBand
UL subband.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
static TypeId GetTypeId()
Get the type ID.
bool m_changePdschConfigDedicated
PDSCH config dedicate changed?
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
TracedCallback< uint16_t, uint8_t > m_changePdschConfigDedicatedTrace
PDSCH config dedicated change trace callback.
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
uint8_t m_ulOffset
UL offset.
void UpdatePdschConfigDedicated()
Update PDSCH config dedicated function.
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:154
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:305
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
MeasResults structure.
Definition: lte-rrc-sap.h:703
PdschConfigDedicated structure.
Definition: lte-rrc-sap.h:157