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 
219  virtual void SetNumberOfComponentCarriers (uint16_t noOfComponentCarriers) = 0;
220 
221 }; // end of class LteCcmRrcSapUser
222 
224 template <class C>
226 {
227 public:
233  MemberLteCcmRrcSapProvider (C* owner);
234 
235  // inherited from LteCcmRrcSapProvider
236  virtual void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);
237  virtual void AddUe (uint16_t rnti, uint8_t state);
238  virtual void AddLc (LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu);
239  virtual void RemoveUe (uint16_t rnti);
240  virtual std::vector<LteCcmRrcSapProvider::LcsConfig> SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu);
241  virtual std::vector<uint8_t> ReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid);
243 
244 private:
245  C* m_owner;
246 };
247 
248 template <class C>
250  : m_owner (owner)
251 {
252 }
253 
254 template <class C>
256 {
257  m_owner->DoReportUeMeas (rnti, measResults);
258 }
259 
260 template <class C>
261 void MemberLteCcmRrcSapProvider<C>::AddUe (uint16_t rnti, uint8_t state)
262 {
263  m_owner->DoAddUe (rnti, state);
264 }
265 
266 template <class C>
268 {
269  m_owner->DoAddLc (lcInfo, msu);
270 }
271 
272 template <class C>
274 {
275  m_owner->DoRemoveUe (rnti);
276 }
277 
278 template <class C>
279 std::vector<LteCcmRrcSapProvider::LcsConfig> MemberLteCcmRrcSapProvider<C>::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu)
280 {
281  return m_owner->DoSetupDataRadioBearer (bearer, bearerId, rnti, lcid, lcGroup, msu);
282 }
283 
284 template <class C>
285 std::vector<uint8_t> MemberLteCcmRrcSapProvider<C>::ReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid)
286 {
287  return m_owner->DoReleaseDataRadioBearer (rnti, lcid);
288 }
289 
290 template <class C>
292 {
293  return m_owner->DoConfigureSignalBearer (lcInfo, rlcMacSapUser);
294 }
295 
296 
298 template <class C>
300 {
301 public:
307  MemberLteCcmRrcSapUser (C* owner);
308 
309  // inherited from LteCcmRrcSapUser
310  virtual void AddLcs (std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig);
311  virtual void ReleaseLcs (uint16_t rnti, uint8_t lcid);
313  virtual void TriggerComponentCarrier (uint16_t rnti, uint16_t targetCellId);
314  virtual Ptr<UeManager> GetUeManager (uint16_t rnti);
315  virtual void SetNumberOfComponentCarriers (uint16_t noOfComponentCarriers);
316 
317 private:
318  C* m_owner;
319 };
320 
321 template <class C>
323  : m_owner (owner)
324 {
325 }
326 
327 template <class C>
328 void MemberLteCcmRrcSapUser<C>::AddLcs (std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig)
329 {
330  NS_FATAL_ERROR ("Function should not be called because it is not implemented.");
331  //m_owner->DoAddLcs (lcConfig);
332 }
333 
334 template <class C>
335 void MemberLteCcmRrcSapUser<C>::ReleaseLcs (uint16_t rnti, uint8_t lcid)
336 {
337  NS_FATAL_ERROR ("Function should not be called because it is not implemented.");
338  //m_owner->DoReleaseLcs (rnti, lcid);
339 
340 }
341 
342 template <class C>
343 uint8_t
345 {
346  return m_owner->DoAddUeMeasReportConfigForComponentCarrier (reportConfig);
347 }
348 
349 
350 template <class C>
351 void
352 MemberLteCcmRrcSapUser<C>::TriggerComponentCarrier (uint16_t rnti, uint16_t targetCellId)
353 {
354  NS_FATAL_ERROR ("Function should not be called because it is not implemented.");
355 }
356 
357 template <class C>
360 {
361  return m_owner->GetUeManager (rnti);
362 }
363 
364 template <class C>
365 void
367 {
368  return m_owner->DoSetNumberOfComponentCarriers (noOfComponentCarriers);
369 }
370 
371 } // end of namespace ns3
372 
373 
374 #endif /* LTE_CCM_RRC_SAP_H */
375 
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)
Set the number of component carriers.
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:361
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:634
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
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.
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)=0
Set the number of component carriers.
MeasResults structure.
Definition: lte-rrc-sap.h:678
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:74
virtual uint8_t AddUeMeasReportConfigForComponentCarrier(LteRrcSap::ReportConfigEutra reportConfig)
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity...
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
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.