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 
168  std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> > m_ueAttached;
169  std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> > m_rlcLcInstantiated;
170  std::map <uint16_t, uint8_t> m_enabledComponentCarrier;
171  std::map <uint16_t, uint8_t> m_ueState;
173  // pointer to RRC object for direct function calls, e.g. when CCM needs to obtain
174  // a pointer to RLC object of a specific flow
176 
177  /*
178  * This interface is used to receive API calls from the RLC instance that through
179  * LteMacSapProvider interface. The component carrier manager acts a proxy. This means that all
180  * RLC instances will see as in previous architecture the LteMacSapProvider interface, but the
181  * actual provider in new architecture will be some of child classes of LteEnbComponentCarrierManager.
182  * So, LteEnbComponentCarrierManager class will receive function calls that are meant for MAC, and
183  * will forward them to the MAC of the component carriers based on the logic implemented
184  * in LteComponentCarrierManager. This attribute will be initialized by using class that implements
185  * LteMacSapProvider interface and class that implements LteEnbComponentCarrierManager base class
186  * e.g.:EnbMacMemberLteMacSapProvider <LteEnbComponentCarrierManagerImpl>
187  */
189  // This map is initialized in LteHelper when the Component Carrier Manager is initialized, contains
190  // component carrier id and a pointer to the corresponding LteMacSapProvider interface of the
191  // MAC instance
192  std::map <uint8_t, LteMacSapProvider*> m_macSapProvidersMap;
193  // This map contains pointers to LteCcmMacSapProvider interfaces of the
194  // MAC instances. LteCcmMacSapProvider is new interface added for the
195  // communication between component carrier manager and MAC instance,
196  // to allow CCM to control UL buffer status reporting, and forwarding to
197  // schedulers. Before adding carrier aggregation to LTE module, MAC was
198  // directly forwarding UL buffer status report to scheduler. Now is this
199  // done through CCM, which decides to which MAC scheduler to forward UL BSR.
200  std::map< uint8_t, LteCcmMacSapProvider*> m_ccmMacSapProviderMap;
204 
205 }; // end of class LteEnbComponentCarrierManager
206 
207 
208 } // end of namespace ns3
209 
210 
211 #endif /* LTE_ENB_COMPONENT_CARRIER_MANAGER_H */
Service Access Point (SAP) offered by the component carrier manager (CCM) by MAC to CCM...
LteCcmRrcSapUser * m_ccmRrcSapUser
A pointer to SAP interface of RRC instance, i.e.
LteCcmRrcSapProvider * m_ccmRrcSapProvider
A pointer to the SAP interface of the CCM instance to receive API calls from the eNodeB RRC instance...
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
std::map< uint8_t, LteMacSapProvider * > m_macSapProvidersMap
A map of pointers to real SAP interfaces of MAC instances.
virtual bool SetCcmMacSapProviders(uint8_t componentCarrierId, LteCcmMacSapProvider *sap)
Set LteCcmMacSapProvider interface for the MAC object of the specified component carrier.
LteCcmMacSapUser * m_ccmMacSapUser
LteCcmMacSapUser is extended version of LteMacSapUser interface.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Implementation of ReportUeMeas.
std::map< uint16_t, std::map< uint8_t, LteEnbCmacSapProvider::LcInfo > > m_rlcLcInstantiated
This map contains logical channel configuration per flow Id (rnti, lcid).
virtual LteCcmMacSapUser * GetLteCcmMacSapUser()
This function returns a pointer to the LteCcmMacSapUser interface, which is used by MAC to communicat...
MeasResults structure.
Definition: lte-rrc-sap.h:678
virtual void DoDispose()
Destructor implementation.
std::map< uint8_t, LteCcmMacSapProvider * > m_ccmMacSapProviderMap
A map of pointers to the SAP interfaces of CCM instance that provides the CCM specific functionalitie...
std::map< uint16_t, std::map< uint8_t, LteMacSapUser * > > m_ueAttached
The map that contains the rnti, lcid, SAP of the RLC instance.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Service Access Point (SAP) offered by MAC to the component carrier manager (CCM). ...
virtual LteCcmRrcSapProvider * GetLteCcmRrcSapProvider()
Export the "provider" part of the ComponentCarrier Management SAP interface.
std::map< uint16_t, uint8_t > m_ueState
Map of RRC states per UE (rnti, state), e.g.
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
std::map< uint16_t, uint8_t > m_enabledComponentCarrier
This map tells for each RNTI the number of enabled component carriers.
The class implements Component Carrier Manager (CCM) that operates using the Component Carrier Manage...
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:36
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)
Sets the total number of component carriers.
A base class which provides memory management and object aggregation.
Definition: object.h:87
Ptr< LteEnbRrc > m_rrc
A pointer to the RRC instance of this eNb.
virtual void SetLteCcmRrcSapUser(LteCcmRrcSapUser *s)
Set the "user" part of the ComponentCarrier Management SAP interface that this ComponentCarrier algor...
LteMacSapProvider * m_macSapProvider
A pointer to main SAP interface of the MAC instance, which is in this case handled by CCM...
a unique identifier for an interface.
Definition: type-id.h:58
virtual bool SetMacSapProvider(uint8_t componentCarrierId, LteMacSapProvider *sap)
Set LteMacSapProvider interface for the MAC object of the specified component carrier.
virtual LteMacSapProvider * GetLteMacSapProvider()
Returns the pointer to the LteMacSapProvider interface, the provider of MAC, which is this new archit...
uint16_t m_noOfComponentCarriers
The number component of carriers that are supported by this eNb.