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