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
44{
45 public:
50
51 ~LteFfrSimple() override;
52
57 static TypeId GetTypeId();
58
63 void ChangePdschConfigDedicated(bool change);
69
76 void SetTpc(uint32_t tpc, uint32_t num, bool acculumatedMode);
77
78 // inherited from LteFfrAlgorithm
79 void SetLteFfrSapUser(LteFfrSapUser* s) override;
81
82 void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
84
89
96 typedef void (*PdschTracedCallback)(uint16_t rnti, uint8_t pdschPa);
97
98 protected:
99 // inherited from Object
100 void DoInitialize() override;
101 void DoDispose() override;
102
103 void Reconfigure() override;
104
105 // FFR SAP PROVIDER IMPLEMENTATION
106 std::vector<bool> DoGetAvailableDlRbg() override;
107 bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
108 std::vector<bool> DoGetAvailableUlRbg() override;
109 bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
111 const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override;
113 const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override;
114 void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
115 uint8_t DoGetTpc(uint16_t rnti) override;
116 uint16_t DoGetMinContinuousUlBandwidth() override;
117
118 // FFR SAP RRC PROVIDER IMPLEMENTATION
119 void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
121
122 private:
125
126 // FFR SAP
129
130 // FFR RRF SAP
133
134 uint8_t m_dlOffset;
135 uint8_t m_dlSubBand;
136
137 uint8_t m_ulOffset;
138 uint8_t m_ulSubBand;
139
140 std::vector<bool> m_dlRbgMap;
141 std::vector<bool> m_ulRbgMap;
142
143 std::map<uint16_t, LteRrcSap::PdschConfigDedicated> m_ues;
144
145 // The expected measurement identity
146 uint8_t m_measId;
147
149
151
154
155 // Uplink Power Control
159
160}; // end of class LteFfrSimple
161
162} // end of namespace ns3
163
164#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:717
PdschConfigDedicated structure.
Definition: lte-rrc-sap.h:163