A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-control-messages.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Giuseppe Piro <g.piro@poliba.it>
7 * Author: Marco Miozzo <marco.miozzo@cttc.es>
8 */
9
10#ifndef LTE_CONTROL_MESSAGES_H
11#define LTE_CONTROL_MESSAGES_H
12
13#include "ff-mac-common.h"
14#include "lte-rrc-sap.h"
15
16#include <ns3/ptr.h>
17#include <ns3/simple-ref-count.h>
18
19#include <list>
20
21namespace ns3
22{
23
24class LteNetDevice;
25
26/**
27 * \ingroup lte
28 *
29 * The LteControlMessage provides a basic implementations for
30 * control messages (such as PDCCH allocation map, CQI feedbacks)
31 * that are exchanged among eNodeB and UEs.
32 */
33class LteControlMessage : public SimpleRefCount<LteControlMessage>
34{
35 public:
36 /**
37 * The type of the message
38 * NOTE: The messages sent by UE are filtered by the
39 * LteEnbPhy::ReceiveLteControlMessageList in order to remove the ones
40 * that has been already handoff by the eNB for avoiding propagation of
41 * spurious messages. When new messaged have to been added, consider to
42 * update the switch statement implementing the filtering.
43 */
45 {
47 UL_DCI, // Downlink/Uplink Data Control Indicator
49 UL_CQI, // Downlink/Uplink Channel Quality Indicator
50 BSR, // Buffer Status Report
51 DL_HARQ, // UL HARQ feedback
52 RACH_PREAMBLE, // Random Access Preamble
53 RAR, // Random Access Response
54 MIB, // Master Information Block
55 SIB1, // System Information Block Type 1
56 };
57
59 virtual ~LteControlMessage();
60
61 /**
62 * \brief Set the type of the message
63 * \param type the type of the message
64 */
65 void SetMessageType(MessageType type);
66 /**
67 * \brief Get the type of the message
68 * \return the type of the message
69 */
70 MessageType GetMessageType();
71
72 private:
73 MessageType m_type; ///< message type
74};
75
76// -----------------------------------------------------------------------
77
78/**
79 * \ingroup lte
80 * The Downlink Data Control Indicator messages defines the RB allocation for the
81 * users in the downlink
82 */
84{
85 public:
87 ~DlDciLteControlMessage() override;
88
89 /**
90 * \brief add a DCI into the message
91 * \param dci the dci
92 */
93 void SetDci(DlDciListElement_s dci);
94
95 /**
96 * \brief Get dic information
97 * \return dci messages
98 */
100
101 private:
103};
104
105// ---------------------------------------------------------------------------
106
107/**
108 * \ingroup lte
109 * The Uplink Data Control Indicator messages defines the RB allocation for the
110 * users in the uplink
111 */
113{
114 public:
116 ~UlDciLteControlMessage() override;
117
118 /**
119 * \brief add a DCI into the message
120 * \param dci the dci
121 */
122 void SetDci(UlDciListElement_s dci);
123
124 /**
125 * \brief Get dic information
126 * \return dci messages
127 */
128 const UlDciListElement_s& GetDci();
129
130 private:
132};
133
134// ---------------------------------------------------------------------------
135
136/**
137 * \ingroup lte
138 * The downlink CqiLteControlMessage defines an ideal list of
139 * feedback about the channel quality sent by the UE to the eNodeB.
140 */
142{
143 public:
145 ~DlCqiLteControlMessage() override;
146
147 /**
148 * \brief add a DL-CQI feedback record into the message.
149 * \param dlcqi the DL cqi feedback
150 */
151 void SetDlCqi(CqiListElement_s dlcqi);
152
153 /**
154 * \brief Get DL cqi information
155 * \return dlcqi messages
156 */
158
159 private:
161};
162
163// ---------------------------------------------------------------------------
164
165/**
166 * \ingroup lte
167 * The uplink BsrLteControlMessage defines the specific
168 * extension of the CE element for reporting the buffer status report
169 */
171{
172 public:
174 ~BsrLteControlMessage() override;
175
176 /**
177 * \brief add a BSR feedback record into the message.
178 * \param bsr the BSR feedback
179 */
180 void SetBsr(MacCeListElement_s bsr);
181
182 /**
183 * \brief Get BSR information
184 * \return BSR message
185 */
187
188 private:
190};
191
192// ---------------------------------------------------------------------------
193
194/**
195 * \ingroup lte
196 * The downlink DlHarqFeedbackLteControlMessage defines the specific
197 * messages for transmitting the DL HARQ feedback through PUCCH
198 */
200{
201 public:
204
205 /**
206 * \brief add a DL HARQ feedback record into the message.
207 * \param m the DL HARQ feedback
208 */
210
211 /**
212 * \brief Get DL HARQ information
213 * \return DL HARQ message
214 */
216
217 private:
218 DlInfoListElement_s m_dlInfoListElement; ///< DL info list element
219};
220
221// ---------------------------------------------------------------------------
222
223/**
224 * \ingroup lte
225 *
226 * abstract model for the Random Access Preamble
227 */
229{
230 public:
232
233 /**
234 * Set the Random Access Preamble Identifier (RAPID), see 3GPP TS 36.321 6.2.2
235 *
236 * \param rapid the RAPID
237 */
238 void SetRapId(uint32_t rapid);
239
240 /**
241 *
242 * \return the RAPID
243 */
244 uint32_t GetRapId() const;
245
246 private:
247 uint32_t m_rapId; ///< the RAPID
248};
249
250// ---------------------------------------------------------------------------
251
252/**
253 * \ingroup lte
254 *
255 * abstract model for the MAC Random Access Response message
256 */
258{
259 public:
261
262 /**
263 *
264 * \param raRnti the RA-RNTI, see 3GPP TS 36.321 5.1.4
265 */
266 void SetRaRnti(uint16_t raRnti);
267
268 /**
269 *
270 * \return the RA-RNTI, see 3GPP TS 36.321 5.1.4
271 */
272 uint16_t GetRaRnti() const;
273
274 /**
275 * a MAC RAR and the corresponding RAPID subheader
276 *
277 */
278 struct Rar
279 {
280 uint8_t rapId; ///< RAPID
282 };
283
284 /**
285 * add a RAR to the MAC PDU, see 3GPP TS 36.321 6.2.3
286 *
287 * \param rar the rar
288 */
289 void AddRar(Rar rar);
290
291 /**
292 *
293 * \return a const iterator to the beginning of the RAR list
294 */
295 std::list<Rar>::const_iterator RarListBegin() const;
296
297 /**
298 *
299 * \return a const iterator to the end of the RAR list
300 */
301 std::list<Rar>::const_iterator RarListEnd() const;
302
303 private:
304 std::list<Rar> m_rarList; ///< RAR list
305 uint16_t m_raRnti; ///< RA RNTI
306};
307
308// ---------------------------------------------------------------------------
309
310/**
311 * \ingroup lte
312 * \brief Abstract model for broadcasting the Master Information Block (MIB)
313 * within the control channel (BCCH).
314 *
315 * MIB is transmitted by eNodeB RRC and received by UE RRC at every radio frame,
316 * i.e., every 10 milliseconds.
317 *
318 * \sa LteEnbRrc::ConfigureCell, LteEnbPhy::StartFrame,
319 * LteUeRrc::DoRecvMasterInformationBlock
320 */
322{
323 public:
324 /**
325 * \brief Create a new instance of MIB control message.
326 */
328
329 /**
330 * \brief Replace the MIB content of this control message.
331 * \param mib the desired MIB content
332 */
334
335 /**
336 * \brief Retrieve the MIB content from this control message.
337 * \return the current MIB content that this control message holds
338 */
340
341 private:
343
344}; // end of class MibLteControlMessage
345
346// ---------------------------------------------------------------------------
347
348/**
349 * \ingroup lte
350 * \brief Abstract model for broadcasting the System Information Block Type 1
351 * (SIB1) within the control channel (BCCH).
352 *
353 * SIB1 is transmitted by eNodeB RRC and received by UE RRC at the 6th subframe
354 * of every odd-numbered radio frame, i.e., every 20 milliseconds.
355 *
356 * \sa LteEnbRrc::SetSystemInformationBlockType1, LteEnbPhy::StartSubFrame,
357 * LteUeRrc::DoRecvSystemInformationBlockType1
358 */
360{
361 public:
362 /**
363 * \brief Create a new instance of SIB1 control message.
364 */
366
367 /**
368 * \brief Replace the SIB1 content of this control message.
369 * \param sib1 the desired SIB1 content
370 */
372
373 /**
374 * \brief Retrieve the SIB1 content from this control message.
375 * \return the current SIB1 content that this control message holds
376 */
378
379 private:
381
382}; // end of class Sib1LteControlMessage
383
384} // namespace ns3
385
386#endif // LTE_CONTROL_MESSAGES_H
The uplink BsrLteControlMessage defines the specific extension of the CE element for reporting the bu...
MacCeListElement_s m_bsr
BSR.
MacCeListElement_s GetBsr()
Get BSR information.
void SetBsr(MacCeListElement_s bsr)
add a BSR feedback record into the message.
The downlink CqiLteControlMessage defines an ideal list of feedback about the channel quality sent by...
CqiListElement_s m_dlCqi
DL CQI.
void SetDlCqi(CqiListElement_s dlcqi)
add a DL-CQI feedback record into the message.
CqiListElement_s GetDlCqi()
Get DL cqi information.
The Downlink Data Control Indicator messages defines the RB allocation for the users in the downlink.
const DlDciListElement_s & GetDci()
Get dic information.
void SetDci(DlDciListElement_s dci)
add a DCI into the message
The downlink DlHarqFeedbackLteControlMessage defines the specific messages for transmitting the DL HA...
void SetDlHarqFeedback(DlInfoListElement_s m)
add a DL HARQ feedback record into the message.
DlInfoListElement_s GetDlHarqFeedback()
Get DL HARQ information.
DlInfoListElement_s m_dlInfoListElement
DL info list element.
The LteControlMessage provides a basic implementations for control messages (such as PDCCH allocation...
MessageType GetMessageType()
Get the type of the message.
MessageType m_type
message type
MessageType
The type of the message NOTE: The messages sent by UE are filtered by the LteEnbPhy::ReceiveLteContro...
void SetMessageType(MessageType type)
Set the type of the message.
Abstract model for broadcasting the Master Information Block (MIB) within the control channel (BCCH).
MibLteControlMessage()
Create a new instance of MIB control message.
void SetMib(LteRrcSap::MasterInformationBlock mib)
Replace the MIB content of this control message.
LteRrcSap::MasterInformationBlock m_mib
MIB.
LteRrcSap::MasterInformationBlock GetMib() const
Retrieve the MIB content from this control message.
abstract model for the Random Access Preamble
void SetRapId(uint32_t rapid)
Set the Random Access Preamble Identifier (RAPID), see 3GPP TS 36.321 6.2.2.
abstract model for the MAC Random Access Response message
std::list< Rar >::const_iterator RarListEnd() const
std::list< Rar >::const_iterator RarListBegin() const
std::list< Rar > m_rarList
RAR list.
void SetRaRnti(uint16_t raRnti)
void AddRar(Rar rar)
add a RAR to the MAC PDU, see 3GPP TS 36.321 6.2.3
Abstract model for broadcasting the System Information Block Type 1 (SIB1) within the control channel...
void SetSib1(LteRrcSap::SystemInformationBlockType1 sib1)
Replace the SIB1 content of this control message.
LteRrcSap::SystemInformationBlockType1 m_sib1
SIB1.
LteRrcSap::SystemInformationBlockType1 GetSib1() const
Retrieve the SIB1 content from this control message.
Sib1LteControlMessage()
Create a new instance of SIB1 control message.
A template-based reference counting class.
The Uplink Data Control Indicator messages defines the RB allocation for the users in the uplink.
void SetDci(UlDciListElement_s dci)
add a DCI into the message
const UlDciListElement_s & GetDci()
Get dic information.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
See section 4.3.10 buildRARListElement.
See section 4.3.24 cqiListElement.
See section 4.3.1 dlDciListElement.
See section 4.3.23 dlInfoListElement.
MasterInformationBlock structure.
SystemInformationBlockType1 structure.
See section 4.3.14 macCEListElement.
a MAC RAR and the corresponding RAPID subheader
BuildRarListElement_s rarPayload
RAR payload.
See section 4.3.2 ulDciListElement.