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 
84 
85 
86 };
87 
88 
96 {
97 public:
98  virtual ~LteMacSapUser ();
104  {
114  TxOpportunityParameters (uint32_t bytes, uint8_t layer, uint8_t harqId,
115  uint8_t ccId, uint16_t rnti, uint8_t lcId)
116  {
117  this->bytes = bytes;
118  this->layer = layer;
119  this->harqId = harqId;
120  this->componentCarrierId = ccId;
121  this->rnti = rnti;
122  this->lcid = lcId;
123  }
128 
129  uint32_t bytes;
130  uint8_t layer;
131  uint8_t harqId;
133  uint16_t rnti;
134  uint8_t lcid;
135  };
142  virtual void NotifyTxOpportunity (TxOpportunityParameters params) = 0;
143 
150  virtual void NotifyHarqDeliveryFailure () = 0;
151 
157  {
162 
169  ReceivePduParameters (const Ptr<Packet> &p, uint16_t rnti, uint8_t lcid)
170  {
171  this->p = p;
172  this->rnti = rnti;
173  this->lcid = lcid;
174  }
176  uint16_t rnti;
177  uint8_t lcid;
178  };
184  virtual void ReceivePdu (ReceivePduParameters params) = 0;
185 
186 };
187 
189 template <class C>
191 {
192 public:
199 
200  // inherited from LteMacSapProvider
201  virtual void TransmitPdu (TransmitPduParameters params);
202  virtual void ReportBufferStatus (ReportBufferStatusParameters params);
203 
204 private:
205  C* m_mac;
206 };
207 
208 
209 template <class C>
211  : m_mac (mac)
212 {
213 }
214 
215 template <class C>
217 {
218  m_mac->DoTransmitPdu (params);
219 }
220 
221 template <class C>
223 {
224  m_mac->DoReportBufferStatus (params);
225 }
226 
227 
228 } // namespace ns3
229 
230 
231 #endif // LTE_MAC_SAP_H
ns3::LteMacSapProvider::TransmitPduParameters
Parameters for LteMacSapProvider::TransmitPdu.
Definition: lte-mac-sap.h:46
ns3::EnbMacMemberLteMacSapProvider::TransmitPdu
virtual void TransmitPdu(TransmitPduParameters params)
send an RLC PDU to the MAC for transmission.
Definition: lte-mac-sap.h:216
ns3::LteMacSapProvider::TransmitPduParameters::harqProcessId
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
ns3::LteMacSapProvider::ReportBufferStatusParameters::retxQueueSize
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
Definition: lte-mac-sap.h:73
ns3::LteMacSapProvider::ReportBufferStatusParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:69
ns3::EnbMacMemberLteMacSapProvider::m_mac
C * m_mac
the MAC class
Definition: lte-mac-sap.h:205
ns3::LteMacSapProvider
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:37
ns3::LteMacSapUser::ReceivePduParameters::p
Ptr< Packet > p
the RLC PDU to be received
Definition: lte-mac-sap.h:175
ns3::LteMacSapUser::ReceivePduParameters::ReceivePduParameters
ReceivePduParameters(const Ptr< Packet > &p, uint16_t rnti, uint8_t lcid)
ReceivePduParameters constructor.
Definition: lte-mac-sap.h:169
ns3::LteMacSapProvider::TransmitPdu
virtual void TransmitPdu(TransmitPduParameters params)=0
send an RLC PDU to the MAC for transmission.
ns3::EnbMacMemberLteMacSapProvider
EnbMacMemberLteMacSapProvider class.
Definition: lte-mac-sap.h:191
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::LteMacSapUser::~LteMacSapUser
virtual ~LteMacSapUser()
Definition: lte-mac-sap.cc:32
ns3::LteMacSapUser::TxOpportunityParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:133
third.mac
mac
Definition: third.py:99
ns3::LteMacSapUser::TxOpportunityParameters::lcid
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:134
ns3::LteMacSapProvider::TransmitPduParameters::pdu
Ptr< Packet > pdu
the RLC PDU
Definition: lte-mac-sap.h:47
ns3::LteMacSapUser::ReceivePduParameters::ReceivePduParameters
ReceivePduParameters()
ReceivePduParameters default constructor (DEPRECATED)
Definition: lte-mac-sap.h:161
ns3::EnbMacMemberLteMacSapProvider::EnbMacMemberLteMacSapProvider
EnbMacMemberLteMacSapProvider(C *mac)
Constructor.
Definition: lte-mac-sap.h:210
ns3::LteMacSapProvider::TransmitPduParameters::componentCarrierId
uint8_t componentCarrierId
the component carrier id corresponding to the sending Mac istance
Definition: lte-mac-sap.h:52
ns3::LteMacSapUser::ReceivePduParameters::lcid
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:177
ns3::Ptr< Packet >
ns3::LteMacSapProvider::ReportBufferStatusParameters
Parameters for LteMacSapProvider::ReportBufferStatus.
Definition: lte-mac-sap.h:68
ns3::LteMacSapUser::NotifyTxOpportunity
virtual void NotifyTxOpportunity(TxOpportunityParameters params)=0
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
ns3::LteMacSapProvider::ReportBufferStatusParameters::txQueueHolDelay
uint16_t txQueueHolDelay
the Head Of Line delay of the transmission queue
Definition: lte-mac-sap.h:72
ns3::LteMacSapProvider::ReportBufferStatusParameters::txQueueSize
uint32_t txQueueSize
the current size of the RLC transmission queue
Definition: lte-mac-sap.h:71
ns3::LteMacSapUser::ReceivePduParameters
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:157
ns3::LteMacSapProvider::~LteMacSapProvider
virtual ~LteMacSapProvider()
Definition: lte-mac-sap.cc:28
ns3::LteMacSapProvider::ReportBufferStatusParameters::retxQueueHolDelay
uint16_t retxQueueHolDelay
the Head Of Line delay of the retransmission queue
Definition: lte-mac-sap.h:74
ns3::LteMacSapUser::TxOpportunityParameters::harqId
uint8_t harqId
the HARQ ID
Definition: lte-mac-sap.h:131
ns3::LteMacSapProvider::TransmitPduParameters::layer
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
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::LteMacSapProvider::ReportBufferStatus
virtual void ReportBufferStatus(ReportBufferStatusParameters params)=0
Report the RLC buffer status to the MAC.
ns3::LteMacSapUser::TxOpportunityParameters::componentCarrierId
uint8_t componentCarrierId
the component carrier id
Definition: lte-mac-sap.h:132
ns3::LteMacSapUser::TxOpportunityParameters::bytes
uint32_t bytes
the number of bytes to transmit
Definition: lte-mac-sap.h:129
ns3::LteMacSapProvider::TransmitPduParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:48
ns3::LteMacSapProvider::ReportBufferStatusParameters::lcid
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:70
ns3::LteMacSapUser::TxOpportunityParameters::layer
uint8_t layer
the layer of transmission (MIMO)
Definition: lte-mac-sap.h:130
ns3::LteMacSapProvider::TransmitPduParameters::lcid
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:49
ns3::LteMacSapUser::TxOpportunityParameters::TxOpportunityParameters
TxOpportunityParameters()
TxOpportunityParameters default constructor (DEPRECATED)
Definition: lte-mac-sap.h:127
ns3::EnbMacMemberLteMacSapProvider::ReportBufferStatus
virtual void ReportBufferStatus(ReportBufferStatusParameters params)
Report the RLC buffer status to the MAC.
Definition: lte-mac-sap.h:222
ns3::LteMacSapUser::TxOpportunityParameters::TxOpportunityParameters
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:114
ns3::LteMacSapUser::NotifyHarqDeliveryFailure
virtual void NotifyHarqDeliveryFailure()=0
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed.
ns3::LteMacSapProvider::ReportBufferStatusParameters::statusPduSize
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
Definition: lte-mac-sap.h:75
ns3::LteMacSapUser::ReceivePduParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:176
ns3::LteMacSapUser::ReceivePdu
virtual void ReceivePdu(ReceivePduParameters params)=0
Called by the MAC to notify the RLC of the reception of a new PDU.