author | Robert Ammon <ammo6818@vandals.uidaho.edu> |
Fri, 02 Jun 2017 14:45:29 +0200 | |
changeset 12904 | e949b994faad |
parent 12753 | 3fbb703f257f |
child 13042 | f010860857bd |
permissions | -rw-r--r-- |
8349 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2011 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_RLC_SAP_H |
|
22 |
#define LTE_RLC_SAP_H |
|
23 |
||
24 |
#include "ns3/packet.h" |
|
25 |
||
26 |
namespace ns3 { |
|
27 |
||
28 |
/** |
|
29 |
* Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity |
|
30 |
* See 3GPP 36.322 Radio Link Control (RLC) protocol specification |
|
31 |
* |
|
32 |
* This is the RLC SAP Provider |
|
33 |
* (i.e. the part of the SAP that contains the RLC methods called by the PDCP) |
|
34 |
*/ |
|
35 |
class LteRlcSapProvider |
|
36 |
{ |
|
37 |
public: |
|
38 |
virtual ~LteRlcSapProvider (); |
|
39 |
||
40 |
/** |
|
41 |
* Parameters for LteRlcSapProvider::TransmitPdcpPdu |
|
42 |
*/ |
|
43 |
struct TransmitPdcpPduParameters |
|
44 |
{ |
|
45 |
Ptr<Packet> pdcpPdu; /**< the PDCP 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 a PDCP PDU to the RLC for transmission |
|
52 |
* This method is to be called |
|
53 |
* when upper PDCP entity has a PDCP PDU ready to send |
|
12904
e949b994faad
lte: Additional doxygen corrections (patch set 5)
Robert Ammon <ammo6818@vandals.uidaho.edu>
parents:
12753
diff
changeset
|
54 |
* \param params the TransmitPdcpPduParameters |
8349 | 55 |
*/ |
56 |
virtual void TransmitPdcpPdu (TransmitPdcpPduParameters params) = 0; |
|
57 |
}; |
|
58 |
||
59 |
||
60 |
/** |
|
61 |
* Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity |
|
62 |
* See 3GPP 36.322 Radio Link Control (RLC) protocol specification |
|
63 |
* |
|
64 |
* This is the RLC SAP User |
|
65 |
* (i.e. the part of the SAP that contains the PDCP methos called by the RLC) |
|
66 |
*/ |
|
67 |
class LteRlcSapUser |
|
68 |
{ |
|
69 |
public: |
|
70 |
virtual ~LteRlcSapUser (); |
|
71 |
||
72 |
/** |
|
73 |
* Called by the RLC entity to notify the PDCP entity of the reception of a new PDCP PDU |
|
74 |
* |
|
75 |
* \param p the PDCP PDU |
|
76 |
*/ |
|
77 |
virtual void ReceivePdcpPdu (Ptr<Packet> p) = 0; |
|
78 |
}; |
|
79 |
||
80 |
||
12753
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
81 |
/// LteRlcSpecificLteRlcSapProvider |
8349 | 82 |
template <class C> |
83 |
class LteRlcSpecificLteRlcSapProvider : public LteRlcSapProvider |
|
84 |
{ |
|
85 |
public: |
|
12753
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
86 |
/** |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
87 |
* Constructor |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
88 |
* |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
89 |
* \param rlc the RLC |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
90 |
*/ |
8349 | 91 |
LteRlcSpecificLteRlcSapProvider (C* rlc); |
92 |
||
12904
e949b994faad
lte: Additional doxygen corrections (patch set 5)
Robert Ammon <ammo6818@vandals.uidaho.edu>
parents:
12753
diff
changeset
|
93 |
/** |
e949b994faad
lte: Additional doxygen corrections (patch set 5)
Robert Ammon <ammo6818@vandals.uidaho.edu>
parents:
12753
diff
changeset
|
94 |
* Interface implemented from LteRlcSapProvider |
e949b994faad
lte: Additional doxygen corrections (patch set 5)
Robert Ammon <ammo6818@vandals.uidaho.edu>
parents:
12753
diff
changeset
|
95 |
* \param params the TransmitPdcpPduParameters |
e949b994faad
lte: Additional doxygen corrections (patch set 5)
Robert Ammon <ammo6818@vandals.uidaho.edu>
parents:
12753
diff
changeset
|
96 |
*/ |
8349 | 97 |
virtual void TransmitPdcpPdu (TransmitPdcpPduParameters params); |
98 |
||
99 |
private: |
|
100 |
LteRlcSpecificLteRlcSapProvider (); |
|
12753
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
101 |
C* m_rlc; ///< the RLC |
8349 | 102 |
}; |
103 |
||
104 |
template <class C> |
|
105 |
LteRlcSpecificLteRlcSapProvider<C>::LteRlcSpecificLteRlcSapProvider (C* rlc) |
|
106 |
: m_rlc (rlc) |
|
107 |
{ |
|
108 |
} |
|
109 |
||
110 |
template <class C> |
|
111 |
LteRlcSpecificLteRlcSapProvider<C>::LteRlcSpecificLteRlcSapProvider () |
|
112 |
{ |
|
113 |
} |
|
114 |
||
115 |
template <class C> |
|
116 |
void LteRlcSpecificLteRlcSapProvider<C>::TransmitPdcpPdu (TransmitPdcpPduParameters params) |
|
117 |
{ |
|
118 |
m_rlc->DoTransmitPdcpPdu (params.pdcpPdu); |
|
119 |
} |
|
120 |
||
121 |
||
12753
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
122 |
/// LteRlcSpecificLteRlcSapUser class |
8349 | 123 |
template <class C> |
124 |
class LteRlcSpecificLteRlcSapUser : public LteRlcSapUser |
|
125 |
{ |
|
126 |
public: |
|
12753
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
127 |
/** |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
128 |
* Constructor |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
129 |
* |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
130 |
* \param pdcp the PDCP |
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
131 |
*/ |
8349 | 132 |
LteRlcSpecificLteRlcSapUser (C* pdcp); |
133 |
||
134 |
// Interface implemented from LteRlcSapUser |
|
135 |
virtual void ReceivePdcpPdu (Ptr<Packet> p); |
|
136 |
||
137 |
private: |
|
138 |
LteRlcSpecificLteRlcSapUser (); |
|
12753
3fbb703f257f
lte: doxygen updates of model (many thanks to Robert Ammon for initial patch)
Biljana Bojovic <biljana.bojovic@gmail.com>
parents:
8349
diff
changeset
|
139 |
C* m_pdcp; ///< the PDCP |
8349 | 140 |
}; |
141 |
||
142 |
template <class C> |
|
143 |
LteRlcSpecificLteRlcSapUser<C>::LteRlcSpecificLteRlcSapUser (C* pdcp) |
|
144 |
: m_pdcp (pdcp) |
|
145 |
{ |
|
146 |
} |
|
147 |
||
148 |
template <class C> |
|
149 |
LteRlcSpecificLteRlcSapUser<C>::LteRlcSpecificLteRlcSapUser () |
|
150 |
{ |
|
151 |
} |
|
152 |
||
153 |
template <class C> |
|
154 |
void LteRlcSpecificLteRlcSapUser<C>::ReceivePdcpPdu (Ptr<Packet> p) |
|
155 |
{ |
|
156 |
m_pdcp->DoReceivePdcpPdu (p); |
|
157 |
} |
|
158 |
||
159 |
||
160 |
} // namespace ns3 |
|
161 |
||
162 |
#endif // LTE_RLC_SAP_H |