A Discrete-Event Network Simulator
API
lte-control-messages.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Giuseppe Piro <g.piro@poliba.it>
19  * Author: Marco Miozzo <marco.miozzo@cttc.es>
20  */
21 
22 #ifndef LTE_CONTROL_MESSAGES_H
23 #define LTE_CONTROL_MESSAGES_H
24 
25 #include <ns3/ptr.h>
26 #include <ns3/simple-ref-count.h>
27 #include <ns3/ff-mac-common.h>
28 #include <ns3/lte-rrc-sap.h>
29 #include <list>
30 
31 namespace ns3 {
32 
33 class LteNetDevice;
34 
35 
43 class LteControlMessage : public SimpleRefCount<LteControlMessage>
44 {
45 public:
55  {
56  DL_DCI, UL_DCI, // Downlink/Uplink Data Control Indicator
57  DL_CQI, UL_CQI, // Downlink/Uplink Channel Quality Indicator
58  BSR, // Buffer Status Report
59  DL_HARQ, // UL HARQ feedback
60  RACH_PREAMBLE, // Random Access Preamble
61  RAR, // Random Access Response
62  MIB, // Master Information Block
63  SIB1, // System Information Block Type 1
64  };
65 
66  LteControlMessage (void);
67  virtual ~LteControlMessage (void);
68 
73  void SetMessageType (MessageType type);
79 
80 private:
82 };
83 
84 
85 // -----------------------------------------------------------------------
86 
93 {
94 public:
96  virtual ~DlDciLteControlMessage (void);
97 
102  void SetDci (DlDciListElement_s dci);
103 
108  DlDciListElement_s GetDci (void);
109 
110 private:
112 };
113 
114 
115 // ---------------------------------------------------------------------------
116 
123 {
124 public:
125  UlDciLteControlMessage (void);
126  virtual ~UlDciLteControlMessage (void);
127 
132  void SetDci (UlDciListElement_s dci);
133 
138  UlDciListElement_s GetDci (void);
139 
140 private:
142 };
143 
144 
145 // ---------------------------------------------------------------------------
146 
153 {
154 public:
155  DlCqiLteControlMessage (void);
156  virtual ~DlCqiLteControlMessage (void);
157 
162  void SetDlCqi (CqiListElement_s dlcqi);
163 
168  CqiListElement_s GetDlCqi (void);
169 
170 private:
172 };
173 
174 
175 // ---------------------------------------------------------------------------
176 
183 {
184 public:
185  BsrLteControlMessage (void);
186  virtual ~BsrLteControlMessage (void);
187 
192  void SetBsr (MacCeListElement_s bsr);
193 
198  MacCeListElement_s GetBsr (void);
199 
200 private:
202 
203 };
204 
205 
206 // ---------------------------------------------------------------------------
207 
214 {
215 public:
217  virtual ~DlHarqFeedbackLteControlMessage (void);
218 
224 
230 
231 private:
233 
234 };
235 
236 
237 // ---------------------------------------------------------------------------
238 
245 {
246 public:
248 
254  void SetRapId (uint32_t rapid);
255 
260  uint32_t GetRapId () const;
261 
262 private:
263  uint32_t m_rapId;
264 
265 };
266 
267 
268 // ---------------------------------------------------------------------------
269 
276 {
277 public:
278  RarLteControlMessage (void);
279 
284  void SetRaRnti (uint16_t raRnti);
285 
290  uint16_t GetRaRnti () const;
291 
296  struct Rar
297  {
298  uint8_t rapId;
300  };
301 
307  void AddRar (Rar rar);
308 
313  std::list<Rar>::const_iterator RarListBegin () const;
314 
319  std::list<Rar>::const_iterator RarListEnd () const;
320 
321 private:
322  std::list<Rar> m_rarList;
323  uint16_t m_raRnti;
324 
325 };
326 
327 
328 // ---------------------------------------------------------------------------
329 
342 {
343 public:
347  MibLteControlMessage (void);
348 
354 
360 
361 private:
363 
364 }; // end of class MibLteControlMessage
365 
366 
367 // ---------------------------------------------------------------------------
368 
381 {
382 public:
386  Sib1LteControlMessage (void);
387 
393 
399 
400 private:
402 
403 }; // end of class Sib1LteControlMessage
404 
405 
406 } // namespace ns3
407 
408 #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(void)
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(void)
Get DL cqi information.
The Downlink Data Control Indicator messages defines the RB allocation for the users in the downlink.
void SetDci(DlDciListElement_s dci)
add a DCI into the message
DlDciListElement_s GetDci(void)
Get dic information.
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 m_dlInfoListElement
DL info list element.
DlInfoListElement_s GetDlHarqFeedback(void)
Get DL HARQ information.
The LteControlMessage provides a basic implementations for control messages (such as PDCCH allocation...
MessageType GetMessageType(void)
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).
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.
MibLteControlMessage(void)
Create a new instance of MIB 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...
Sib1LteControlMessage(void)
Create a new instance of SIB1 control message.
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.
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
UlDciListElement_s GetDci(void)
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:94
See section 4.3.23 dlInfoListElement.
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:588
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:595
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.