A Discrete-Event Network Simulator
API
lte-enb-component-carrier-manager.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Danilo Abrignani
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
19  *
20  */
21 
22 #ifndef LTE_ENB_COMPONENT_CARRIER_MANAGER_H
23 #define LTE_ENB_COMPONENT_CARRIER_MANAGER_H
24 
25 #include <ns3/object.h>
26 #include <ns3/lte-enb-rrc.h>
27 #include <ns3/lte-rrc-sap.h>
28 #include <ns3/lte-ccm-rrc-sap.h>
29 #include <ns3/lte-mac-sap.h>
30 #include <ns3/lte-enb-cmac-sap.h>
31 #include <ns3/lte-ccm-mac-sap.h>
32 #include <map>
33 #include <vector>
34 
35 namespace ns3 {
36 
37 
38 class LteCcmRrcSapUser;
39 class LteCcmRrcSapProvider;
40 class LteMacSapUser;
41 class LteMacSapProvider;
42 class LteEnbCmacSapProvider;
43 class LteCcmMacSapProvider;
44 
79 {
80 public:
81 
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 
155 protected:
156 
157  // inherited from Object
158  virtual void DoDispose ();
159 
166  virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
167 
171  struct UeInfo {
172  std::map<uint8_t, LteMacSapUser*> m_ueAttached;
173  std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> m_rlcLcInstantiated;
175  uint8_t m_ueState;
176  };
177 
178  std::map <uint16_t, UeInfo> m_ueInfo;
180  // pointer to RRC object for direct function calls, e.g. when CCM needs to obtain
181  // a pointer to RLC object of a specific flow
183 
184  /*
185  * This interface is used to receive API calls from the RLC instance that through
186  * LteMacSapProvider interface. The component carrier manager acts a proxy. This means that all
187  * RLC instances will see as in previous architecture the LteMacSapProvider interface, but the
188  * actual provider in new architecture will be some of child classes of LteEnbComponentCarrierManager.
189  * So, LteEnbComponentCarrierManager class will receive function calls that are meant for MAC, and
190  * will forward them to the MAC of the component carriers based on the logic implemented
191  * in LteComponentCarrierManager. This attribute will be initialized by using class that implements
192  * LteMacSapProvider interface and class that implements LteEnbComponentCarrierManager base class
193  * e.g.:EnbMacMemberLteMacSapProvider <LteEnbComponentCarrierManagerImpl>
194  */
196  // This map is initialized in LteHelper when the Component Carrier Manager is initialized, contains
197  // component carrier id and a pointer to the corresponding LteMacSapProvider interface of the
198  // MAC instance
199  std::map <uint8_t, LteMacSapProvider*> m_macSapProvidersMap;
200  // This map contains pointers to LteCcmMacSapProvider interfaces of the
201  // MAC instances. LteCcmMacSapProvider is new interface added for the
202  // communication between component carrier manager and MAC instance,
203  // to allow CCM to control UL buffer status reporting, and forwarding to
204  // schedulers. Before adding carrier aggregation to LTE module, MAC was
205  // directly forwarding UL buffer status report to scheduler. Now is this
206  // done through CCM, which decides to which MAC scheduler to forward UL BSR.
207  std::map< uint8_t, LteCcmMacSapProvider*> m_ccmMacSapProviderMap;
211 
212 }; // end of class LteEnbComponentCarrierManager
213 
214 
215 } // end of namespace ns3
216 
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.
std::map< uint8_t, LteCcmMacSapProvider * > m_ccmMacSapProviderMap
A map of pointers to the SAP interfaces of CCM instance that provides the CCM specific functionalitie...
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.
uint16_t m_noOfComponentCarriers
The number component of carriers that are supported by this eNb.
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.
virtual void DoDispose()
Destructor implementation.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:37
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
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:680