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