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 */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::LteMacSapProvider
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:37
ns3::LteEnbComponentCarrierManager::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: lte-enb-component-carrier-manager.cc:51
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteCcmRrcSapProvider
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
Definition: lte-ccm-rrc-sap.h:47
ns3::LteEnbComponentCarrierManager::m_enabledComponentCarrier
std::map< uint16_t, uint8_t > m_enabledComponentCarrier
This map tells for each RNTI the number of enabled component carriers.
Definition: lte-enb-component-carrier-manager.h:170
ns3::LteEnbComponentCarrierManager::SetNumberOfComponentCarriers
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)
Sets the total number of component carriers.
Definition: lte-enb-component-carrier-manager.cc:124
ns3::LteEnbComponentCarrierManager::SetLteCcmRrcSapUser
virtual void SetLteCcmRrcSapUser(LteCcmRrcSapUser *s)
Set the "user" part of the ComponentCarrier Management SAP interface that this ComponentCarrier algor...
Definition: lte-enb-component-carrier-manager.cc:56
ns3::LteEnbComponentCarrierManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: lte-enb-component-carrier-manager.cc:41
ns3::LteEnbComponentCarrierManager::SetMacSapProvider
virtual bool SetMacSapProvider(uint8_t componentCarrierId, LteMacSapProvider *sap)
Set LteMacSapProvider interface for the MAC object of the specified component carrier.
Definition: lte-enb-component-carrier-manager.cc:84
ns3::LteEnbComponentCarrierManager::m_ccmRrcSapProvider
LteCcmRrcSapProvider * m_ccmRrcSapProvider
A pointer to the SAP interface of the CCM instance to receive API calls from the eNodeB RRC instance.
Definition: lte-enb-component-carrier-manager.h:203
ns3::LteCcmRrcSapUser
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
Definition: lte-ccm-rrc-sap.h:152
ns3::LteEnbComponentCarrierManager::m_ueAttached
std::map< uint16_t, std::map< uint8_t, LteMacSapUser * > > m_ueAttached
The map that contains the rnti, lcid, SAP of the RLC instance.
Definition: lte-enb-component-carrier-manager.h:168
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::LteEnbComponentCarrierManager::m_ccmMacSapProviderMap
std::map< uint8_t, LteCcmMacSapProvider * > m_ccmMacSapProviderMap
A map of pointers to the SAP interfaces of CCM instance that provides the CCM specific functionalitie...
Definition: lte-enb-component-carrier-manager.h:200
ns3::Object
A base class which provides memory management and object aggregation.
Definition: object.h:88
ns3::LteEnbComponentCarrierManager::SetCcmMacSapProviders
virtual bool SetCcmMacSapProviders(uint8_t componentCarrierId, LteCcmMacSapProvider *sap)
Set LteCcmMacSapProvider interface for the MAC object of the specified component carrier.
Definition: lte-enb-component-carrier-manager.cc:107
ns3::LteEnbComponentCarrierManager::m_ueState
std::map< uint16_t, uint8_t > m_ueState
Map of RRC states per UE (rnti, state), e.g.
Definition: lte-enb-component-carrier-manager.h:171
ns3::LteEnbComponentCarrierManager::DoReportUeMeas
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Implementation of ReportUeMeas.
ns3::LteEnbComponentCarrierManager::m_rlcLcInstantiated
std::map< uint16_t, std::map< uint8_t, LteEnbCmacSapProvider::LcInfo > > m_rlcLcInstantiated
This map contains logical channel configuration per flow Id (rnti, lcid).
Definition: lte-enb-component-carrier-manager.h:169
ns3::LteEnbComponentCarrierManager::m_ccmRrcSapUser
LteCcmRrcSapUser * m_ccmRrcSapUser
A pointer to SAP interface of RRC instance, i.e.
Definition: lte-enb-component-carrier-manager.h:202
ns3::LteEnbComponentCarrierManager::m_noOfComponentCarriers
uint16_t m_noOfComponentCarriers
The number component of carriers that are supported by this eNb.
Definition: lte-enb-component-carrier-manager.h:172
ns3::LteRrcSap::MeasResults
MeasResults structure.
Definition: lte-rrc-sap.h:679
ns3::LteEnbComponentCarrierManager
The class implements Component Carrier Manager (CCM) that operates using the Component Carrier Manage...
Definition: lte-enb-component-carrier-manager.h:79
ns3::LteEnbComponentCarrierManager::GetLteCcmRrcSapProvider
virtual LteCcmRrcSapProvider * GetLteCcmRrcSapProvider()
Export the "provider" part of the ComponentCarrier Management SAP interface.
Definition: lte-enb-component-carrier-manager.cc:63
ns3::LteEnbComponentCarrierManager::GetLteCcmMacSapUser
virtual LteCcmMacSapUser * GetLteCcmMacSapUser()
This function returns a pointer to the LteCcmMacSapUser interface, which is used by MAC to communicat...
Definition: lte-enb-component-carrier-manager.cc:77
ns3::LteEnbComponentCarrierManager::LteEnbComponentCarrierManager
LteEnbComponentCarrierManager()
Definition: lte-enb-component-carrier-manager.cc:31
ns3::LteEnbComponentCarrierManager::GetLteMacSapProvider
virtual LteMacSapProvider * GetLteMacSapProvider()
Returns the pointer to the LteMacSapProvider interface, the provider of MAC, which is this new archit...
Definition: lte-enb-component-carrier-manager.cc:70
ns3::LteEnbComponentCarrierManager::m_macSapProvidersMap
std::map< uint8_t, LteMacSapProvider * > m_macSapProvidersMap
A map of pointers to real SAP interfaces of MAC instances.
Definition: lte-enb-component-carrier-manager.h:192
ns3::LteCcmMacSapProvider
Service Access Point (SAP) offered by the component carrier manager (CCM) by MAC to CCM.
Definition: lte-ccm-mac-sap.h:44
ns3::LteEnbComponentCarrierManager::~LteEnbComponentCarrierManager
virtual ~LteEnbComponentCarrierManager()
Definition: lte-enb-component-carrier-manager.cc:36
ns3::LteEnbComponentCarrierManager::m_macSapProvider
LteMacSapProvider * m_macSapProvider
A pointer to main SAP interface of the MAC instance, which is in this case handled by CCM.
Definition: lte-enb-component-carrier-manager.h:188
ns3::LteEnbComponentCarrierManager::m_ccmMacSapUser
LteCcmMacSapUser * m_ccmMacSapUser
LteCcmMacSapUser is extended version of LteMacSapUser interface.
Definition: lte-enb-component-carrier-manager.h:201
ns3::LteCcmMacSapUser
Service Access Point (SAP) offered by MAC to the component carrier manager (CCM).
Definition: lte-ccm-mac-sap.h:79
ns3::LteEnbComponentCarrierManager::m_rrc
Ptr< LteEnbRrc > m_rrc
A pointer to the RRC instance of this eNb.
Definition: lte-enb-component-carrier-manager.h:175