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 <ns3/eps-bearer.h>
25 #include <ns3/lte-mac-sap.h>
26 #include <ns3/lte-rrc-sap.h>
27 #include <ns3/lte-ue-cmac-sap.h>
28 
29 #include <map>
30 
31 namespace ns3
32 {
33 class LteUeCmacSapProvider;
34 class LteMacSapUser;
35 
45 {
47  friend class LteMacSapUser;
48 
49  public:
50  virtual ~LteUeCcmRrcSapProvider();
51 
53  struct LcsConfig
54  {
58  };
59 
74  virtual std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc(
75  uint8_t lcId,
77  LteMacSapUser* msu) = 0;
78 
85  virtual std::vector<uint16_t> RemoveLc(uint8_t lcid) = 0;
90  virtual void Reset() = 0;
93 
103  uint8_t lcid,
105  LteMacSapUser* msu) = 0;
106 
107 }; // end of class LteUeCcmRrcSapProvider
108 
110 template <class C>
112 {
113  public:
120 
121  // inherited from LteUeCcmRrcSapProvider
122  std::vector<uint16_t> RemoveLc(uint8_t lcid) override;
123  void Reset() override;
124  std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc(
125  uint8_t lcId,
127  LteMacSapUser* msu) override;
128  void NotifyConnectionReconfigurationMsg() override;
129  LteMacSapUser* ConfigureSignalBearer(uint8_t lcid,
131  LteMacSapUser* msu) override;
132 
133  private:
134  C* m_owner;
135 };
136 
137 template <class C>
139  : m_owner(owner)
140 {
141 }
142 
143 template <class C>
144 std::vector<uint16_t>
146 {
147  return m_owner->DoRemoveLc(lcid);
148 }
149 
150 template <class C>
151 void
153 {
154  return m_owner->DoReset();
155 }
156 
157 template <class C>
158 std::vector<LteUeCcmRrcSapProvider::LcsConfig>
161  LteMacSapUser* msu)
162 {
163  return m_owner->DoAddLc(lcId, lcConfig, msu);
164 }
165 
166 template <class C>
167 void
169 {
170  NS_FATAL_ERROR("Function should not be called because it is not implemented.");
171  // m_owner->DoNotifyConnectionReconfigurationMsg ();
172 }
173 
174 template <class C>
177  uint8_t lcid,
179  LteMacSapUser* msu)
180 {
181  return m_owner->DoConfigureSignalBearer(lcid, lcConfig, msu);
182 }
183 
191 {
192  public:
193  virtual ~LteUeCcmRrcSapUser();
194 
201  virtual void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) = 0;
207  virtual void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) = 0;
208 
209 }; // end of class LteUeCcmRrcSapUser
210 
212 template <class C>
214 {
215  public:
221  MemberLteUeCcmRrcSapUser(C* owner);
222  // inherited from LteUeCcmRrcSapUser
223  void ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList) override;
224  void SetNumberOfComponentCarriers(uint16_t noOfComponentCarriers) override;
225 
226  private:
227  C* m_owner;
228 };
229 
230 template <class C>
232  : m_owner(owner)
233 {
234 }
235 
236 template <class C>
237 void
238 MemberLteUeCcmRrcSapUser<C>::ComponentCarrierEnabling(std::vector<uint8_t> componentCarrierList)
239 {
240  NS_FATAL_ERROR("Function should not be called because it is not implemented.");
241  // m_owner->DoComponentCarrierEnabling (componentCarrierList);
242 }
243 
244 template <class C>
245 void
247 {
248  m_owner->DoSetNumberOfComponentCarriers(noOfComponentCarriers);
249 }
250 
251 } // end of namespace ns3
252 
253 #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