A Discrete-Event Network Simulator
API
lte-rlc-um.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: Manuel Requena <manuel.requena@cttc.es>
18 */
19
20#ifndef LTE_RLC_UM_H
21#define LTE_RLC_UM_H
22
23#include "ns3/lte-rlc-sequence-number.h"
24#include "ns3/lte-rlc.h"
25#include <ns3/event-id.h>
26
27#include <map>
28
29namespace ns3
30{
31
35class LteRlcUm : public LteRlc
36{
37 public:
38 LteRlcUm();
39 ~LteRlcUm() override;
44 static TypeId GetTypeId();
45 void DoDispose() override;
46
52 void DoTransmitPdcpPdu(Ptr<Packet> p) override;
53
60 void DoNotifyHarqDeliveryFailure() override;
61 void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
62
63 private:
67 void ExpireRbsTimer();
68
76
85 void ReassembleSnInterval(SequenceNumber10 lowSeqNumber, SequenceNumber10 highSeqNumber);
86
93
96
97 private:
100
104 struct TxPdu
105 {
111 TxPdu(const Ptr<Packet>& pdu, const Time& time)
112 : m_pdu(pdu),
113 m_waitingSince(time)
114 {
115 }
116
117 TxPdu() = delete;
118
121 };
122
123 std::vector<TxPdu> m_txBuffer;
124 std::map<uint16_t, Ptr<Packet>> m_rxBuffer;
125 std::vector<Ptr<Packet>> m_reasBuffer;
126
127 std::list<Ptr<Packet>> m_sdusBuffer;
128
133
137
141 uint16_t m_windowSize;
142
149
154 {
155 NONE = 0,
157 WAITING_SI_SF = 2
158 };
159
162
167};
168
169} // namespace ns3
170
171#endif // LTE_RLC_UM_H
An identifier for simulation events.
Definition: event-id.h:55
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE,...
Definition: lte-rlc.h:48
LTE RLC Unacknowledged Mode (UM), see 3GPP TS 36.322.
Definition: lte-rlc-um.h:36
SequenceNumber10 m_vrUr
VR(UR)
Definition: lte-rlc-um.h:134
Ptr< Packet > m_keepS0
keep S0
Definition: lte-rlc-um.h:161
void ReassembleAndDeliver(Ptr< Packet > packet)
Reassemble and deliver function.
Definition: lte-rlc-um.cc:603
void DoReportBufferStatus()
Report buffer status.
Definition: lte-rlc-um.cc:1136
uint32_t m_txBufferSize
transmit buffer size
Definition: lte-rlc-um.h:99
static TypeId GetTypeId()
Get the type ID.
Definition: lte-rlc-um.cc:55
void ReassembleOutsideWindow()
Reassemble outside window.
Definition: lte-rlc-um.cc:1080
std::vector< Ptr< Packet > > m_reasBuffer
Reassembling buffer.
Definition: lte-rlc-um.h:125
void DoDispose() override
Destructor implementation.
Definition: lte-rlc-um.cc:76
void ExpireReorderingTimer()
Expire reordering timer.
Definition: lte-rlc-um.cc:1163
std::vector< TxPdu > m_txBuffer
Transmission buffer.
Definition: lte-rlc-um.h:123
Time m_reorderingTimerValue
Timers.
Definition: lte-rlc-um.h:146
~LteRlcUm() override
Definition: lte-rlc-um.cc:49
SequenceNumber10 m_expectedSeqNumber
Expected Sequence Number.
Definition: lte-rlc-um.h:166
ReassemblingState_t m_reassemblingState
reassembling state
Definition: lte-rlc-um.h:160
void ReassembleSnInterval(SequenceNumber10 lowSeqNumber, SequenceNumber10 highSeqNumber)
Reassemble SN interval function.
Definition: lte-rlc-um.cc:1106
void ExpireRbsTimer()
Expire RBS timer.
Definition: lte-rlc-um.cc:1203
EventId m_rbsTimer
RBS timer.
Definition: lte-rlc-um.h:148
void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams) override
MAC SAP.
Definition: lte-rlc-um.cc:127
SequenceNumber10 m_vrUx
VR(UX)
Definition: lte-rlc-um.h:135
uint16_t m_windowSize
Constants.
Definition: lte-rlc-um.h:141
std::map< uint16_t, Ptr< Packet > > m_rxBuffer
Reception buffer.
Definition: lte-rlc-um.h:124
void DoNotifyHarqDeliveryFailure() override
Notify HARQ delivery failure.
Definition: lte-rlc-um.cc:406
SequenceNumber10 m_vrUh
VR(UH)
Definition: lte-rlc-um.h:136
void DoTransmitPdcpPdu(Ptr< Packet > p) override
RLC SAP.
Definition: lte-rlc-um.cc:90
void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override
Receive PDU function.
Definition: lte-rlc-um.cc:412
uint32_t m_maxTxBufferSize
maximum transmit buffer status
Definition: lte-rlc-um.h:98
std::list< Ptr< Packet > > m_sdusBuffer
List of SDUs in a packet.
Definition: lte-rlc-um.h:127
ReassemblingState_t
Reassembling state.
Definition: lte-rlc-um.h:154
EventId m_reorderingTimer
reordering timer
Definition: lte-rlc-um.h:147
bool IsInsideReorderingWindow(SequenceNumber10 seqNumber)
Is inside reordering window function.
Definition: lte-rlc-um.cc:581
SequenceNumber10 m_sequenceNumber
State variables.
Definition: lte-rlc-um.h:132
SequenceNumber10 class.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
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
Store an incoming (from layer above us) PDU, waiting to transmit it.
Definition: lte-rlc-um.h:105
TxPdu(const Ptr< Packet > &pdu, const Time &time)
TxPdu default constructor.
Definition: lte-rlc-um.h:111
Ptr< Packet > m_pdu
PDU.
Definition: lte-rlc-um.h:119
Time m_waitingSince
Layer arrival time.
Definition: lte-rlc-um.h:120