5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-ue-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_UE_CCM_RRC_SAP_H
8#define NR_UE_CCM_RRC_SAP_H
9
10#include "nr-mac-sap.h"
11#include "nr-ue-cmac-sap.h"
12
13#include <map>
14
15namespace ns3
16{
17class NrUeCmacSapProvider;
18class NrMacSapUser;
19
29{
31 friend class NrMacSapUser;
32
33 public:
34 virtual ~NrUeCcmRrcSapProvider() = default;
35
43
58 virtual std::vector<NrUeCcmRrcSapProvider::LcsConfig> AddLc(
59 uint8_t lcId,
61 NrMacSapUser* msu) = 0;
62
69 virtual std::vector<uint16_t> RemoveLc(uint8_t lcid) = 0;
74 virtual void Reset() = 0;
77
86 virtual NrMacSapUser* ConfigureSignalBearer(uint8_t lcid,
88 NrMacSapUser* msu) = 0;
89
90}; // end of class NrUeCcmRrcSapProvider
91
93template <class C>
95{
96 public:
103
104 // inherited from NrUeCcmRrcSapProvider
105 std::vector<uint16_t> RemoveLc(uint8_t lcid) override;
106 void Reset() override;
107 std::vector<NrUeCcmRrcSapProvider::LcsConfig> AddLc(
108 uint8_t lcId,
110 NrMacSapUser* msu) override;
114 NrMacSapUser* msu) override;
115
116 private:
117 C* m_owner;
118};
119
120template <class C>
122 : m_owner(owner)
123{
124}
125
126template <class C>
127std::vector<uint16_t>
129{
130 return m_owner->DoRemoveLc(lcid);
131}
132
133template <class C>
134void
136{
137 return m_owner->DoReset();
138}
139
140template <class C>
141std::vector<NrUeCcmRrcSapProvider::LcsConfig>
144 NrMacSapUser* msu)
145{
146 return m_owner->DoAddLc(lcId, lcConfig, msu);
147}
148
149template <class C>
150void
152{
153 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
154 // m_owner->DoNotifyConnectionReconfigurationMsg ();
155}
156
157template <class C>
160 uint8_t lcid,
162 NrMacSapUser* msu)
163{
164 return m_owner->DoConfigureSignalBearer(lcid, lcConfig, msu);
165}
166
174{
175 public:
176 virtual ~NrUeCcmRrcSapUser() = default;
177
184 virtual void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) = 0;
190 virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) = 0;
191
192}; // end of class NrUeCcmRrcSapUser
193
195template <class C>
197{
198 public:
204 MemberNrUeCcmRrcSapUser(C* owner);
205 // inherited from NrUeCcmRrcSapUser
206 void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) override;
207 void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override;
208
209 private:
210 C* m_owner;
211};
212
213template <class C>
215 : m_owner(owner)
216{
217}
218
219template <class C>
220void
221MemberNrUeCcmRrcSapUser<C>::ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList)
222{
223 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
224 // m_owner->DoComponentCarrierEnabling (componentCarrierList);
225}
226
227template <class C>
228void
230{
231 m_owner->DoSetNumberOfComponentCarriers(noOfComponentCarriers);
232}
233
234} // end of namespace ns3
235
236#endif /* NR_UE_CCM_RRC_SAP_H */
MemberNrUeCcmRrcSapProvider class.
NrMacSapUser * ConfigureSignalBearer(uint8_t lcid, NrUeCmacSapProvider::LogicalChannelConfig lcConfig, NrMacSapUser *msu) override
Add the Signal Bearer for a specific Ue in NrUeComponenCarrierManager.
std::vector< uint16_t > RemoveLc(uint8_t lcid) override
Remove an existing Logical Channel for a Ue in the NrUeComponentCarrierManager.
void Reset() override
Reset LC maps.
void NotifyConnectionReconfigurationMsg() override
Notify reconfiguration msg function.
std::vector< NrUeCcmRrcSapProvider::LcsConfig > AddLc(uint8_t lcId, NrUeCmacSapProvider::LogicalChannelConfig lcConfig, NrMacSapUser *msu) override
MemberNrUeCcmRrcSapUser class.
void ComponentCarrierEnabling(std::vector< uint8_t > componentCarrierList) override
void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override
Set the number of component carriers.
Service Access Point (SAP) offered by the UE component carrier manager to the UE RRC.
virtual NrMacSapUser * ConfigureSignalBearer(uint8_t lcid, NrUeCmacSapProvider::LogicalChannelConfig lcConfig, NrMacSapUser *msu)=0
Add the Signal Bearer for a specific Ue in NrUeComponenCarrierManager.
virtual std::vector< NrUeCcmRrcSapProvider::LcsConfig > AddLc(uint8_t lcId, NrUeCmacSapProvider::LogicalChannelConfig lcConfig, NrMacSapUser *msu)=0
virtual std::vector< uint16_t > RemoveLc(uint8_t lcid)=0
Remove an existing Logical Channel for a Ue in the NrUeComponentCarrierManager.
virtual void Reset()=0
Reset LC maps.
virtual void NotifyConnectionReconfigurationMsg()=0
Notify reconfiguration msg function.
Service Access Point (SAP) offered by the UE RRC to the UE CCM.
virtual void ComponentCarrierEnabling(std::vector< uint8_t > componentCarrierList)=0
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)=0
Set the number of component carriers.
NrUeCmacSapProvider::LogicalChannelConfig lcConfig
logical channel config
uint8_t componentCarrierId
component carrier ID