A Discrete-Event Network Simulator
API
lte-enb-component-carrier-manager.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Danilo Abrignani
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: Danilo Abrignani <danilo.abrignani@unibo.it>
18  *
19  */
20 
21 #ifndef LTE_ENB_COMPONENT_CARRIER_MANAGER_H
22 #define LTE_ENB_COMPONENT_CARRIER_MANAGER_H
23 
24 #include "lte-ccm-mac-sap.h"
25 #include "lte-ccm-rrc-sap.h"
26 #include "lte-enb-cmac-sap.h"
27 #include "lte-enb-rrc.h"
28 #include "lte-mac-sap.h"
29 #include "lte-rrc-sap.h"
30 
31 #include <ns3/object.h>
32 
33 #include <map>
34 #include <vector>
35 
36 namespace ns3
37 {
38 
39 class LteCcmRrcSapUser;
40 class LteCcmRrcSapProvider;
41 class LteMacSapUser;
42 class LteMacSapProvider;
43 class LteEnbCmacSapProvider;
44 class LteCcmMacSapProvider;
45 
80 {
81  public:
88  static TypeId GetTypeId();
89 
96  virtual void SetLteCcmRrcSapUser(LteCcmRrcSapUser* s);
97 
104 
114 
126 
135  virtual bool SetMacSapProvider(uint8_t componentCarrierId, LteMacSapProvider* sap);
136 
146  virtual bool SetCcmMacSapProviders(uint8_t componentCarrierId, LteCcmMacSapProvider* sap);
147 
152  virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers);
153 
154  protected:
155  // inherited from Object
156  void DoDispose() override;
157 
164  virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
165 
169  struct UeInfo
170  {
171  std::map<uint8_t, LteMacSapUser*>
173  std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>
176  uint8_t m_ueState;
177  };
178 
179  std::map<uint16_t, UeInfo> m_ueInfo;
182  // pointer to RRC object for direct function calls, e.g. when CCM needs to obtain
183  // a pointer to RLC object of a specific flow
185 
186  /*
187  * This interface is used to receive API calls from the RLC instance that through
188  * LteMacSapProvider interface. The component carrier manager acts a proxy. This means that all
189  * RLC instances will see as in previous architecture the LteMacSapProvider interface, but the
190  * actual provider in new architecture will be some of child classes of
191  * LteEnbComponentCarrierManager. So, LteEnbComponentCarrierManager class will receive function
192  * calls that are meant for MAC, and will forward them to the MAC of the component carriers
193  * based on the logic implemented in LteComponentCarrierManager. This attribute will be
194  * initialized by using class that implements LteMacSapProvider interface and class that
195  * implements LteEnbComponentCarrierManager base class e.g.:EnbMacMemberLteMacSapProvider
196  * <LteEnbComponentCarrierManagerImpl>
197  */
200  // This map is initialized in LteHelper when the Component Carrier Manager is initialized,
201  // contains component carrier id and a pointer to the corresponding LteMacSapProvider interface
202  // of the MAC instance
203  std::map<uint8_t, LteMacSapProvider*>
205  // This map contains pointers to LteCcmMacSapProvider interfaces of the
206  // MAC instances. LteCcmMacSapProvider is new interface added for the
207  // communication between component carrier manager and MAC instance,
208  // to allow CCM to control UL buffer status reporting, and forwarding to
209  // schedulers. Before adding carrier aggregation to LTE module, MAC was
210  // directly forwarding UL buffer status report to scheduler. Now is this
211  // done through CCM, which decides to which MAC scheduler to forward UL BSR.
212  std::map<uint8_t, LteCcmMacSapProvider*>
224 
225 }; // end of class LteEnbComponentCarrierManager
226 
227 } // end of namespace ns3
228 
229 #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:36
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
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.
Definition: lte-rrc-sap.h:717