A Discrete-Event Network Simulator
API
lte-pdcp.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011-2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Manuel Requena <manuel.requena@cttc.es>
19  */
20 
21 #ifndef LTE_PDCP_H
22 #define LTE_PDCP_H
23 
24 #include "ns3/traced-value.h"
25 #include "ns3/trace-source-accessor.h"
26 
27 #include "ns3/object.h"
28 
29 #include "ns3/lte-pdcp-sap.h"
30 #include "ns3/lte-rlc-sap.h"
31 
32 namespace ns3 {
33 
37 class LtePdcp : public Object // SimpleRefCount<LtePdcp>
38 {
43 public:
44  LtePdcp ();
45  virtual ~LtePdcp ();
50  static TypeId GetTypeId (void);
51  virtual void DoDispose ();
52 
58  void SetRnti (uint16_t rnti);
59 
65  void SetLcId (uint8_t lcId);
66 
73 
80 
87 
94 
96  static const uint16_t MAX_PDCP_SN = 4096;
97 
101  struct Status
102  {
103  uint16_t txSn;
104  uint16_t rxSn;
105  };
106 
111  Status GetStatus ();
112 
118  void SetStatus (Status s);
119 
128  typedef void (* PduTxTracedCallback)
129  (uint16_t rnti, uint8_t lcid, uint32_t size);
130 
140  typedef void (* PduRxTracedCallback)
141  (const uint16_t rnti, const uint8_t lcid,
142  const uint32_t size, const uint64_t delay);
143 
144 protected:
151 
154 
160  virtual void DoReceivePdu (Ptr<Packet> p);
161 
164 
165  uint16_t m_rnti;
166  uint8_t m_lcid;
167 
178 
179 private:
188 
192  static const uint16_t m_maxPdcpSn = 4095;
193 
194 };
195 
196 
197 } // namespace ns3
198 
199 #endif // LTE_PDCP_H
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
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
Definition: lte-pdcp.h:163
uint16_t m_rnti
RNTI.
Definition: lte-pdcp.h:165
virtual void DoReceivePdu(Ptr< Packet > p)
Interface provided to lower RLC entity.
Definition: lte-pdcp.cc:211
LteRlcSapUser * GetLteRlcSapUser()
Definition: lte-pdcp.cc:152
void SetLtePdcpSapUser(LtePdcpSapUser *s)
Definition: lte-pdcp.cc:131
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:35
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-pdcp.cc:90
uint16_t txSn
TX sequence number.
Definition: lte-pdcp.h:103
LtePdcpSapProvider * m_pdcpSapProvider
PDCP SAP provider.
Definition: lte-pdcp.h:153
Status variables of the PDCP.
Definition: lte-pdcp.h:101
void(* PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size)
TracedCallback for PDU transmission event.
Definition: lte-pdcp.h:129
uint16_t m_txSequenceNumber
State variables.
Definition: lte-pdcp.h:183
virtual void DoTransmitPdcpSdu(LtePdcpSapProvider::TransmitPdcpSduParameters params)
Interface provided to upper RRC entity.
Definition: lte-pdcp.cc:177
uint16_t m_rxSequenceNumber
State variables.
Definition: lte-pdcp.h:187
static const uint16_t MAX_PDCP_SN
maximum PDCP SN
Definition: lte-pdcp.h:96
void SetStatus(Status s)
Set the status of the PDCP.
Definition: lte-pdcp.cc:168
TracedCallback< uint16_t, uint8_t, uint32_t > m_txPdu
Used to inform of a PDU delivery to the RLC SAP provider.
Definition: lte-pdcp.h:172
virtual ~LtePdcp()
Definition: lte-pdcp.cc:84
LtePdcpSapProvider * GetLtePdcpSapProvider()
Definition: lte-pdcp.cc:138
void(* PduRxTracedCallback)(const uint16_t rnti, const uint8_t lcid, const uint32_t size, const uint64_t delay)
TracedCallback signature for PDU receive event.
Definition: lte-pdcp.h:141
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Definition: lte-pdcp-sap.h:43
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Definition: lte-pdcp.cc:145
uint16_t rxSn
RX sequence number.
Definition: lte-pdcp.h:104
void SetLcId(uint8_t lcId)
Definition: lte-pdcp.cc:124
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetRnti(uint16_t rnti)
Definition: lte-pdcp.cc:117
virtual void DoDispose()
Destructor implementation.
Definition: lte-pdcp.cc:108
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
Definition: lte-pdcp.h:162
LTE PDCP entity, see 3GPP TS 36.323.
Definition: lte-pdcp.h:37
uint8_t m_lcid
LCID.
Definition: lte-pdcp.h:166
Status GetStatus()
Definition: lte-pdcp.cc:159
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
Definition: lte-pdcp-sap.h:35
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
Definition: lte-pdcp-sap.h:69
LtePdcpSpecificLteRlcSapUser class.
Definition: lte-pdcp.cc:34
TracedCallback< uint16_t, uint8_t, uint32_t, uint64_t > m_rxPdu
Used to inform of a PDU reception from the RLC SAP user.
Definition: lte-pdcp.h:177
LtePdcpSapUser * m_pdcpSapUser
PDCP SAP user.
Definition: lte-pdcp.h:152
static const uint16_t m_maxPdcpSn
Constants.
Definition: lte-pdcp.h:192
A base class which provides memory management and object aggregation.
Definition: object.h:87
a unique identifier for an interface.
Definition: type-id.h:58
LtePdcpSpecificLtePdcpSapProvider class.
Definition: lte-pdcp-sap.h:95