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 
30 namespace ns3 {
31 
35 class LteRlcUm : public LteRlc
36 {
37 public:
38  LteRlcUm ();
39  virtual ~LteRlcUm ();
44  static TypeId GetTypeId (void);
45  virtual void DoDispose ();
46 
52  virtual void DoTransmitPdcpPdu (Ptr<Packet> p);
53 
64  virtual void DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid);
65  virtual void DoNotifyHarqDeliveryFailure ();
66  virtual void DoReceivePdu (Ptr<Packet> p, uint16_t rnti, uint8_t lcid);
67 
68 private:
70  void ExpireReorderingTimer (void);
72  void ExpireRbsTimer (void);
73 
81 
83  void ReassembleOutsideWindow (void);
90  void ReassembleSnInterval (SequenceNumber10 lowSeqNumber, SequenceNumber10 highSeqNumber);
91 
97  void ReassembleAndDeliver (Ptr<Packet> packet);
98 
100  void DoReportBufferStatus ();
101 
102 private:
103  uint32_t m_maxTxBufferSize;
104  uint32_t m_txBufferSize;
105  std::vector < Ptr<Packet> > m_txBuffer;
106  std::map <uint16_t, Ptr<Packet> > m_rxBuffer;
107  std::vector < Ptr<Packet> > m_reasBuffer;
108 
109  std::list < Ptr<Packet> > m_sdusBuffer;
110 
115 
119 
123  uint16_t m_windowSize;
124 
130 
134  typedef enum { NONE = 0,
139 
144 
145 };
146 
147 
148 } // namespace ns3
149 
150 #endif // LTE_RLC_UM_H
uint32_t m_maxTxBufferSize
maximum transmit buffer status
Definition: lte-rlc-um.h:103
LTE RLC Unacknowledged Mode (UM), see 3GPP TS 36.322.
Definition: lte-rlc-um.h:35
virtual ~LteRlcUm()
Definition: lte-rlc-um.cc:49
void ReassembleAndDeliver(Ptr< Packet > packet)
Reassemble and deliver function.
Definition: lte-rlc-um.cc:595
void DoReportBufferStatus()
Report buffer status.
Definition: lte-rlc-um.cc:1119
virtual void DoTransmitPdcpPdu(Ptr< Packet > p)
RLC SAP.
Definition: lte-rlc-um.cc:85
virtual void DoReceivePdu(Ptr< Packet > p, uint16_t rnti, uint8_t lcid)
Receive PDU function.
Definition: lte-rlc-um.cc:410
virtual void DoNotifyHarqDeliveryFailure()
Notify HARQ delivery failure.
Definition: lte-rlc-um.cc:404
SequenceNumber10 m_vrUr
VR(UR)
Definition: lte-rlc-um.h:116
SequenceNumber10 m_sequenceNumber
State variables.
Definition: lte-rlc-um.h:114
void ReassembleSnInterval(SequenceNumber10 lowSeqNumber, SequenceNumber10 highSeqNumber)
Reassemble SN interval function.
Definition: lte-rlc-um.cc:1088
SequenceNumber10 m_vrUh
VR(UH)
Definition: lte-rlc-um.h:118
SequenceNumber10 m_expectedSeqNumber
Expected Sequence Number.
Definition: lte-rlc-um.h:143
std::vector< Ptr< Packet > > m_txBuffer
Transmission buffer.
Definition: lte-rlc-um.h:105
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rlc-um.cc:55
virtual void DoNotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid)
MAC SAP.
Definition: lte-rlc-um.cc:127
ReassemblingState_t m_reassemblingState
reassembling state
Definition: lte-rlc-um.h:137
Ptr< Packet > m_keepS0
keep S0
Definition: lte-rlc-um.h:138
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< Ptr< Packet > > m_reasBuffer
Reassembling buffer.
Definition: lte-rlc-um.h:107
SequenceNumber10 m_vrUx
VR(UX)
Definition: lte-rlc-um.h:117
uint16_t m_windowSize
Constants.
Definition: lte-rlc-um.h:123
void ExpireReorderingTimer(void)
Expire reordering timer.
Definition: lte-rlc-um.cc:1149
std::map< uint16_t, Ptr< Packet > > m_rxBuffer
Reception buffer.
Definition: lte-rlc-um.h:106
EventId m_reorderingTimer
Timers.
Definition: lte-rlc-um.h:128
std::list< Ptr< Packet > > m_sdusBuffer
List of SDUs in a packet.
Definition: lte-rlc-um.h:109
An identifier for simulation events.
Definition: event-id.h:53
void ReassembleOutsideWindow(void)
Reassemble outside window.
Definition: lte-rlc-um.cc:1062
bool IsInsideReorderingWindow(SequenceNumber10 seqNumber)
Is inside reordering window function.
Definition: lte-rlc-um.cc:572
ReassemblingState_t
Reassembling state.
Definition: lte-rlc-um.h:134
virtual void DoDispose()
Destructor implementation.
Definition: lte-rlc-um.cc:71
uint32_t m_txBufferSize
transmit buffer size
Definition: lte-rlc-um.h:104
void ExpireRbsTimer(void)
Expire RBS timer.
Definition: lte-rlc-um.cc:1188
SequenceNumber10 class.
EventId m_rbsTimer
RBS timer.
Definition: lte-rlc-um.h:129
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE...
Definition: lte-rlc.h:50
a unique identifier for an interface.
Definition: type-id.h:58