A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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 "ff-mac-common.h"
25#include "lte-mac-sap.h"
26
27namespace ns3
28{
40{
41 public:
42 virtual ~LteCcmMacSapProvider();
43
50
57 virtual void ReportSrToScheduler(uint16_t rnti) = 0;
58
59}; // end of class LteCcmMacSapProvider
60
73{
74 public:
75 ~LteCcmMacSapUser() override;
82 virtual void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) = 0;
83
96 virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) = 0;
97
103 virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) = 0;
104
105}; // end of class LteCcmMacSapUser
106
108template <class C>
110{
111 public:
118 // inherited from LteCcmRrcSapProvider
120 void ReportSrToScheduler(uint16_t rnti) override;
121
122 private:
124};
125
126template <class C>
128 : m_owner(owner)
129{
130}
131
132template <class C>
133void
135{
136 m_owner->DoReportMacCeToScheduler(bsr);
137}
138
139template <class C>
140void
142{
143 m_owner->DoReportSrToScheduler(rnti);
144}
145
147template <class C>
149{
150 public:
156 MemberLteCcmMacSapUser(C* owner);
157 // inherited from LteCcmRrcSapUser
158 void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) override;
159 void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) override;
160 void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) override;
161 // inherited from LteMacSapUser
163 void ReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
164 void NotifyHarqDeliveryFailure() override;
165
166 private:
168};
169
170template <class C>
172 : m_owner(owner)
173{
174}
175
176template <class C>
177void
179{
180 m_owner->DoUlReceiveMacCe(bsr, componentCarrierId);
181}
182
183template <class C>
184void
185MemberLteCcmMacSapUser<C>::UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)
186{
187 m_owner->DoUlReceiveSr(rnti, componentCarrierId);
188}
189
190template <class C>
191void
192MemberLteCcmMacSapUser<C>::NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)
193{
194 m_owner->DoNotifyPrbOccupancy(prbOccupancy, componentCarrierId);
195}
196
197template <class C>
198void
200{
201 m_owner->DoNotifyTxOpportunity(txOpParams);
202}
203
204template <class C>
205void
207{
208 m_owner->DoReceivePdu(rxPduParams);
209}
210
211template <class C>
212void
214{
215 m_owner->DoNotifyHarqDeliveryFailure();
216}
217
218} // end of namespace ns3
219
220#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.