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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7 *
8 */
9
10#ifndef LTE_CCM_MAC_SAP_H
11#define LTE_CCM_MAC_SAP_H
12
13#include "ff-mac-common.h"
14#include "lte-mac-sap.h"
15
16namespace ns3
17{
18/**
19 * \ingroup lte
20 *
21 * \brief Service Access Point (SAP) offered by the component carrier manager (CCM)
22 * by MAC to CCM.
23 *
24 * This is the *Component Carrier Manager SAP Provider*, i.e., the part of the SAP
25 * that contains the MAC methods called by the eNodeB CCM
26 * instance.
27 */
29{
30 public:
31 virtual ~LteCcmMacSapProvider();
32
33 /**
34 * \brief Add the Buffer Status Report to the list.
35 * \param bsr LteEnbComponentCarrierManager used this function to
36 * send back an uplink BSR to some of the MAC instances
37 */
39
40 /**
41 * \brief Report SR to the right scheduler
42 * \param rnti RNTI of the user that requested the SR
43 *
44 * \see LteCcmMacSapUser::UlReceiveSr
45 */
46 virtual void ReportSrToScheduler(uint16_t rnti) = 0;
47
48}; // end of class LteCcmMacSapProvider
49
50/**
51 * \ingroup lte
52 *
53 * \brief Service Access Point (SAP) offered by MAC to the
54 * component carrier manager (CCM).
55 *
56 *
57 * This is the *CCM MAC SAP User*, i.e., the part of the SAP
58 * that contains the component carrier manager methods called
59 * by the eNodeB MAC instance.
60 */
62{
63 public:
64 ~LteCcmMacSapUser() override;
65 /**
66 * \brief When the Primary Component carrier receive a buffer status report
67 * it is sent to the CCM.
68 * \param bsr Buffer Status Report received from a Ue
69 * \param componentCarrierId
70 */
71 virtual void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) = 0;
72
73 /**
74 * \brief The MAC received a SR
75 * \param rnti RNTI of the UE that requested a SR
76 * \param componentCarrierId CC that received the SR
77 *
78 * NOTE: Not implemented in the LTE module. The FemtoForum API requires
79 * that this function gets as parameter a struct SchedUlSrInfoReqParameters.
80 * However, that struct has the SfnSf as a member: since it differs from
81 * LTE to mmwave/NR, and we don't have an effective strategy to deal with
82 * that, we limit the function to the only thing that the module have in
83 * common: the RNTI.
84 */
85 virtual void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) = 0;
86
87 /**
88 * \brief Notifies component carrier manager about physical resource block occupancy
89 * \param prbOccupancy The physical resource block occupancy
90 * \param componentCarrierId The component carrier id
91 */
92 virtual void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) = 0;
93
94}; // end of class LteCcmMacSapUser
95
96/// MemberLteCcmMacSapProvider class
97template <class C>
99{
100 public:
101 /**
102 * Constructor
103 *
104 * \param owner the owner class
105 */
107 // inherited from LteCcmRrcSapProvider
109 void ReportSrToScheduler(uint16_t rnti) override;
110
111 private:
112 C* m_owner; ///< the owner class
113};
114
115template <class C>
117 : m_owner(owner)
118{
119}
120
121template <class C>
122void
124{
125 m_owner->DoReportMacCeToScheduler(bsr);
126}
127
128template <class C>
129void
131{
132 m_owner->DoReportSrToScheduler(rnti);
133}
134
135/// MemberLteCcmMacSapUser class
136template <class C>
138{
139 public:
140 /**
141 * Constructor
142 *
143 * \param owner the owner class
144 */
145 MemberLteCcmMacSapUser(C* owner);
146 // inherited from LteCcmRrcSapUser
147 void UlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) override;
148 void UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) override;
149 void NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) override;
150 // inherited from LteMacSapUser
152 void ReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
153 void NotifyHarqDeliveryFailure() override;
154
155 private:
156 C* m_owner; ///< the owner class
157};
158
159template <class C>
161 : m_owner(owner)
162{
163}
164
165template <class C>
166void
168{
169 m_owner->DoUlReceiveMacCe(bsr, componentCarrierId);
170}
171
172template <class C>
173void
174MemberLteCcmMacSapUser<C>::UlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)
175{
176 m_owner->DoUlReceiveSr(rnti, componentCarrierId);
177}
178
179template <class C>
180void
181MemberLteCcmMacSapUser<C>::NotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)
182{
183 m_owner->DoNotifyPrbOccupancy(prbOccupancy, componentCarrierId);
184}
185
186template <class C>
187void
189{
190 m_owner->DoNotifyTxOpportunity(txOpParams);
191}
192
193template <class C>
194void
196{
197 m_owner->DoReceivePdu(rxPduParams);
198}
199
200template <class C>
201void
203{
204 m_owner->DoNotifyHarqDeliveryFailure();
205}
206
207} // end of namespace ns3
208
209#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:85
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.
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.
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition lte-mac-sap.h:94
See section 4.3.14 macCEListElement.