A Discrete-Event Network Simulator
API
lte-rlc-tm.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011,2012 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  * Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 #ifndef LTE_RLC_TM_H
22 #define LTE_RLC_TM_H
23 
24 #include "ns3/lte-rlc.h"
25 #include <ns3/event-id.h>
26 
27 #include <map>
28 
29 namespace ns3
30 {
31 
39 class LteRlcTm : public LteRlc
40 {
41  public:
42  LteRlcTm();
43  ~LteRlcTm() override;
48  static TypeId GetTypeId();
49  void DoDispose() override;
50 
56  void DoTransmitPdcpPdu(Ptr<Packet> p) override;
57 
67  void DoNotifyHarqDeliveryFailure() override;
68  void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
69 
70  private:
72  void ExpireRbsTimer();
74  void DoReportBufferStatus();
75 
76  private:
80  struct TxPdu
81  {
87  TxPdu(const Ptr<Packet>& pdu, const Time& time)
88  : m_pdu(pdu),
89  m_waitingSince(time)
90  {
91  }
92 
93  TxPdu() = delete;
94 
97  };
98 
99  std::vector<TxPdu> m_txBuffer;
100 
101  uint32_t m_maxTxBufferSize;
102  uint32_t m_txBufferSize;
103 
105 };
106 
107 } // namespace ns3
108 
109 #endif // LTE_RLC_TM_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 Transparent Mode (TM), see 3GPP TS 36.322.
Definition: lte-rlc-tm.h:40
void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override
Receive PDU function.
Definition: lte-rlc-tm.cc:161
void DoReportBufferStatus()
Report buffer status.
Definition: lte-rlc-tm.cc:176
void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams) override
MAC SAP.
Definition: lte-rlc-tm.cc:106
static TypeId GetTypeId()
Get the type ID.
Definition: lte-rlc-tm.cc:46
~LteRlcTm() override
Definition: lte-rlc-tm.cc:40
std::vector< TxPdu > m_txBuffer
Transmission buffer.
Definition: lte-rlc-tm.h:99
void ExpireRbsTimer()
Expire RBS timer function.
Definition: lte-rlc-tm.cc:202
uint32_t m_txBufferSize
transmit buffer size
Definition: lte-rlc-tm.h:102
EventId m_rbsTimer
RBS timer.
Definition: lte-rlc-tm.h:104
void DoNotifyHarqDeliveryFailure() override
Notify HARQ deliver failure.
Definition: lte-rlc-tm.cc:155
void DoTransmitPdcpPdu(Ptr< Packet > p) override
RLC SAP.
Definition: lte-rlc-tm.cc:75
uint32_t m_maxTxBufferSize
maximum transmit buffer size
Definition: lte-rlc-tm.h:101
void DoDispose() override
Destructor implementation.
Definition: lte-rlc-tm.cc:61
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:60
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-tm.h:81
Ptr< Packet > m_pdu
PDU.
Definition: lte-rlc-tm.h:95
TxPdu(const Ptr< Packet > &pdu, const Time &time)
TxPdu default constructor.
Definition: lte-rlc-tm.h:87
Time m_waitingSince
Layer arrival time.
Definition: lte-rlc-tm.h:96