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{
29/**
30 * \ingroup lte
31 *
32 * \brief Service Access Point (SAP) offered by the component carrier manager (CCM)
33 * by MAC to CCM.
34 *
35 * This is the *Component Carrier Manager SAP Provider*, i.e., the part of the SAP
36 * that contains the MAC methods called by the eNodeB CCM
37 * instance.
38 */
40{
41 public:
42 virtual ~LteCcmMacSapProvider();
43
44 /**
45 * \brief Add the Buffer Status Report to the list.
46 * \param bsr LteEnbComponentCarrierManager used this function to
47 * send back an uplink BSR to some of the MAC instances
48 */
50
51 /**
52 * \brief Report SR to the right scheduler
53 * \param rnti RNTI of the user that requested the SR
54 *
55 * \see LteCcmMacSapUser::UlReceiveSr
56 */
57 virtual void ReportSrToScheduler(uint16_t rnti) = 0;
58
59}; // end of class LteCcmMacSapProvider
60
61/**
62 * \ingroup lte
63 *
64 * \brief Service Access Point (SAP) offered by MAC to the
65 * component carrier manager (CCM).
66 *
67 *
68 * This is the *CCM MAC SAP User*, i.e., the part of the SAP
69 * that contains the component carrier manager methods called
70 * by the eNodeB MAC instance.
71 */
73{
74 public:
75 ~LteCcmMacSapUser() override;
76 /**
77 * \brief When the Primary Component carrier receive a buffer status report
78 * it is sent to the CCM.
79 * \param bsr Buffer Status Report received from a Ue
80 * \param componentCarrierId
81 */
82 virtual void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) = 0;
83
84 /**
85 * \brief The MAC received a SR
86 * \param rnti RNTI of the UE that requested a SR
87 * \param componentCarrierId CC that received the SR
88 *
89 * NOTE: Not implemented in the LTE module. The FemtoForum API requires
90 * that this function gets as parameter a struct SchedUlSrInfoReqParameters.
91 * However, that struct has the SfnSf as a member: since it differs from
92 * LTE to mmwave/NR, and we don't have an effective strategy to deal with
93 * that, we limit the function to the only thing that the module have in
94 * common: the RNTI.
95 */
96 virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) = 0;
97
98 /**
99 * \brief Notifies component carrier manager about physical resource block occupancy
100 * \param prbOccupancy The physical resource block occupancy
101 * \param componentCarrierId The component carrier id
102 */
103 virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) = 0;
104
105}; // end of class LteCcmMacSapUser
106
107/// MemberLteCcmMacSapProvider class
108template <class C>
110{
111 public:
112 /**
113 * Constructor
114 *
115 * \param owner the owner class
116 */
118 // inherited from LteCcmRrcSapProvider
120 void ReportSrToScheduler(uint16_t rnti) override;
121
122 private:
123 C* m_owner; ///< the owner class
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
146/// MemberLteCcmMacSapUser class
147template <class C>
149{
150 public:
151 /**
152 * Constructor
153 *
154 * \param owner the owner class
155 */
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:
167 C* m_owner; ///< the owner class
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.