A Discrete-Event Network Simulator
API
lte-ccm-rrc-sap.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Danilo Abrignani
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
18  *
19  */
20 
21 #ifndef LTE_CCM_RRC_SAP_H
22 #define LTE_CCM_RRC_SAP_H
23 
24 #include "eps-bearer.h"
25 #include "lte-enb-cmac-sap.h"
26 #include "lte-mac-sap.h"
27 #include "lte-rrc-sap.h"
28 
29 #include <map>
30 
31 namespace ns3
32 {
33 class LteUeCmacSapProvider;
34 class UeManager;
35 class LteEnbCmacSapProvider;
36 class LteMacSapUser;
37 class LteRrcSap;
38 
47 {
49  friend class UeManager;
51  friend class LteMacSapUser;
52 
53  public:
54  virtual ~LteCcmRrcSapProvider();
55 
57  struct LcsConfig
58  {
59  uint16_t componentCarrierId;
62  };
63 
75  virtual void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
76 
82  virtual void AddUe(uint16_t rnti, uint8_t state) = 0;
83 
90  virtual void AddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu) = 0;
91 
97  virtual void RemoveUe(uint16_t rnti) = 0;
98 
117  virtual std::vector<LteCcmRrcSapProvider::LcsConfig> SetupDataRadioBearer(
118  EpsBearer bearer,
119  uint8_t bearerId,
120  uint16_t rnti,
121  uint8_t lcid,
122  uint8_t lcGroup,
123  LteMacSapUser* msu) = 0;
124 
134  virtual std::vector<uint8_t> ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) = 0;
135 
144  LteMacSapUser* rlcMacSapUser) = 0;
145 
146 }; // end of class LteCcmRrcSapProvider
147 
156 {
158  friend class LteEnbRrc;
159 
160  public:
161  virtual ~LteCcmRrcSapUser();
162 
180  LteRrcSap::ReportConfigEutra reportConfig) = 0;
181 
195  virtual void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId) = 0;
196 
203  virtual void AddLcs(std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig) = 0;
204 
211  virtual void ReleaseLcs(uint16_t rnti, uint8_t lcid) = 0;
212 
219  virtual Ptr<UeManager> GetUeManager(uint16_t rnti) = 0;
220 
226  virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) = 0;
227 
228 }; // end of class LteCcmRrcSapUser
229 
231 template <class C>
233 {
234  public:
240  MemberLteCcmRrcSapProvider(C* owner);
241 
242  // inherited from LteCcmRrcSapProvider
243  void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
244  void AddUe(uint16_t rnti, uint8_t state) override;
245  void AddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu) override;
246  void RemoveUe(uint16_t rnti) override;
247  std::vector<LteCcmRrcSapProvider::LcsConfig> SetupDataRadioBearer(EpsBearer bearer,
248  uint8_t bearerId,
249  uint16_t rnti,
250  uint8_t lcid,
251  uint8_t lcGroup,
252  LteMacSapUser* msu) override;
253  std::vector<uint8_t> ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) override;
255  LteMacSapUser* rlcMacSapUser) override;
256 
257  private:
258  C* m_owner;
259 };
260 
261 template <class C>
263  : m_owner(owner)
264 {
265 }
266 
267 template <class C>
268 void
270 {
271  m_owner->DoReportUeMeas(rnti, measResults);
272 }
273 
274 template <class C>
275 void
276 MemberLteCcmRrcSapProvider<C>::AddUe(uint16_t rnti, uint8_t state)
277 {
278  m_owner->DoAddUe(rnti, state);
279 }
280 
281 template <class C>
282 void
284 {
285  m_owner->DoAddLc(lcInfo, msu);
286 }
287 
288 template <class C>
289 void
291 {
292  m_owner->DoRemoveUe(rnti);
293 }
294 
295 template <class C>
296 std::vector<LteCcmRrcSapProvider::LcsConfig>
298  uint8_t bearerId,
299  uint16_t rnti,
300  uint8_t lcid,
301  uint8_t lcGroup,
302  LteMacSapUser* msu)
303 {
304  return m_owner->DoSetupDataRadioBearer(bearer, bearerId, rnti, lcid, lcGroup, msu);
305 }
306 
307 template <class C>
308 std::vector<uint8_t>
310 {
311  return m_owner->DoReleaseDataRadioBearer(rnti, lcid);
312 }
313 
314 template <class C>
317  LteMacSapUser* rlcMacSapUser)
318 {
319  return m_owner->DoConfigureSignalBearer(lcInfo, rlcMacSapUser);
320 }
321 
323 template <class C>
325 {
326  public:
332  MemberLteCcmRrcSapUser(C* owner);
333 
334  // inherited from LteCcmRrcSapUser
335  void AddLcs(std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig) override;
336  void ReleaseLcs(uint16_t rnti, uint8_t lcid) override;
338  LteRrcSap::ReportConfigEutra reportConfig) override;
339  void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId) override;
340  Ptr<UeManager> GetUeManager(uint16_t rnti) override;
341  void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override;
342 
343  private:
344  C* m_owner;
345 };
346 
347 template <class C>
349  : m_owner(owner)
350 {
351 }
352 
353 template <class C>
354 void
355 MemberLteCcmRrcSapUser<C>::AddLcs(std::vector<LteEnbRrcSapProvider::LogicalChannelConfig> lcConfig)
356 {
357  NS_FATAL_ERROR("Function should not be called because it is not implemented.");
358  // m_owner->DoAddLcs (lcConfig);
359 }
360 
361 template <class C>
362 void
363 MemberLteCcmRrcSapUser<C>::ReleaseLcs(uint16_t rnti, uint8_t lcid)
364 {
365  NS_FATAL_ERROR("Function should not be called because it is not implemented.");
366  // m_owner->DoReleaseLcs (rnti, lcid);
367 }
368 
369 template <class C>
370 uint8_t
372  LteRrcSap::ReportConfigEutra reportConfig)
373 {
374  return m_owner->DoAddUeMeasReportConfigForComponentCarrier(reportConfig);
375 }
376 
377 template <class C>
378 void
379 MemberLteCcmRrcSapUser<C>::TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId)
380 {
381  NS_FATAL_ERROR("Function should not be called because it is not implemented.");
382 }
383 
384 template <class C>
387 {
388  return m_owner->GetUeManager(rnti);
389 }
390 
391 template <class C>
392 void
394 {
395  return m_owner->DoSetNumberOfComponentCarriers(noOfComponentCarriers);
396 }
397 
398 } // end of namespace ns3
399 
400 #endif /* LTE_CCM_RRC_SAP_H */
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
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.
virtual void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Reports UE measurements to the component carrier manager.
virtual LteMacSapUser * ConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *rlcMacSapUser)=0
Add the Signal Bearer for a specific Ue in LteEnbComponenCarrierManager.
virtual void AddUe(uint16_t rnti, uint8_t state)=0
Add a new UE in the LteEnbComponentCarrierManager.
virtual void AddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *msu)=0
Add a new logical channel.
virtual void RemoveUe(uint16_t rnti)=0
Remove an existing UE.
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.
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
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 ReleaseLcs(uint16_t rnti, uint8_t lcid)=0
remove an existing LC
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)=0
Set the number of component carriers.
virtual void AddLcs(std::vector< LteEnbRrcSapProvider::LogicalChannelConfig > lcConfig)=0
add a new Logical Channel (LC)
virtual Ptr< UeManager > GetUeManager(uint16_t rnti)=0
Get UE manager by RNTI.
virtual void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId)=0
Instruct the eNodeB RRC entity to prepare a component carrier.
The LTE Radio Resource Control entity at the eNB.
Definition: lte-enb-rrc.h:656
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:96
MemberLteCcmRrcSapProvider class.
std::vector< LteCcmRrcSapProvider::LcsConfig > SetupDataRadioBearer(EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu) override
Add a new Bearer for the Ue in the LteEnbComponentCarrierManager.
MemberLteCcmRrcSapProvider(C *owner)
Constructor.
void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Reports UE measurements to the component carrier manager.
std::vector< uint8_t > ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) override
Release an existing Data Radio Bearer for a Ue in the LteEnbComponentCarrierManager.
LteMacSapUser * ConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *rlcMacSapUser) override
Add the Signal Bearer for a specific Ue in LteEnbComponenCarrierManager.
void AddUe(uint16_t rnti, uint8_t state) override
Add a new UE in the LteEnbComponentCarrierManager.
void AddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *msu) override
Add a new logical channel.
void RemoveUe(uint16_t rnti) override
Remove an existing UE.
MemberLteCcmRrcSapUser class.
Ptr< UeManager > GetUeManager(uint16_t rnti) override
Get UE manager by RNTI.
C * m_owner
the owner class
void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId) override
Instruct the eNodeB RRC entity to prepare a component carrier.
void AddLcs(std::vector< LteEnbRrcSapProvider::LogicalChannelConfig > lcConfig) override
add a new Logical Channel (LC)
void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override
Set the number of component carriers.
uint8_t AddUeMeasReportConfigForComponentCarrier(LteRrcSap::ReportConfigEutra reportConfig) override
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
MemberLteCcmRrcSapUser(C *owner)
Constructor.
void ReleaseLcs(uint16_t rnti, uint8_t lcid) override
remove an existing LC
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Manages all the radio bearer information possessed by the ENB RRC for a single UE.
Definition: lte-enb-rrc.h:68
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t componentCarrierId
component carrier ID
LteEnbCmacSapProvider::LcInfo lc
LC info.
Logical Channel information to be passed to CmacSapProvider::ConfigureLc.
MeasResults structure.
Definition: lte-rrc-sap.h:717
Specifies criteria for triggering of an E-UTRA measurement reporting event.
Definition: lte-rrc-sap.h:373