5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-gnb-component-carrier-manager.h
1// Copyright (c) 2015 Danilo Abrignani
2//
3// SPDX-License-Identifier: GPL-2.0-only
4//
5// Author: Danilo Abrignani <danilo.abrignani@unibo.it>
6
7#ifndef NR_GNB_COMPONENT_CARRIER_MANAGER_H
8#define NR_GNB_COMPONENT_CARRIER_MANAGER_H
9
10#include "nr-ccm-mac-sap.h"
11#include "nr-ccm-rrc-sap.h"
12#include "nr-gnb-cmac-sap.h"
13#include "nr-gnb-rrc.h"
14#include "nr-mac-sap.h"
15#include "nr-rrc-sap.h"
16
17#include "ns3/object.h"
18
19#include <map>
20#include <vector>
21
22namespace ns3
23{
24
25class NrCcmRrcSapUser;
26class NrCcmRrcSapProvider;
27class NrMacSapUser;
28class NrMacSapProvider;
29class NrGnbCmacSapProvider;
30class NrCcmMacSapProvider;
31
65class NrGnbComponentCarrierManager : public Object
66{
67 public:
74 static TypeId GetTypeId();
75
82 virtual void SetNrCcmRrcSapUser(NrCcmRrcSapUser* s);
83
90
100
112
121 virtual bool SetMacSapProvider(uint8_t componentCarrierId, NrMacSapProvider* sap);
122
132 virtual bool SetCcmMacSapProviders(uint8_t componentCarrierId, NrCcmMacSapProvider* sap);
133
138 virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers);
139
140 protected:
141 // inherited from Object
142 void DoDispose() override;
143
150 virtual void DoReportUeMeas(uint16_t rnti, NrRrcSap::MeasResults measResults) = 0;
151
155 struct NrUeInfo
156 {
157 std::map<uint8_t, NrMacSapUser*>
159 std::map<uint8_t, NrGnbCmacSapProvider::LcInfo>
162 uint8_t m_ueState;
163 };
164
165 std::map<uint16_t, NrUeInfo> m_ueInfo;
168 // pointer to RRC object for direct function calls, e.g. when CCM needs to obtain
169 // a pointer to RLC object of a specific flow
170 Ptr<NrGnbRrc> m_rrc;
171
172 /*
173 * This interface is used to receive API calls from the RLC instance that through
174 * NrMacSapProvider interface. The component carrier manager acts a proxy. This means that all
175 * RLC instances will see as in previous architecture the NrMacSapProvider interface, but the
176 * actual provider in new architecture will be some of child classes of
177 * NrGnbComponentCarrierManager. So, NrGnbComponentCarrierManager class will receive function
178 * calls that are meant for MAC, and will forward them to the MAC of the component carriers
179 * based on the logic implemented in NrComponentCarrierManager. This attribute will be
180 * initialized by using class that implements NrMacSapProvider interface and class that
181 * implements NrGnbComponentCarrierManager base class e.g.:GnbMacMemberNrMacSapProvider
182 * <NrGnbComponentCarrierManagerImpl>
183 */
186 // This map is initialized in NrHelper when the Component Carrier Manager is initialized,
187 // contains component carrier id and a pointer to the corresponding NrMacSapProvider interface
188 // of the MAC instance
189 std::map<uint8_t, NrMacSapProvider*>
191 // This map contains pointers to NrCcmMacSapProvider interfaces of the
192 // MAC instances. NrCcmMacSapProvider is new interface added for the
193 // communication between component carrier manager and MAC instance,
194 // to allow CCM to control UL buffer status reporting, and forwarding to
195 // schedulers. Before adding carrier aggregation to NR module, MAC was
196 // directly forwarding UL buffer status report to scheduler. Now is this
197 // done through CCM, which decides to which MAC scheduler to forward UL BSR.
198 std::map<uint8_t, NrCcmMacSapProvider*>
210
211}; // end of class NrGnbComponentCarrierManager
212
213} // end of namespace ns3
214
215#endif /* NR_GNB_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 bool SetCcmMacSapProviders(uint8_t componentCarrierId, NrCcmMacSapProvider *sap)
Set NrCcmMacSapProvider interface for the MAC object of the specified component carrier....
virtual NrMacSapProvider * GetNrMacSapProvider()
Returns the pointer to the NrMacSapProvider interface, the provider of MAC, which is this new archite...
virtual void SetNrCcmRrcSapUser(NrCcmRrcSapUser *s)
Set the "user" part of the NrComponentCarrier Management SAP interface that this NrComponentCarrier a...
virtual bool SetMacSapProvider(uint8_t componentCarrierId, NrMacSapProvider *sap)
Set NrMacSapProvider interface for the MAC object of the specified component carrier.
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)
Sets the total number of component carriers.
virtual NrCcmMacSapUser * GetNrCcmMacSapUser()
This function returns a pointer to the NrCcmMacSapUser interface, which is used by MAC to communicate...
std::map< uint8_t, NrCcmMacSapProvider * > m_ccmMacSapProviderMap
std::map< uint16_t, NrUeInfo > m_ueInfo
The map from RNTI to UE information.
Ptr< NrGnbRrc > m_rrc
A pointer to the RRC instance of this eNb.
std::map< uint8_t, NrMacSapProvider * > m_macSapProvidersMap
A map of pointers to real SAP interfaces of MAC instances.
virtual NrCcmRrcSapProvider * GetNrCcmRrcSapProvider()
Export the "provider" part of the NrComponentCarrier Management SAP interface.
virtual void DoReportUeMeas(uint16_t rnti, NrRrcSap::MeasResults measResults)=0
Implementation of ReportUeMeas.
std::map< uint8_t, NrMacSapUser * > m_ueAttached
Map from LCID to SAP of the RLC instance.
std::map< uint8_t, NrGnbCmacSapProvider::LcInfo > m_rlcLcInstantiated
Logical channel configuration per flow Id (rnti, lcid).
uint8_t m_ueState
RRC states of UE, e.g. CONNECTED_NORMALLY.
uint8_t m_enabledComponentCarrier
The number of enabled component carriers.
MeasResults structure.
Definition nr-rrc-sap.h:723