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
See section 4.3.1 dlDciListElement.
Definition: ff-mac-common.h:93
LteRrcSap::MasterInformationBlock m_mib
MIB.
Sib1LteControlMessage(void)
Create a new instance of SIB1 control message.
a MAC RAR and the corresponding RAPID subheader
The Uplink Data Control Indicator messages defines the RB allocation for the users in the uplink...
The LteControlMessage provides a basic implementations for control messages (such as PDCCH allocation...
DlDciListElement_s m_dci
DCI.
The uplink BsrLteControlMessage defines the specific extension of the CE element for reporting the bu...
See section 4.3.2 ulDciListElement.
See section 4.3.24 cqiListElement.
std::list< Rar >::const_iterator RarListEnd() const
See section 4.3.10 buildRARListElement.
The Downlink Data Control Indicator messages defines the RB allocation for the users in the downlink...
void SetRaRnti(uint16_t raRnti)
LteRrcSap::SystemInformationBlockType1 GetSib1() const
Retrieve the SIB1 content from this control message.
abstract model for the MAC Random Access Response message
DlInfoListElement_s GetDlHarqFeedback(void)
Get DL HARQ information.
void SetRapId(uint32_t rapid)
Set the Random Access Preamble Identifier (RAPID), see 3GPP TS 36.321 6.2.2.
void AddRar(Rar rar)
add a RAR to the MAC PDU, see 3GPP TS 36.321 6.2.3
MibLteControlMessage(void)
Create a new instance of MIB control message.
std::list< Rar >::const_iterator RarListBegin() const
MessageType m_type
message type
CqiListElement_s GetDlCqi(void)
Get DL cqi information.
UlDciListElement_s GetDci(void)
Get dic information.
void SetDlCqi(CqiListElement_s dlcqi)
add a DL-CQI feedback record into the message.
See section 4.3.23 dlInfoListElement.
BuildRarListElement_s rarPayload
RAR payload.
See section 4.3.14 macCEListElement.
MessageType GetMessageType(void)
Get the type of the message.
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:587
MessageType
The type of the message NOTE: The messages sent by UE are filtered by the LteEnbPhy::ReceiveLteContro...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The downlink CqiLteControlMessage defines an ideal list of feedback about the channel quality sent by...
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:580
void SetDci(UlDciListElement_s dci)
add a DCI into the message
void SetDci(DlDciListElement_s dci)
add a DCI into the message
Abstract model for broadcasting the Master Information Block (MIB) within the control channel (BCCH)...
UlDciListElement_s m_dci
DCI.
Abstract model for broadcasting the System Information Block Type 1 (SIB1) within the control channel...
DlDciListElement_s GetDci(void)
Get dic information.
void SetMib(LteRrcSap::MasterInformationBlock mib)
Replace the MIB content of this control message.
CqiListElement_s m_dlCqi
DL CQI.
void SetDlHarqFeedback(DlInfoListElement_s m)
add a DL HARQ feedback record into the message.
MacCeListElement_s GetBsr(void)
Get BSR information.
void SetMessageType(MessageType type)
Set the type of the message.
The downlink DlHarqFeedbackLteControlMessage defines the specific messages for transmitting the DL HA...
std::list< Rar > m_rarList
RAR list.
LteRrcSap::MasterInformationBlock GetMib() const
Retrieve the MIB content from this control message.
abstract model for the Random Access Preamble
void SetBsr(MacCeListElement_s bsr)
add a BSR feedback record into the message.
A template-based reference counting class.
DlInfoListElement_s m_dlInfoListElement
DL info list element.
void SetSib1(LteRrcSap::SystemInformationBlockType1 sib1)
Replace the SIB1 content of this control message.
MacCeListElement_s m_bsr
BSR.
LteRrcSap::SystemInformationBlockType1 m_sib1
SIB1.