A Discrete-Event Network Simulator
API
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 
29 namespace ns3
30 {
31 class LteUeCmacSapProvider;
32 class LteMacSapUser;
33 
43 {
45  friend class LteMacSapUser;
46 
47  public:
48  virtual ~LteUeCcmRrcSapProvider();
49 
51  struct LcsConfig
52  {
56  };
57 
72  virtual std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc(
73  uint8_t lcId,
75  LteMacSapUser* msu) = 0;
76 
83  virtual std::vector<uint16_t> RemoveLc(uint8_t lcid) = 0;
88  virtual void Reset() = 0;
91 
101  uint8_t lcid,
103  LteMacSapUser* msu) = 0;
104 
105 }; // end of class LteUeCcmRrcSapProvider
106 
108 template <class C>
110 {
111  public:
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;
126  void NotifyConnectionReconfigurationMsg() override;
127  LteMacSapUser* ConfigureSignalBearer(uint8_t lcid,
129  LteMacSapUser* msu) override;
130 
131  private:
132  C* m_owner;
133 };
134 
135 template <class C>
137  : m_owner(owner)
138 {
139 }
140 
141 template <class C>
142 std::vector<uint16_t>
144 {
145  return m_owner->DoRemoveLc(lcid);
146 }
147 
148 template <class C>
149 void
151 {
152  return m_owner->DoReset();
153 }
154 
155 template <class C>
156 std::vector<LteUeCcmRrcSapProvider::LcsConfig>
159  LteMacSapUser* msu)
160 {
161  return m_owner->DoAddLc(lcId, lcConfig, msu);
162 }
163 
164 template <class C>
165 void
167 {
168  NS_FATAL_ERROR("Function should not be called because it is not implemented.");
169  // m_owner->DoNotifyConnectionReconfigurationMsg ();
170 }
171 
172 template <class C>
175  uint8_t lcid,
177  LteMacSapUser* msu)
178 {
179  return m_owner->DoConfigureSignalBearer(lcid, lcConfig, msu);
180 }
181 
189 {
190  public:
191  virtual ~LteUeCcmRrcSapUser();
192 
199  virtual void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) = 0;
205  virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) = 0;
206 
207 }; // end of class LteUeCcmRrcSapUser
208 
210 template <class C>
212 {
213  public:
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;
226 };
227 
228 template <class C>
230  : m_owner(owner)
231 {
232 }
233 
234 template <class C>
235 void
236 MemberLteUeCcmRrcSapUser<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 
242 template <class C>
243 void
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 std::vector< LteUeCcmRrcSapProvider::LcsConfig > AddLc(uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)=0
add a new Logical Channel (LC)
virtual void NotifyConnectionReconfigurationMsg()=0
Notify reconfiguration msg function.
virtual void Reset()=0
Reset LC maps.
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< uint16_t > RemoveLc(uint8_t lcid)=0
Remove an existing Logical Channel for a Ue in the LteUeComponentCarrierManager.
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