A Discrete-Event Network Simulator
API
lte-ccm-mac-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_CCM_MAC_SAP_H
22 #define LTE_CCM_MAC_SAP_H
23 
24 #include <ns3/eps-bearer.h>
25 #include <ns3/ff-mac-common.h>
26 #include <ns3/lte-enb-cmac-sap.h>
27 #include <ns3/lte-mac-sap.h>
28 #include <ns3/lte-rrc-sap.h>
29 
30 namespace ns3
31 {
43 {
44  public:
45  virtual ~LteCcmMacSapProvider();
46 
53 
60  virtual void ReportSrToScheduler(uint16_t rnti) = 0;
61 
62 }; // end of class LteCcmMacSapProvider
63 
76 {
77  public:
78  ~LteCcmMacSapUser() override;
85  virtual void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) = 0;
86 
99  virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) = 0;
100 
106  virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) = 0;
107 
108 }; // end of class LteCcmMacSapUser
109 
111 template <class C>
113 {
114  public:
120  MemberLteCcmMacSapProvider(C* owner);
121  // inherited from LteCcmRrcSapProvider
122  void ReportMacCeToScheduler(MacCeListElement_s bsr) override;
123  void ReportSrToScheduler(uint16_t rnti) override;
124 
125  private:
126  C* m_owner;
127 };
128 
129 template <class C>
131  : m_owner(owner)
132 {
133 }
134 
135 template <class C>
136 void
138 {
139  m_owner->DoReportMacCeToScheduler(bsr);
140 }
141 
142 template <class C>
143 void
145 {
146  m_owner->DoReportSrToScheduler(rnti);
147 }
148 
150 template <class C>
152 {
153  public:
159  MemberLteCcmMacSapUser(C* owner);
160  // inherited from LteCcmRrcSapUser
161  void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) override;
162  void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) override;
163  void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) override;
164  // inherited from LteMacSapUser
166  void ReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
167  void NotifyHarqDeliveryFailure() override;
168 
169  private:
170  C* m_owner;
171 };
172 
173 template <class C>
175  : m_owner(owner)
176 {
177 }
178 
179 template <class C>
180 void
182 {
183  m_owner->DoUlReceiveMacCe(bsr, componentCarrierId);
184 }
185 
186 template <class C>
187 void
188 MemberLteCcmMacSapUser<C>::UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)
189 {
190  m_owner->DoUlReceiveSr(rnti, componentCarrierId);
191 }
192 
193 template <class C>
194 void
195 MemberLteCcmMacSapUser<C>::NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)
196 {
197  m_owner->DoNotifyPrbOccupancy(prbOccupancy, componentCarrierId);
198 }
199 
200 template <class C>
201 void
203 {
204  m_owner->DoNotifyTxOpportunity(txOpParams);
205 }
206 
207 template <class C>
208 void
210 {
211  m_owner->DoReceivePdu(rxPduParams);
212 }
213 
214 template <class C>
215 void
217 {
218  m_owner->DoNotifyHarqDeliveryFailure();
219 }
220 
221 } // end of namespace ns3
222 
223 #endif /* LTE_CCM_MAC_SAP_H */
Service Access Point (SAP) offered by the component carrier manager (CCM) by MAC to CCM.
virtual void ReportMacCeToScheduler(MacCeListElement_s bsr)=0
Add the Buffer Status Report to the list.
virtual void ReportSrToScheduler(uint16_t rnti)=0
Report SR to the right scheduler.
Service Access Point (SAP) offered by MAC to the component carrier manager (CCM).
virtual void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId)=0
When the Primary Component carrier receive a buffer status report it is sent to the CCM.
virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)=0
Notifies component carrier manager about physical resource block occupancy.
virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)=0
The MAC received a SR.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:96
MemberLteCcmMacSapProvider class.
MemberLteCcmMacSapProvider(C *owner)
Constructor.
void ReportSrToScheduler(uint16_t rnti) override
Report SR to the right scheduler.
void ReportMacCeToScheduler(MacCeListElement_s bsr) override
Add the Buffer Status Report to the list.
MemberLteCcmMacSapUser class.
void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) override
Notifies component carrier manager about physical resource block occupancy.
void ReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override
Called by the MAC to notify the RLC of the reception of a new PDU.
C * m_owner
the owner class
void NotifyHarqDeliveryFailure() override
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed.
void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) override
The MAC received a SR.
MemberLteCcmMacSapUser(C *owner)
Constructor.
void NotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams) override
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) override
When the Primary Component carrier receive a buffer status report it is sent to the CCM.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:166
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:105
See section 4.3.14 macCEListElement.