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 {
41 public:
42  LtePdcp ();
43  virtual ~LtePdcp ();
44  static TypeId GetTypeId (void);
45  virtual void DoDispose ();
46 
52  void SetRnti (uint16_t rnti);
53 
59  void SetLcId (uint8_t lcId);
60 
67 
74 
81 
88 
89  static const uint16_t MAX_PDCP_SN = 4096;
90 
95  struct Status
96  {
97  uint16_t txSn;
98  uint16_t rxSn;
99  };
100 
105  Status GetStatus ();
106 
112  void SetStatus (Status s);
113 
122  typedef void (* PduTxTracedCallback)
123  (uint16_t rnti, uint8_t lcid, uint32_t size);
124 
134  typedef void (* PduRxTracedCallback)
135  (const uint16_t rnti, const uint8_t lcid,
136  const uint32_t size, const uint64_t delay);
137 
138 protected:
139  // Interface provided to upper RRC entity
140  virtual void DoTransmitPdcpSdu (Ptr<Packet> p);
141 
144 
145  // Interface provided to lower RLC entity
146  virtual void DoReceivePdu (Ptr<Packet> p);
147 
150 
151  uint16_t m_rnti;
152  uint8_t m_lcid;
153 
164 
165 private:
171 
175  static const uint16_t m_maxPdcpSn = 4095;
176 
177 };
178 
179 
180 } // namespace ns3
181 
182 #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:66
LteRlcSapProvider * m_rlcSapProvider
Definition: lte-pdcp.h:149
uint16_t m_rnti
Definition: lte-pdcp.h:151
virtual void DoReceivePdu(Ptr< Packet > p)
Definition: lte-pdcp.cc:203
LteRlcSapUser * GetLteRlcSapUser()
Definition: lte-pdcp.cc:146
void SetLtePdcpSapUser(LtePdcpSapUser *s)
Definition: lte-pdcp.cc:125
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)
Definition: lte-pdcp.cc:84
uint16_t txSn
TX sequence number.
Definition: lte-pdcp.h:97
LtePdcpSapProvider * m_pdcpSapProvider
Definition: lte-pdcp.h:143
Status variables of the PDCP.
Definition: lte-pdcp.h:95
void(* PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size)
TracedCallback for PDU transmission event.
Definition: lte-pdcp.h:123
uint16_t m_txSequenceNumber
State variables.
Definition: lte-pdcp.h:169
uint16_t m_rxSequenceNumber
Definition: lte-pdcp.h:170
static const uint16_t MAX_PDCP_SN
Definition: lte-pdcp.h:89
void SetStatus(Status s)
Set the status of the PDCP.
Definition: lte-pdcp.cc:162
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:158
virtual ~LtePdcp()
Definition: lte-pdcp.cc:78
LtePdcpSapProvider * GetLtePdcpSapProvider()
Definition: lte-pdcp.cc:132
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:135
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Definition: lte-pdcp.cc:139
uint16_t rxSn
RX sequence number.
Definition: lte-pdcp.h:98
virtual void DoTransmitPdcpSdu(Ptr< Packet > p)
Definition: lte-pdcp.cc:171
void SetLcId(uint8_t lcId)
Definition: lte-pdcp.cc:118
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetRnti(uint16_t rnti)
Definition: lte-pdcp.cc:111
virtual void DoDispose()
Destructor implementation.
Definition: lte-pdcp.cc:102
LteRlcSapUser * m_rlcSapUser
Definition: lte-pdcp.h:148
LTE PDCP entity, see 3GPP TS 36.323.
Definition: lte-pdcp.h:37
uint8_t m_lcid
Definition: lte-pdcp.h:152
Status GetStatus()
Definition: lte-pdcp.cc:153
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:68
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:163
LtePdcpSapUser * m_pdcpSapUser
Definition: lte-pdcp.h:142
static const uint16_t m_maxPdcpSn
Constants.
Definition: lte-pdcp.h:175
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