A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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 "lte-rlc.h"
25
26#include <ns3/event-id.h>
27
28#include <map>
29
30namespace ns3
31{
32
33/**
34 * LTE RLC Transparent Mode (TM), see 3GPP TS 36.322
35 *
36 * Please note that, as in TM it is not possible to add any header, the delay
37 * measurements gathered from the trace source "RxPDU" of LteRlc are invalid
38 * (they will be always 0)
39 */
40class LteRlcTm : public LteRlc
41{
42 public:
43 LteRlcTm();
44 ~LteRlcTm() override;
45 /**
46 * \brief Get the type ID.
47 * \return the object TypeId
48 */
49 static TypeId GetTypeId();
50 void DoDispose() override;
51
52 /**
53 * RLC SAP
54 *
55 * \param p packet
56 */
57 void DoTransmitPdcpPdu(Ptr<Packet> p) override;
58
59 /**
60 * MAC SAP
61 *
62 * \param txOpParams the LteMacSapUser::TxOpportunityParameters
63 */
65 /**
66 * Notify HARQ deliver failure
67 */
68 void DoNotifyHarqDeliveryFailure() override;
69 void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
70
71 private:
72 /// Expire RBS timer function
73 void ExpireRbsTimer();
74 /// Report buffer status
76
77 private:
78 /**
79 * \brief Store an incoming (from layer above us) PDU, waiting to transmit it
80 */
81 struct TxPdu
82 {
83 /**
84 * \brief TxPdu default constructor
85 * \param pdu the PDU
86 * \param time the arrival time
87 */
88 TxPdu(const Ptr<Packet>& pdu, const Time& time)
89 : m_pdu(pdu),
90 m_waitingSince(time)
91 {
92 }
93
94 TxPdu() = delete;
95
97 Time m_waitingSince; ///< Layer arrival time
98 };
99
100 std::vector<TxPdu> m_txBuffer; ///< Transmission buffer
101
102 uint32_t m_maxTxBufferSize; ///< maximum transmit buffer size
103 uint32_t m_txBufferSize; ///< transmit buffer size
104
105 EventId m_rbsTimer; ///< RBS timer
106};
107
108} // namespace ns3
109
110#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:49
LTE RLC Transparent Mode (TM), see 3GPP TS 36.322.
Definition: lte-rlc-tm.h:41
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:100
void ExpireRbsTimer()
Expire RBS timer function.
Definition: lte-rlc-tm.cc:202
uint32_t m_txBufferSize
transmit buffer size
Definition: lte-rlc-tm.h:103
EventId m_rbsTimer
RBS timer.
Definition: lte-rlc-tm.h:105
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:102
void DoDispose() override
Destructor implementation.
Definition: lte-rlc-tm.cc:61
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
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-tm.h:82
Ptr< Packet > m_pdu
PDU.
Definition: lte-rlc-tm.h:96
TxPdu(const Ptr< Packet > &pdu, const Time &time)
TxPdu default constructor.
Definition: lte-rlc-tm.h:88
Time m_waitingSince
Layer arrival time.
Definition: lte-rlc-tm.h:97