A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
lte-rlc-sap.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 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
*/
19
20
#ifndef LTE_RLC_SAP_H
21
#define LTE_RLC_SAP_H
22
23
#include "ns3/packet.h"
24
25
namespace
ns3
26
{
27
28
/**
29
* Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity
30
* See 3GPP 36.322 Radio Link Control (RLC) protocol specification
31
*
32
* This is the RLC SAP Provider
33
* (i.e. the part of the SAP that contains the RLC methods called by the PDCP)
34
*/
35
class
LteRlcSapProvider
36
{
37
public
:
38
virtual
~LteRlcSapProvider
();
39
40
/**
41
* Parameters for LteRlcSapProvider::TransmitPdcpPdu
42
*/
43
struct
TransmitPdcpPduParameters
44
{
45
Ptr<Packet>
pdcpPdu
;
/**< the PDCP PDU */
46
uint16_t
rnti
;
/**< the C-RNTI identifying the UE */
47
uint8_t
lcid
;
/**< the logical channel id corresponding to the sending RLC instance */
48
};
49
50
/**
51
* Send a PDCP PDU to the RLC for transmission
52
* This method is to be called
53
* when upper PDCP entity has a PDCP PDU ready to send
54
* \param params the TransmitPdcpPduParameters
55
*/
56
virtual
void
TransmitPdcpPdu
(
TransmitPdcpPduParameters
params) = 0;
57
};
58
59
/**
60
* Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity
61
* See 3GPP 36.322 Radio Link Control (RLC) protocol specification
62
*
63
* This is the RLC SAP User
64
* (i.e. the part of the SAP that contains the PDCP methods called by the RLC)
65
*/
66
class
LteRlcSapUser
67
{
68
public
:
69
virtual
~LteRlcSapUser
();
70
71
/**
72
* Called by the RLC entity to notify the PDCP entity of the reception of a new PDCP PDU
73
*
74
* \param p the PDCP PDU
75
*/
76
virtual
void
ReceivePdcpPdu
(
Ptr<Packet>
p) = 0;
77
};
78
79
/// LteRlcSpecificLteRlcSapProvider
80
template
<
class
C>
81
class
LteRlcSpecificLteRlcSapProvider
:
public
LteRlcSapProvider
82
{
83
public
:
84
/**
85
* Constructor
86
*
87
* \param rlc the RLC
88
*/
89
LteRlcSpecificLteRlcSapProvider
(C* rlc);
90
91
// Delete default constructor to avoid misuse
92
LteRlcSpecificLteRlcSapProvider
() =
delete
;
93
94
/**
95
* Interface implemented from LteRlcSapProvider
96
* \param params the TransmitPdcpPduParameters
97
*/
98
void
TransmitPdcpPdu
(
TransmitPdcpPduParameters
params)
override
;
99
100
private
:
101
C*
m_rlc
;
///< the RLC
102
};
103
104
template
<
class
C>
105
LteRlcSpecificLteRlcSapProvider<C>::LteRlcSpecificLteRlcSapProvider
(C* rlc)
106
: m_rlc(rlc)
107
{
108
}
109
110
template
<
class
C>
111
void
112
LteRlcSpecificLteRlcSapProvider<C>::TransmitPdcpPdu
(
TransmitPdcpPduParameters
params)
113
{
114
m_rlc->DoTransmitPdcpPdu(params.pdcpPdu);
115
}
116
117
/// LteRlcSpecificLteRlcSapUser class
118
template
<
class
C>
119
class
LteRlcSpecificLteRlcSapUser
:
public
LteRlcSapUser
120
{
121
public
:
122
/**
123
* Constructor
124
*
125
* \param pdcp the PDCP
126
*/
127
LteRlcSpecificLteRlcSapUser
(C* pdcp);
128
129
// Delete default constructor to avoid misuse
130
LteRlcSpecificLteRlcSapUser
() =
delete
;
131
132
// Interface implemented from LteRlcSapUser
133
void
ReceivePdcpPdu
(
Ptr<Packet>
p)
override
;
134
135
private
:
136
C*
m_pdcp
;
///< the PDCP
137
};
138
139
template
<
class
C>
140
LteRlcSpecificLteRlcSapUser<C>::LteRlcSpecificLteRlcSapUser
(C* pdcp)
141
: m_pdcp(pdcp)
142
{
143
}
144
145
template
<
class
C>
146
void
147
LteRlcSpecificLteRlcSapUser<C>::ReceivePdcpPdu
(
Ptr<Packet>
p)
148
{
149
m_pdcp->DoReceivePdcpPdu(p);
150
}
151
152
}
// namespace ns3
153
154
#endif
// LTE_RLC_SAP_H
ns3::LteRlcSapProvider
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
Definition:
lte-rlc-sap.h:36
ns3::LteRlcSapProvider::~LteRlcSapProvider
virtual ~LteRlcSapProvider()
Definition:
lte-rlc-sap.cc:25
ns3::LteRlcSapProvider::TransmitPdcpPdu
virtual void TransmitPdcpPdu(TransmitPdcpPduParameters params)=0
Send a PDCP PDU to the RLC for transmission This method is to be called when upper PDCP entity has a ...
ns3::LteRlcSapUser
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
Definition:
lte-rlc-sap.h:67
ns3::LteRlcSapUser::~LteRlcSapUser
virtual ~LteRlcSapUser()
Definition:
lte-rlc-sap.cc:29
ns3::LteRlcSapUser::ReceivePdcpPdu
virtual void ReceivePdcpPdu(Ptr< Packet > p)=0
Called by the RLC entity to notify the PDCP entity of the reception of a new PDCP PDU.
ns3::LteRlcSpecificLteRlcSapProvider
LteRlcSpecificLteRlcSapProvider.
Definition:
lte-rlc-sap.h:82
ns3::LteRlcSpecificLteRlcSapProvider::LteRlcSpecificLteRlcSapProvider
LteRlcSpecificLteRlcSapProvider()=delete
ns3::LteRlcSpecificLteRlcSapProvider::TransmitPdcpPdu
void TransmitPdcpPdu(TransmitPdcpPduParameters params) override
Interface implemented from LteRlcSapProvider.
Definition:
lte-rlc-sap.h:112
ns3::LteRlcSpecificLteRlcSapProvider::m_rlc
C * m_rlc
the RLC
Definition:
lte-rlc-sap.h:101
ns3::LteRlcSpecificLteRlcSapUser
LteRlcSpecificLteRlcSapUser class.
Definition:
lte-rlc-sap.h:120
ns3::LteRlcSpecificLteRlcSapUser::m_pdcp
C * m_pdcp
the PDCP
Definition:
lte-rlc-sap.h:136
ns3::LteRlcSpecificLteRlcSapUser::ReceivePdcpPdu
void ReceivePdcpPdu(Ptr< Packet > p) override
Called by the RLC entity to notify the PDCP entity of the reception of a new PDCP PDU.
Definition:
lte-rlc-sap.h:147
ns3::LteRlcSpecificLteRlcSapUser::LteRlcSpecificLteRlcSapUser
LteRlcSpecificLteRlcSapUser()=delete
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteRlcSapProvider::TransmitPdcpPduParameters
Parameters for LteRlcSapProvider::TransmitPdcpPdu.
Definition:
lte-rlc-sap.h:44
ns3::LteRlcSapProvider::TransmitPdcpPduParameters::lcid
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition:
lte-rlc-sap.h:47
ns3::LteRlcSapProvider::TransmitPdcpPduParameters::pdcpPdu
Ptr< Packet > pdcpPdu
the PDCP PDU
Definition:
lte-rlc-sap.h:45
ns3::LteRlcSapProvider::TransmitPdcpPduParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition:
lte-rlc-sap.h:46
src
lte
model
lte-rlc-sap.h
Generated on Tue May 28 2024 23:37:27 for ns-3 by
1.9.6