A Discrete-Event Network Simulator
API
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 "ns3/lte-mac-sap.h"
24#include "ns3/lte-rlc-sap.h"
25#include "ns3/nstime.h"
26#include "ns3/object.h"
27#include "ns3/trace-source-accessor.h"
28#include "ns3/traced-value.h"
29#include "ns3/uinteger.h"
30#include <ns3/packet.h>
31#include <ns3/simple-ref-count.h>
32
33namespace ns3
34{
35
36// class LteRlcSapProvider;
37// class LteRlcSapUser;
38//
39// class LteMacSapProvider;
40// class LteMacSapUser;
41
47class LteRlc : public Object // SimpleRefCount<LteRlc>
48{
53
54 public:
55 LteRlc();
56 ~LteRlc() override;
61 static TypeId GetTypeId();
62 void DoDispose() override;
63
69 void SetRnti(uint16_t rnti);
70
76 void SetLcId(uint8_t lcId);
77
84
91
98
105
114 typedef void (*NotifyTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes);
115
125 typedef void (*ReceiveTracedCallback)(uint16_t rnti,
126 uint8_t lcid,
127 uint32_t bytes,
128 uint64_t delay);
129
131 // NB to avoid the use of multiple inheritance
132
133 protected:
134 // Interface forwarded by LteRlcSapProvider
140 virtual void DoTransmitPdcpPdu(Ptr<Packet> p) = 0;
141
144
145 // Interface forwarded by LteMacSapUser
155 virtual void DoNotifyHarqDeliveryFailure() = 0;
162
165
166 uint16_t m_rnti;
167 uint8_t m_lcid;
168
182};
183
192class LteRlcSm : public LteRlc
193{
194 public:
195 LteRlcSm();
196 ~LteRlcSm() override;
201 static TypeId GetTypeId();
202 void DoInitialize() override;
203 void DoDispose() override;
204
205 void DoTransmitPdcpPdu(Ptr<Packet> p) override;
207 void DoNotifyHarqDeliveryFailure() override;
208 void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
209
210 private:
212 void ReportBufferStatus();
213};
214
215// /**
216// * Implements LTE_RLC Transparent Mode (TM), see 3GPP TS 36.322
217// *
218// */
219// class LteRlcTm : public LteRlc
220// {
221// public:
222// virtual ~LteRlcTm ();
223
224// };
225
226// /**
227// * Implements LTE_RLC Unacknowledged Mode (UM), see 3GPP TS 36.322
228// *
229// */
230// class LteRlcUm : public LteRlc
231// {
232// public:
233// virtual ~LteRlcUm ();
234
235// };
236
237// /**
238// * Implements LTE_RLC Acknowledged Mode (AM), see 3GPP TS 36.322
239// *
240// */
241
242// class LteRlcAm : public LteRlc
243// {
244// public:
245// virtual ~LteRlcAm ();
246// };
247
248} // namespace ns3
249
250#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:48
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
Definition: lte-rlc.h:142
uint8_t m_lcid
LCID.
Definition: lte-rlc.h:167
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:181
void(* ReceiveTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes, uint64_t delay)
TracedCallback signature for.
Definition: lte-rlc.h:125
void(* NotifyTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes)
TracedCallback signature for NotifyTxOpportunity events.
Definition: lte-rlc.h:114
uint16_t m_rnti
RNTI.
Definition: lte-rlc.h:166
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:176
void DoDispose() override
Destructor implementation.
Definition: lte-rlc.cc:126
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
Definition: lte-rlc.h:143
LteMacSapUser * m_macSapUser
MAC SAP user.
Definition: lte-rlc.h:163
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
Definition: lte-rlc.h:164
void SetLteRlcSapUser(LteRlcSapUser *s)
Definition: lte-rlc.cc:148
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:172
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:162
virtual void DoReceivePdu(LteMacSapUser::ReceivePduParameters params)=0
Receive PDU function.
~LteRlc() override
Definition: lte-rlc.cc:98
LteMacSapUser * GetLteMacSapUser()
Definition: lte-rlc.cc:169
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:155
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:193
void DoDispose() override
Destructor implementation.
Definition: lte-rlc.cc:205
void DoInitialize() override
Initialize() implementation.
Definition: lte-rlc.cc:198
static TypeId GetTypeId()
Get the type ID.
Definition: lte-rlc.cc:190
~LteRlcSm() override
Definition: lte-rlc.cc:184
void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override
Receive PDU function.
Definition: lte-rlc.cc:218
void DoTransmitPdcpPdu(Ptr< Packet > p) override
Transmit PDCP PDU.
Definition: lte-rlc.cc:212
void DoNotifyHarqDeliveryFailure() override
Notify HARQ delivery failure.
Definition: lte-rlc.cc:263
void ReportBufferStatus()
Report buffer status.
Definition: lte-rlc.cc:269
void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams) override
Notify transmit opportunity.
Definition: lte-rlc.cc:233
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
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:166
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:105