A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
114 protected:
115  // Interface provided to upper RRC entity
116  virtual void DoTransmitPdcpSdu (Ptr<Packet> p);
117 
120 
121  // Interface provided to lower RLC entity
122  virtual void DoReceivePdu (Ptr<Packet> p);
123 
126 
127  uint16_t m_rnti;
128  uint8_t m_lcid;
129 
140 
141 private:
147 
151  static const uint16_t m_maxPdcpSn = 4095;
152 
153 };
154 
155 
156 } // namespace ns3
157 
158 #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:125
uint16_t m_rnti
Definition: lte-pdcp.h:127
virtual void DoReceivePdu(Ptr< Packet > p)
Definition: lte-pdcp.cc:201
LteRlcSapUser * GetLteRlcSapUser()
Definition: lte-pdcp.cc:144
void SetLtePdcpSapUser(LtePdcpSapUser *s)
Definition: lte-pdcp.cc:123
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:85
uint16_t txSn
TX sequence number.
Definition: lte-pdcp.h:97
LtePdcpSapProvider * m_pdcpSapProvider
Definition: lte-pdcp.h:119
Status variables of the PDCP.
Definition: lte-pdcp.h:95
uint16_t m_txSequenceNumber
State variables.
Definition: lte-pdcp.h:145
uint16_t m_rxSequenceNumber
Definition: lte-pdcp.h:146
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:160
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:134
Ptr< SampleEmitter > s
virtual ~LtePdcp()
Definition: lte-pdcp.cc:79
LtePdcpSapProvider * GetLtePdcpSapProvider()
Definition: lte-pdcp.cc:130
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Definition: lte-pdcp.cc:137
uint16_t rxSn
RX sequence number.
Definition: lte-pdcp.h:98
virtual void DoTransmitPdcpSdu(Ptr< Packet > p)
Definition: lte-pdcp.cc:169
void SetLcId(uint8_t lcId)
Definition: lte-pdcp.cc:116
void SetRnti(uint16_t rnti)
Definition: lte-pdcp.cc:109
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: lte-pdcp.cc:100
LteRlcSapUser * m_rlcSapUser
Definition: lte-pdcp.h:124
LTE PDCP entity, see 3GPP TS 36.323.
Definition: lte-pdcp.h:37
uint8_t m_lcid
Definition: lte-pdcp.h:128
Status GetStatus()
Definition: lte-pdcp.cc:151
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:139
LtePdcpSapUser * m_pdcpSapUser
Definition: lte-pdcp.h:118
static const uint16_t m_maxPdcpSn
Constants.
Definition: lte-pdcp.h:151
a base class which provides memory management and object aggregation
Definition: object.h:64
a unique identifier for an interface.
Definition: type-id.h:49