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 * 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 UCD_CHANNEL_ENCODINGS_H
23#define UCD_CHANNEL_ENCODINGS_H
24
25#include "ns3/buffer.h"
26
27#include <list>
28#include <stdint.h>
29
30namespace ns3
31{
32
40{
41 public:
43 virtual ~UcdChannelEncodings();
44
49 void SetBwReqOppSize(uint16_t bwReqOppSize);
54 void SetRangReqOppSize(uint16_t rangReqOppSize);
59 void SetFrequency(uint32_t frequency);
60
65 uint16_t GetBwReqOppSize() const;
70 uint16_t GetRangReqOppSize() const;
75 uint32_t GetFrequency() const;
76
81 uint16_t GetSize() const;
82
95
96 private:
102 virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const = 0;
109
110 uint16_t m_bwReqOppSize;
113};
114
115} // namespace ns3
116
117#endif /* UCD_CHANNEL_ENCODINGS_H */
118
119// ----------------------------------------------------------------------------------------------------------
120
121#ifndef OFDM_UCD_CHANNEL_ENCODINGS_H
122#define OFDM_UCD_CHANNEL_ENCODINGS_H
123
124#include <stdint.h>
125
126namespace ns3
127{
128
135{
136 public:
138 ~OfdmUcdChannelEncodings() override;
139
144 void SetSbchnlReqRegionFullParams(uint8_t sbchnlReqRegionFullParams);
149 void SetSbchnlFocContCodes(uint8_t sbchnlFocContCodes);
150
155 uint8_t GetSbchnlReqRegionFullParams() const;
160 uint8_t GetSbchnlFocContCodes() const;
161
166 uint16_t GetSize() const;
167
168 private:
174 Buffer::Iterator DoWrite(Buffer::Iterator start) const override;
181
184};
185
186} // namespace ns3
187
188#endif /* OFDM_UCD_CHANNEL_ENCODINGS_H */
189
190// ----------------------------------------------------------------------------------------------------------
191
192#ifndef OFDM_UL_BURST_PROFILE_H
193#define OFDM_UL_BURST_PROFILE_H
194
195#include "ns3/buffer.h"
196
197#include <stdint.h>
198
199namespace ns3
200{
201
208{
209 public:
211 enum Uiuc
212 {
227 };
228
231
236 void SetType(uint8_t type);
241 void SetLength(uint8_t length);
246 void SetUiuc(uint8_t uiuc);
251 void SetFecCodeType(uint8_t fecCodeType);
252
257 uint8_t GetType() const;
262 uint8_t GetLength() const;
267 uint8_t GetUiuc() const;
272 uint8_t GetFecCodeType() const;
273
278 uint16_t GetSize() const;
279
292
293 private:
294 uint8_t m_type;
295 uint8_t m_length;
296 uint8_t m_uiuc;
297
298 // TLV Encoded information
300};
301
302} // namespace ns3
303
304#endif /* OFDM_UL_BURST_PROFILE_H */
305
306// ----------------------------------------------------------------------------------------------------------
307
308#ifndef UCD_H
309#define UCD_H
310
311#include "ns3/header.h"
312
313#include <stdint.h>
314#include <vector>
315
316namespace ns3
317{
318
324class Ucd : public Header
325{
326 public:
327 Ucd();
328 ~Ucd() override;
329
334 void SetConfigurationChangeCount(uint8_t ucdCount);
339 void SetRangingBackoffStart(uint8_t rangingBackoffStart);
344 void SetRangingBackoffEnd(uint8_t rangingBackoffEnd);
349 void SetRequestBackoffStart(uint8_t requestBackoffStart);
354 void SetRequestBackoffEnd(uint8_t requestBackoffEnd);
359 void SetChannelEncodings(OfdmUcdChannelEncodings channelEncodings);
364 void AddUlBurstProfile(OfdmUlBurstProfile ulBurstProfile);
369 void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles);
370
375 uint8_t GetConfigurationChangeCount() const;
380 uint8_t GetRangingBackoffStart() const;
385 uint8_t GetRangingBackoffEnd() const;
390 uint8_t GetRequestBackoffStart() const;
395 uint8_t GetRequestBackoffEnd() const;
405 std::vector<OfdmUlBurstProfile> GetUlBurstProfiles() const;
410 uint8_t GetNrUlBurstProfiles() const;
411
416 std::string GetName() const;
421 static TypeId GetTypeId();
422 TypeId GetInstanceTypeId() const override;
423 void Print(std::ostream& os) const override;
424 uint32_t GetSerializedSize() const override;
425 void Serialize(Buffer::Iterator start) const override;
426 uint32_t Deserialize(Buffer::Iterator start) override;
427
428 private:
435 std::vector<OfdmUlBurstProfile> m_ulBurstProfiles;
436
438};
439
440} // namespace ns3
441
442#endif /* UCD_H */
443
444// ----------------------------------------------------------------------------------------------------------
445
446#ifndef OFDM_UL_MAP_IE_H
447#define OFDM_UL_MAP_IE_H
448
449#include "cid.h"
450
451#include "ns3/header.h"
452
453#include <stdint.h>
454
455namespace ns3
456{
457
464{
465 public:
466 OfdmUlMapIe();
467 ~OfdmUlMapIe();
468
473 void SetCid(const Cid& cid);
478 void SetStartTime(uint16_t startTime);
483 void SetSubchannelIndex(uint8_t subchannelIndex);
488 void SetUiuc(uint8_t uiuc);
493 void SetDuration(uint16_t duration);
498 void SetMidambleRepetitionInterval(uint8_t midambleRepetitionInterval);
499
504 Cid GetCid() const;
509 uint16_t GetStartTime() const;
514 uint8_t GetSubchannelIndex() const;
519 uint8_t GetUiuc() const;
524 uint16_t GetDuration() const;
529 uint8_t GetMidambleRepetitionInterval() const;
530
535 uint16_t GetSize() const;
536
549
550 private:
552 uint16_t m_startTime;
554 uint8_t m_uiuc;
555 uint16_t m_duration;
557
558 // fields to be implemented later on:
559 // m_focusedContentionIe()
560 // m_subchannelizedNetworkEntryIe()
561 // m_ulExtendedIe()
562 // m_paddingNibble;
563};
564
565} // namespace ns3
566
567#endif /* OFDM_UL_MAP_IE_H */
568
569// ----------------------------------------------------------------------------------------------------------
570
571#ifndef UL_MAP_H
572#define UL_MAP_H
573
574#include "ns3/header.h"
575
576#include <stdint.h>
577#include <vector>
578
579namespace ns3
580{
581
587class UlMap : public Header
588{
589 public:
590 UlMap();
591 ~UlMap() override;
592
597 void SetUcdCount(uint8_t ucdCount);
602 void SetAllocationStartTime(uint32_t allocationStartTime);
607 void AddUlMapElement(OfdmUlMapIe ulMapElement);
608
613 uint8_t GetUcdCount() const;
623 std::list<OfdmUlMapIe> GetUlMapElements() const;
624
629 std::string GetName() const;
634 static TypeId GetTypeId();
635 TypeId GetInstanceTypeId() const override;
636 void Print(std::ostream& os) const override;
637 uint32_t GetSerializedSize() const override;
638 void Serialize(Buffer::Iterator start) const override;
639 uint32_t Deserialize(Buffer::Iterator start) override;
640
641 private:
642 uint8_t m_reserved;
643
644 uint8_t m_ucdCount;
646 std::list<OfdmUlMapIe> m_ulMapElements;
647};
648
649} // namespace ns3
650
651#endif /* UL_MAP_H */
iterator in a Buffer instance
Definition: buffer.h:100
Cid class.
Definition: cid.h:37
Protocol header serialization and deserialization.
Definition: header.h:44
This class implements the OFDM UCD channel encodings as described by "IEEE Standard for Local and met...
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 for Local and metropolitan ...
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 for Local 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:59
This class implements the UCD channel encodings as described by "IEEE Standard for Local and metropol...
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 for Local and metropolitan area ...
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 for Local 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.