A Discrete-Event Network Simulator
API
lte-ccm-rrc-sap.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_CCM_RRC_SAP_H
23 #define LTE_CCM_RRC_SAP_H
24 
25 #include <ns3/lte-rrc-sap.h>
26 #include <ns3/eps-bearer.h>
27 #include <ns3/lte-enb-cmac-sap.h>
28 #include <ns3/lte-mac-sap.h>
29 #include <map>
30 
31 
32 namespace ns3 {
33  class LteUeCmacSapProvider;
34  class UeManager;
35  class LteEnbCmacSapProvider;
36  class LteMacSapUser;
37  class LteRrcSap;
38 
47 {
48 
50 friend class UeManager;
52 friend class LteMacSapUser;
53 
54 public:
55 
56  virtual ~LteCcmRrcSapProvider ();
57 
59  struct LcsConfig
60  {
61  uint16_t componentCarrierId;
64  };
65 
77  virtual void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
78 
84  virtual void AddUe (uint16_t rnti, uint8_t state) = 0;
85 
92  virtual void AddLc (LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu) = 0;
93 
99  virtual void RemoveUe (uint16_t rnti) = 0;
100 
119  virtual std::vector<LteCcmRrcSapProvider::LcsConfig> SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu) = 0;
120 
130  virtual std::vector<uint8_t> ReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid) = 0;
131 
140 
141 }; // end of class LteCcmRrcSapProvider
142 
143 
152 {
154  friend class LteEnbRrc;
155 public:
156  virtual ~LteCcmRrcSapUser ();
157 
175 
189  virtual void TriggerComponentCarrier (uint16_t rnti, uint16_t targetCellId) = 0;
190 
196  virtual void AddLcs (std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig) = 0;
197 
204  virtual void ReleaseLcs (uint16_t rnti, uint8_t lcid) = 0;
205 
212  virtual Ptr<UeManager> GetUeManager (uint16_t rnti) = 0;
213 
214 }; // end of class LteCcmRrcSapUser
215 
217 template <class C>
219 {
220 public:
226  MemberLteCcmRrcSapProvider (C* owner);
227 
228  // inherited from LteCcmRrcSapProvider
229  virtual void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);
230  virtual void AddUe (uint16_t rnti, uint8_t state);
231  virtual void AddLc (LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu);
232  virtual void RemoveUe (uint16_t rnti);
233  virtual std::vector<LteCcmRrcSapProvider::LcsConfig> SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu);
234  virtual std::vector<uint8_t> ReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid);
236 
237 private:
238  C* m_owner;
239 };
240 
241 template <class C>
243  : m_owner (owner)
244 {
245 }
246 
247 template <class C>
249 {
250  m_owner->DoReportUeMeas (rnti, measResults);
251 }
252 
253 template <class C>
254 void MemberLteCcmRrcSapProvider<C>::AddUe (uint16_t rnti, uint8_t state)
255 {
256  m_owner->DoAddUe (rnti, state);
257 }
258 
259 template <class C>
261 {
262  m_owner->DoAddLc (lcInfo, msu);
263 }
264 
265 template <class C>
267 {
268  m_owner->DoRemoveUe (rnti);
269 }
270 
271 template <class C>
272 std::vector<LteCcmRrcSapProvider::LcsConfig> MemberLteCcmRrcSapProvider<C>::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu)
273 {
274  return m_owner->DoSetupDataRadioBearer (bearer, bearerId, rnti, lcid, lcGroup, msu);
275 }
276 
277 template <class C>
278 std::vector<uint8_t> MemberLteCcmRrcSapProvider<C>::ReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid)
279 {
280  return m_owner->DoReleaseDataRadioBearer (rnti, lcid);
281 }
282 
283 template <class C>
285 {
286  return m_owner->DoConfigureSignalBearer (lcInfo, rlcMacSapUser);
287 }
288 
289 
291 template <class C>
293 {
294 public:
300  MemberLteCcmRrcSapUser (C* owner);
301 
302  // inherited from LteCcmRrcSapUser
303  virtual void AddLcs (std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig);
304  virtual void ReleaseLcs (uint16_t rnti, uint8_t lcid);
306  virtual void TriggerComponentCarrier (uint16_t rnti, uint16_t targetCellId);
307  virtual Ptr<UeManager> GetUeManager (uint16_t rnti);
308 
309 private:
310  C* m_owner;
311 };
312 
313 template <class C>
315  : m_owner (owner)
316 {
317 }
318 
319 template <class C>
320 void MemberLteCcmRrcSapUser<C>::AddLcs (std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig)
321 {
322  NS_FATAL_ERROR ("Function should not be called because it is not implemented.");
323  //m_owner->DoAddLcs (lcConfig);
324 }
325 
326 template <class C>
327 void MemberLteCcmRrcSapUser<C>::ReleaseLcs (uint16_t rnti, uint8_t lcid)
328 {
329  NS_FATAL_ERROR ("Function should not be called because it is not implemented.");
330  //m_owner->DoReleaseLcs (rnti, lcid);
331 
332 }
333 
334 template <class C>
335 uint8_t
337 {
338  return m_owner->DoAddUeMeasReportConfigForComponentCarrier (reportConfig);
339 }
340 
341 
342 template <class C>
343 void
344 MemberLteCcmRrcSapUser<C>::TriggerComponentCarrier (uint16_t rnti, uint16_t targetCellId)
345 {
346  NS_FATAL_ERROR ("Function should not be called because it is not implemented.");
347 }
348 
349 template <class C>
352 {
353  return m_owner->GetUeManager (rnti);
354 }
355 
356 } // end of namespace ns3
357 
358 
359 #endif /* LTE_CCM_RRC_SAP_H */
360 
virtual Ptr< UeManager > GetUeManager(uint16_t rnti)=0
Get UE manager by RNTI.
virtual std::vector< uint8_t > ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid)=0
Release an existing Data Radio Bearer for a Ue in the LteEnbComponentCarrierManager.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual std::vector< LteCcmRrcSapProvider::LcsConfig > SetupDataRadioBearer(EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu)=0
Add a new Bearer for the Ue in the LteEnbComponentCarrierManager.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
Definition: lte-rrc-sap.h:354
virtual void RemoveUe(uint16_t rnti)=0
Remove an existing UE.
virtual LteMacSapUser * ConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *rlcMacSapUser)=0
Add the Signal Bearer for a specific Ue in LteEnbComponenCarrierManager.
The LTE Radio Resource Control entity at the eNB.
Definition: lte-enb-rrc.h:577
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
virtual void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId)
Instruct the eNodeB RRC entity to prepare a component carrier.
virtual void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Reports UE measurements to the component carrier manager.
MemberLteCcmRrcSapUser class.
virtual uint8_t AddUeMeasReportConfigForComponentCarrier(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity...
virtual void AddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *msu)
Add a new logical channel.
uint16_t componentCarrierId
component carrier ID
MemberLteCcmRrcSapProvider(C *owner)
Constructor.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
MeasResults structure.
Definition: lte-rrc-sap.h:671
Logical Channel information to be passed to CmacSapProvider::ConfigureLc.
virtual void ReleaseLcs(uint16_t rnti, uint8_t lcid)=0
remove an existing LC
virtual void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Reports UE measurements to the component carrier manager.
MemberLteCcmRrcSapUser(C *owner)
Constructor.
virtual Ptr< UeManager > GetUeManager(uint16_t rnti)
Get UE manager by RNTI.
virtual std::vector< LteCcmRrcSapProvider::LcsConfig > SetupDataRadioBearer(EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu)
Add a new Bearer for the Ue in the LteEnbComponentCarrierManager.
C * m_owner
the owner class
virtual void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId)=0
Instruct the eNodeB RRC entity to prepare a component carrier.
MemberLteCcmRrcSapProvider class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Manages all the radio bearer information possessed by the ENB RRC for a single UE.
Definition: lte-enb-rrc.h:72
virtual uint8_t AddUeMeasReportConfigForComponentCarrier(LteRrcSap::ReportConfigEutra reportConfig)
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity...
virtual void AddUe(uint16_t rnti, uint8_t state)=0
Add a new UE in the LteEnbComponentCarrierManager.
virtual std::vector< uint8_t > ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid)
Release an existing Data Radio Bearer for a Ue in the LteEnbComponentCarrierManager.
virtual void RemoveUe(uint16_t rnti)
Remove an existing UE.
virtual void AddUe(uint16_t rnti, uint8_t state)
Add a new UE in the LteEnbComponentCarrierManager.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:95
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
virtual void AddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *msu)=0
Add a new logical channel.
LteEnbCmacSapProvider::LcInfo lc
LC info.
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
virtual void AddLcs(std::vector< LteEnbRrcSapProvider::LogicalChannelConfig > lcConfig)
add a new Logical Channel (LC)
virtual void ReleaseLcs(uint16_t rnti, uint8_t lcid)
remove an existing LC
virtual void AddLcs(std::vector< LteEnbRrcSapProvider::LogicalChannelConfig > lcConfig)=0
add a new Logical Channel (LC)
virtual LteMacSapUser * ConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *rlcMacSapUser)
Add the Signal Bearer for a specific Ue in LteEnbComponenCarrierManager.