A Discrete-Event Network Simulator
API
lte-pdcp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2012 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_H
21 #define LTE_PDCP_H
22 
23 #include "ns3/lte-pdcp-sap.h"
24 #include "ns3/lte-rlc-sap.h"
25 #include "ns3/object.h"
26 #include "ns3/trace-source-accessor.h"
27 #include "ns3/traced-value.h"
28 
29 namespace ns3
30 {
31 
35 class LtePdcp : public Object // SimpleRefCount<LtePdcp>
36 {
41 
42  public:
43  LtePdcp();
44  ~LtePdcp() override;
49  static TypeId GetTypeId();
50  void DoDispose() override;
51 
57  void SetRnti(uint16_t rnti);
58 
64  void SetLcId(uint8_t lcId);
65 
72 
79 
86 
93 
95  static const uint16_t MAX_PDCP_SN = 4096;
96 
100  struct Status
101  {
102  uint16_t txSn;
103  uint16_t rxSn;
104  };
105 
110  Status GetStatus() const;
111 
117  void SetStatus(Status s);
118 
127  typedef void (*PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size);
128 
138  typedef void (*PduRxTracedCallback)(const uint16_t rnti,
139  const uint8_t lcid,
140  const uint32_t size,
141  const uint64_t delay);
142 
143  protected:
150 
153 
159  virtual void DoReceivePdu(Ptr<Packet> p);
160 
163 
164  uint16_t m_rnti;
165  uint8_t m_lcid;
166 
177 
178  private:
187 
191  static const uint16_t m_maxPdcpSn = 4095;
192 };
193 
194 } // namespace ns3
195 
196 #endif // LTE_PDCP_H
LTE PDCP entity, see 3GPP TS 36.323.
Definition: lte-pdcp.h:36
uint16_t m_rxSequenceNumber
State variables.
Definition: lte-pdcp.h:186
void SetLtePdcpSapUser(LtePdcpSapUser *s)
Definition: lte-pdcp.cc:129
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:138
LteRlcSapUser * GetLteRlcSapUser()
Definition: lte-pdcp.cc:150
static const uint16_t MAX_PDCP_SN
maximum PDCP SN
Definition: lte-pdcp.h:95
LtePdcpSapUser * m_pdcpSapUser
PDCP SAP user.
Definition: lte-pdcp.h:151
LtePdcpSapProvider * GetLtePdcpSapProvider()
Definition: lte-pdcp.cc:136
virtual void DoReceivePdu(Ptr< Packet > p)
Interface provided to lower RLC entity.
Definition: lte-pdcp.cc:209
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
Definition: lte-pdcp.h:161
uint8_t m_lcid
LCID.
Definition: lte-pdcp.h:165
~LtePdcp() override
Definition: lte-pdcp.cc:84
uint16_t m_txSequenceNumber
State variables.
Definition: lte-pdcp.h:182
void SetStatus(Status s)
Set the status of the PDCP.
Definition: lte-pdcp.cc:166
virtual void DoTransmitPdcpSdu(LtePdcpSapProvider::TransmitPdcpSduParameters params)
Interface provided to upper RRC entity.
Definition: lte-pdcp.cc:175
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
Definition: lte-pdcp.h:162
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:176
static const uint16_t m_maxPdcpSn
Constants.
Definition: lte-pdcp.h:191
void SetRnti(uint16_t rnti)
Definition: lte-pdcp.cc:115
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:171
void(* PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size)
TracedCallback for PDU transmission event.
Definition: lte-pdcp.h:127
LtePdcpSapProvider * m_pdcpSapProvider
PDCP SAP provider.
Definition: lte-pdcp.h:152
Status GetStatus() const
Definition: lte-pdcp.cc:157
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Definition: lte-pdcp.cc:143
void DoDispose() override
Destructor implementation.
Definition: lte-pdcp.cc:107
void SetLcId(uint8_t lcId)
Definition: lte-pdcp.cc:122
uint16_t m_rnti
RNTI.
Definition: lte-pdcp.h:164
static TypeId GetTypeId()
Get the type ID.
Definition: lte-pdcp.cc:90
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
Definition: lte-pdcp-sap.h:36
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
Definition: lte-pdcp-sap.h:69
LtePdcpSpecificLtePdcpSapProvider class.
Definition: lte-pdcp-sap.h:94
LtePdcpSpecificLteRlcSapUser class.
Definition: lte-pdcp.cc:35
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
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
A base class which provides memory management and object aggregation.
Definition: object.h:89
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Status variables of the PDCP.
Definition: lte-pdcp.h:101
uint16_t rxSn
RX sequence number.
Definition: lte-pdcp.h:103
uint16_t txSn
TX sequence number.
Definition: lte-pdcp.h:102
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Definition: lte-pdcp-sap.h:44