A Discrete-Event Network Simulator
API
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 <ns3/ff-mac-common.h>
25 #include <ns3/lte-rrc-sap.h>
26 #include <ns3/ptr.h>
27 #include <ns3/simple-ref-count.h>
28 
29 #include <list>
30 
31 namespace ns3
32 {
33 
34 class LteNetDevice;
35 
43 class LteControlMessage : public SimpleRefCount<LteControlMessage>
44 {
45  public:
55  {
57  UL_DCI, // Downlink/Uplink Data Control Indicator
59  UL_CQI, // Downlink/Uplink Channel Quality Indicator
60  BSR, // Buffer Status Report
61  DL_HARQ, // UL HARQ feedback
62  RACH_PREAMBLE, // Random Access Preamble
63  RAR, // Random Access Response
64  MIB, // Master Information Block
65  SIB1, // System Information Block Type 1
66  };
67 
69  virtual ~LteControlMessage();
70 
81 
82  private:
84 };
85 
86 // -----------------------------------------------------------------------
87 
94 {
95  public:
97  ~DlDciLteControlMessage() override;
98 
103  void SetDci(DlDciListElement_s dci);
104 
109  const DlDciListElement_s& GetDci();
110 
111  private:
113 };
114 
115 // ---------------------------------------------------------------------------
116 
123 {
124  public:
126  ~UlDciLteControlMessage() override;
127 
132  void SetDci(UlDciListElement_s dci);
133 
138  const UlDciListElement_s& GetDci();
139 
140  private:
142 };
143 
144 // ---------------------------------------------------------------------------
145 
152 {
153  public:
155  ~DlCqiLteControlMessage() override;
156 
161  void SetDlCqi(CqiListElement_s dlcqi);
162 
168 
169  private:
171 };
172 
173 // ---------------------------------------------------------------------------
174 
181 {
182  public:
184  ~BsrLteControlMessage() override;
185 
190  void SetBsr(MacCeListElement_s bsr);
191 
197 
198  private:
200 };
201 
202 // ---------------------------------------------------------------------------
203 
210 {
211  public:
214 
220 
226 
227  private:
229 };
230 
231 // ---------------------------------------------------------------------------
232 
239 {
240  public:
242 
248  void SetRapId(uint32_t rapid);
249 
254  uint32_t GetRapId() const;
255 
256  private:
257  uint32_t m_rapId;
258 };
259 
260 // ---------------------------------------------------------------------------
261 
268 {
269  public:
271 
276  void SetRaRnti(uint16_t raRnti);
277 
282  uint16_t GetRaRnti() const;
283 
288  struct Rar
289  {
290  uint8_t rapId;
292  };
293 
299  void AddRar(Rar rar);
300 
305  std::list<Rar>::const_iterator RarListBegin() const;
306 
311  std::list<Rar>::const_iterator RarListEnd() const;
312 
313  private:
314  std::list<Rar> m_rarList;
315  uint16_t m_raRnti;
316 };
317 
318 // ---------------------------------------------------------------------------
319 
332 {
333  public:
338 
344 
350 
351  private:
353 
354 }; // end of class MibLteControlMessage
355 
356 // ---------------------------------------------------------------------------
357 
370 {
371  public:
376 
382 
388 
389  private:
391 
392 }; // end of class Sib1LteControlMessage
393 
394 } // namespace ns3
395 
396 #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.