A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dl-mac-messages.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008,2009 INRIA, UDcast
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 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19 * <amine.ismail@UDcast.com>
20 */
21
22#ifndef DCD_CHANNEL_ENCODINGS_H
23#define DCD_CHANNEL_ENCODINGS_H
24
25#include "ns3/buffer.h"
26
27#include <list>
28#include <stdint.h>
29
30namespace ns3
31{
32
33/**
34 * \ingroup wimax
35 * This class implements the DCD channel encodings as described by "IEEE Standard for
36 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
37 * Systems" 11.4.1 DCD channel encodings, page 659
38 */
40{
41 public:
43 virtual ~DcdChannelEncodings();
44
45 /**
46 * Set BS EIRP field
47 * \param bs_eirp the BS EIRP
48 */
49 void SetBsEirp(uint16_t bs_eirp);
50 /**
51 * Set EIRX IR MAX field
52 * \param rss_ir_max the EIRRX IR MAX
53 */
54 void SetEirxPIrMax(uint16_t rss_ir_max);
55 /**
56 * Set frequency field
57 * \param frequency the frequency
58 */
59 void SetFrequency(uint32_t frequency);
60
61 /**
62 * Get BS EIRP field
63 * \returns the BS EIRP
64 */
65 uint16_t GetBsEirp() const;
66 /**
67 * Get EIRX IR MAX field
68 * \returns the EIRX IR MAX
69 */
70 uint16_t GetEirxPIrMax() const;
71 /**
72 * Get frequency function
73 * \returns the frequency
74 */
75 uint32_t GetFrequency() const;
76
77 /**
78 * Get size field
79 * \returns the size
80 */
81 uint16_t GetSize() const;
82
83 /**
84 * Write item
85 * \param start the iterator
86 * \returns the updated iterator
87 */
89 /**
90 * Read item
91 * \param start the iterator
92 * \returns the updated iterator
93 */
95
96 private:
97 /**
98 * Write item
99 * \param start iterator
100 * \returns the updated iterator
101 */
102 virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const = 0;
103 /**
104 * Read item
105 * \param start the iterator
106 * \returns the updated iterator
107 */
109
110 uint16_t m_bsEirp; ///< BS EIRP
111 uint16_t m_eirXPIrMax; ///< EIRX IR MAX
112 uint32_t m_frequency; ///< frequency
113};
114
115} // namespace ns3
116
117#endif /* DCD_CHANNEL_ENCODINGS_H */
118
119// ----------------------------------------------------------------------------------------------------------
120
121#ifndef OFDM_DCD_CHANNEL_ENCODINGS_H
122#define OFDM_DCD_CHANNEL_ENCODINGS_H
123
124#include "ns3/mac48-address.h"
125
126#include <stdint.h>
127
128namespace ns3
129{
130
131/**
132 * This class implements the OFDM DCD channel encodings as described by "IEEE Standard for
133 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
134 * Systems"
135 */
137{
138 public:
140 ~OfdmDcdChannelEncodings() override;
141
142 /**
143 * Set channel number field
144 * \param channelNr the channel number
145 */
146 void SetChannelNr(uint8_t channelNr);
147 /**
148 * Set TTG field
149 * \param ttg the TTG
150 */
151 void SetTtg(uint8_t ttg);
152 /**
153 * Set RTG field
154 * \param rtg the RTG
155 */
156 void SetRtg(uint8_t rtg);
157
158 /**
159 * Set base station ID field
160 * \param baseStationId the base station ID
161 */
162 void SetBaseStationId(Mac48Address baseStationId);
163 /**
164 * Set frame duration code field
165 * \param frameDurationCode the frame duration code
166 */
167 void SetFrameDurationCode(uint8_t frameDurationCode);
168 /**
169 * Set frame number field
170 * \param frameNumber the frame number
171 */
172 void SetFrameNumber(uint32_t frameNumber);
173
174 /**
175 * Get channel number field
176 * \returns the channel number
177 */
178 uint8_t GetChannelNr() const;
179 /**
180 * Get TTG field
181 * \returns the TTG
182 */
183 uint8_t GetTtg() const;
184 /**
185 * Get RTG field
186 * \returns the RTG
187 */
188 uint8_t GetRtg() const;
189
190 /**
191 * Get base station ID field
192 * \returns the base station MAC address
193 */
195 /**
196 * Get frame duration code field
197 * \returns the frame duration code
198 */
199 uint8_t GetFrameDurationCode() const;
200 /**
201 * Get frame number field
202 * \returns the frame number
203 */
204 uint32_t GetFrameNumber() const;
205
206 /**
207 * Get size field
208 * \returns the size
209 */
210 uint16_t GetSize() const;
211
212 private:
213 /**
214 * Write item
215 * \param start the iterator
216 * \returns the updated iterator
217 */
218 Buffer::Iterator DoWrite(Buffer::Iterator start) const override;
219 /**
220 * Read item
221 * \param start the iterator
222 * \returns the updated iterator
223 */
225
226 uint8_t m_channelNr; ///< channel number
227 uint8_t m_ttg; ///< TTG
228 uint8_t m_rtg; ///< RTG
229
230 Mac48Address m_baseStationId; ///< base station ID
231 uint8_t m_frameDurationCode; ///< frame duration code
232 uint32_t m_frameNumber; ///< frame number
233};
234
235} // namespace ns3
236
237#endif /* OFDM_DCD_CHANNEL_ENCODINGS_H */
238
239// ----------------------------------------------------------------------------------------------------------
240
241#ifndef OFDM_DL_BURST_PROFILE_H
242#define OFDM_DL_BURST_PROFILE_H
243
244#include "ns3/buffer.h"
245
246#include <stdint.h>
247
248namespace ns3
249{
250
251/**
252 * This class implements the OFDM Downlink burst profile descriptor as described by "IEEE Standard
253 * for Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless
254 * Access Systems" 8.2.1.10 Burst profile formats page 416
255 *
256 */
258{
259 public:
260 /// DIUC enumeration
261 enum Diuc
262 {
275 // 12 is reserved
278 };
279
282
283 /**
284 * Set type field
285 * \param type the type to set
286 */
287 void SetType(uint8_t type);
288 /**
289 * Set length field
290 * \param length the length to set
291 */
292 void SetLength(uint8_t length);
293 /**
294 * Set DIUC field
295 * \param diuc the DIUC
296 */
297 void SetDiuc(uint8_t diuc);
298
299 /**
300 * Set FEC code type
301 * \param fecCodeType the FEC code type
302 */
303 void SetFecCodeType(uint8_t fecCodeType);
304
305 /**
306 * Get type function
307 * \returns the type
308 */
309 uint8_t GetType() const;
310 /** \returns the length field */
311 uint8_t GetLength() const;
312 /** \returns the DIUC field */
313 uint8_t GetDiuc() const;
314
315 /** \returns the FEC code type */
316 uint8_t GetFecCodeType() const;
317
318 /** \returns the size */
319 uint16_t GetSize() const;
320
321 /**
322 * Write item
323 * \param start the starting item iterator
324 * \returns the iterator
325 */
327 /**
328 * Read item
329 * \param start the starting item iterator
330 * \returns the iterator
331 */
333
334 private:
335 uint8_t m_type; ///< type
336 uint8_t m_length; ///< length
337 uint8_t m_diuc; ///< diuc
338
339 // TLV Encoded information
340 uint8_t m_fecCodeType; ///< FEC code type
341};
342
343} // namespace ns3
344
345#endif /* OFDM_DL_BURST_PROFILE_H */
346
347// ----------------------------------------------------------------------------------------------------------
348
349#ifndef DCD_H
350#define DCD_H
351
352#include "ns3/header.h"
353
354#include <stdint.h>
355#include <vector>
356
357namespace ns3
358{
359
360/**
361 * This class implements Downlink channel descriptor as described by "IEEE Standard for
362 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
363 * Systems" 6.3.2.3.1 Downlink Channel Descriptor (DCD) message, page 45
364 */
365class Dcd : public Header
366{
367 public:
368 Dcd();
369 ~Dcd() override;
370
371 /**
372 * Set configuration change count field
373 * \param configurationChangeCount the configuration change count
374 */
375 void SetConfigurationChangeCount(uint8_t configurationChangeCount);
376 /**
377 * Set channel encodings field
378 * \param channelEncodings the channel encodings
379 */
380 void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings);
381 /**
382 * Add DL burst profile field
383 * \param dlBurstProfile the DL burst profile
384 */
385 void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile);
386 /**
387 * Set number DL burst profile field
388 * \param nrDlBurstProfiles the number of DL burst profiles
389 */
390 void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles);
391
392 /**
393 * Get configuration change count field
394 * \returns the configuration change count
395 */
396 uint8_t GetConfigurationChangeCount() const;
397 /**
398 * Get channel encodings field
399 * \returns the channel encodings
400 */
402 /**
403 * Get DL burst profile field
404 * \returns the DL burst profiles
405 */
406 std::vector<OfdmDlBurstProfile> GetDlBurstProfiles() const;
407 /**
408 * Get number DL burst profiles field
409 * \returns the number of DL burst profiles
410 */
411 uint8_t GetNrDlBurstProfiles() const;
412
413 /**
414 * Get name field
415 * \returns the name string
416 */
417 std::string GetName() const;
418 /**
419 * \brief Get the type ID.
420 * \return the object TypeId
421 */
422 static TypeId GetTypeId();
423 TypeId GetInstanceTypeId() const override;
424 void Print(std::ostream& os) const override;
425 uint32_t GetSerializedSize() const override;
426 void Serialize(Buffer::Iterator start) const override;
427 uint32_t Deserialize(Buffer::Iterator start) override;
428
429 private:
430 uint8_t m_reserved; ///< changed as per the amendment 802.16e-2005
431 uint8_t m_configurationChangeCount; ///< configuration change count
432 OfdmDcdChannelEncodings m_channelEncodings; ///< TLV Encoded information for the overall channel
433 std::vector<OfdmDlBurstProfile> m_dlBurstProfiles; ///< vector of download burst profiles
434
435 uint8_t m_nrDlBurstProfiles; ///< number DL purst profiles
436};
437
438} // namespace ns3
439
440#endif /* DCD_H */
441
442// ----------------------------------------------------------------------------------------------------------
443
444#ifndef OFDM_DL_MAP_IE_H
445#define OFDM_DL_MAP_IE_H
446
447#include "cid.h"
448
449#include <stdint.h>
450
451namespace ns3
452{
453
454/**
455 * This class implements the OFDM DL-MAP information element as described by "IEEE Standard for
456 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
457 * Systems" 6.3.2.3.43.6 Compact DL-MAP IE page 109
458 */
460{
461 public:
462 OfdmDlMapIe();
463 ~OfdmDlMapIe();
464
465 /**
466 * Set CID function
467 * \param cid the CID
468 */
469 void SetCid(Cid cid);
470 /**
471 * Set DIUC field
472 * \param diuc the DIUC
473 */
474 void SetDiuc(uint8_t diuc);
475 /**
476 * Set preamble present field
477 * \param preamblePresent the preamble present
478 */
479 void SetPreamblePresent(uint8_t preamblePresent);
480 /**
481 * Set start time field
482 * \param startTime the start time value
483 */
484 void SetStartTime(uint16_t startTime);
485
486 /**
487 * Set CID field
488 * \returns the CID
489 */
490 Cid GetCid() const;
491 /**
492 * Get DIUC field
493 * \returns the DIUC
494 */
495 uint8_t GetDiuc() const;
496 /**
497 * Get preamble present field
498 * \returns the preamble present indicator
499 */
500 uint8_t GetPreamblePresent() const;
501 /**
502 * Get start time field
503 * \returns the start time
504 */
505 uint16_t GetStartTime() const;
506
507 /**
508 * Get size
509 * \returns the size
510 */
511 uint16_t GetSize() const;
512
513 /**
514 * Write item
515 * \param start the iterator
516 * \returns the updated iterator
517 */
519 /**
520 * Read item
521 * \param start the iterator
522 * \returns the updated iterator
523 */
525
526 private:
527 Cid m_cid; ///< CID
528 uint8_t m_diuc; ///< DIUC
529 uint8_t m_preamblePresent; ///< preamble present
530 uint16_t m_startTime; ///< start time
531};
532
533} // namespace ns3
534
535#endif /* OFDM_DL_MAP_IE_H */
536
537// ----------------------------------------------------------------------------------------------------------
538
539#ifndef DL_MAP_H
540#define DL_MAP_H
541
542#include "ns3/header.h"
543#include "ns3/mac48-address.h"
544
545#include <stdint.h>
546#include <vector>
547
548namespace ns3
549{
550
551/**
552 * This class implements DL-MAP as described by "IEEE Standard for
553 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
554 * Systems" 8.2.1.8.1 Compressed DL-MAP, page 402
555 */
556class DlMap : public Header
557{
558 public:
559 DlMap();
560 ~DlMap() override;
561
562 /**
563 * Set DCD count field
564 * \param dcdCount the DCD count
565 */
566 void SetDcdCount(uint8_t dcdCount);
567 /**
568 * Set base station ID field
569 * \param baseStationID the base station ID
570 */
571 void SetBaseStationId(Mac48Address baseStationID);
572 /**
573 * Add DL Map element field
574 * \param dlMapElement the DL map element
575 */
576 void AddDlMapElement(OfdmDlMapIe dlMapElement);
577
578 /**
579 * Get DCD count field
580 * \returns the DCD count
581 */
582 uint8_t GetDcdCount() const;
583 /**
584 * Get base station ID field
585 * \returns the MAC address
586 */
588 /**
589 * Get DL Map elements field
590 * \returns the DL map elements
591 */
592 std::list<OfdmDlMapIe> GetDlMapElements() const;
593
594 /**
595 * Get name field
596 * \returns the name string
597 */
598 std::string GetName() const;
599 /**
600 * \brief Get the type ID.
601 * \return the object TypeId
602 */
603 static TypeId GetTypeId();
604 TypeId GetInstanceTypeId() const override;
605 void Print(std::ostream& os) const override;
606 uint32_t GetSerializedSize() const override;
607 void Serialize(Buffer::Iterator start) const override;
608 uint32_t Deserialize(Buffer::Iterator start) override;
609
610 private:
611 uint8_t m_dcdCount; ///< DCD count
612 Mac48Address m_baseStationId; ///< base station ID
613 std::list<OfdmDlMapIe> m_dlMapElements; ///< DL Map elements
614 // m_paddingNibble; //fields to be implemented later on:
615};
616
617} // namespace ns3
618
619#endif /* DL_MAP_H */
iterator in a Buffer instance
Definition: buffer.h:100
Cid class.
Definition: cid.h:37
This class implements the DCD channel encodings as described by "IEEE Standard for Local and metropol...
uint16_t GetEirxPIrMax() const
Get EIRX IR MAX field.
uint32_t m_frequency
frequency
uint16_t GetSize() const
Get size field.
uint16_t GetBsEirp() const
Get BS EIRP field.
void SetBsEirp(uint16_t bs_eirp)
Set BS EIRP field.
void SetFrequency(uint32_t frequency)
Set frequency field.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
void SetEirxPIrMax(uint16_t rss_ir_max)
Set EIRX IR MAX field.
uint32_t GetFrequency() const
Get frequency function.
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
Write item.
uint16_t m_eirXPIrMax
EIRX IR MAX.
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
Read item.
uint16_t m_bsEirp
BS EIRP.
This class implements Downlink channel descriptor as described by "IEEE Standard for Local and metrop...
OfdmDcdChannelEncodings m_channelEncodings
TLV Encoded information for the overall channel.
uint8_t m_nrDlBurstProfiles
number DL purst profiles
void SetConfigurationChangeCount(uint8_t configurationChangeCount)
Set configuration change count field.
void Print(std::ostream &os) const override
void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles)
Set number DL burst profile field.
uint8_t m_reserved
changed as per the amendment 802.16e-2005
uint32_t Deserialize(Buffer::Iterator start) override
uint8_t m_configurationChangeCount
configuration change count
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles() const
Get DL burst profile field.
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
OfdmDcdChannelEncodings GetChannelEncodings() const
Get channel encodings field.
std::string GetName() const
Get name field.
uint8_t GetConfigurationChangeCount() const
Get configuration change count field.
void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile)
Add DL burst profile field.
~Dcd() override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(Buffer::Iterator start) const override
uint8_t GetNrDlBurstProfiles() const
Get number DL burst profiles field.
void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings)
Set channel encodings field.
std::vector< OfdmDlBurstProfile > m_dlBurstProfiles
vector of download burst profiles
This class implements DL-MAP as described by "IEEE Standard for Local and metropolitan area networks ...
void SetDcdCount(uint8_t dcdCount)
Set DCD count field.
void Serialize(Buffer::Iterator start) const override
static TypeId GetTypeId()
Get the type ID.
void AddDlMapElement(OfdmDlMapIe dlMapElement)
Add DL Map element field.
Mac48Address GetBaseStationId() const
Get base station ID field.
std::list< OfdmDlMapIe > GetDlMapElements() const
Get DL Map elements field.
std::list< OfdmDlMapIe > m_dlMapElements
DL Map elements.
void SetBaseStationId(Mac48Address baseStationID)
Set base station ID field.
uint32_t GetSerializedSize() const override
uint8_t m_dcdCount
DCD count.
std::string GetName() const
Get name field.
void Print(std::ostream &os) const override
uint32_t Deserialize(Buffer::Iterator start) override
uint8_t GetDcdCount() const
Get DCD count field.
Mac48Address m_baseStationId
base station ID
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
~DlMap() override
Protocol header serialization and deserialization.
Definition: header.h:44
an EUI-48 address
Definition: mac48-address.h:46
This class implements the OFDM DCD channel encodings as described by "IEEE Standard for Local and met...
uint8_t GetTtg() const
Get TTG field.
uint32_t GetFrameNumber() const
Get frame number field.
uint8_t GetFrameDurationCode() const
Get frame duration code field.
uint8_t m_channelNr
channel number
uint16_t GetSize() const
Get size field.
Buffer::Iterator DoRead(Buffer::Iterator start) override
Read item.
void SetChannelNr(uint8_t channelNr)
Set channel number field.
uint8_t GetChannelNr() const
Get channel number field.
void SetTtg(uint8_t ttg)
Set TTG field.
void SetFrameDurationCode(uint8_t frameDurationCode)
Set frame duration code field.
uint8_t m_frameDurationCode
frame duration code
Mac48Address GetBaseStationId() const
Get base station ID field.
Buffer::Iterator DoWrite(Buffer::Iterator start) const override
Write item.
uint32_t m_frameNumber
frame number
void SetRtg(uint8_t rtg)
Set RTG field.
void SetFrameNumber(uint32_t frameNumber)
Set frame number field.
Mac48Address m_baseStationId
base station ID
uint8_t GetRtg() const
Get RTG field.
void SetBaseStationId(Mac48Address baseStationId)
Set base station ID field.
This class implements the OFDM Downlink burst profile descriptor as described by "IEEE Standard for L...
uint16_t GetSize() const
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint8_t GetFecCodeType() const
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
void SetLength(uint8_t length)
Set length field.
void SetType(uint8_t type)
Set type field.
uint8_t GetType() const
Get type function.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
uint8_t m_fecCodeType
FEC code type.
void SetDiuc(uint8_t diuc)
Set DIUC field.
This class implements the OFDM DL-MAP information element as described by "IEEE Standard for Local an...
void SetStartTime(uint16_t startTime)
Set start time field.
uint8_t GetDiuc() const
Get DIUC field.
void SetCid(Cid cid)
Set CID function.
uint8_t m_preamblePresent
preamble present
Cid GetCid() const
Set CID field.
uint16_t m_startTime
start time
void SetDiuc(uint8_t diuc)
Set DIUC field.
void SetPreamblePresent(uint8_t preamblePresent)
Set preamble present field.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint16_t GetStartTime() const
Get start time field.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
uint8_t GetPreamblePresent() const
Get preamble present field.
uint16_t GetSize() const
Get size.
uint8_t m_diuc
DIUC.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.