A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-fr-hard-algorithm.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_FR_HARD_ALGORITHM_H
22#define LTE_FR_HARD_ALGORITHM_H
23
24#include "lte-ffr-algorithm.h"
25#include "lte-ffr-rrc-sap.h"
26#include "lte-ffr-sap.h"
27#include "lte-rrc-sap.h"
28
29namespace ns3
30{
31
32/**
33 * \brief Hard Frequency Reuse algorithm implementation which uses only 1 sub-band.
34 */
36{
37 public:
38 /**
39 * \brief Creates a trivial ffr algorithm instance.
40 */
42
43 ~LteFrHardAlgorithm() override;
44
45 /**
46 * \brief Get the type ID.
47 * \return the object TypeId
48 */
49 static TypeId GetTypeId();
50
51 // inherited from LteFfrAlgorithm
52 void SetLteFfrSapUser(LteFfrSapUser* s) override;
54
55 void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
57
58 /// let the forwarder class access the protected and private members
60 /// let the forwarder class access the protected and private members
62
63 protected:
64 // inherited from Object
65 void DoInitialize() override;
66 void DoDispose() override;
67
68 void Reconfigure() override;
69
70 // FFR SAP PROVIDER IMPLEMENTATION
71 std::vector<bool> DoGetAvailableDlRbg() override;
72 bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
73 std::vector<bool> DoGetAvailableUlRbg() override;
74 bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
79 void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
80 uint8_t DoGetTpc(uint16_t rnti) override;
81 uint16_t DoGetMinContinuousUlBandwidth() override;
82
83 // FFR SAP RRC PROVIDER IMPLEMENTATION
84 void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
86
87 private:
88 /**
89 * Set downlink configuration
90 *
91 * \param cellId the cell ID
92 * \param bandwidth the bandwidth
93 */
94 void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth);
95 /**
96 * Set uplink configuration
97 *
98 * \param cellId the cell ID
99 * \param bandwidth the bandwidth
100 */
101 void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth);
102 /**
103 * Initialize downlink rbg maps
104 */
106 /**
107 * Initialize uplink rbg maps
108 */
110
111 // FFR SAP
112 LteFfrSapUser* m_ffrSapUser; ///< FFR SAP user
113 LteFfrSapProvider* m_ffrSapProvider; ///< FFR SAP provider
114
115 // FFR RRF SAP
116 LteFfrRrcSapUser* m_ffrRrcSapUser; ///< FFR RRC SAP user
117 LteFfrRrcSapProvider* m_ffrRrcSapProvider; ///< FFR RRC SAP provider
118
119 uint8_t m_dlOffset; ///< DL offset
120 uint8_t m_dlSubBand; ///< DL subband
121
122 uint8_t m_ulOffset; ///< UL offset
123 uint8_t m_ulSubBand; ///< UL subband
124
125 std::vector<bool> m_dlRbgMap; ///< DL RBG Map
126 std::vector<bool> m_ulRbgMap; ///< UL RBG Map
127
128}; // end of class LteFrHardAlgorithm
129
130} // end of namespace ns3
131
132#endif /* LTE_FR_HARD_ALGORITHM_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:40
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:140
Hard Frequency Reuse algorithm implementation which uses only 1 sub-band.
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
void DoDispose() override
Destructor implementation.
std::vector< bool > m_dlRbgMap
DL RBG Map.
void InitializeDownlinkRbgMaps()
Initialize downlink rbg maps.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
void InitializeUplinkRbgMaps()
Initialize uplink rbg maps.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
static TypeId GetTypeId()
Get the type ID.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
void DoInitialize() override
Initialize() implementation.
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
uint8_t m_ulSubBand
UL subband.
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
std::vector< bool > m_ulRbgMap
UL RBG Map.
LteFrHardAlgorithm()
Creates a trivial ffr algorithm instance.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
void Reconfigure() override
Automatic FR reconfiguration.
uint8_t m_dlSubBand
DL subband.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
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:153
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:306
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