A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-mac-sap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Nicola Baldo <nbaldo@cttc.es>
18 */
19
20#ifndef LTE_MAC_SAP_H
21#define LTE_MAC_SAP_H
22
23#include <ns3/packet.h>
24
25namespace ns3
26{
27
36{
37 public:
38 virtual ~LteMacSapProvider();
39
45 {
47 uint16_t rnti;
48 uint8_t lcid;
49 uint8_t layer;
51 uint8_t harqProcessId;
55 };
56
63 virtual void TransmitPdu(TransmitPduParameters params) = 0;
64
69 {
70 uint16_t rnti;
71 uint8_t lcid;
73 uint16_t txQueueHolDelay;
76 uint16_t
78 };
79
86};
87
96{
97 public:
98 virtual ~LteMacSapUser();
99
105 {
116 uint8_t layer,
117 uint8_t harqId,
118 uint8_t ccId,
119 uint16_t rnti,
120 uint8_t lcId)
121 {
122 this->bytes = bytes;
123 this->layer = layer;
124 this->harqId = harqId;
125 this->componentCarrierId = ccId;
126 this->rnti = rnti;
127 this->lcid = lcId;
128 }
129
134 {
135 }
136
138 uint8_t layer;
139 uint8_t harqId;
141 uint16_t rnti;
142 uint8_t lcid;
143 };
144
152
159 virtual void NotifyHarqDeliveryFailure() = 0;
160
166 {
171 {
172 }
173
180 ReceivePduParameters(const Ptr<Packet>& p, uint16_t rnti, uint8_t lcid)
181 {
182 this->p = p;
183 this->rnti = rnti;
184 this->lcid = lcid;
185 }
186
188 uint16_t rnti;
189 uint8_t lcid;
190 };
191
197 virtual void ReceivePdu(ReceivePduParameters params) = 0;
198};
199
201template <class C>
203{
204 public:
211
212 // inherited from LteMacSapProvider
213 void TransmitPdu(TransmitPduParameters params) override;
215
216 private:
217 C* m_mac;
218};
219
220template <class C>
222 : m_mac(mac)
223{
224}
225
226template <class C>
227void
229{
230 m_mac->DoTransmitPdu(params);
231}
232
233template <class C>
234void
236{
237 m_mac->DoReportBufferStatus(params);
238}
239
240} // namespace ns3
241
242#endif // LTE_MAC_SAP_H
EnbMacMemberLteMacSapProvider class.
Definition: lte-mac-sap.h:203
void ReportBufferStatus(ReportBufferStatusParameters params) override
Report the RLC buffer status to the MAC.
Definition: lte-mac-sap.h:235
EnbMacMemberLteMacSapProvider(C *mac)
Constructor.
Definition: lte-mac-sap.h:221
void TransmitPdu(TransmitPduParameters params) override
send an RLC PDU to the MAC for transmission.
Definition: lte-mac-sap.h:228
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:36
virtual void TransmitPdu(TransmitPduParameters params)=0
send an RLC PDU to the MAC for transmission.
virtual void ReportBufferStatus(ReportBufferStatusParameters params)=0
Report the RLC buffer status to the MAC.
virtual ~LteMacSapProvider()
Definition: lte-mac-sap.cc:25
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:96
virtual void NotifyTxOpportunity(TxOpportunityParameters params)=0
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
virtual ~LteMacSapUser()
Definition: lte-mac-sap.cc:29
virtual void NotifyHarqDeliveryFailure()=0
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed.
virtual void ReceivePdu(ReceivePduParameters params)=0
Called by the MAC to notify the RLC of the reception of a new PDU.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for LteMacSapProvider::ReportBufferStatus.
Definition: lte-mac-sap.h:69
uint32_t txQueueSize
the current size of the RLC transmission queue
Definition: lte-mac-sap.h:72
uint16_t retxQueueHolDelay
the Head Of Line delay of the retransmission queue
Definition: lte-mac-sap.h:75
uint16_t txQueueHolDelay
the Head Of Line delay of the transmission queue
Definition: lte-mac-sap.h:73
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
Definition: lte-mac-sap.h:74
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:71
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:70
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
Definition: lte-mac-sap.h:77
Parameters for LteMacSapProvider::TransmitPdu.
Definition: lte-mac-sap.h:45
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:47
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:48
uint8_t componentCarrierId
the component carrier id corresponding to the sending Mac instance
Definition: lte-mac-sap.h:53
uint8_t harqProcessId
the HARQ process id that was passed by the MAC in the call to NotifyTxOpportunity that generated this...
Definition: lte-mac-sap.h:51
uint8_t layer
the layer value that was passed by the MAC in the call to NotifyTxOpportunity that generated this PDU
Definition: lte-mac-sap.h:49
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:166
Ptr< Packet > p
the RLC PDU to be received
Definition: lte-mac-sap.h:187
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:189
ReceivePduParameters()
ReceivePduParameters default constructor (DEPRECATED)
Definition: lte-mac-sap.h:170
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:188
ReceivePduParameters(const Ptr< Packet > &p, uint16_t rnti, uint8_t lcid)
ReceivePduParameters constructor.
Definition: lte-mac-sap.h:180
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:105
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:141
uint32_t bytes
the number of bytes to transmit
Definition: lte-mac-sap.h:137
uint8_t componentCarrierId
the component carrier id
Definition: lte-mac-sap.h:140
uint8_t layer
the layer of transmission (MIMO)
Definition: lte-mac-sap.h:138
TxOpportunityParameters(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t ccId, uint16_t rnti, uint8_t lcId)
TxOpportunityParameters constructor.
Definition: lte-mac-sap.h:115
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:142
TxOpportunityParameters()
TxOpportunityParameters default constructor (DEPRECATED)
Definition: lte-mac-sap.h:133