5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-ccm-rrc-sap.h
1// Copyright (c) 2015 Danilo Abrignani
2//
3// SPDX-License-Identifier: GPL-2.0-only
4//
5// Author: Danilo Abrignani <danilo.abrignani@unibo.it>
6
7#ifndef NR_CCM_RRC_SAP_H
8#define NR_CCM_RRC_SAP_H
9
10#include "nr-eps-bearer.h"
11#include "nr-gnb-cmac-sap.h"
12#include "nr-mac-sap.h"
13#include "nr-rrc-sap.h"
14
15#include <map>
16
17namespace ns3
18{
19class NrUeCmacSapProvider;
20class NrUeManager;
21class NrGnbCmacSapProvider;
22class NrMacSapUser;
23class NrRrcSap;
24
33{
35 friend class NrUeManager;
37 friend class NrMacSapUser;
38
39 public:
40 virtual ~NrCcmRrcSapProvider() = default;
41
49
61 virtual void ReportUeMeas(uint16_t rnti, NrRrcSap::MeasResults measResults) = 0;
62
68 virtual void AddUe(uint16_t rnti, uint8_t state) = 0;
69
76 virtual void AddLc(NrGnbCmacSapProvider::LcInfo lcInfo, NrMacSapUser* msu) = 0;
77
83 virtual void RemoveUe(uint16_t rnti) = 0;
84
103 virtual std::vector<NrCcmRrcSapProvider::LcsConfig> SetupDataRadioBearer(NrEpsBearer bearer,
104 uint8_t bearerId,
105 uint16_t rnti,
106 uint8_t lcid,
107 uint8_t lcGroup,
108 NrMacSapUser* msu) = 0;
109
119 virtual std::vector<uint8_t> ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) = 0;
120
129 NrMacSapUser* rlcMacSapUser) = 0;
130
131}; // end of class NrCcmRrcSapProvider
132
141{
143 friend class NrGnbRrc;
144
145 public:
146 virtual ~NrCcmRrcSapUser() = default;
147
165 NrRrcSap::ReportConfigEutra reportConfig) = 0;
166
180 virtual void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId) = 0;
181
188 virtual void AddLcs(std::vector<NrGnbRrcSapProvider::LogicalChannelConfig> lcConfig) = 0;
189
196 virtual void ReleaseLcs(uint16_t rnti, uint8_t lcid) = 0;
197
204 virtual Ptr<NrUeManager> GetUeManager(uint16_t rnti) = 0;
205
211 virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) = 0;
212
213}; // end of class NrCcmRrcSapUser
214
216template <class C>
218{
219 public:
226
227 // inherited from NrCcmRrcSapProvider
228 void ReportUeMeas(uint16_t rnti, NrRrcSap::MeasResults measResults) override;
229 void AddUe(uint16_t rnti, uint8_t state) override;
230 void AddLc(NrGnbCmacSapProvider::LcInfo lcInfo, NrMacSapUser* msu) override;
231 void RemoveUe(uint16_t rnti) override;
232 std::vector<NrCcmRrcSapProvider::LcsConfig> SetupDataRadioBearer(NrEpsBearer bearer,
233 uint8_t bearerId,
234 uint16_t rnti,
235 uint8_t lcid,
236 uint8_t lcGroup,
237 NrMacSapUser* msu) override;
238 std::vector<uint8_t> ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) override;
240 NrMacSapUser* rlcMacSapUser) override;
241
242 private:
243 C* m_owner;
244};
245
246template <class C>
248 : m_owner(owner)
249{
250}
251
252template <class C>
253void
255{
256 m_owner->DoReportUeMeas(rnti, measResults);
257}
258
259template <class C>
260void
261MemberNrCcmRrcSapProvider<C>::AddUe(uint16_t rnti, uint8_t state)
262{
263 m_owner->DoAddUe(rnti, state);
264}
265
266template <class C>
267void
269{
270 m_owner->DoAddLc(lcInfo, msu);
271}
272
273template <class C>
274void
276{
277 m_owner->DoRemoveUe(rnti);
278}
279
280template <class C>
281std::vector<NrCcmRrcSapProvider::LcsConfig>
283 uint8_t bearerId,
284 uint16_t rnti,
285 uint8_t lcid,
286 uint8_t lcGroup,
287 NrMacSapUser* msu)
288{
289 return m_owner->DoSetupDataRadioBearer(bearer, bearerId, rnti, lcid, lcGroup, msu);
290}
291
292template <class C>
293std::vector<uint8_t>
295{
296 return m_owner->DoReleaseDataRadioBearer(rnti, lcid);
297}
298
299template <class C>
302 NrMacSapUser* rlcMacSapUser)
303{
304 return m_owner->DoConfigureSignalBearer(lcInfo, rlcMacSapUser);
305}
306
308template <class C>
310{
311 public:
317 MemberNrCcmRrcSapUser(C* owner);
318
319 // inherited from NrCcmRrcSapUser
320 void AddLcs(std::vector<NrGnbRrcSapProvider::LogicalChannelConfig> lcConfig) override;
321 void ReleaseLcs(uint16_t rnti, uint8_t lcid) override;
323 NrRrcSap::ReportConfigEutra reportConfig) override;
324 void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId) override;
325 Ptr<NrUeManager> GetUeManager(uint16_t rnti) override;
326 void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override;
327
328 private:
329 C* m_owner;
330};
331
332template <class C>
334 : m_owner(owner)
335{
336}
337
338template <class C>
339void
340MemberNrCcmRrcSapUser<C>::AddLcs(std::vector<NrGnbRrcSapProvider::LogicalChannelConfig> lcConfig)
341{
342 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
343 // m_owner->DoAddLcs (lcConfig);
344}
345
346template <class C>
347void
348MemberNrCcmRrcSapUser<C>::ReleaseLcs(uint16_t rnti, uint8_t lcid)
349{
350 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
351 // m_owner->DoReleaseLcs (rnti, lcid);
352}
353
354template <class C>
355uint8_t
357 NrRrcSap::ReportConfigEutra reportConfig)
358{
359 return m_owner->DoAddUeMeasReportConfigForComponentCarrier(reportConfig);
360}
361
362template <class C>
363void
364MemberNrCcmRrcSapUser<C>::TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId)
365{
366 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
367}
368
369template <class C>
370Ptr<NrUeManager>
372{
373 return m_owner->GetUeManager(rnti);
374}
375
376template <class C>
377void
379{
380 return m_owner->DoSetNumberOfComponentCarriers(noOfComponentCarriers);
381}
382
383} // end of namespace ns3
384
385#endif /* NR_CCM_RRC_SAP_H */
MemberNrCcmRrcSapProvider class.
std::vector< NrCcmRrcSapProvider::LcsConfig > SetupDataRadioBearer(NrEpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, NrMacSapUser *msu) override
Add a new Bearer for the Ue in the NrGnbComponentCarrierManager.
void RemoveUe(uint16_t rnti) override
Remove an existing UE.
std::vector< uint8_t > ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) override
Release an existing Data Radio Bearer for a Ue in the NrGnbComponentCarrierManager.
void ReportUeMeas(uint16_t rnti, NrRrcSap::MeasResults measResults) override
Reports UE measurements to the component carrier manager.
void AddLc(NrGnbCmacSapProvider::LcInfo lcInfo, NrMacSapUser *msu) override
Add a new logical channel.
NrMacSapUser * ConfigureSignalBearer(NrGnbCmacSapProvider::LcInfo lcInfo, NrMacSapUser *rlcMacSapUser) override
Add the Signal Bearer for a specific Ue in NrGnbComponenCarrierManager.
void AddUe(uint16_t rnti, uint8_t state) override
Add a new UE in the NrGnbComponentCarrierManager.
MemberNrCcmRrcSapUser class.
uint8_t AddUeMeasReportConfigForComponentCarrier(NrRrcSap::ReportConfigEutra reportConfig) override
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override
Set the number of component carriers.
void ReleaseLcs(uint16_t rnti, uint8_t lcid) override
void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId) override
Instruct the eNodeB RRC entity to prepare a component carrier.
Ptr< NrUeManager > GetUeManager(uint16_t rnti) override
void AddLcs(std::vector< NrGnbRrcSapProvider::LogicalChannelConfig > lcConfig) override
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
virtual void AddLc(NrGnbCmacSapProvider::LcInfo lcInfo, NrMacSapUser *msu)=0
Add a new logical channel.
virtual void RemoveUe(uint16_t rnti)=0
Remove an existing UE.
virtual NrMacSapUser * ConfigureSignalBearer(NrGnbCmacSapProvider::LcInfo lcInfo, NrMacSapUser *rlcMacSapUser)=0
Add the Signal Bearer for a specific Ue in NrGnbComponenCarrierManager.
virtual std::vector< uint8_t > ReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid)=0
Release an existing Data Radio Bearer for a Ue in the NrGnbComponentCarrierManager.
virtual std::vector< NrCcmRrcSapProvider::LcsConfig > SetupDataRadioBearer(NrEpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, NrMacSapUser *msu)=0
Add a new Bearer for the Ue in the NrGnbComponentCarrierManager.
virtual void ReportUeMeas(uint16_t rnti, NrRrcSap::MeasResults measResults)=0
Reports UE measurements to the component carrier manager.
virtual void AddUe(uint16_t rnti, uint8_t state)=0
Add a new UE in the NrGnbComponentCarrierManager.
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
virtual Ptr< NrUeManager > GetUeManager(uint16_t rnti)=0
virtual void ReleaseLcs(uint16_t rnti, uint8_t lcid)=0
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)=0
Set the number of component carriers.
virtual uint8_t AddUeMeasReportConfigForComponentCarrier(NrRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
virtual void AddLcs(std::vector< NrGnbRrcSapProvider::LogicalChannelConfig > lcConfig)=0
virtual void TriggerComponentCarrier(uint16_t rnti, uint16_t targetCellId)=0
Instruct the eNodeB RRC entity to prepare a component carrier.
This class contains the specification of EPS Bearers.
uint16_t componentCarrierId
component carrier ID
NrGnbCmacSapProvider::LcInfo lc
LC info.
MeasResults structure.
Definition nr-rrc-sap.h:723
Specifies criteria for triggering of an E-UTRA measurement reporting event.
Definition nr-rrc-sap.h:360