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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
7 *
8 */
9
10#ifndef LTE_FR_HARD_ALGORITHM_H
11#define LTE_FR_HARD_ALGORITHM_H
12
13#include "lte-ffr-algorithm.h"
14#include "lte-ffr-rrc-sap.h"
15#include "lte-ffr-sap.h"
16#include "lte-rrc-sap.h"
17
18namespace ns3
19{
20
21/**
22 * \brief Hard Frequency Reuse algorithm implementation which uses only 1 sub-band.
23 */
25{
26 public:
27 /**
28 * \brief Creates a trivial ffr algorithm instance.
29 */
31
32 ~LteFrHardAlgorithm() override;
33
34 /**
35 * \brief Get the type ID.
36 * \return the object TypeId
37 */
38 static TypeId GetTypeId();
39
40 // inherited from LteFfrAlgorithm
41 void SetLteFfrSapUser(LteFfrSapUser* s) override;
43
44 void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
46
47 /// let the forwarder class access the protected and private members
49 /// let the forwarder class access the protected and private members
51
52 protected:
53 // inherited from Object
54 void DoInitialize() override;
55 void DoDispose() override;
56
57 void Reconfigure() override;
58
59 // FFR SAP PROVIDER IMPLEMENTATION
60 std::vector<bool> DoGetAvailableDlRbg() override;
61 bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
62 std::vector<bool> DoGetAvailableUlRbg() override;
63 bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
68 void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
69 uint8_t DoGetTpc(uint16_t rnti) override;
70 uint16_t DoGetMinContinuousUlBandwidth() override;
71
72 // FFR SAP RRC PROVIDER IMPLEMENTATION
73 void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
75
76 private:
77 /**
78 * Set downlink configuration
79 *
80 * \param cellId the cell ID
81 * \param bandwidth the bandwidth
82 */
83 void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth);
84 /**
85 * Set uplink configuration
86 *
87 * \param cellId the cell ID
88 * \param bandwidth the bandwidth
89 */
90 void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth);
91 /**
92 * Initialize downlink rbg maps
93 */
95 /**
96 * Initialize uplink rbg maps
97 */
99
100 // FFR SAP
101 LteFfrSapUser* m_ffrSapUser; ///< FFR SAP user
102 LteFfrSapProvider* m_ffrSapProvider; ///< FFR SAP provider
103
104 // FFR RRF SAP
105 LteFfrRrcSapUser* m_ffrRrcSapUser; ///< FFR RRC SAP user
106 LteFfrRrcSapProvider* m_ffrRrcSapProvider; ///< FFR RRC SAP provider
107
108 uint8_t m_dlOffset; ///< DL offset
109 uint8_t m_dlSubBand; ///< DL subband
110
111 uint8_t m_ulOffset; ///< UL offset
112 uint8_t m_ulSubBand; ///< UL subband
113
114 std::vector<bool> m_dlRbgMap; ///< DL RBG Map
115 std::vector<bool> m_ulRbgMap; ///< UL RBG Map
116
117}; // end of class LteFrHardAlgorithm
118
119} // end of namespace ns3
120
121#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:29
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
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.
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.
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...
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the LOAD INFORMATION message.
Definition epc-x2-sap.h:295
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
MeasResults structure.