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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 * Nicola Baldo <nbaldo@cttc.es>
8 */
9
10#ifndef LTE_RLC_TM_H
11#define LTE_RLC_TM_H
12
13#include "lte-rlc.h"
14
15#include <ns3/event-id.h>
16
17#include <map>
18
19namespace ns3
20{
21
22/**
23 * LTE RLC Transparent Mode (TM), see 3GPP TS 36.322
24 *
25 * Please note that, as in TM it is not possible to add any header, the delay
26 * measurements gathered from the trace source "RxPDU" of LteRlc are invalid
27 * (they will be always 0)
28 */
29class LteRlcTm : public LteRlc
30{
31 public:
32 LteRlcTm();
33 ~LteRlcTm() override;
34 /**
35 * @brief Get the type ID.
36 * @return the object TypeId
37 */
38 static TypeId GetTypeId();
39 void DoDispose() override;
40
41 /**
42 * RLC SAP
43 *
44 * @param p packet
45 */
46 void DoTransmitPdcpPdu(Ptr<Packet> p) override;
47
48 /**
49 * MAC SAP
50 *
51 * @param txOpParams the LteMacSapUser::TxOpportunityParameters
52 */
54 /**
55 * Notify HARQ deliver failure
56 */
57 void DoNotifyHarqDeliveryFailure() override;
58 void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override;
59
60 private:
61 /// Expire RBS timer function
62 void ExpireRbsTimer();
63 /// Report buffer status
65
66 private:
67 /**
68 * @brief Store an incoming (from layer above us) PDU, waiting to transmit it
69 */
70 struct TxPdu
71 {
72 /**
73 * @brief TxPdu default constructor
74 * @param pdu the PDU
75 * @param time the arrival time
76 */
77 TxPdu(const Ptr<Packet>& pdu, const Time& time)
78 : m_pdu(pdu),
79 m_waitingSince(time)
80 {
81 }
82
83 TxPdu() = delete;
84
86 Time m_waitingSince; ///< Layer arrival time
87 };
88
89 std::vector<TxPdu> m_txBuffer; ///< Transmission buffer
90
91 uint32_t m_maxTxBufferSize; ///< maximum transmit buffer size
92 uint32_t m_txBufferSize; ///< transmit buffer size
93
94 EventId m_rbsTimer; ///< RBS timer
95};
96
97} // namespace ns3
98
99#endif // LTE_RLC_TM_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 Transparent Mode (TM), see 3GPP TS 36.322.
Definition lte-rlc-tm.h:30
void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams) override
Receive PDU function.
void DoReportBufferStatus()
Report buffer status.
void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams) override
MAC SAP.
Definition lte-rlc-tm.cc:95
static TypeId GetTypeId()
Get the type ID.
Definition lte-rlc-tm.cc:35
~LteRlcTm() override
Definition lte-rlc-tm.cc:29
std::vector< TxPdu > m_txBuffer
Transmission buffer.
Definition lte-rlc-tm.h:89
void ExpireRbsTimer()
Expire RBS timer function.
uint32_t m_txBufferSize
transmit buffer size
Definition lte-rlc-tm.h:92
EventId m_rbsTimer
RBS timer.
Definition lte-rlc-tm.h:94
void DoNotifyHarqDeliveryFailure() override
Notify HARQ deliver failure.
void DoTransmitPdcpPdu(Ptr< Packet > p) override
RLC SAP.
Definition lte-rlc-tm.cc:64
uint32_t m_maxTxBufferSize
maximum transmit buffer size
Definition lte-rlc-tm.h:91
void DoDispose() override
Destructor implementation.
Definition lte-rlc-tm.cc:50
Smart pointer class similar to boost::intrusive_ptr.
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-tm.h:71
Ptr< Packet > m_pdu
PDU.
Definition lte-rlc-tm.h:85
TxPdu(const Ptr< Packet > &pdu, const Time &time)
TxPdu default constructor.
Definition lte-rlc-tm.h:77
Time m_waitingSince
Layer arrival time.
Definition lte-rlc-tm.h:86