A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-enb-component-carrier-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Danilo Abrignani
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7 *
8 */
9
10#ifndef LTE_ENB_COMPONENT_CARRIER_MANAGER_H
11#define LTE_ENB_COMPONENT_CARRIER_MANAGER_H
12
13#include "lte-ccm-mac-sap.h"
14#include "lte-ccm-rrc-sap.h"
15#include "lte-enb-cmac-sap.h"
16#include "lte-enb-rrc.h"
17#include "lte-mac-sap.h"
18#include "lte-rrc-sap.h"
19
20#include <ns3/object.h>
21
22#include <map>
23#include <vector>
24
25namespace ns3
26{
27
28class LteCcmRrcSapUser;
29class LteCcmRrcSapProvider;
30class LteMacSapUser;
31class LteMacSapProvider;
32class LteEnbCmacSapProvider;
33class LteCcmMacSapProvider;
34
35/**
36 * @brief The class implements Component Carrier Manager (CCM) that operates
37 * using the Component Carrier Manager SAP interfaces.
38 *
39 * CCM receives measurement reports from an eNode RRC instance and is forwarding
40 * calls from RLC to MAC layer, and from MAC to RLC.
41 *
42 * This class is an abstract class intended to be inherited by subclasses that
43 * will implement its virtual methods. The subclasses are compatible with the
44 * LteEnbNetDevice class, and are accessible using namespace-based access
45 * through ns-3 Config subsystem, and can be installed and configured by
46 * LteHelper class.
47 *
48 * The communication with the eNodeB RRC instance is done through the *Component
49 * Carrier Manager SAP* interface. The LteEnbComponentCarrierManager instance
50 * corresponds to the "provider" part of this interface, while the eNodeB RRC
51 * instance takes the role of the "user" part. The following code skeleton
52 * establishes the connection between both instances:
53 *
54 * Ptr<LteEnbRrc> rrc = ...;
55 * Ptr<LteComponentCarrierManager> ccmEnb = ...;
56 * rrc->SetLteCcmRrcSapProvider (ccmEnb->GetLteCcmRrcSapProvider ());
57 * ccmEnb->SetLteCcmRrcSapUser (rrc->GetLteCcmRrcSapUser ())
58 *
59 * Similarly, LteEnbComponentCarrierManager instance communicates with MAC, and
60 * it takes the role of the "user".
61 *
62 * However, user rarely needs to use the above code, since it has already been
63 * taken care by LteHelper::InstallEnbDevice.
64 *
65 * \sa LteCcmRrcSapUser, LteCcmRrcSapProvider, LteCcmMacSapUser, LteCcmMacSapProvider
66 */
67
69{
70 public:
73 /**
74 * @brief Get the type ID.
75 * @return the object TypeId
76 */
77 static TypeId GetTypeId();
78
79 /**
80 * @brief Set the "user" part of the ComponentCarrier Management SAP interface that
81 * this ComponentCarrier algorithm instance will interact with.
82 * @param s a reference to the "user" part of the interface, typically a
83 * member of an LteEnbRrc instance
84 */
86
87 /**
88 * @brief Export the "provider" part of the ComponentCarrier Management SAP interface.
89 * @return the reference to the "provider" part of the interface, typically to
90 * be kept by an LteEnbRlc instance
91 */
93
94 /**
95 * @brief This function returns a pointer to the LteCcmMacSapUser interface, which
96 * is used by MAC to communicate to CCM when e.g. UL buffer status report is
97 * received, or to notify CCM about PRB occupancy, and similar. Functions that are
98 * specific for the communication between MAC and CCM.
99 *
100 * @returns LteCcmMacSapUser*
101 */
103
104 /**
105 * @brief Returns the pointer to the LteMacSapProvider interface, the
106 * provider of MAC, which is this new architecture served by
107 * LteEnbComponentCarrierManager object which will behave as a
108 * proxy, and will forward calls between to MAC objects of
109 * component carriers based on the logic implemented in the
110 * specific component carrier manager.
111 *
112 * @returns LteMacSapProvider*
113 */
115
116 /**
117 * @brief Set LteMacSapProvider interface for the MAC object of
118 * the specified component carrier.
119 *
120 * @param componentCarrierId component carrier ID
121 * @param sap the MAC SAP provider
122 * @returns true if successful
123 */
124 virtual bool SetMacSapProvider(uint8_t componentCarrierId, LteMacSapProvider* sap);
125
126 /**
127 * @brief Set LteCcmMacSapProvider interface for the MAC object of
128 * the specified component carrier. Through this interface CCM communicates with
129 * MAC, e.g. it notifies MAC of the specific carrier when to scheduler UL BSR.
130 *
131 * @param componentCarrierId component carrier ID
132 * @param sap the MAC SAP provider
133 * @returns true if successful
134 */
135 virtual bool SetCcmMacSapProviders(uint8_t componentCarrierId, LteCcmMacSapProvider* sap);
136
137 /**
138 * @brief Sets the total number of component carriers.
139 * @param noOfComponentCarriers number of component carriers
140 */
141 virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers);
142
143 protected:
144 // inherited from Object
145 void DoDispose() override;
146
147 /**
148 * @brief Implementation of ReportUeMeas.
149 * @param rnti Radio Network Temporary Identity, an integer identifying the UE
150 * where the report originates from
151 * @param measResults a single report of one measurement identity
152 */
153 virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
154
155 /**
156 * @brief Structure to represent UE info
157 */
158 struct UeInfo
159 {
160 std::map<uint8_t, LteMacSapUser*>
161 m_ueAttached; //!< Map from LCID to SAP of the RLC instance.
162 std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>
163 m_rlcLcInstantiated; //!< Logical channel configuration per flow Id (rnti, lcid).
164 uint8_t m_enabledComponentCarrier; //!< The number of enabled component carriers.
165 uint8_t m_ueState; //!< RRC states of UE, e.g. CONNECTED_NORMALLY
166 };
167
168 std::map<uint16_t, UeInfo> m_ueInfo; //!< The map from RNTI to UE information.
169 uint16_t m_noOfComponentCarriers; //!< The number component of carriers that are supported by
170 //!< this eNb.
171 // pointer to RRC object for direct function calls, e.g. when CCM needs to obtain
172 // a pointer to RLC object of a specific flow
173 Ptr<LteEnbRrc> m_rrc; //!< A pointer to the RRC instance of this eNb.
174
175 /*
176 * This interface is used to receive API calls from the RLC instance that through
177 * LteMacSapProvider interface. The component carrier manager acts a proxy. This means that all
178 * RLC instances will see as in previous architecture the LteMacSapProvider interface, but the
179 * actual provider in new architecture will be some of child classes of
180 * LteEnbComponentCarrierManager. So, LteEnbComponentCarrierManager class will receive function
181 * calls that are meant for MAC, and will forward them to the MAC of the component carriers
182 * based on the logic implemented in LteComponentCarrierManager. This attribute will be
183 * initialized by using class that implements LteMacSapProvider interface and class that
184 * implements LteEnbComponentCarrierManager base class e.g.:EnbMacMemberLteMacSapProvider
185 * <LteEnbComponentCarrierManagerImpl>
186 */
187 LteMacSapProvider* m_macSapProvider; //!< A pointer to main SAP interface of the MAC instance,
188 //!< which is in this case handled by CCM.
189 // This map is initialized in LteHelper when the Component Carrier Manager is initialized,
190 // contains component carrier id and a pointer to the corresponding LteMacSapProvider interface
191 // of the MAC instance
192 std::map<uint8_t, LteMacSapProvider*>
193 m_macSapProvidersMap; //!< A map of pointers to real SAP interfaces of MAC instances.
194 // This map contains pointers to LteCcmMacSapProvider interfaces of the
195 // MAC instances. LteCcmMacSapProvider is new interface added for the
196 // communication between component carrier manager and MAC instance,
197 // to allow CCM to control UL buffer status reporting, and forwarding to
198 // schedulers. Before adding carrier aggregation to LTE module, MAC was
199 // directly forwarding UL buffer status report to scheduler. Now is this
200 // done through CCM, which decides to which MAC scheduler to forward UL BSR.
201 std::map<uint8_t, LteCcmMacSapProvider*>
202 m_ccmMacSapProviderMap; //!< A map of pointers to the SAP interfaces of CCM instance that
203 //!< provides the CCM specific functionalities to MAC, i.e.
204 //!< ReportMacCeToScheduler.
206 m_ccmMacSapUser; //!< LteCcmMacSapUser is extended version of LteMacSapUser interface.
207 //!< Contains functions that allow reporting of UL BSR from MAC to CCM.
208 LteCcmRrcSapUser* m_ccmRrcSapUser; //!< A pointer to SAP interface of RRC instance, i.e. to
209 //!< configure measurements reporting for CCM.
211 m_ccmRrcSapProvider; //!< A pointer to the SAP interface of the CCM instance to receive API
212 //!< calls from the eNodeB RRC instance.
213
214}; // end of class LteEnbComponentCarrierManager
215
216} // end of namespace ns3
217
218#endif /* LTE_ENB_COMPONENT_CARRIER_MANAGER_H */
Service Access Point (SAP) offered by the component carrier manager (CCM) by MAC to CCM.
Service Access Point (SAP) offered by MAC to the component carrier manager (CCM).
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
The class implements Component Carrier Manager (CCM) that operates using the Component Carrier Manage...
virtual LteCcmMacSapUser * GetLteCcmMacSapUser()
This function returns a pointer to the LteCcmMacSapUser interface, which is used by MAC to communicat...
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Implementation of ReportUeMeas.
std::map< uint16_t, UeInfo > m_ueInfo
The map from RNTI to UE information.
LteCcmRrcSapProvider * m_ccmRrcSapProvider
A pointer to the SAP interface of the CCM instance to receive API calls from the eNodeB RRC instance.
virtual LteMacSapProvider * GetLteMacSapProvider()
Returns the pointer to the LteMacSapProvider interface, the provider of MAC, which is this new archit...
LteMacSapProvider * m_macSapProvider
A pointer to main SAP interface of the MAC instance, which is in this case handled by CCM.
std::map< uint8_t, LteMacSapProvider * > m_macSapProvidersMap
A map of pointers to real SAP interfaces of MAC instances.
Ptr< LteEnbRrc > m_rrc
A pointer to the RRC instance of this eNb.
virtual LteCcmRrcSapProvider * GetLteCcmRrcSapProvider()
Export the "provider" part of the ComponentCarrier Management SAP interface.
virtual bool SetMacSapProvider(uint8_t componentCarrierId, LteMacSapProvider *sap)
Set LteMacSapProvider interface for the MAC object of the specified component carrier.
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)
Sets the total number of component carriers.
void DoDispose() override
Destructor implementation.
uint16_t m_noOfComponentCarriers
The number component of carriers that are supported by this eNb.
std::map< uint8_t, LteCcmMacSapProvider * > m_ccmMacSapProviderMap
A map of pointers to the SAP interfaces of CCM instance that provides the CCM specific functionalitie...
virtual bool SetCcmMacSapProviders(uint8_t componentCarrierId, LteCcmMacSapProvider *sap)
Set LteCcmMacSapProvider interface for the MAC object of the specified component carrier.
virtual void SetLteCcmRrcSapUser(LteCcmRrcSapUser *s)
Set the "user" part of the ComponentCarrier Management SAP interface that this ComponentCarrier algor...
LteCcmMacSapUser * m_ccmMacSapUser
LteCcmMacSapUser is extended version of LteMacSapUser interface.
LteCcmRrcSapUser * m_ccmRrcSapUser
A pointer to SAP interface of RRC instance, i.e.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition lte-mac-sap.h:25
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::map< uint8_t, LteEnbCmacSapProvider::LcInfo > m_rlcLcInstantiated
Logical channel configuration per flow Id (rnti, lcid).
uint8_t m_enabledComponentCarrier
The number of enabled component carriers.
std::map< uint8_t, LteMacSapUser * > m_ueAttached
Map from LCID to SAP of the RLC instance.
MeasResults structure.