A Discrete-Event Network Simulator
API
lte-ccm-mac-sap.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Danilo Abrignani
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
19  *
20  */
21 
22 #ifndef LTE_CCM_MAC_SAP_H
23 #define LTE_CCM_MAC_SAP_H
24 
25 #include <ns3/lte-rrc-sap.h>
26 #include <ns3/eps-bearer.h>
27 #include <ns3/lte-enb-cmac-sap.h>
28 #include <ns3/lte-mac-sap.h>
29 #include <ns3/ff-mac-common.h>
30 
31 
32 namespace ns3 {
44 {
45 
46 public:
47  virtual ~LteCcmMacSapProvider ();
48 
55 
62  virtual void ReportSrToScheduler (uint16_t rnti) = 0;
63 
64 }; // end of class LteCcmMacSapProvider
65 
66 
79 {
80 public:
81  virtual ~LteCcmMacSapUser ();
88  virtual void UlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId) = 0;
89 
102  virtual void UlReceiveSr (uint16_t rnti, uint8_t componentCarrierId) = 0;
103 
109  virtual void NotifyPrbOccupancy (double prbOccupancy, uint8_t componentCarrierId) = 0;
110 
111 }; // end of class LteCcmMacSapUser
112 
114 template <class C>
116 {
117 public:
123  MemberLteCcmMacSapProvider (C* owner);
124  // inherited from LteCcmRrcSapProvider
125  virtual void ReportMacCeToScheduler (MacCeListElement_s bsr) override;
126  virtual void ReportSrToScheduler (uint16_t rnti) override;
127 
128 private:
129  C* m_owner;
130 };
131 
132 template <class C>
134  : m_owner (owner)
135 {
136 }
137 
138 template <class C>
140 {
141  m_owner->DoReportMacCeToScheduler (bsr);
142 }
143 
144 template <class C>
146 {
147  m_owner->DoReportSrToScheduler (rnti);
148 }
149 
151 template <class C>
153 {
154 public:
160  MemberLteCcmMacSapUser (C* owner);
161  // inherited from LteCcmRrcSapUser
162  virtual void UlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId);
163  virtual void UlReceiveSr (uint16_t rnti, uint8_t componentCarrierId);
164  virtual void NotifyPrbOccupancy (double prbOccupancy, uint8_t componentCarrierId);
165  // inherited from LteMacSapUser
167  virtual void ReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams);
168  virtual void NotifyHarqDeliveryFailure ();
169 
170 
171 private:
172  C* m_owner;
173 };
174 
175 template <class C>
177  : m_owner (owner)
178 {
179 }
180 
181 template <class C>
182 void MemberLteCcmMacSapUser<C>::UlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId)
183 {
184  m_owner->DoUlReceiveMacCe (bsr, componentCarrierId);
185 }
186 
187 template<class C>
188 void MemberLteCcmMacSapUser<C>::UlReceiveSr (uint16_t rnti, uint8_t componentCarrierId)
189 {
190  m_owner->DoUlReceiveSr (rnti, componentCarrierId);
191 }
192 
193 template <class C>
194 void MemberLteCcmMacSapUser<C>::NotifyPrbOccupancy (double prbOccupancy, uint8_t componentCarrierId)
195 {
196  m_owner->DoNotifyPrbOccupancy (prbOccupancy, componentCarrierId);
197 }
198 
199 template <class C>
201 {
202  m_owner->DoNotifyTxOpportunity (txOpParams);
203 }
204 
205 template <class C>
207 {
208  m_owner->DoReceivePdu (rxPduParams);
209 }
210 
211 template <class C>
213 {
214  m_owner->DoNotifyHarqDeliveryFailure ();
215 }
216 
217 
218 } // end of namespace ns3
219 
220 
221 #endif /* LTE_CCM_MAC_SAP_H */
222 
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.
virtual void ReportSrToScheduler(uint16_t rnti) override
Report SR to the right scheduler.
virtual void ReportMacCeToScheduler(MacCeListElement_s bsr) override
Add the Buffer Status Report to the list.
MemberLteCcmMacSapUser class.
virtual void ReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams)
Called by the MAC to notify the RLC of the reception of a new PDU.
C * m_owner
the owner class
virtual void NotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams)
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)
Notifies component carrier manager about physical resource block occupancy.
virtual void NotifyHarqDeliveryFailure()
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed.
virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)
The MAC received a SR.
MemberLteCcmMacSapUser(C *owner)
Constructor.
virtual void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId)
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:157
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:104
See section 4.3.14 macCEListElement.