A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-enb-cmac-sap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 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: Nicola Baldo <nbaldo@cttc.es>
18 * Marco Miozzo <mmiozzo@cttc.es>
19 */
20
21#ifndef LTE_ENB_CMAC_SAP_H
22#define LTE_ENB_CMAC_SAP_H
23
24#include <ns3/packet.h>
25
26namespace ns3
27{
28
29class LteMacSapUser;
30
31/**
32 * Service Access Point (SAP) offered by the eNB MAC to the eNB RRC
33 * See Femto Forum MAC Scheduler Interface Specification v 1.11, Figure 1
34 *
35 * This is the MAC SAP Provider, i.e., the part of the SAP that contains the MAC methods called by
36 * the RRC
37 */
39{
40 public:
41 virtual ~LteEnbCmacSapProvider();
42 /**
43 *
44 *
45 * @param ulBandwidth
46 * @param dlBandwidth
47 */
48 virtual void ConfigureMac(uint16_t ulBandwidth, uint16_t dlBandwidth) = 0;
49
50 /**
51 * Add UE function
52 *
53 * \param rnti
54 */
55 virtual void AddUe(uint16_t rnti) = 0;
56
57 /**
58 * remove the UE, e.g., after handover or termination of the RRC connection
59 *
60 * \param rnti
61 */
62 virtual void RemoveUe(uint16_t rnti) = 0;
63
64 /**
65 * Logical Channel information to be passed to CmacSapProvider::ConfigureLc
66 *
67 */
68 struct LcInfo
69 {
70 uint16_t rnti; /**< C-RNTI identifying the UE */
71 uint8_t lcId; /**< logical channel identifier */
72 uint8_t lcGroup; /**< logical channel group */
73 uint8_t qci; /**< QoS Class Identifier */
74 uint8_t resourceType; /**< 0 if the bearer is NON-GBR, 1 if the bearer
75 is GBR, 2 if the bearer in DC-GBR */
76 uint64_t mbrUl; /**< maximum bitrate in uplink */
77 uint64_t mbrDl; /**< maximum bitrate in downlink */
78 uint64_t gbrUl; /**< guaranteed bitrate in uplink */
79 uint64_t gbrDl; /**< guaranteed bitrate in downlink */
80 };
81
82 /**
83 * Add a new logical channel
84 *
85 * \param lcinfo
86 * \param msu
87 */
88 virtual void AddLc(LcInfo lcinfo, LteMacSapUser* msu) = 0;
89
90 /**
91 * Reconfigure an existing logical channel
92 *
93 * \param lcinfo
94 */
95 virtual void ReconfigureLc(LcInfo lcinfo) = 0;
96
97 /**
98 * release an existing logical channel
99 *
100 * \param rnti
101 * \param lcid
102 */
103 virtual void ReleaseLc(uint16_t rnti, uint8_t lcid) = 0;
104
105 /**
106 * \brief Parameters for [re]configuring the UE
107 */
108 struct UeConfig
109 {
110 /**
111 * UE id within this cell
112 */
113 uint16_t m_rnti;
114 /**
115 * Transmission mode [1..7] (i.e., SISO, MIMO, etc.)
116 */
118 };
119
120 /**
121 * update the configuration of the UE
122 *
123 * \param params
124 */
125 virtual void UeUpdateConfigurationReq(UeConfig params) = 0;
126
127 /**
128 * struct defining the RACH configuration of the MAC
129 *
130 */
132 {
133 uint8_t numberOfRaPreambles; ///< number of RA preambles
134 uint8_t preambleTransMax; ///< preamble transmit maximum
135 uint8_t raResponseWindowSize; ///< RA response window size
136 uint8_t connEstFailCount; ///< the counter value for T300 timer expiration
137 };
138
139 /**
140 *
141 * \return the current RACH configuration of the MAC
142 */
144
145 /**
146 * \brief AllocateNcRaPreambleReturnValue structure
147 *
148 */
150 {
151 bool valid; ///< true if a valid RA config was allocated, false otherwise
152 uint8_t raPreambleId; ///< random access preamble id
153 uint8_t raPrachMaskIndex; ///< PRACH mask index
154 };
155
156 /**
157 * Allocate a random access preamble for non-contention based random access (e.g., for
158 * handover).
159 *
160 * \param rnti the RNTI of the UE who will perform non-contention based random access
161 *
162 * \return the newly allocated random access preamble
163 */
165};
166
167/**
168 * Service Access Point (SAP) offered by the MAC to the RRC
169 * See Femto Forum MAC Scheduler Interface Specification v 1.11, Figure 1
170 *
171 * This is the MAC SAP User, i.e., the part of the SAP that contains the RRC methods called by the
172 * MAC
173 */
175{
176 public:
177 virtual ~LteEnbCmacSapUser();
178
179 /**
180 * request the allocation of a Temporary C-RNTI
181 *
182 * \return the T-C-RNTI
183 */
184 virtual uint16_t AllocateTemporaryCellRnti() = 0;
185
186 /**
187 * notify the result of the last LC config operation
188 *
189 * \param rnti the rnti of the user
190 * \param lcid the logical channel id
191 * \param success true if the operation was successful, false otherwise
192 */
193 virtual void NotifyLcConfigResult(uint16_t rnti, uint8_t lcid, bool success) = 0;
194
195 /**
196 * \brief Parameters for [re]configuring the UE
197 */
198 struct UeConfig
199 {
200 /**
201 * UE id within this cell
202 */
203 uint16_t m_rnti;
204 /**
205 * Transmission mode [1..7] (i.e., SISO, MIMO, etc.)
206 */
208 };
209
210 /**
211 * Notify the RRC of a UE config updated requested by the MAC (normally, by the scheduler)
212 *
213 * \param params
214 */
215 virtual void RrcConfigurationUpdateInd(UeConfig params) = 0;
216
217 /**
218 * \brief Is random access completed function
219 *
220 * This method is executed to decide if the non contention based
221 * preamble has to be reused or not upon preamble expiry. If the random access
222 * in connected mode is completed, then the preamble can be reused by other UEs.
223 * If not, the same UE retains the preamble and other available preambles are
224 * assigned to the required UEs.
225 *
226 * \param rnti the C-RNTI identifying the user
227 * \return true if the random access in connected mode is completed
228 */
229 virtual bool IsRandomAccessCompleted(uint16_t rnti) = 0;
230};
231
232} // namespace ns3
233
234#endif // MAC_SAP_H
Service Access Point (SAP) offered by the eNB MAC to the eNB RRC See Femto Forum MAC Scheduler Interf...
virtual RachConfig GetRachConfig()=0
virtual void ReleaseLc(uint16_t rnti, uint8_t lcid)=0
release an existing logical channel
virtual void AddLc(LcInfo lcinfo, LteMacSapUser *msu)=0
Add a new logical channel.
virtual void UeUpdateConfigurationReq(UeConfig params)=0
update the configuration of the UE
virtual void AddUe(uint16_t rnti)=0
Add UE function.
virtual AllocateNcRaPreambleReturnValue AllocateNcRaPreamble(uint16_t rnti)=0
Allocate a random access preamble for non-contention based random access (e.g., for handover).
virtual void RemoveUe(uint16_t rnti)=0
remove the UE, e.g., after handover or termination of the RRC connection
virtual void ReconfigureLc(LcInfo lcinfo)=0
Reconfigure an existing logical channel.
virtual void ConfigureMac(uint16_t ulBandwidth, uint16_t dlBandwidth)=0
Service Access Point (SAP) offered by the MAC to the RRC See Femto Forum MAC Scheduler Interface Spec...
virtual bool IsRandomAccessCompleted(uint16_t rnti)=0
Is random access completed function.
virtual void RrcConfigurationUpdateInd(UeConfig params)=0
Notify the RRC of a UE config updated requested by the MAC (normally, by the scheduler)
virtual void NotifyLcConfigResult(uint16_t rnti, uint8_t lcid, bool success)=0
notify the result of the last LC config operation
virtual uint16_t AllocateTemporaryCellRnti()=0
request the allocation of a Temporary C-RNTI
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:96
Every class exported by the ns3 library is enclosed in the ns3 namespace.
AllocateNcRaPreambleReturnValue structure.
bool valid
true if a valid RA config was allocated, false otherwise
Logical Channel information to be passed to CmacSapProvider::ConfigureLc.
uint64_t gbrUl
guaranteed bitrate in uplink
uint8_t qci
QoS Class Identifier.
uint64_t mbrDl
maximum bitrate in downlink
uint64_t mbrUl
maximum bitrate in uplink
uint8_t lcGroup
logical channel group
uint8_t resourceType
0 if the bearer is NON-GBR, 1 if the bearer is GBR, 2 if the bearer in DC-GBR
uint64_t gbrDl
guaranteed bitrate in downlink
uint8_t lcId
logical channel identifier
uint16_t rnti
C-RNTI identifying the UE.
struct defining the RACH configuration of the MAC
uint8_t preambleTransMax
preamble transmit maximum
uint8_t raResponseWindowSize
RA response window size.
uint8_t connEstFailCount
the counter value for T300 timer expiration
uint8_t numberOfRaPreambles
number of RA preambles
Parameters for [re]configuring the UE.
uint16_t m_rnti
UE id within this cell.
uint8_t m_transmissionMode
Transmission mode [1..7] (i.e., SISO, MIMO, etc.)
Parameters for [re]configuring the UE.
uint16_t m_rnti
UE id within this cell.
uint8_t m_transmissionMode
Transmission mode [1..7] (i.e., SISO, MIMO, etc.)