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 * 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: Giuseppe Piro <g.piro@poliba.it>
18 * Author: Marco Miozzo <marco.miozzo@cttc.es>
19 */
20
21#ifndef LTE_CONTROL_MESSAGES_H
22#define LTE_CONTROL_MESSAGES_H
23
24#include "ff-mac-common.h"
25#include "lte-rrc-sap.h"
26
27#include <ns3/ptr.h>
28#include <ns3/simple-ref-count.h>
29
30#include <list>
31
32namespace ns3
33{
34
35class LteNetDevice;
36
37/**
38 * \ingroup lte
39 *
40 * The LteControlMessage provides a basic implementations for
41 * control messages (such as PDCCH allocation map, CQI feedbacks)
42 * that are exchanged among eNodeB and UEs.
43 */
44class LteControlMessage : public SimpleRefCount<LteControlMessage>
45{
46 public:
47 /**
48 * The type of the message
49 * NOTE: The messages sent by UE are filtered by the
50 * LteEnbPhy::ReceiveLteControlMessageList in order to remove the ones
51 * that has been already handoff by the eNB for avoiding propagation of
52 * spurious messages. When new messaged have to been added, consider to
53 * update the switch statement implementing the filtering.
54 */
56 {
58 UL_DCI, // Downlink/Uplink Data Control Indicator
60 UL_CQI, // Downlink/Uplink Channel Quality Indicator
61 BSR, // Buffer Status Report
62 DL_HARQ, // UL HARQ feedback
63 RACH_PREAMBLE, // Random Access Preamble
64 RAR, // Random Access Response
65 MIB, // Master Information Block
66 SIB1, // System Information Block Type 1
67 };
68
70 virtual ~LteControlMessage();
71
72 /**
73 * \brief Set the type of the message
74 * \param type the type of the message
75 */
76 void SetMessageType(MessageType type);
77 /**
78 * \brief Get the type of the message
79 * \return the type of the message
80 */
82
83 private:
84 MessageType m_type; ///< message type
85};
86
87// -----------------------------------------------------------------------
88
89/**
90 * \ingroup lte
91 * The Downlink Data Control Indicator messages defines the RB allocation for the
92 * users in the downlink
93 */
95{
96 public:
98 ~DlDciLteControlMessage() override;
99
100 /**
101 * \brief add a DCI into the message
102 * \param dci the dci
103 */
104 void SetDci(DlDciListElement_s dci);
105
106 /**
107 * \brief Get dic information
108 * \return dci messages
109 */
110 const DlDciListElement_s& GetDci();
111
112 private:
114};
115
116// ---------------------------------------------------------------------------
117
118/**
119 * \ingroup lte
120 * The Uplink Data Control Indicator messages defines the RB allocation for the
121 * users in the uplink
122 */
124{
125 public:
127 ~UlDciLteControlMessage() override;
128
129 /**
130 * \brief add a DCI into the message
131 * \param dci the dci
132 */
133 void SetDci(UlDciListElement_s dci);
134
135 /**
136 * \brief Get dic information
137 * \return dci messages
138 */
139 const UlDciListElement_s& GetDci();
140
141 private:
143};
144
145// ---------------------------------------------------------------------------
146
147/**
148 * \ingroup lte
149 * The downlink CqiLteControlMessage defines an ideal list of
150 * feedback about the channel quality sent by the UE to the eNodeB.
151 */
153{
154 public:
156 ~DlCqiLteControlMessage() override;
157
158 /**
159 * \brief add a DL-CQI feedback record into the message.
160 * \param dlcqi the DL cqi feedback
161 */
162 void SetDlCqi(CqiListElement_s dlcqi);
163
164 /**
165 * \brief Get DL cqi information
166 * \return dlcqi messages
167 */
169
170 private:
172};
173
174// ---------------------------------------------------------------------------
175
176/**
177 * \ingroup lte
178 * The uplink BsrLteControlMessage defines the specific
179 * extension of the CE element for reporting the buffer status report
180 */
182{
183 public:
185 ~BsrLteControlMessage() override;
186
187 /**
188 * \brief add a BSR feedback record into the message.
189 * \param bsr the BSR feedback
190 */
191 void SetBsr(MacCeListElement_s bsr);
192
193 /**
194 * \brief Get BSR information
195 * \return BSR message
196 */
198
199 private:
201};
202
203// ---------------------------------------------------------------------------
204
205/**
206 * \ingroup lte
207 * The downlink DlHarqFeedbackLteControlMessage defines the specific
208 * messages for transmitting the DL HARQ feedback through PUCCH
209 */
211{
212 public:
215
216 /**
217 * \brief add a DL HARQ feedback record into the message.
218 * \param m the DL HARQ feedback
219 */
221
222 /**
223 * \brief Get DL HARQ information
224 * \return DL HARQ message
225 */
227
228 private:
229 DlInfoListElement_s m_dlInfoListElement; ///< DL info list element
230};
231
232// ---------------------------------------------------------------------------
233
234/**
235 * \ingroup lte
236 *
237 * abstract model for the Random Access Preamble
238 */
240{
241 public:
243
244 /**
245 * Set the Random Access Preamble Identifier (RAPID), see 3GPP TS 36.321 6.2.2
246 *
247 * \param rapid the RAPID
248 */
249 void SetRapId(uint32_t rapid);
250
251 /**
252 *
253 * \return the RAPID
254 */
255 uint32_t GetRapId() const;
256
257 private:
258 uint32_t m_rapId; ///< the RAPID
259};
260
261// ---------------------------------------------------------------------------
262
263/**
264 * \ingroup lte
265 *
266 * abstract model for the MAC Random Access Response message
267 */
269{
270 public:
272
273 /**
274 *
275 * \param raRnti the RA-RNTI, see 3GPP TS 36.321 5.1.4
276 */
277 void SetRaRnti(uint16_t raRnti);
278
279 /**
280 *
281 * \return the RA-RNTI, see 3GPP TS 36.321 5.1.4
282 */
283 uint16_t GetRaRnti() const;
284
285 /**
286 * a MAC RAR and the corresponding RAPID subheader
287 *
288 */
289 struct Rar
290 {
291 uint8_t rapId; ///< RAPID
293 };
294
295 /**
296 * add a RAR to the MAC PDU, see 3GPP TS 36.321 6.2.3
297 *
298 * \param rar the rar
299 */
300 void AddRar(Rar rar);
301
302 /**
303 *
304 * \return a const iterator to the beginning of the RAR list
305 */
306 std::list<Rar>::const_iterator RarListBegin() const;
307
308 /**
309 *
310 * \return a const iterator to the end of the RAR list
311 */
312 std::list<Rar>::const_iterator RarListEnd() const;
313
314 private:
315 std::list<Rar> m_rarList; ///< RAR list
316 uint16_t m_raRnti; ///< RA RNTI
317};
318
319// ---------------------------------------------------------------------------
320
321/**
322 * \ingroup lte
323 * \brief Abstract model for broadcasting the Master Information Block (MIB)
324 * within the control channel (BCCH).
325 *
326 * MIB is transmitted by eNodeB RRC and received by UE RRC at every radio frame,
327 * i.e., every 10 milliseconds.
328 *
329 * \sa LteEnbRrc::ConfigureCell, LteEnbPhy::StartFrame,
330 * LteUeRrc::DoRecvMasterInformationBlock
331 */
333{
334 public:
335 /**
336 * \brief Create a new instance of MIB control message.
337 */
339
340 /**
341 * \brief Replace the MIB content of this control message.
342 * \param mib the desired MIB content
343 */
345
346 /**
347 * \brief Retrieve the MIB content from this control message.
348 * \return the current MIB content that this control message holds
349 */
351
352 private:
354
355}; // end of class MibLteControlMessage
356
357// ---------------------------------------------------------------------------
358
359/**
360 * \ingroup lte
361 * \brief Abstract model for broadcasting the System Information Block Type 1
362 * (SIB1) within the control channel (BCCH).
363 *
364 * SIB1 is transmitted by eNodeB RRC and received by UE RRC at the 6th subframe
365 * of every odd-numbered radio frame, i.e., every 20 milliseconds.
366 *
367 * \sa LteEnbRrc::SetSystemInformationBlockType1, LteEnbPhy::StartSubFrame,
368 * LteUeRrc::DoRecvSystemInformationBlockType1
369 */
371{
372 public:
373 /**
374 * \brief Create a new instance of SIB1 control message.
375 */
377
378 /**
379 * \brief Replace the SIB1 content of this control message.
380 * \param sib1 the desired SIB1 content
381 */
383
384 /**
385 * \brief Retrieve the SIB1 content from this control message.
386 * \return the current SIB1 content that this control message holds
387 */
389
390 private:
392
393}; // end of class Sib1LteControlMessage
394
395} // namespace ns3
396
397#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
DlDciListElement_s m_dci
DCI.
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.
UlDciListElement_s m_dci
DCI.
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.
Definition: ff-mac-common.h:93
See section 4.3.23 dlInfoListElement.
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:622
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:629
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.