A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-ue-ccm-rrc-sap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Danilo Abrignani
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7 *
8 */
9
10#ifndef LTE_UE_CCM_RRC_SAP_H
11#define LTE_UE_CCM_RRC_SAP_H
12
13#include "lte-mac-sap.h"
14#include "lte-ue-cmac-sap.h"
15
16#include <map>
17
18namespace ns3
19{
20class LteUeCmacSapProvider;
21class LteMacSapUser;
22
23/**
24 * \brief Service Access Point (SAP) offered by the UE component carrier manager
25 * to the UE RRC.
26 *
27 * This is the *Component Carrier Management SAP Provider*, i.e., the part of the SAP
28 * that contains the component carrier manager methods called by the Ue RRC
29 * instance.
30 */
32{
33 /// allow LteMacSapUser class friend access
34 friend class LteMacSapUser;
35
36 public:
38
39 /// LcsConfig structure
40 struct LcsConfig
41 {
42 uint8_t componentCarrierId; ///< component carrier ID
44 LteMacSapUser* msu; ///< MSU
45 };
46
47 /**
48 * add a new Logical Channel (LC)
49 *
50 * \param lcId is the Logical Channel Id
51 * \param lcConfig is a single structure contains logical Channel Id, Logical Channel config and
52 * Component Carrier Id
53 * \param msu is the pointer to LteMacSapUser related to the Rlc instance
54 * \return vector of LcsConfig contains the lc configuration for each Mac
55 * the size of the vector is equal to the number of component
56 * carrier enabled.
57 *
58 * The Logical Channel configurations for each component carrier depend on the
59 * algorithm used to split the traffic between the component carriers themself.
60 */
61 virtual std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc(
62 uint8_t lcId,
64 LteMacSapUser* msu) = 0;
65
66 /**
67 * \brief Remove an existing Logical Channel for a Ue in the LteUeComponentCarrierManager
68 * \param lcid the Logical Channel Id
69 * \return vector of integer the componentCarrierId of the componentCarrier
70 * where the bearer is enabled
71 */
72 virtual std::vector<uint16_t> RemoveLc(uint8_t lcid) = 0;
73 /**
74 * \brief Reset LC maps
75 *
76 */
77 virtual void Reset() = 0;
78 /// Notify reconfiguration msg function
80
81 /**
82 * \brief Add the Signal Bearer for a specific Ue in LteUeComponenCarrierManager
83 * \param lcid the Logical Channel Id
84 * \param lcConfig this structure it is hard-coded in the LteEnbRrc
85 * \param msu it is the MacSapUser of the Rlc instance
86 * \return the LteMacSapUser of the ComponentCarrierManager
87 *
88 */
90 uint8_t lcid,
92 LteMacSapUser* msu) = 0;
93
94}; // end of class LteUeCcmRrcSapProvider
95
96/// MemberLteUeCcmRrcSapProvider class
97template <class C>
99{
100 public:
101 /**
102 * Constructor
103 *
104 * \param owner the owner class
105 */
107
108 // inherited from LteUeCcmRrcSapProvider
109 std::vector<uint16_t> RemoveLc(uint8_t lcid) override;
110 void Reset() override;
111 std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc(
112 uint8_t lcId,
114 LteMacSapUser* msu) override;
118 LteMacSapUser* msu) override;
119
120 private:
121 C* m_owner; ///< the owner class
122};
123
124template <class C>
129
130template <class C>
131std::vector<uint16_t>
133{
134 return m_owner->DoRemoveLc(lcid);
135}
136
137template <class C>
138void
140{
141 return m_owner->DoReset();
142}
143
144template <class C>
145std::vector<LteUeCcmRrcSapProvider::LcsConfig>
148 LteMacSapUser* msu)
149{
150 return m_owner->DoAddLc(lcId, lcConfig, msu);
151}
152
153template <class C>
154void
156{
157 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
158 // m_owner->DoNotifyConnectionReconfigurationMsg ();
159}
160
161template <class C>
164 uint8_t lcid,
166 LteMacSapUser* msu)
167{
168 return m_owner->DoConfigureSignalBearer(lcid, lcConfig, msu);
169}
170
171/**
172 * \brief Service Access Point (SAP) offered by the UE RRC to the UE CCM.
173 *
174 * This is the *Component Carrier Management SAP User*, i.e., the part of the SAP
175 * that contains the UE RRC methods called by the UE CCM instance.
176 */
178{
179 public:
180 virtual ~LteUeCcmRrcSapUser();
181
182 /**
183 * this function will be used after the RRC notify to ComponentCarrierManager
184 * that a reconfiguration message with Secondary component carrier (SCc) arrived or not
185 * the method it is called only if the SCc wasn't set up
186 * \param componentCarrierList component carrier list
187 */
188 virtual void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) = 0;
189 /**
190 * \brief Set the number of component carriers
191 *
192 * \param noOfComponentCarriers The number of component carriers
193 */
194 virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) = 0;
195
196}; // end of class LteUeCcmRrcSapUser
197
198/// MemberLteUeCcmRrcSapUser class
199template <class C>
201{
202 public:
203 /**
204 * Constructor
205 *
206 * \param owner the owner class
207 */
208 MemberLteUeCcmRrcSapUser(C* owner);
209 // inherited from LteUeCcmRrcSapUser
210 void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) override;
211 void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override;
212
213 private:
214 C* m_owner; ///< the owner class
215};
216
217template <class C>
219 : m_owner(owner)
220{
221}
222
223template <class C>
224void
225MemberLteUeCcmRrcSapUser<C>::ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList)
226{
227 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
228 // m_owner->DoComponentCarrierEnabling (componentCarrierList);
229}
230
231template <class C>
232void
234{
235 m_owner->DoSetNumberOfComponentCarriers(noOfComponentCarriers);
236}
237
238} // end of namespace ns3
239
240#endif /* LTE_UE_CCM_RRC_SAP_H */
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition lte-mac-sap.h:85
Service Access Point (SAP) offered by the UE component carrier manager to the UE RRC.
virtual void NotifyConnectionReconfigurationMsg()=0
Notify reconfiguration msg function.
virtual void Reset()=0
Reset LC maps.
virtual std::vector< uint16_t > RemoveLc(uint8_t lcid)=0
Remove an existing Logical Channel for a Ue in the LteUeComponentCarrierManager.
virtual LteMacSapUser * ConfigureSignalBearer(uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)=0
Add the Signal Bearer for a specific Ue in LteUeComponenCarrierManager.
virtual std::vector< LteUeCcmRrcSapProvider::LcsConfig > AddLc(uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)=0
add a new Logical Channel (LC)
Service Access Point (SAP) offered by the UE RRC to the UE CCM.
virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers)=0
Set the number of component carriers.
virtual void ComponentCarrierEnabling(std::vector< uint8_t > componentCarrierList)=0
this function will be used after the RRC notify to ComponentCarrierManager that a reconfiguration mes...
MemberLteUeCcmRrcSapProvider class.
std::vector< LteUeCcmRrcSapProvider::LcsConfig > AddLc(uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu) override
add a new Logical Channel (LC)
LteMacSapUser * ConfigureSignalBearer(uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu) override
Add the Signal Bearer for a specific Ue in LteUeComponenCarrierManager.
std::vector< uint16_t > RemoveLc(uint8_t lcid) override
Remove an existing Logical Channel for a Ue in the LteUeComponentCarrierManager.
MemberLteUeCcmRrcSapProvider(C *owner)
Constructor.
void NotifyConnectionReconfigurationMsg() override
Notify reconfiguration msg function.
void Reset() override
Reset LC maps.
MemberLteUeCcmRrcSapUser class.
void ComponentCarrierEnabling(std::vector< uint8_t > componentCarrierList) override
this function will be used after the RRC notify to ComponentCarrierManager that a reconfiguration mes...
void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override
Set the number of component carriers.
MemberLteUeCcmRrcSapUser(C *owner)
Constructor.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t componentCarrierId
component carrier ID
LteUeCmacSapProvider::LogicalChannelConfig lcConfig
logical channel config