A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-rlc.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_RLC_H
21#define LTE_RLC_H
22
23#include "lte-mac-sap.h"
24#include "lte-rlc-sap.h"
25
26#include "ns3/nstime.h"
27#include "ns3/object.h"
28#include "ns3/trace-source-accessor.h"
29#include "ns3/traced-value.h"
30#include "ns3/uinteger.h"
31#include <ns3/packet.h>
32#include <ns3/simple-ref-count.h>
33
34namespace ns3
35{
36
37// class LteRlcSapProvider;
38// class LteRlcSapUser;
39//
40// class LteMacSapProvider;
41// class LteMacSapUser;
42
48class LteRlc : public Object // SimpleRefCount<LteRlc>
49{
54
55 public:
56 LteRlc();
57 ~LteRlc() override;
62 static TypeId GetTypeId();
63 void DoDispose() override;
64
70 void SetRnti(uint16_t rnti);
71
77 void SetLcId(uint8_t lcId);
78
82 void SetPacketDelayBudgetMs(uint16_t packetDelayBudget);
83
90
97
104
111
120 typedef void (*NotifyTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes);
121
131 typedef void (*ReceiveTracedCallback)(uint16_t rnti,
132 uint8_t lcid,
133 uint32_t bytes,
134 uint64_t delay);
135
137 // NB to avoid the use of multiple inheritance
138
139 protected:
140 // Interface forwarded by LteRlcSapProvider
146 virtual void DoTransmitPdcpPdu(Ptr<Packet> p) = 0;
147
150
151 // Interface forwarded by LteMacSapUser
161 virtual void DoNotifyHarqDeliveryFailure() = 0;
168
171
172 uint16_t m_rnti;
173 uint8_t m_lcid;
175 UINT16_MAX};
176
190};
191
200class LteRlcSm : public LteRlc
201{
202 public:
203 LteRlcSm();
204 ~LteRlcSm() override;
209 static TypeId GetTypeId();
210 void DoInitialize() override;
211 void DoDispose() override;
212
213 void DoTransmitPdcpPdu(Ptr<Packet> p) override;
215 void DoNotifyHarqDeliveryFailure() override;
216 void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
217
218 private:
220 void ReportBufferStatus();
221};
222
223// /**
224// * Implements LTE_RLC Transparent Mode (TM), see 3GPP TS 36.322
225// *
226// */
227// class LteRlcTm : public LteRlc
228// {
229// public:
230// virtual ~LteRlcTm ();
231
232// };
233
234// /**
235// * Implements LTE_RLC Unacknowledged Mode (UM), see 3GPP TS 36.322
236// *
237// */
238// class LteRlcUm : public LteRlc
239// {
240// public:
241// virtual ~LteRlcUm ();
242
243// };
244
245// /**
246// * Implements LTE_RLC Acknowledged Mode (AM), see 3GPP TS 36.322
247// *
248// */
249
250// class LteRlcAm : public LteRlc
251// {
252// public:
253// virtual ~LteRlcAm ();
254// };
255
256} // namespace ns3
257
258#endif // LTE_RLC_H
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:36
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:96
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE,...
Definition: lte-rlc.h:49
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
Definition: lte-rlc.h:148
uint8_t m_lcid
LCID.
Definition: lte-rlc.h:173
void SetPacketDelayBudgetMs(uint16_t packetDelayBudget)
Definition: lte-rlc.cc:148
virtual void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters params)=0
Notify transmit opportunity.
TracedCallback< Ptr< const Packet > > m_txDropTrace
The trace source fired when the RLC drops a packet before transmission.
Definition: lte-rlc.h:189
void(* ReceiveTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes, uint64_t delay)
TracedCallback signature for.
Definition: lte-rlc.h:131
void(* NotifyTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes)
TracedCallback signature for NotifyTxOpportunity events.
Definition: lte-rlc.h:120
uint16_t m_rnti
RNTI.
Definition: lte-rlc.h:172
TracedCallback< uint16_t, uint8_t, uint32_t, uint64_t > m_rxPdu
Used to inform of a PDU reception from the MAC SAP user.
Definition: lte-rlc.h:184
void DoDispose() override
Destructor implementation.
Definition: lte-rlc.cc:126
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
Definition: lte-rlc.h:149
LteMacSapUser * m_macSapUser
MAC SAP user.
Definition: lte-rlc.h:169
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
Definition: lte-rlc.h:170
void SetLteRlcSapUser(LteRlcSapUser *s)
Definition: lte-rlc.cc:155
uint16_t m_packetDelayBudgetMs
the packet delay budget in ms of the corresponding logical channel
Definition: lte-rlc.h:174
TracedCallback< uint16_t, uint8_t, uint32_t > m_txPdu
Used to inform of a PDU delivery to the MAC SAP provider.
Definition: lte-rlc.h:180
void SetRnti(uint16_t rnti)
Definition: lte-rlc.cc:134
virtual void DoNotifyHarqDeliveryFailure()=0
Notify HARQ delivery failure.
void SetLteMacSapProvider(LteMacSapProvider *s)
Definition: lte-rlc.cc:169
virtual void DoReceivePdu(LteMacSapUser::ReceivePduParameters params)=0
Receive PDU function.
~LteRlc() override
Definition: lte-rlc.cc:98
LteMacSapUser * GetLteMacSapUser()
Definition: lte-rlc.cc:176
void SetLcId(uint8_t lcId)
Definition: lte-rlc.cc:141
static TypeId GetTypeId()
Get the type ID.
Definition: lte-rlc.cc:104
virtual void DoTransmitPdcpPdu(Ptr< Packet > p)=0
Transmit PDCP PDU.
LteRlcSapProvider * GetLteRlcSapProvider()
Definition: lte-rlc.cc:162
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
Definition: lte-rlc-sap.h:36
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
Definition: lte-rlc-sap.h:67
LTE_RLC Saturation Mode (SM): simulation-specific mode used for experiments that do not need to consi...
Definition: lte-rlc.h:201
void DoDispose() override
Destructor implementation.
Definition: lte-rlc.cc:212
void DoInitialize() override
Initialize() implementation.
Definition: lte-rlc.cc:205
static TypeId GetTypeId()
Get the type ID.
Definition: lte-rlc.cc:197
~LteRlcSm() override
Definition: lte-rlc.cc:191
void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override
Receive PDU function.
Definition: lte-rlc.cc:225
void DoTransmitPdcpPdu(Ptr< Packet > p) override
Transmit PDCP PDU.
Definition: lte-rlc.cc:219
void DoNotifyHarqDeliveryFailure() override
Notify HARQ delivery failure.
Definition: lte-rlc.cc:270
void ReportBufferStatus()
Report buffer status.
Definition: lte-rlc.cc:276
void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams) override
Notify transmit opportunity.
Definition: lte-rlc.cc:240
LteRlcSpecificLteMacSapUser class.
Definition: lte-rlc.cc:37
LteRlcSpecificLteRlcSapProvider.
Definition: lte-rlc-sap.h:82
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:166
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:105