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