A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
lte-control-messages.h
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 <list>
28 
29 namespace ns3 {
30 
31 class LteNetDevice;
32 
33 
41 class LteControlMessage : public SimpleRefCount<LteControlMessage>
42 {
43 public:
48  {
49  DL_DCI, UL_DCI, // Downlink/Uplink Data Control Indicator
50  DL_CQI, UL_CQI, // Downlink/Uplink Channel Quality Indicator
51  BSR, // Buffer Status Report
52  DL_HARQ, // UL HARQ feedback
53  RACH_PREAMBLE, // Random Access Preamble
54  RAR, // Random Access Response
55  MIB, // Master Information Block
56  };
57 
58  LteControlMessage (void);
59  virtual ~LteControlMessage (void);
60 
65  void SetMessageType (MessageType type);
71 
72 private:
73  MessageType m_type;
74 };
75 } // namespace ns3
76 
77 #endif /* LTE_CONTROL_MESSAGES_H */
78 
79 
80 
81 
82 // -----------------------------------------------------------------------
83 
84 
85 #ifndef DL_DCI_LTE_CONTROL_MESSAGES_H
86 #define DL_DCI_LTE_CONTROL_MESSAGES_H
87 
88 #include <ns3/object.h>
89 #include <ns3/ff-mac-common.h>
90 
91 namespace ns3 {
92 
99 {
100 public:
101  DlDciLteControlMessage (void);
102  virtual ~DlDciLteControlMessage (void);
103 
108  void SetDci (DlDciListElement_s dci);
109 
114  DlDciListElement_s GetDci (void);
115 
116 
117 private:
118  DlDciListElement_s m_dci;
119 };
120 } // namespace ns3
121 
122 #endif /* DL_DCI_LTE_CONTROL_MESSAGES_H */
123 
124 
125 // ---------------------------------------------------------------------------
126 
127 
128 #ifndef UL_DCI_LTE_CONTROL_MESSAGES_H
129 #define UL_DCI_LTE_CONTROL_MESSAGES_H
130 
131 #include <ns3/object.h>
132 #include <ns3/ff-mac-common.h>
133 
134 namespace ns3 {
135 
142 {
143 public:
144  UlDciLteControlMessage (void);
145  virtual ~UlDciLteControlMessage (void);
146 
151  void SetDci (UlDciListElement_s dci);
152 
157  UlDciListElement_s GetDci (void);
158 
159 
160 private:
161  UlDciListElement_s m_dci;
162 };
163 } // namespace ns3
164 
165 #endif /* UL_DCI_LTE_CONTROL_MESSAGES_H */
166 
167 
168 
169 // ---------------------------------------------------------------------------
170 
171 
172 
173 #ifndef DLCQI_LTE_CONTROL_MESSAGES_H
174 #define DLCQI_LTE_CONTROL_MESSAGES_H
175 
176 #include <ns3/object.h>
177 #include <ns3/ff-mac-common.h>
178 
179 namespace ns3 {
180 
181 class LteNetDevice;
182 
189 {
190 public:
191  DlCqiLteControlMessage (void);
192  virtual ~DlCqiLteControlMessage (void);
193 
198  void SetDlCqi (CqiListElement_s dlcqi);
199 
204  CqiListElement_s GetDlCqi (void);
205 
206 
207 private:
208  CqiListElement_s m_dlCqi;
209 };
210 } // namespace ns3
211 
212 #endif /* DLCQI_LTE_CONTROL_MESSAGES_H */
213 
214 
215 // ---------------------------------------------------------------------------
216 
217 #ifndef BSR_LTE_CONTROL_MESSAGES_H
218 #define BSR_LTE_CONTROL_MESSAGES_H
219 
220 #include <ns3/object.h>
221 #include <ns3/ff-mac-common.h>
222 
223 namespace ns3 {
224 
225 class LteNetDevice;
226 
233 {
234 public:
235  BsrLteControlMessage (void);
236  virtual ~BsrLteControlMessage (void);
237 
242  void SetBsr (MacCeListElement_s ulcqi);
243 
248  MacCeListElement_s GetBsr (void);
249 
250 
251 private:
252  MacCeListElement_s m_bsr;
253 
254 
255 };
256 
257 } // namespace ns3
258 
259 #endif /* BSR_LTE_CONTROL_MESSAGES_H */
260 
261 
262 // ---------------------------------------------------------------------------
263 
264 #ifndef DL_HARQ_LTE_CONTROL_MESSAGES_H
265 #define DL_HARQ_LTE_CONTROL_MESSAGES_H
266 
267 #include <ns3/object.h>
268 #include <ns3/ff-mac-common.h>
269 
270 namespace ns3 {
271 
278 {
279 public:
281  virtual ~DlHarqFeedbackLteControlMessage (void);
282 
288 
294 
295 
296 private:
297  DlInfoListElement_s m_dlInfoListElement;
298 
299 
300 };
301 } // namespace ns3
302 
303 #endif /* DL_HARQ_LTE_CONTROL_MESSAGES_H */
304 
305 
306 #ifndef RACH_PREAMBLE_LTE_CONTROL_MESSAGES_H
307 #define RACH_PREAMBLE_LTE_CONTROL_MESSAGES_H
308 
309 #include <ns3/object.h>
310 #include <ns3/ff-mac-common.h>
311 
312 namespace ns3 {
313 
314 class LteNetDevice;
315 
322 {
323 public:
325 
326 
332  void SetRapId (uint32_t rapid);
333 
338  uint32_t GetRapId () const;
339 
340 private:
341 
342  uint32_t m_rapId;
343 
344 
345 };
346 
347 } // namespace ns3
348 
349 #endif // RACH_PREAMBLE_LTE_CONTROL_MESSAGES_H
350 
351 
352 #ifndef RAR_LTE_CONTROL_MESSAGES_H
353 #define RAR_LTE_CONTROL_MESSAGES_H
354 
355 #include <ns3/object.h>
356 #include <ns3/ff-mac-common.h>
357 
358 namespace ns3 {
359 
360 class LteNetDevice;
361 
368 {
369 public:
370  RarLteControlMessage (void);
371 
376  void SetRaRnti (uint16_t raRnti);
377 
382  uint16_t GetRaRnti () const;
383 
388  struct Rar
389  {
390  uint8_t rapId;
391  BuildRarListElement_s rarPayload;
392  };
393 
399  void AddRar (Rar rar);
400 
405  std::list<Rar>::const_iterator RarListBegin () const;
406 
411  std::list<Rar>::const_iterator RarListEnd () const;
412 
413 
414 private:
415 
416  std::list<Rar> m_rarList;
417  uint16_t m_raRnti;
418 
419 };
420 
421 } // namespace ns3
422 
423 #endif // RAR_LTE_CONTROL_MESSAGES_H
424 
425 
426 
427 
428 #ifndef MIB_LTE_CONTROL_MESSAGES_H
429 #define MIB_LTE_CONTROL_MESSAGES_H
430 
431 #include <ns3/object.h>
432 #include <ns3/ff-mac-common.h>
433 #include <ns3/lte-rrc-sap.h>
434 
435 namespace ns3 {
436 
437 class LteNetDevice;
438 
445 {
446 public:
447 
448  MibLteControlMessage (void);
449 
450  void SetMib (LteRrcSap::MasterInformationBlock mib);
451 
452  LteRrcSap::MasterInformationBlock GetMib () const;
453 
454 private:
455 
457 
458 };
459 
460 } // namespace ns3
461 
462 #endif // MIB_LTE_CONTROL_MESSAGES_H
See section 4.3.1 dlDciListElement.
Definition: ff-mac-common.h:88
void SetBsr(MacCeListElement_s ulcqi)
add a BSR feedback record into the message.
See section 4.3.2 ulDciListElement.
See section 4.3.24 cqiListElement.
See section 4.3.10 buildRARListElement.
void SetRaRnti(uint16_t raRnti)
DlInfoListElement_s GetDlHarqFeedback(void)
Get DL HARQ informations.
std::list< Rar >::const_iterator RarListEnd() const
CqiListElement_s GetDlCqi(void)
Get DL cqi informations.
UlDciListElement_s GetDci(void)
Get dic informations.
void SetDlCqi(CqiListElement_s dlcqi)
add a DL-CQI feedback record into the message.
See section 4.3.23 dlInfoListElement.
See section 4.3.14 macCEListElement.
MessageType GetMessageType(void)
Get the type of the message.
std::list< Rar >::const_iterator RarListBegin() const
void SetDci(UlDciListElement_s dci)
add a DCI into the message
void SetDci(DlDciListElement_s dci)
add a DCI into the message
DlDciListElement_s GetDci(void)
Get dic informations.
void SetDlHarqFeedback(DlInfoListElement_s m)
add a DL HARQ feedback record into the message.
MacCeListElement_s GetBsr(void)
Get BSR informations.
void SetMessageType(MessageType type)
Set the type of the message.
A template-based reference counting class.