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 
ns3::LteCcmMacSapProvider::ReportMacCeToScheduler
virtual void ReportMacCeToScheduler(MacCeListElement_s bsr)=0
Add the Buffer Status Report to the list.
ns3::MemberLteCcmMacSapUser
MemberLteCcmMacSapUser class.
Definition: lte-ccm-mac-sap.h:153
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteMacSapUser::TxOpportunityParameters
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:104
ns3::MemberLteCcmMacSapProvider
MemberLteCcmMacSapProvider class.
Definition: lte-ccm-mac-sap.h:116
ns3::MemberLteCcmMacSapProvider::m_owner
C * m_owner
the owner class
Definition: lte-ccm-mac-sap.h:129
ns3::MemberLteCcmMacSapUser::UlReceiveSr
virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)
The MAC received a SR.
Definition: lte-ccm-mac-sap.h:188
ns3::LteCcmMacSapUser::NotifyPrbOccupancy
virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)=0
Notifies component carrier manager about physical resource block occupancy.
ns3::LteCcmMacSapUser::UlReceiveMacCe
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.
ns3::MemberLteCcmMacSapUser::MemberLteCcmMacSapUser
MemberLteCcmMacSapUser(C *owner)
Constructor.
Definition: lte-ccm-mac-sap.h:176
ns3::LteCcmMacSapUser::~LteCcmMacSapUser
virtual ~LteCcmMacSapUser()
Definition: lte-ccm-mac-sap.cc:32
ns3::LteCcmMacSapProvider::~LteCcmMacSapProvider
virtual ~LteCcmMacSapProvider()
Definition: lte-ccm-mac-sap.cc:27
ns3::LteCcmMacSapProvider::ReportSrToScheduler
virtual void ReportSrToScheduler(uint16_t rnti)=0
Report SR to the right scheduler.
ns3::MacCeListElement_s
See section 4.3.14 macCEListElement.
Definition: ff-mac-common.h:337
ns3::LteMacSapUser::ReceivePduParameters
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:157
ns3::MemberLteCcmMacSapProvider::ReportSrToScheduler
virtual void ReportSrToScheduler(uint16_t rnti) override
Report SR to the right scheduler.
Definition: lte-ccm-mac-sap.h:145
ns3::MemberLteCcmMacSapUser::NotifyHarqDeliveryFailure
virtual void NotifyHarqDeliveryFailure()
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed.
Definition: lte-ccm-mac-sap.h:212
ns3::LteCcmMacSapUser::UlReceiveSr
virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)=0
The MAC received a SR.
ns3::MemberLteCcmMacSapUser::NotifyPrbOccupancy
virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)
Notifies component carrier manager about physical resource block occupancy.
Definition: lte-ccm-mac-sap.h:194
ns3::MemberLteCcmMacSapUser::m_owner
C * m_owner
the owner class
Definition: lte-ccm-mac-sap.h:172
ns3::LteMacSapUser
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:96
ns3::MemberLteCcmMacSapUser::NotifyTxOpportunity
virtual void NotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams)
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
Definition: lte-ccm-mac-sap.h:200
ns3::MemberLteCcmMacSapProvider::MemberLteCcmMacSapProvider
MemberLteCcmMacSapProvider(C *owner)
Constructor.
Definition: lte-ccm-mac-sap.h:133
ns3::LteCcmMacSapProvider
Service Access Point (SAP) offered by the component carrier manager (CCM) by MAC to CCM.
Definition: lte-ccm-mac-sap.h:44
ns3::MemberLteCcmMacSapUser::UlReceiveMacCe
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.
Definition: lte-ccm-mac-sap.h:182
ns3::LteCcmMacSapUser
Service Access Point (SAP) offered by MAC to the component carrier manager (CCM).
Definition: lte-ccm-mac-sap.h:79
ns3::MemberLteCcmMacSapUser::ReceivePdu
virtual void ReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams)
Called by the MAC to notify the RLC of the reception of a new PDU.
Definition: lte-ccm-mac-sap.h:206
ns3::MemberLteCcmMacSapProvider::ReportMacCeToScheduler
virtual void ReportMacCeToScheduler(MacCeListElement_s bsr) override
Add the Buffer Status Report to the list.
Definition: lte-ccm-mac-sap.h:139