A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ul-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 UCD_CHANNEL_ENCODINGS_H
12#define UCD_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 UCD 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.3.1 UCD channel encodings, page 651
27 */
29{
30 public:
32 virtual ~UcdChannelEncodings();
33
34 /**
35 * Set BW request opp size
36 * \param bwReqOppSize the bandwidth request opp size
37 */
38 void SetBwReqOppSize(uint16_t bwReqOppSize);
39 /**
40 * Set range request opp size
41 * \param rangReqOppSize the ranging request opp size
42 */
43 void SetRangReqOppSize(uint16_t rangReqOppSize);
44 /**
45 * Set frequency
46 * \param frequency the frequency
47 */
48 void SetFrequency(uint32_t frequency);
49
50 /**
51 * Get BW request opp size
52 * \returns the bandwidth request opp size
53 */
54 uint16_t GetBwReqOppSize() const;
55 /**
56 * Get range request opp size
57 * \returns the ragning request opp size
58 */
59 uint16_t GetRangReqOppSize() const;
60 /**
61 * Get frequency
62 * \returns the frequency
63 */
64 uint32_t GetFrequency() const;
65
66 /**
67 * Get size
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 the 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_bwReqOppSize; ///< BW request opp size
100 uint16_t m_rangReqOppSize; ///< range request opp size
101 uint32_t m_frequency; ///< frequency
102};
103
104} // namespace ns3
105
106#endif /* UCD_CHANNEL_ENCODINGS_H */
107
108// ----------------------------------------------------------------------------------------------------------
109
110#ifndef OFDM_UCD_CHANNEL_ENCODINGS_H
111#define OFDM_UCD_CHANNEL_ENCODINGS_H
112
113#include <stdint.h>
114
115namespace ns3
116{
117
118/**
119 * This class implements the OFDM UCD channel encodings as described by "IEEE Standard for
120 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
121 * Systems" 11.3.1 UCD channel encodings, page 651
122 */
124{
125 public:
127 ~OfdmUcdChannelEncodings() override;
128
129 /**
130 * Set SB channel reguest region full parameters
131 * \param sbchnlReqRegionFullParams the channel request region full parameters
132 */
133 void SetSbchnlReqRegionFullParams(uint8_t sbchnlReqRegionFullParams);
134 /**
135 * Set SB channel for control codes
136 * \param sbchnlFocContCodes the channel control codes
137 */
138 void SetSbchnlFocContCodes(uint8_t sbchnlFocContCodes);
139
140 /**
141 * Get SB channel request region full parameters
142 * \returns the channel request region full parameters
143 */
144 uint8_t GetSbchnlReqRegionFullParams() const;
145 /**
146 * Get SB channel for control codes
147 * \returns the channel for control codes
148 */
149 uint8_t GetSbchnlFocContCodes() const;
150
151 /**
152 * Get size
153 * \returns the size
154 */
155 uint16_t GetSize() const;
156
157 private:
158 /**
159 * Write item
160 * \param start the iterator
161 * \returns the updated iterator
162 */
163 Buffer::Iterator DoWrite(Buffer::Iterator start) const override;
164 /**
165 * Read item
166 * \param start the iterator
167 * \returns the updated iterator
168 */
170
171 uint8_t m_sbchnlReqRegionFullParams; ///< SB channel request region full parameters
172 uint8_t m_sbchnlFocContCodes; ///< SB channel for control codes
173};
174
175} // namespace ns3
176
177#endif /* OFDM_UCD_CHANNEL_ENCODINGS_H */
178
179// ----------------------------------------------------------------------------------------------------------
180
181#ifndef OFDM_UL_BURST_PROFILE_H
182#define OFDM_UL_BURST_PROFILE_H
183
184#include "ns3/buffer.h"
185
186#include <stdint.h>
187
188namespace ns3
189{
190
191/**
192 * This class implements the UL burst profile as described by "IEEE Standard for
193 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
194 * Systems" 11.3.1.1 Uplink burst profile encodings, page 655
195 */
197{
198 public:
199 /// UIUC enumeraton
217
220
221 /**
222 * Set type
223 * \param type the type
224 */
225 void SetType(uint8_t type);
226 /**
227 * Set length
228 * \param length the length
229 */
230 void SetLength(uint8_t length);
231 /**
232 * Set UIUC
233 * \param uiuc the UIUC
234 */
235 void SetUiuc(uint8_t uiuc);
236 /**
237 * Set FEC code type
238 * \param fecCodeType the FEC code type
239 */
240 void SetFecCodeType(uint8_t fecCodeType);
241
242 /**
243 * Get type
244 * \returns the type
245 */
246 uint8_t GetType() const;
247 /**
248 * Get length
249 * \returns the length
250 */
251 uint8_t GetLength() const;
252 /**
253 * Get UIUC
254 * \returns the UIUC
255 */
256 uint8_t GetUiuc() const;
257 /**
258 * Get FEC code type
259 * \returns the FEC code type
260 */
261 uint8_t GetFecCodeType() const;
262
263 /**
264 * Get size
265 * \returns the size
266 */
267 uint16_t GetSize() const;
268
269 /**
270 * Write item
271 * \param start the iterator
272 * \returns the updated iterator
273 */
275 /**
276 * Read item
277 * \param start the iterator
278 * \returns the updated iterator
279 */
281
282 private:
283 uint8_t m_type; ///< type
284 uint8_t m_length; ///< length
285 uint8_t m_uiuc; ///< UIUC
286
287 // TLV Encoded information
288 uint8_t m_fecCodeType; ///< FEC code type
289};
290
291} // namespace ns3
292
293#endif /* OFDM_UL_BURST_PROFILE_H */
294
295// ----------------------------------------------------------------------------------------------------------
296
297#ifndef UCD_H
298#define UCD_H
299
300#include "ns3/header.h"
301
302#include <stdint.h>
303#include <vector>
304
305namespace ns3
306{
307
308/**
309 * This class implements the UCD message as described by "IEEE Standard for
310 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
311 * Systems" 6.3.2.3.3 Uplink Channel Descriptor (UCD) message, page 47
312 */
313class Ucd : public Header
314{
315 public:
316 Ucd();
317 ~Ucd() override;
318
319 /**
320 * Set configuration change count
321 * \param ucdCount the UCD count
322 */
323 void SetConfigurationChangeCount(uint8_t ucdCount);
324 /**
325 * Set ranging backoff start
326 * \param rangingBackoffStart ranging backoff start
327 */
328 void SetRangingBackoffStart(uint8_t rangingBackoffStart);
329 /**
330 * Set ranging backoff end
331 * \param rangingBackoffEnd the ranging backoff end
332 */
333 void SetRangingBackoffEnd(uint8_t rangingBackoffEnd);
334 /**
335 * Set request backoff start
336 * \param requestBackoffStart the request backoff start
337 */
338 void SetRequestBackoffStart(uint8_t requestBackoffStart);
339 /**
340 * Set request backoff end
341 * \param requestBackoffEnd the request backoff end
342 */
343 void SetRequestBackoffEnd(uint8_t requestBackoffEnd);
344 /**
345 * Set channel encodings
346 * \param channelEncodings the channel encodings
347 */
348 void SetChannelEncodings(OfdmUcdChannelEncodings channelEncodings);
349 /**
350 * Add UL burst profile
351 * \param ulBurstProfile the UL burst profile
352 */
353 void AddUlBurstProfile(OfdmUlBurstProfile ulBurstProfile);
354 /**
355 * Set NR UL burst profiles
356 * \param nrUlBurstProfiles the NR UL burst profiles
357 */
358 void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles);
359
360 /**
361 * Get configuration change count
362 * \returns the configuration change count
363 */
364 uint8_t GetConfigurationChangeCount() const;
365 /**
366 * Get ranging backoff start
367 * \returns the ranging backoff start
368 */
369 uint8_t GetRangingBackoffStart() const;
370 /**
371 * Get ranging backoff end
372 * \returns the ranging backoff end value
373 */
374 uint8_t GetRangingBackoffEnd() const;
375 /**
376 * Get request backoff start
377 * \returns the request backoff start value
378 */
379 uint8_t GetRequestBackoffStart() const;
380 /**
381 * Get request backoff end
382 * \returns the request backoff end value
383 */
384 uint8_t GetRequestBackoffEnd() const;
385 /**
386 * Get channel encodings
387 * \returns the OFDM UCD channel encodings
388 */
390 /**
391 * Get UL burst profiles
392 * \returns the UL burst profile
393 */
394 std::vector<OfdmUlBurstProfile> GetUlBurstProfiles() const;
395 /**
396 * Get number UL burst profiles
397 * \returns the number of UL burst profiles
398 */
399 uint8_t GetNrUlBurstProfiles() const;
400
401 /**
402 * Get name
403 * \returns the name string
404 */
405 std::string GetName() const;
406 /**
407 * \brief Get the type ID.
408 * \return the object TypeId
409 */
410 static TypeId GetTypeId();
411 TypeId GetInstanceTypeId() const override;
412 void Print(std::ostream& os) const override;
413 uint32_t GetSerializedSize() const override;
414 void Serialize(Buffer::Iterator start) const override;
415 uint32_t Deserialize(Buffer::Iterator start) override;
416
417 private:
418 uint8_t m_configurationChangeCount; ///< configuration change count
419 uint8_t m_rangingBackoffStart; ///< ranging backoff start
420 uint8_t m_rangingBackoffEnd; ///< ranging backoff end
421 uint8_t m_requestBackoffStart; ///< request backoff start
422 uint8_t m_requestBackoffEnd; ///< request backoff end
423 OfdmUcdChannelEncodings m_channelEncodings; ///< TLV Encoded information for the overall channel
424 std::vector<OfdmUlBurstProfile> m_ulBurstProfiles; ///< UL burst profiles
425
426 uint8_t m_nrUlBurstProfiles; ///< number UL burst profiles
427};
428
429} // namespace ns3
430
431#endif /* UCD_H */
432
433// ----------------------------------------------------------------------------------------------------------
434
435#ifndef OFDM_UL_MAP_IE_H
436#define OFDM_UL_MAP_IE_H
437
438#include "cid.h"
439
440#include "ns3/header.h"
441
442#include <stdint.h>
443
444namespace ns3
445{
446
447/**
448 * This class implements the UL-MAP_IE message as described by "IEEE Standard for
449 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
450 * Systems" 6.3.2.3.43.7 UL-MAP_IE, page 115
451 */
453{
454 public:
455 OfdmUlMapIe();
456 ~OfdmUlMapIe();
457
458 /**
459 * Set CID
460 * \param cid the CID
461 */
462 void SetCid(const Cid& cid);
463 /**
464 * Set start time
465 * \param startTime the start time
466 */
467 void SetStartTime(uint16_t startTime);
468 /**
469 * Set subchannel index
470 * \param subchannelIndex
471 */
472 void SetSubchannelIndex(uint8_t subchannelIndex);
473 /**
474 * Set UIUC
475 * \param uiuc the UIUC
476 */
477 void SetUiuc(uint8_t uiuc);
478 /**
479 * Set duration
480 * \param duration the duration
481 */
482 void SetDuration(uint16_t duration);
483 /**
484 * Set midambe repetition interval
485 * \param midambleRepetitionInterval the midambe repetition interval
486 */
487 void SetMidambleRepetitionInterval(uint8_t midambleRepetitionInterval);
488
489 /**
490 * Get CID
491 * \returns the CID
492 */
493 Cid GetCid() const;
494 /**
495 * Get start time
496 * \returns the start time
497 */
498 uint16_t GetStartTime() const;
499 /**
500 * Get subchannel index
501 * \returns the subchannel index
502 */
503 uint8_t GetSubchannelIndex() const;
504 /**
505 * Get UIUC
506 * \returns the UIUC
507 */
508 uint8_t GetUiuc() const;
509 /**
510 * Get duration
511 * \returns the duration
512 */
513 uint16_t GetDuration() const;
514 /**
515 * Get Midamble repetition interval
516 * \returns the midamble repetition interval
517 */
518 uint8_t GetMidambleRepetitionInterval() const;
519
520 /**
521 * Get size
522 * \returns the size
523 */
524 uint16_t GetSize() const;
525
526 /**
527 * Write item
528 * \param start the iterator
529 * \returns the updated iterator
530 */
532 /**
533 * Read item
534 * \param start the iterator
535 * \returns the updated iterator
536 */
538
539 private:
540 Cid m_cid; ///< CID
541 uint16_t m_startTime; ///< start time
542 uint8_t m_subchannelIndex; ///< subchannel index
543 uint8_t m_uiuc; ///< UIUC
544 uint16_t m_duration; ///< duration
545 uint8_t m_midambleRepetitionInterval; ///< midamble repetition interval
546
547 // fields to be implemented later on:
548 // m_focusedContentionIe()
549 // m_subchannelizedNetworkEntryIe()
550 // m_ulExtendedIe()
551 // m_paddingNibble;
552};
553
554} // namespace ns3
555
556#endif /* OFDM_UL_MAP_IE_H */
557
558// ----------------------------------------------------------------------------------------------------------
559
560#ifndef UL_MAP_H
561#define UL_MAP_H
562
563#include "ns3/header.h"
564
565#include <stdint.h>
566#include <vector>
567
568namespace ns3
569{
570
571/**
572 * This class implements the UL-MAP_IE message as described by "IEEE Standard for
573 * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access
574 * Systems" 8.2.1.8.2 Compressed UL-MAP, page 404
575 */
576class UlMap : public Header
577{
578 public:
579 UlMap();
580 ~UlMap() override;
581
582 /**
583 * Set UCD count
584 * \param ucdCount the UCD count
585 */
586 void SetUcdCount(uint8_t ucdCount);
587 /**
588 * Set allocation start time
589 * \param allocationStartTime the allocation start time
590 */
591 void SetAllocationStartTime(uint32_t allocationStartTime);
592 /**
593 * Add UL map element
594 * \param ulMapElement the UL map element
595 */
596 void AddUlMapElement(OfdmUlMapIe ulMapElement);
597
598 /**
599 * Get UCD count
600 * \returns the UCD count
601 */
602 uint8_t GetUcdCount() const;
603 /**
604 * Get allocation start time
605 * \returns the allocation start time
606 */
608 /**
609 * Get UL map elements
610 * \returns the UL map elements
611 */
612 std::list<OfdmUlMapIe> GetUlMapElements() const;
613
614 /**
615 * Get name
616 * \returns the name
617 */
618 std::string GetName() const;
619 /**
620 * \brief Get the type ID.
621 * \return the object TypeId
622 */
623 static TypeId GetTypeId();
624 TypeId GetInstanceTypeId() const override;
625 void Print(std::ostream& os) const override;
626 uint32_t GetSerializedSize() const override;
627 void Serialize(Buffer::Iterator start) const override;
628 uint32_t Deserialize(Buffer::Iterator start) override;
629
630 private:
631 uint8_t m_reserved; ///< changed as per the amendment 802.16e-2005
632
633 uint8_t m_ucdCount; ///< UCD count
634 uint32_t m_allocationStartTime; ///< allocation start time
635 std::list<OfdmUlMapIe> m_ulMapElements; ///< UL map elements
636};
637
638} // namespace ns3
639
640#endif /* UL_MAP_H */
iterator in a Buffer instance
Definition buffer.h:89
Cid class.
Definition cid.h:26
Protocol header serialization and deserialization.
Definition header.h:33
This class implements the OFDM UCD channel encodings as described by "IEEE Standard forLocal and metr...
uint16_t GetSize() const
Get size.
Buffer::Iterator DoWrite(Buffer::Iterator start) const override
Write item.
uint8_t m_sbchnlFocContCodes
SB channel for control codes.
Buffer::Iterator DoRead(Buffer::Iterator start) override
Read item.
void SetSbchnlReqRegionFullParams(uint8_t sbchnlReqRegionFullParams)
Set SB channel reguest region full parameters.
uint8_t GetSbchnlReqRegionFullParams() const
Get SB channel request region full parameters.
void SetSbchnlFocContCodes(uint8_t sbchnlFocContCodes)
Set SB channel for control codes.
uint8_t GetSbchnlFocContCodes() const
Get SB channel for control codes.
uint8_t m_sbchnlReqRegionFullParams
SB channel request region full parameters.
This class implements the UL burst profile as described by "IEEE Standard forLocal and metropolitan a...
uint16_t GetSize() const
Get size.
void SetLength(uint8_t length)
Set length.
void SetUiuc(uint8_t uiuc)
Set UIUC.
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
void SetType(uint8_t type)
Set type.
uint8_t GetFecCodeType() const
Get FEC code type.
uint8_t GetType() const
Get type.
uint8_t GetLength() const
Get length.
uint8_t GetUiuc() const
Get UIUC.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint8_t m_fecCodeType
FEC code type.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
This class implements the UL-MAP_IE message as described by "IEEE Standard forLocal and metropolitan ...
uint16_t GetSize() const
Get size.
uint16_t GetDuration() const
Get duration.
void SetStartTime(uint16_t startTime)
Set start time.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
Cid GetCid() const
Get CID.
uint8_t GetUiuc() const
Get UIUC.
void SetDuration(uint16_t duration)
Set duration.
void SetMidambleRepetitionInterval(uint8_t midambleRepetitionInterval)
Set midambe repetition interval.
void SetSubchannelIndex(uint8_t subchannelIndex)
Set subchannel index.
uint16_t GetStartTime() const
Get start time.
uint8_t m_subchannelIndex
subchannel index
uint8_t m_midambleRepetitionInterval
midamble repetition interval
uint8_t GetSubchannelIndex() const
Get subchannel index.
uint16_t m_startTime
start time
uint8_t m_uiuc
UIUC.
void SetCid(const Cid &cid)
Set CID.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
uint16_t m_duration
duration
void SetUiuc(uint8_t uiuc)
Set UIUC.
uint8_t GetMidambleRepetitionInterval() const
Get Midamble repetition interval.
a unique identifier for an interface.
Definition type-id.h:48
This class implements the UCD channel encodings as described by "IEEE Standard forLocal and metropoli...
void SetRangReqOppSize(uint16_t rangReqOppSize)
Set range request opp size.
void SetFrequency(uint32_t frequency)
Set frequency.
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
Read item.
uint16_t m_bwReqOppSize
BW request opp size.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
Write item.
uint32_t m_frequency
frequency
uint16_t m_rangReqOppSize
range request opp size
uint16_t GetSize() const
Get size.
uint16_t GetRangReqOppSize() const
Get range request opp size.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
void SetBwReqOppSize(uint16_t bwReqOppSize)
Set BW request opp size.
uint16_t GetBwReqOppSize() const
Get BW request opp size.
uint32_t GetFrequency() const
Get frequency.
This class implements the UCD message as described by "IEEE Standard forLocal and metropolitan area n...
static TypeId GetTypeId()
Get the type ID.
uint8_t GetRangingBackoffEnd() const
Get ranging backoff end.
void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles)
Set NR UL burst profiles.
uint8_t m_nrUlBurstProfiles
number UL burst profiles
uint8_t GetNrUlBurstProfiles() const
Get number UL burst profiles.
uint8_t m_rangingBackoffStart
ranging backoff start
uint8_t m_requestBackoffEnd
request backoff end
uint8_t m_requestBackoffStart
request backoff start
uint8_t m_rangingBackoffEnd
ranging backoff end
uint8_t GetRequestBackoffStart() const
Get request backoff start.
void AddUlBurstProfile(OfdmUlBurstProfile ulBurstProfile)
Add UL burst profile.
void Print(std::ostream &os) const override
void SetChannelEncodings(OfdmUcdChannelEncodings channelEncodings)
Set channel encodings.
std::vector< OfdmUlBurstProfile > GetUlBurstProfiles() const
Get UL burst profiles.
uint8_t GetConfigurationChangeCount() const
Get configuration change count.
void SetConfigurationChangeCount(uint8_t ucdCount)
Set configuration change count.
uint32_t Deserialize(Buffer::Iterator start) override
void SetRangingBackoffStart(uint8_t rangingBackoffStart)
Set ranging backoff start.
void Serialize(Buffer::Iterator start) const override
void SetRangingBackoffEnd(uint8_t rangingBackoffEnd)
Set ranging backoff end.
uint32_t GetSerializedSize() const override
OfdmUcdChannelEncodings GetChannelEncodings() const
Get channel encodings.
void SetRequestBackoffEnd(uint8_t requestBackoffEnd)
Set request backoff end.
std::vector< OfdmUlBurstProfile > m_ulBurstProfiles
UL burst profiles.
uint8_t GetRangingBackoffStart() const
Get ranging backoff start.
uint8_t m_configurationChangeCount
configuration change count
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
~Ucd() override
uint8_t GetRequestBackoffEnd() const
Get request backoff end.
std::string GetName() const
Get name.
void SetRequestBackoffStart(uint8_t requestBackoffStart)
Set request backoff start.
OfdmUcdChannelEncodings m_channelEncodings
TLV Encoded information for the overall channel.
This class implements the UL-MAP_IE message as described by "IEEE Standard forLocal and metropolitan ...
void SetAllocationStartTime(uint32_t allocationStartTime)
Set allocation start time.
uint8_t m_ucdCount
UCD count.
std::list< OfdmUlMapIe > GetUlMapElements() const
Get UL map elements.
uint32_t GetAllocationStartTime() const
Get allocation start time.
std::string GetName() const
Get name.
uint8_t m_reserved
changed as per the amendment 802.16e-2005
void AddUlMapElement(OfdmUlMapIe ulMapElement)
Add UL map element.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
~UlMap() override
void SetUcdCount(uint8_t ucdCount)
Set UCD count.
uint32_t GetSerializedSize() const override
void Serialize(Buffer::Iterator start) const override
void Print(std::ostream &os) const override
uint32_t m_allocationStartTime
allocation start time
std::list< OfdmUlMapIe > m_ulMapElements
UL map elements.
static TypeId GetTypeId()
Get the type ID.
uint32_t Deserialize(Buffer::Iterator start) override
uint8_t GetUcdCount() const
Get UCD count.
Every class exported by the ns3 library is enclosed in the ns3 namespace.