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 * 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_UE_CCM_RRC_SAP_H
22#define LTE_UE_CCM_RRC_SAP_H
23
24#include "lte-mac-sap.h"
25#include "lte-ue-cmac-sap.h"
26
27#include <map>
28
29namespace ns3
30{
31class LteUeCmacSapProvider;
32class LteMacSapUser;
33
34/**
35 * \brief Service Access Point (SAP) offered by the UE component carrier manager
36 * to the UE RRC.
37 *
38 * This is the *Component Carrier Management SAP Provider*, i.e., the part of the SAP
39 * that contains the component carrier manager methods called by the Ue RRC
40 * instance.
41 */
43{
44 /// allow LteMacSapUser class friend access
45 friend class LteMacSapUser;
46
47 public:
49
50 /// LcsConfig structure
51 struct LcsConfig
52 {
53 uint8_t componentCarrierId; ///< component carrier ID
55 LteMacSapUser* msu; ///< MSU
56 };
57
58 /**
59 * add a new Logical Channel (LC)
60 *
61 * \param lcId is the Logical Channel Id
62 * \param lcConfig is a single structure contains logical Channel Id, Logical Channel config and
63 * Component Carrier Id
64 * \param msu is the pointer to LteMacSapUser related to the Rlc instance
65 * \return vector of LcsConfig contains the lc configuration for each Mac
66 * the size of the vector is equal to the number of component
67 * carrier enabled.
68 *
69 * The Logical Channel configurations for each component carrier depend on the
70 * algorithm used to split the traffic between the component carriers themself.
71 */
72 virtual std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc(
73 uint8_t lcId,
75 LteMacSapUser* msu) = 0;
76
77 /**
78 * \brief Remove an existing Logical Channel for a Ue in the LteUeComponentCarrierManager
79 * \param lcid the Logical Channel Id
80 * \return vector of integer the componentCarrierId of the componentCarrier
81 * where the bearer is enabled
82 */
83 virtual std::vector<uint16_t> RemoveLc(uint8_t lcid) = 0;
84 /**
85 * \brief Reset LC maps
86 *
87 */
88 virtual void Reset() = 0;
89 /// Notify reconfiguration msg function
91
92 /**
93 * \brief Add the Signal Bearer for a specific Ue in LteUeComponenCarrierManager
94 * \param lcid the Logical Channel Id
95 * \param lcConfig this structure it is hard-coded in the LteEnbRrc
96 * \param msu it is the MacSapUser of the Rlc instance
97 * \return the LteMacSapUser of the ComponentCarrierManager
98 *
99 */
101 uint8_t lcid,
103 LteMacSapUser* msu) = 0;
104
105}; // end of class LteUeCcmRrcSapProvider
106
107/// MemberLteUeCcmRrcSapProvider class
108template <class C>
110{
111 public:
112 /**
113 * Constructor
114 *
115 * \param owner the owner class
116 */
118
119 // inherited from LteUeCcmRrcSapProvider
120 std::vector<uint16_t> RemoveLc(uint8_t lcid) override;
121 void Reset() override;
122 std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc(
123 uint8_t lcId,
125 LteMacSapUser* msu) override;
129 LteMacSapUser* msu) override;
130
131 private:
132 C* m_owner; ///< the owner class
133};
134
135template <class C>
137 : m_owner(owner)
138{
139}
140
141template <class C>
142std::vector<uint16_t>
144{
145 return m_owner->DoRemoveLc(lcid);
146}
147
148template <class C>
149void
151{
152 return m_owner->DoReset();
153}
154
155template <class C>
156std::vector<LteUeCcmRrcSapProvider::LcsConfig>
159 LteMacSapUser* msu)
160{
161 return m_owner->DoAddLc(lcId, lcConfig, msu);
162}
163
164template <class C>
165void
167{
168 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
169 // m_owner->DoNotifyConnectionReconfigurationMsg ();
170}
171
172template <class C>
175 uint8_t lcid,
177 LteMacSapUser* msu)
178{
179 return m_owner->DoConfigureSignalBearer(lcid, lcConfig, msu);
180}
181
182/**
183 * \brief Service Access Point (SAP) offered by the UE RRC to the UE CCM.
184 *
185 * This is the *Component Carrier Management SAP User*, i.e., the part of the SAP
186 * that contains the UE RRC methods called by the UE CCM instance.
187 */
189{
190 public:
191 virtual ~LteUeCcmRrcSapUser();
192
193 /**
194 * this function will be used after the RRC notify to ComponentCarrierManager
195 * that a reconfiguration message with Secondary component carrier (SCc) arrived or not
196 * the method it is called only if the SCc wasn't set up
197 * \param componentCarrierList component carrier list
198 */
199 virtual void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) = 0;
200 /**
201 * \brief Set the number of component carriers
202 *
203 * \param noOfComponentCarriers The number of component carriers
204 */
205 virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) = 0;
206
207}; // end of class LteUeCcmRrcSapUser
208
209/// MemberLteUeCcmRrcSapUser class
210template <class C>
212{
213 public:
214 /**
215 * Constructor
216 *
217 * \param owner the owner class
218 */
219 MemberLteUeCcmRrcSapUser(C* owner);
220 // inherited from LteUeCcmRrcSapUser
221 void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) override;
222 void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override;
223
224 private:
225 C* m_owner; ///< the owner class
226};
227
228template <class C>
230 : m_owner(owner)
231{
232}
233
234template <class C>
235void
236MemberLteUeCcmRrcSapUser<C>::ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList)
237{
238 NS_FATAL_ERROR("Function should not be called because it is not implemented.");
239 // m_owner->DoComponentCarrierEnabling (componentCarrierList);
240}
241
242template <class C>
243void
245{
246 m_owner->DoSetNumberOfComponentCarriers(noOfComponentCarriers);
247}
248
249} // end of namespace ns3
250
251#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:96
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.
Definition: fatal-error.h:179
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