A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
26 #include "ns3/lte-rlc.h"
27 
28 #include <map>
29 
30 namespace ns3 {
31 
35 class LteRlcUm : public LteRlc
36 {
37 public:
38  LteRlcUm ();
39  virtual ~LteRlcUm ();
40  static TypeId GetTypeId (void);
41 
45  virtual void DoTransmitPdcpPdu (Ptr<Packet> p);
46 
50  virtual void DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer);
51  virtual void DoNotifyHarqDeliveryFailure ();
52  virtual void DoReceivePdu (Ptr<Packet> p);
53 
54  void Start ();
55 
56 private:
57  void ExpireReorderingTimer (void);
58  void ExpireRbsTimer (void);
59 
61 
62  void ReassembleOutsideWindow (void);
63  void ReassembleSnInterval (SequenceNumber10 lowSeqNumber, SequenceNumber10 highSeqNumber);
64 
65  void ReassembleAndDeliver (Ptr<Packet> packet);
66 
67  void DoReportBufferStatus ();
68 
69 private:
71  uint32_t m_txBufferSize;
72  std::vector < Ptr<Packet> > m_txBuffer; // Transmission buffer
73  std::map <uint16_t, Ptr<Packet> > m_rxBuffer; // Reception buffer
74  std::vector < Ptr<Packet> > m_reasBuffer; // Reassembling buffer
75 
76  std::list < Ptr<Packet> > m_sdusBuffer; // List of SDUs in a packet
77 
82 
86 
90  uint16_t m_windowSize;
91 
97 
101  typedef enum { NONE = 0,
106 
111 
112 };
113 
114 
115 } // namespace ns3
116 
117 #endif // LTE_RLC_UM_H