A Discrete-Event Network Simulator
API
lte-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) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 #ifndef LTE_MAC_SAP_H
22 #define LTE_MAC_SAP_H
23 
24 #include <ns3/packet.h>
25 
26 namespace ns3 {
27 
28 
29 
37 {
38 public:
39  virtual ~LteMacSapProvider ();
40 
46  {
48  uint16_t rnti;
49  uint8_t lcid;
50  uint8_t layer;
51  uint8_t harqProcessId;
53  };
54 
61  virtual void TransmitPdu (TransmitPduParameters params) = 0;
62 
63 
68  {
69  uint16_t rnti;
70  uint8_t lcid;
71  uint32_t txQueueSize;
72  uint16_t txQueueHolDelay;
73  uint32_t retxQueueSize;
74  uint16_t retxQueueHolDelay;
75  uint16_t statusPduSize;
76  };
77 
83  virtual void ReportBufferStatus (ReportBufferStatusParameters params) = 0;
84 
85 
86 };
87 
88 
96 {
97 public:
98  virtual ~LteMacSapUser ();
110  virtual void NotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid) = 0;
111 
118  virtual void NotifyHarqDeliveryFailure () = 0;
119 
120 
128  virtual void ReceivePdu (Ptr<Packet> p, uint16_t rnti, uint8_t lcid) = 0;
129 
130 };
131 
133 template <class C>
135 {
136 public:
143 
144  // inherited from LteMacSapProvider
145  virtual void TransmitPdu (TransmitPduParameters params);
146  virtual void ReportBufferStatus (ReportBufferStatusParameters params);
147 
148 private:
149  C* m_mac;
150 };
151 
152 
153 template <class C>
155  : m_mac (mac)
156 {
157 }
158 
159 template <class C>
161 {
162  m_mac->DoTransmitPdu (params);
163 }
164 
165 template <class C>
167 {
168  m_mac->DoReportBufferStatus (params);
169 }
170 
171 
172 } // namespace ns3
173 
174 
175 #endif // LTE_MAC_SAP_H
EnbMacMemberLteMacSapProvider class.
Definition: lte-mac-sap.h:134
virtual void NotifyHarqDeliveryFailure()=0
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed...
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
Definition: lte-mac-sap.h:73
virtual void ReportBufferStatus(ReportBufferStatusParameters params)
Report the RLC buffer status to the MAC.
Definition: lte-mac-sap.h:166
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:49
uint8_t componentCarrierId
the component carrier id corresponding to the sending Mac istance
Definition: lte-mac-sap.h:52
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:69
Parameters for LteMacSapProvider::ReportBufferStatus.
Definition: lte-mac-sap.h:67
uint16_t txQueueHolDelay
the Head Of Line delay of the transmission queue
Definition: lte-mac-sap.h:72
virtual void TransmitPdu(TransmitPduParameters params)
send an RLC PDU to the MAC for transmission.
Definition: lte-mac-sap.h:160
virtual void ReceivePdu(Ptr< Packet > p, uint16_t rnti, uint8_t lcid)=0
Called by the MAC to notify the RLC of the reception of a new PDU.
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:48
mac
Definition: third.py:92
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:50
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:70
uint32_t txQueueSize
the current size of the RLC transmission queue
Definition: lte-mac-sap.h:71
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
Definition: lte-mac-sap.h:75
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:95
uint16_t retxQueueHolDelay
the Head Of Line delay of the retransmission queue
Definition: lte-mac-sap.h:74
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 ReportBufferStatus(ReportBufferStatusParameters params)=0
Report the RLC buffer status to the MAC.
virtual ~LteMacSapUser()
Definition: lte-mac-sap.cc:32
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
virtual void TransmitPdu(TransmitPduParameters params)=0
send an RLC PDU to the MAC for transmission.
virtual ~LteMacSapProvider()
Definition: lte-mac-sap.cc:28
virtual void NotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid)=0
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
EnbMacMemberLteMacSapProvider(C *mac)
Constructor.
Definition: lte-mac-sap.h:154
Parameters for LteMacSapProvider::TransmitPdu.
Definition: lte-mac-sap.h:45