A Discrete-Event Network Simulator
API
ul-mac-messages.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007,2008,2009 INRIA, UDcast
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  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20  * <amine.ismail@UDcast.com>
21  */
22 
23 
24 #ifndef UCD_CHANNEL_ENCODINGS_H
25 #define UCD_CHANNEL_ENCODINGS_H
26 
27 #include <stdint.h>
28 #include "ns3/buffer.h"
29 #include <list>
30 
31 namespace ns3 {
32 
40 {
41 public:
42  UcdChannelEncodings (void);
43  virtual ~UcdChannelEncodings (void);
44 
49  void SetBwReqOppSize (uint16_t bwReqOppSize);
54  void SetRangReqOppSize (uint16_t rangReqOppSize);
59  void SetFrequency (uint32_t frequency);
60 
65  uint16_t GetBwReqOppSize (void) const;
70  uint16_t GetRangReqOppSize (void) const;
75  uint32_t GetFrequency (void) const;
76 
81  uint16_t GetSize (void) const;
82 
95 private:
101  virtual Buffer::Iterator DoWrite (Buffer::Iterator start) const = 0;
108 
109 
110  uint16_t m_bwReqOppSize;
111  uint16_t m_rangReqOppSize;
112  uint32_t m_frequency;
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 
126 namespace ns3 {
127 
134 {
135 public:
138 
143  void SetSbchnlReqRegionFullParams (uint8_t sbchnlReqRegionFullParams);
148  void SetSbchnlFocContCodes (uint8_t sbchnlFocContCodes);
149 
154  uint8_t GetSbchnlReqRegionFullParams (void) const;
159  uint8_t GetSbchnlFocContCodes (void) const;
160 
165  uint16_t GetSize (void) const;
166 private:
179 
182 };
183 
184 } // namespace ns3
185 
186 #endif /* OFDM_UCD_CHANNEL_ENCODINGS_H */
187 
188 // ----------------------------------------------------------------------------------------------------------
189 
190 #ifndef OFDM_UL_BURST_PROFILE_H
191 #define OFDM_UL_BURST_PROFILE_H
192 
193 #include <stdint.h>
194 #include "ns3/buffer.h"
195 
196 namespace ns3 {
197 
204 {
205 public:
207  enum Uiuc
208  {
223  };
224 
225  OfdmUlBurstProfile (void);
226  ~OfdmUlBurstProfile (void);
227 
232  void SetType (uint8_t type);
237  void SetLength (uint8_t length);
242  void SetUiuc (uint8_t uiuc);
247  void SetFecCodeType (uint8_t fecCodeType);
248 
253  uint8_t GetType (void) const;
258  uint8_t GetLength (void) const;
263  uint8_t GetUiuc (void) const;
268  uint8_t GetFecCodeType (void) const;
269 
274  uint16_t GetSize (void) const;
275 
288 private:
289  uint8_t m_type;
290  uint8_t m_length;
291  uint8_t m_uiuc;
292 
293  // TLV Encoded information
294  uint8_t m_fecCodeType;
295 };
296 
297 } // namespace ns3
298 
299 #endif /* OFDM_UL_BURST_PROFILE_H */
300 
301 // ----------------------------------------------------------------------------------------------------------
302 
303 #ifndef UCD_H
304 #define UCD_H
305 
306 #include <stdint.h>
307 #include "ns3/header.h"
308 #include <vector>
309 
310 namespace ns3 {
311 
317 class Ucd : public Header
318 {
319 public:
320  Ucd (void);
321  virtual ~Ucd (void);
322 
327  void SetConfigurationChangeCount (uint8_t ucdCount);
332  void SetRangingBackoffStart (uint8_t rangingBackoffStart);
337  void SetRangingBackoffEnd (uint8_t rangingBackoffEnd);
342  void SetRequestBackoffStart (uint8_t requestBackoffStart);
347  void SetRequestBackoffEnd (uint8_t requestBackoffEnd);
352  void SetChannelEncodings (OfdmUcdChannelEncodings channelEncodings);
357  void AddUlBurstProfile (OfdmUlBurstProfile ulBurstProfile);
362  void SetNrUlBurstProfiles (uint8_t nrUlBurstProfiles);
363 
368  uint8_t GetConfigurationChangeCount (void) const;
373  uint8_t GetRangingBackoffStart (void) const;
378  uint8_t GetRangingBackoffEnd (void) const;
383  uint8_t GetRequestBackoffStart (void) const;
388  uint8_t GetRequestBackoffEnd (void) const;
398  std::vector<OfdmUlBurstProfile> GetUlBurstProfiles (void) const;
403  uint8_t GetNrUlBurstProfiles (void) const;
404 
409  std::string GetName (void) const;
414  static TypeId GetTypeId (void);
415  virtual TypeId GetInstanceTypeId (void) const;
416  void Print (std::ostream &os) const;
417  uint32_t GetSerializedSize (void) const;
418  void Serialize (Buffer::Iterator start) const;
420 private:
427  std::vector<OfdmUlBurstProfile> m_ulBurstProfiles;
428 
430 };
431 
432 } // namespace ns3
433 
434 #endif /* UCD_H */
435 
436 // ----------------------------------------------------------------------------------------------------------
437 
438 #ifndef OFDM_UL_MAP_IE_H
439 #define OFDM_UL_MAP_IE_H
440 
441 #include <stdint.h>
442 #include "ns3/header.h"
443 #include "cid.h"
444 
445 namespace ns3 {
446 
453 {
454 public:
455  OfdmUlMapIe (void);
456  ~OfdmUlMapIe (void);
457 
462  void SetCid (const Cid &cid);
467  void SetStartTime (uint16_t startTime);
472  void SetSubchannelIndex (uint8_t subchannelIndex);
477  void SetUiuc (uint8_t uiuc);
482  void SetDuration (uint16_t duration);
487  void SetMidambleRepetitionInterval (uint8_t midambleRepetitionInterval);
488 
493  Cid GetCid (void) const;
498  uint16_t GetStartTime (void) const;
503  uint8_t GetSubchannelIndex (void) const;
508  uint8_t GetUiuc (void) const;
513  uint16_t GetDuration (void) const;
518  uint8_t GetMidambleRepetitionInterval (void) const;
519 
524  uint16_t GetSize (void) const;
525 
538 private:
540  uint16_t m_startTime;
542  uint8_t m_uiuc;
543  uint16_t m_duration;
545 
546  // fields to be implemented later on:
547  // m_focusedContentionIe()
548  // m_subchannelizedNetworkEntryIe()
549  // m_ulExtendedIe()
550  // m_paddingNibble;
551 };
552 
553 } // namespace ns3
554 
555 #endif /* OFDM_UL_MAP_IE_H */
556 
557 // ----------------------------------------------------------------------------------------------------------
558 
559 #ifndef UL_MAP_H
560 #define UL_MAP_H
561 
562 #include <stdint.h>
563 #include "ns3/header.h"
564 #include <vector>
565 
566 namespace ns3 {
567 
573 class UlMap : public Header
574 {
575 public:
576  UlMap (void);
577  virtual ~UlMap (void);
578 
583  void SetUcdCount (uint8_t ucdCount);
588  void SetAllocationStartTime (uint32_t allocationStartTime);
593  void AddUlMapElement (OfdmUlMapIe ulMapElement);
594 
599  uint8_t GetUcdCount (void) const;
604  uint32_t GetAllocationStartTime (void) const;
609  std::list<OfdmUlMapIe> GetUlMapElements (void) const;
610 
615  std::string GetName (void) const;
620  static TypeId GetTypeId (void);
621  virtual TypeId GetInstanceTypeId (void) const;
622  void Print (std::ostream &os) const;
623  uint32_t GetSerializedSize (void) const;
624  void Serialize (Buffer::Iterator start) const;
626 private:
627  uint8_t m_reserved;
628 
629  uint8_t m_ucdCount;
631  std::list<OfdmUlMapIe> m_ulMapElements;
632 };
633 
634 } // namespace ns3
635 
636 #endif /* UL_MAP_H */
637 
Protocol header serialization and deserialization.
Definition: header.h:42
This class implements the OFDM UCD channel encodings as described by "IEEE Standard for Local and met...
virtual ~UlMap(void)
uint16_t GetSize(void) const
Get size.
void SetCid(const Cid &cid)
Set CID.
void Serialize(Buffer::Iterator start) const
void SetUcdCount(uint8_t ucdCount)
Set UCD count.
virtual ~UcdChannelEncodings(void)
uint8_t m_ucdCount
UCD count.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint8_t GetSubchannelIndex(void) const
Get subchannel index.
uint8_t GetUiuc(void) const
Get UIUC.
uint8_t GetRangingBackoffEnd(void) const
Get ranging backoff end.
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
Read item.
std::string GetName(void) const
Get name.
uint8_t m_uiuc
UIUC.
uint16_t GetSize(void) const
Get size.
uint16_t GetStartTime(void) const
Get start time.
void SetSubchannelIndex(uint8_t subchannelIndex)
Set subchannel index.
uint8_t m_nrUlBurstProfiles
number UL burst profiles
uint8_t m_subchannelIndex
subchannel index
def start()
Definition: core.py:1855
void SetRangingBackoffEnd(uint8_t rangingBackoffEnd)
Set ranging backoff end.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint8_t GetSbchnlReqRegionFullParams(void) const
Get SB channel request region full parameters.
uint8_t GetConfigurationChangeCount(void) const
Get configuration change count.
This class implements the UL burst profile as described by "IEEE Standard for Local and metropolitan ...
uint16_t m_duration
duration
static TypeId GetTypeId(void)
Get the type ID.
void SetLength(uint8_t length)
Set length.
std::list< OfdmUlMapIe > m_ulMapElements
UL map elements.
uint8_t m_sbchnlFocContCodes
SB channel for control codes.
void SetChannelEncodings(OfdmUcdChannelEncodings channelEncodings)
Set channel encodings.
uint8_t GetUiuc(void) const
Get UIUC.
void Serialize(Buffer::Iterator start) const
iterator in a Buffer instance
Definition: buffer.h:98
uint8_t m_requestBackoffStart
request backoff start
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles)
Set NR UL burst profiles.
uint32_t GetSerializedSize(void) const
void SetSbchnlReqRegionFullParams(uint8_t sbchnlReqRegionFullParams)
Set SB channel reguest region full parameters.
void SetRequestBackoffStart(uint8_t requestBackoffStart)
Set request backoff start.
uint16_t m_rangReqOppSize
range request opp size
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
Write item.
uint8_t GetLength(void) const
Get length.
std::string GetName(void) const
Get name.
uint32_t Deserialize(Buffer::Iterator start)
uint8_t GetRequestBackoffStart(void) const
Get request backoff start.
uint8_t m_rangingBackoffEnd
ranging backoff end
uint8_t m_configurationChangeCount
configuration change count
void SetSbchnlFocContCodes(uint8_t sbchnlFocContCodes)
Set SB channel for control codes.
uint8_t m_rangingBackoffStart
ranging backoff start
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
static TypeId GetTypeId(void)
Get the type ID.
uint32_t m_frequency
frequency
double startTime
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
void SetUiuc(uint8_t uiuc)
Set UIUC.
This class implements the UCD message as described by "IEEE Standard for Local and metropolitan area ...
void SetAllocationStartTime(uint32_t allocationStartTime)
Set allocation start time.
uint32_t GetFrequency(void) const
Get frequency.
void SetRangingBackoffStart(uint8_t rangingBackoffStart)
Set ranging backoff start.
uint16_t m_startTime
start time
void SetDuration(uint16_t duration)
Set duration.
uint8_t m_fecCodeType
FEC code type.
void SetBwReqOppSize(uint16_t bwReqOppSize)
Set BW request opp size.
void AddUlBurstProfile(OfdmUlBurstProfile ulBurstProfile)
Add UL burst profile.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
std::vector< OfdmUlBurstProfile > m_ulBurstProfiles
UL burst profiles.
uint8_t GetType(void) const
Get type.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetAllocationStartTime(void) const
Get allocation start time.
virtual ~Ucd(void)
uint8_t m_reserved
changed as per the amendment 802.16e-2005
Cid class.
Definition: cid.h:37
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
void SetMidambleRepetitionInterval(uint8_t midambleRepetitionInterval)
Set midambe repetition interval.
std::list< OfdmUlMapIe > GetUlMapElements(void) const
Get UL map elements.
uint8_t GetRangingBackoffStart(void) const
Get ranging backoff start.
OfdmUcdChannelEncodings GetChannelEncodings(void) const
Get channel encodings.
void SetRangReqOppSize(uint16_t rangReqOppSize)
Set range request opp size.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
void SetStartTime(uint16_t startTime)
Set start time.
void Print(std::ostream &os) const
void Print(std::ostream &os) const
void SetFrequency(uint32_t frequency)
Set frequency.
virtual Buffer::Iterator DoRead(Buffer::Iterator start)
Read item.
uint16_t GetSize(void) const
Get size.
void SetConfigurationChangeCount(uint8_t ucdCount)
Set configuration change count.
This class implements the UCD channel encodings as described by "IEEE Standard for Local and metropol...
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
uint8_t GetRequestBackoffEnd(void) const
Get request backoff end.
void SetRequestBackoffEnd(uint8_t requestBackoffEnd)
Set request backoff end.
uint8_t m_midambleRepetitionInterval
midamble repetition interval
std::vector< OfdmUlBurstProfile > GetUlBurstProfiles(void) const
Get UL burst profiles.
OfdmUcdChannelEncodings m_channelEncodings
TLV Encoded information for the overall channel.
uint8_t GetMidambleRepetitionInterval(void) const
Get Midamble repetition interval.
uint8_t GetFecCodeType(void) const
Get FEC code type.
uint16_t GetDuration(void) const
Get duration.
uint8_t GetSbchnlFocContCodes(void) const
Get SB channel for control codes.
uint32_t Deserialize(Buffer::Iterator start)
Cid GetCid(void) const
Get CID.
uint32_t m_allocationStartTime
allocation start time
uint16_t GetSize(void) const
Get size.
uint32_t GetSerializedSize(void) const
uint16_t m_bwReqOppSize
BW request opp size.
uint8_t GetNrUlBurstProfiles(void) const
Get number UL burst profiles.
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
void AddUlMapElement(OfdmUlMapIe ulMapElement)
Add UL map element.
a unique identifier for an interface.
Definition: type-id.h:58
void SetUiuc(uint8_t uiuc)
Set UIUC.
uint8_t m_requestBackoffEnd
request backoff end
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const
Write item.
uint8_t m_sbchnlReqRegionFullParams
SB channel request region full parameters.
uint8_t GetUcdCount(void) const
Get UCD count.
uint16_t GetBwReqOppSize(void) const
Get BW request opp size.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
void SetType(uint8_t type)
Set type.
uint16_t GetRangReqOppSize(void) const
Get range request opp size.