A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-rlc-um.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 */
8
9#ifndef LTE_RLC_UM_H
10#define LTE_RLC_UM_H
11
13#include "lte-rlc.h"
14
15#include <ns3/event-id.h>
16
17#include <deque>
18#include <map>
19
20namespace ns3
21{
22
23/**
24 * LTE RLC Unacknowledged Mode (UM), see 3GPP TS 36.322
25 */
26class LteRlcUm : public LteRlc
27{
28 public:
29 LteRlcUm();
30 ~LteRlcUm() override;
31 /**
32 * \brief Get the type ID.
33 * \return the object TypeId
34 */
35 static TypeId GetTypeId();
36 void DoDispose() override;
37
38 /**
39 * RLC SAP
40 *
41 * \param p packet
42 */
43 void DoTransmitPdcpPdu(Ptr<Packet> p) override;
44
45 /**
46 * MAC SAP
47 *
48 * \param txOpParams the LteMacSapUser::TxOpportunityParameters
49 */
51 void DoNotifyHarqDeliveryFailure() override;
52 void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
53
54 private:
55 /// Expire reordering timer
57 /// Expire RBS timer
58 void ExpireRbsTimer();
59
60 /**
61 * Is inside reordering window function
62 *
63 * \param seqNumber the sequence number
64 * \returns true if inside the window
65 */
67
68 /// Reassemble outside window
70 /**
71 * Reassemble SN interval function
72 *
73 * \param lowSeqNumber the low sequence number
74 * \param highSeqNumber the high sequence number
75 */
76 void ReassembleSnInterval(SequenceNumber10 lowSeqNumber, SequenceNumber10 highSeqNumber);
77
78 /**
79 * Reassemble and deliver function
80 *
81 * \param packet the packet
82 */
84
85 /// Report buffer status
87
88 private:
89 uint32_t m_maxTxBufferSize; ///< maximum transmit buffer status
90 uint32_t m_txBufferSize; ///< transmit buffer size
91
92 /**
93 * \brief Store an incoming (from layer above us) PDU, waiting to transmit it
94 */
95 struct TxPdu
96 {
97 /**
98 * \brief TxPdu default constructor
99 * \param pdu the PDU
100 * \param time the arrival time
101 */
102 TxPdu(const Ptr<Packet>& pdu, const Time& time)
103 : m_pdu(pdu),
104 m_waitingSince(time)
105 {
106 }
107
108 TxPdu() = delete;
109
111 Time m_waitingSince; ///< Layer arrival time
112 };
113
114 std::deque<TxPdu> m_txBuffer; ///< Transmission buffer
115 std::map<uint16_t, Ptr<Packet>> m_rxBuffer; ///< Reception buffer
116 std::vector<Ptr<Packet>> m_reasBuffer; ///< Reassembling buffer
117
118 std::list<Ptr<Packet>> m_sdusBuffer; ///< List of SDUs in a packet
119
120 /**
121 * State variables. See section 7.1 in TS 36.322
122 */
124
128
129 /**
130 * Constants. See section 7.2 in TS 36.322
131 */
132 uint16_t m_windowSize; ///< windows size
133
134 /**
135 * Timers. See section 7.3 in TS 36.322
136 */
137 Time m_reorderingTimerValue; ///< reordering timer value
138 EventId m_reorderingTimer; ///< reordering timer
139 EventId m_rbsTimer; ///< RBS timer
140 bool m_enablePdcpDiscarding{false}; //!< whether to use the PDCP discarding (perform discarding
141 //!< at the moment of passing the PDCP SDU to RLC)
142 uint32_t m_discardTimerMs{0}; //!< the discard timer value in milliseconds
143
144 /**
145 * Reassembling state
146 */
153
155 Ptr<Packet> m_keepS0; ///< keep S0
156
157 /**
158 * Expected Sequence Number
159 */
161};
162
163} // namespace ns3
164
165#endif // LTE_RLC_UM_H
An identifier for simulation events.
Definition event-id.h:45
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE,...
Definition lte-rlc.h:38
LTE RLC Unacknowledged Mode (UM), see 3GPP TS 36.322.
Definition lte-rlc-um.h:27
SequenceNumber10 m_vrUr
VR(UR)
Definition lte-rlc-um.h:125
Ptr< Packet > m_keepS0
keep S0
Definition lte-rlc-um.h:155
void ReassembleAndDeliver(Ptr< Packet > packet)
Reassemble and deliver function.
void DoReportBufferStatus()
Report buffer status.
uint32_t m_txBufferSize
transmit buffer size
Definition lte-rlc-um.h:90
static TypeId GetTypeId()
Get the type ID.
Definition lte-rlc-um.cc:45
void ReassembleOutsideWindow()
Reassemble outside window.
std::vector< Ptr< Packet > > m_reasBuffer
Reassembling buffer.
Definition lte-rlc-um.h:116
void DoDispose() override
Destructor implementation.
Definition lte-rlc-um.cc:80
void ExpireReorderingTimer()
Expire reordering timer.
Time m_reorderingTimerValue
Timers.
Definition lte-rlc-um.h:137
~LteRlcUm() override
Definition lte-rlc-um.cc:39
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.
void ExpireRbsTimer()
Expire RBS timer.
EventId m_rbsTimer
RBS timer.
Definition lte-rlc-um.h:139
void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams) override
MAC SAP.
SequenceNumber10 m_vrUx
VR(UX)
Definition lte-rlc-um.h:126
uint16_t m_windowSize
Constants.
Definition lte-rlc-um.h:132
std::map< uint16_t, Ptr< Packet > > m_rxBuffer
Reception buffer.
Definition lte-rlc-um.h:115
uint32_t m_discardTimerMs
the discard timer value in milliseconds
Definition lte-rlc-um.h:142
void DoNotifyHarqDeliveryFailure() override
Notify HARQ delivery failure.
SequenceNumber10 m_vrUh
VR(UH)
Definition lte-rlc-um.h:127
void DoTransmitPdcpPdu(Ptr< Packet > p) override
RLC SAP.
Definition lte-rlc-um.cc:94
void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override
Receive PDU function.
uint32_t m_maxTxBufferSize
maximum transmit buffer status
Definition lte-rlc-um.h:89
std::deque< TxPdu > m_txBuffer
Transmission buffer.
Definition lte-rlc-um.h:114
std::list< Ptr< Packet > > m_sdusBuffer
List of SDUs in a packet.
Definition lte-rlc-um.h:118
ReassemblingState_t
Reassembling state.
Definition lte-rlc-um.h:148
EventId m_reorderingTimer
reordering timer
Definition lte-rlc-um.h:138
bool IsInsideReorderingWindow(SequenceNumber10 seqNumber)
Is inside reordering window function.
SequenceNumber10 m_sequenceNumber
State variables.
Definition lte-rlc-um.h:123
bool m_enablePdcpDiscarding
whether to use the PDCP discarding (perform discarding at the moment of passing the PDCP SDU to RLC)
Definition lte-rlc-um.h:140
Smart pointer class similar to boost::intrusive_ptr.
SequenceNumber10 class.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for LteMacSapUser::ReceivePdu.
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition lte-mac-sap.h:94
Store an incoming (from layer above us) PDU, waiting to transmit it.
Definition lte-rlc-um.h:96
TxPdu(const Ptr< Packet > &pdu, const Time &time)
TxPdu default constructor.
Definition lte-rlc-um.h:102
Ptr< Packet > m_pdu
PDU.
Definition lte-rlc-um.h:110
Time m_waitingSince
Layer arrival time.
Definition lte-rlc-um.h:111