A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-pdcp-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_PDCP_SAP_H
21#define LTE_PDCP_SAP_H
22
23#include "ns3/packet.h"
24
25namespace ns3
26{
27
28/**
29 * Service Access Point (SAP) offered by the PDCP entity to the RRC entity
30 * See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification
31 *
32 * This is the PDCP SAP Provider
33 * (i.e. the part of the SAP that contains the PDCP methods called by the RRC)
34 */
36{
37 public:
38 virtual ~LtePdcpSapProvider();
39
40 /**
41 * Parameters for LtePdcpSapProvider::TransmitPdcpSdu
42 */
44 {
45 Ptr<Packet> pdcpSdu; /**< the RRC 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 RRC PDU parameters to the PDCP for transmission
52 *
53 * This method is to be called when upper RRC entity has a
54 * RRC PDU ready to send
55 *
56 * \param params Parameters
57 */
59};
60
61/**
62 * Service Access Point (SAP) offered by the PDCP entity to the RRC entity
63 * See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification
64 *
65 * This is the PDCP SAP User
66 * (i.e. the part of the SAP that contains the RRC methods called by the PDCP)
67 */
69{
70 public:
71 virtual ~LtePdcpSapUser();
72
73 /**
74 * Parameters for LtePdcpSapUser::ReceivePdcpSdu
75 */
77 {
78 Ptr<Packet> pdcpSdu; /**< the RRC PDU */
79 uint16_t rnti; /**< the C-RNTI identifying the UE */
80 uint8_t lcid; /**< the logical channel id corresponding to the sending RLC instance */
81 };
82
83 /**
84 * Called by the PDCP entity to notify the RRC entity of the reception of a new RRC PDU
85 *
86 * \param params Parameters
87 */
88 virtual void ReceivePdcpSdu(ReceivePdcpSduParameters params) = 0;
89};
90
91/// LtePdcpSpecificLtePdcpSapProvider class
92template <class C>
94{
95 public:
96 /**
97 * Constructor
98 *
99 * \param pdcp PDCP
100 */
102
103 // Delete default constructor to avoid misuse
105
106 // Interface implemented from LtePdcpSapProvider
107 void TransmitPdcpSdu(TransmitPdcpSduParameters params) override;
108
109 private:
110 C* m_pdcp; ///< the PDCP
111};
112
113template <class C>
115 : m_pdcp(pdcp)
116{
117}
118
119template <class C>
120void
122{
123 m_pdcp->DoTransmitPdcpSdu(params);
124}
125
126/// LtePdcpSpecificLtePdcpSapUser class
127template <class C>
129{
130 public:
131 /**
132 * Constructor
133 *
134 * \param rrc RRC
135 */
137
138 // Delete default constructor to avoid misuse
140
141 // Interface implemented from LtePdcpSapUser
142 void ReceivePdcpSdu(ReceivePdcpSduParameters params) override;
143
144 private:
145 C* m_rrc; ///< RRC
146};
147
148template <class C>
150 : m_rrc(rrc)
151{
152}
153
154template <class C>
155void
157{
158 m_rrc->DoReceivePdcpSdu(params);
159}
160
161} // namespace ns3
162
163#endif // LTE_PDCP_SAP_H
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
Definition: lte-pdcp-sap.h:36
virtual void TransmitPdcpSdu(TransmitPdcpSduParameters params)=0
Send RRC PDU parameters to the PDCP for transmission.
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
Definition: lte-pdcp-sap.h:69
virtual void ReceivePdcpSdu(ReceivePdcpSduParameters params)=0
Called by the PDCP entity to notify the RRC entity of the reception of a new RRC PDU.
virtual ~LtePdcpSapUser()
Definition: lte-pdcp-sap.cc:29
LtePdcpSpecificLtePdcpSapProvider class.
Definition: lte-pdcp-sap.h:94
void TransmitPdcpSdu(TransmitPdcpSduParameters params) override
Send RRC PDU parameters to the PDCP for transmission.
Definition: lte-pdcp-sap.h:121
LtePdcpSpecificLtePdcpSapUser class.
Definition: lte-pdcp-sap.h:129
void ReceivePdcpSdu(ReceivePdcpSduParameters params) override
Called by the PDCP entity to notify the RRC entity of the reception of a new RRC PDU.
Definition: lte-pdcp-sap.h:156
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Definition: lte-pdcp-sap.h:44
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-pdcp-sap.h:47
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:46
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Definition: lte-pdcp-sap.h:77
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-pdcp-sap.h:80
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:79