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 
41 {
42 public:
43  UcdChannelEncodings (void);
44  virtual ~UcdChannelEncodings (void);
45 
46  void SetBwReqOppSize (uint16_t bwReqOppSize);
47  void SetRangReqOppSize (uint16_t rangReqOppSize);
48  void SetFrequency (uint32_t frequency);
49 
50  uint16_t GetBwReqOppSize (void) const;
51  uint16_t GetRangReqOppSize (void) const;
52  uint32_t GetFrequency (void) const;
53 
54  uint16_t GetSize (void) const;
55 
58 private:
59  virtual Buffer::Iterator DoWrite (Buffer::Iterator start) const = 0;
60  virtual Buffer::Iterator DoRead (Buffer::Iterator start) = 0;
61 
62 
63  uint16_t m_bwReqOppSize;
64  uint16_t m_rangReqOppSize;
65  uint32_t m_frequency;
66 };
67 
68 } // namespace ns3
69 
70 #endif /* UCD_CHANNEL_ENCODINGS_H */
71 
72 // ----------------------------------------------------------------------------------------------------------
73 
74 #ifndef OFDM_UCD_CHANNEL_ENCODINGS_H
75 #define OFDM_UCD_CHANNEL_ENCODINGS_H
76 
77 #include <stdint.h>
78 
79 namespace ns3 {
80 
82 {
89 public:
92 
93  void SetSbchnlReqRegionFullParams (uint8_t sbchnlReqRegionFullParams);
94  void SetSbchnlFocContCodes (uint8_t sbchnlFocContCodes);
95 
96  uint8_t GetSbchnlReqRegionFullParams (void) const;
97  uint8_t GetSbchnlFocContCodes (void) const;
98 
99  uint16_t GetSize (void) const;
100 private:
102  virtual Buffer::Iterator DoRead (Buffer::Iterator start);
103 
106 };
107 
108 } // namespace ns3
109 
110 #endif /* OFDM_UCD_CHANNEL_ENCODINGS_H */
111 
112 // ----------------------------------------------------------------------------------------------------------
113 
114 #ifndef OFDM_UL_BURST_PROFILE_H
115 #define OFDM_UL_BURST_PROFILE_H
116 
117 #include <stdint.h>
118 #include "ns3/buffer.h"
119 
120 namespace ns3 {
121 
123 {
130 public:
131  enum Uiuc
132  {
147  };
148 
149  OfdmUlBurstProfile (void);
150  ~OfdmUlBurstProfile (void);
151 
152  void SetType (uint8_t type);
153  void SetLength (uint8_t length);
154  void SetUiuc (uint8_t uiuc);
155  void SetFecCodeType (uint8_t fecCodeType);
156 
157  uint8_t GetType (void) const;
158  uint8_t GetLength (void) const;
159  uint8_t GetUiuc (void) const;
160  uint8_t GetFecCodeType (void) const;
161 
162  uint16_t GetSize (void) const;
163 
166 private:
167  uint8_t m_type;
168  uint8_t m_length;
169  uint8_t m_uiuc;
170 
171  // TLV Encoded information
172  uint8_t m_fecCodeType;
173 };
174 
175 } // namespace ns3
176 
177 #endif /* OFDM_UL_BURST_PROFILE_H */
178 
179 // ----------------------------------------------------------------------------------------------------------
180 
181 #ifndef UCD_H
182 #define UCD_H
183 
184 #include <stdint.h>
185 #include "ns3/header.h"
186 #include <vector>
187 
188 namespace ns3 {
189 
190 class Ucd : public Header
191 {
198 public:
199  Ucd (void);
200  virtual ~Ucd (void);
201 
202  void SetConfigurationChangeCount (uint8_t ucdCount);
203  void SetRangingBackoffStart (uint8_t rangingBackoffStart);
204  void SetRangingBackoffEnd (uint8_t rangingBackoffEnd);
205  void SetRequestBackoffStart (uint8_t requestBackoffStart);
206  void SetRequestBackoffEnd (uint8_t requestBackoffEnd);
207  void SetChannelEncodings (OfdmUcdChannelEncodings channelEncodings);
208  void AddUlBurstProfile (OfdmUlBurstProfile ulBurstProfile);
209  void SetNrUlBurstProfiles (uint8_t nrUlBurstProfiles);
210 
211  uint8_t GetConfigurationChangeCount (void) const;
212  uint8_t GetRangingBackoffStart (void) const;
213  uint8_t GetRangingBackoffEnd (void) const;
214  uint8_t GetRequestBackoffStart (void) const;
215  uint8_t GetRequestBackoffEnd (void) const;
217  std::vector<OfdmUlBurstProfile> GetUlBurstProfiles (void) const;
218  uint8_t GetNrUlBurstProfiles (void) const;
219 
220  std::string GetName (void) const;
221  static TypeId GetTypeId (void);
222  virtual TypeId GetInstanceTypeId (void) const;
223  void Print (std::ostream &os) const;
224  uint32_t GetSerializedSize (void) const;
225  void Serialize (Buffer::Iterator start) const;
226  uint32_t Deserialize (Buffer::Iterator start);
227 private:
233  OfdmUcdChannelEncodings m_channelEncodings; // TLV Encoded information for the overall channel
234  std::vector<OfdmUlBurstProfile> m_ulBurstProfiles;
235 
237 };
238 
239 } // namespace ns3
240 
241 #endif /* UCD_H */
242 
243 // ----------------------------------------------------------------------------------------------------------
244 
245 #ifndef OFDM_UL_MAP_IE_H
246 #define OFDM_UL_MAP_IE_H
247 
248 #include <stdint.h>
249 #include "ns3/header.h"
250 #include "cid.h"
251 
252 namespace ns3 {
253 
255 {
263 public:
264  OfdmUlMapIe (void);
265  ~OfdmUlMapIe (void);
266 
267  void SetCid (Cid cid);
268  void SetStartTime (uint16_t startTime);
269  void SetSubchannelIndex (uint8_t subchannelIndex);
270  void SetUiuc (uint8_t uiuc);
271  void SetDuration (uint16_t duration);
272  void SetMidambleRepetitionInterval (uint8_t midambleRepetitionInterval);
273 
274  Cid GetCid (void) const;
275  uint16_t GetStartTime (void) const;
276  uint8_t GetSubchannelIndex (void) const;
277  uint8_t GetUiuc (void) const;
278  uint16_t GetDuration (void) const;
279  uint8_t GetMidambleRepetitionInterval (void) const;
280 
281  uint16_t GetSize (void) const;
282 
285 private:
287  uint16_t m_startTime;
289  uint8_t m_uiuc;
290  uint16_t m_duration;
292 
293  // fields to be implemented later on:
294  // m_focusedContentionIe()
295  // m_subchannelizedNetworkEntryIe()
296  // m_ulExtendedIe()
297  // m_paddingNibble;
298 };
299 
300 } // namespace ns3
301 
302 #endif /* OFDM_UL_MAP_IE_H */
303 
304 // ----------------------------------------------------------------------------------------------------------
305 
306 #ifndef UL_MAP_H
307 #define UL_MAP_H
308 
309 #include <stdint.h>
310 #include "ns3/header.h"
311 #include <vector>
312 
313 namespace ns3 {
314 
315 class UlMap : public Header
316 {
323 public:
324  UlMap (void);
325  virtual ~UlMap (void);
326 
327  void SetUcdCount (uint8_t ucdCount);
328  void SetAllocationStartTime (uint32_t allocationStartTime);
329  void AddUlMapElement (OfdmUlMapIe ulMapElement);
330 
331  uint8_t GetUcdCount (void) const;
332  uint32_t GetAllocationStartTime (void) const;
333  std::list<OfdmUlMapIe> GetUlMapElements (void) const;
334 
335  std::string GetName (void) const;
336  static TypeId GetTypeId (void);
337  virtual TypeId GetInstanceTypeId (void) const;
338  void Print (std::ostream &os) const;
339  uint32_t GetSerializedSize (void) const;
340  void Serialize (Buffer::Iterator start) const;
341  uint32_t Deserialize (Buffer::Iterator start);
342 private:
343  uint8_t m_reserved; // changed as per the amendment 802.16e-2005
344 
345  uint8_t m_ucdCount;
347  std::list<OfdmUlMapIe> m_ulMapElements;
348 };
349 
350 } // namespace ns3
351 
352 #endif /* UL_MAP_H */
353 
Protocol header serialization and deserialization.
Definition: header.h:42
virtual ~UlMap(void)
void SetUcdCount(uint8_t ucdCount)
virtual ~UcdChannelEncodings(void)
uint8_t m_ucdCount
void SetCid(Cid cid)
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
void Serialize(Buffer::Iterator start) const
uint8_t GetConfigurationChangeCount(void) const
uint32_t GetSerializedSize(void) const
OfdmUlMapIe(void)
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
void SetSubchannelIndex(uint8_t subchannelIndex)
uint8_t m_nrUlBurstProfiles
def start()
Definition: core.py:1482
void SetRangingBackoffEnd(uint8_t rangingBackoffEnd)
uint16_t GetSize(void) const
Cid GetCid(void) const
uint32_t GetSerializedSize(void) const
Buffer::Iterator Write(Buffer::Iterator start) const
UlMap(void)
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
static TypeId GetTypeId(void)
void SetLength(uint8_t length)
uint8_t GetRequestBackoffEnd(void) const
std::list< OfdmUlMapIe > m_ulMapElements
uint16_t GetRangReqOppSize(void) const
void SetChannelEncodings(OfdmUcdChannelEncodings channelEncodings)
iterator in a Buffer instance
Definition: buffer.h:98
uint8_t m_requestBackoffStart
void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles)
Buffer::Iterator Write(Buffer::Iterator start) const
void SetSbchnlReqRegionFullParams(uint8_t sbchnlReqRegionFullParams)
OfdmUcdChannelEncodings(void)
This class implements the UCD channel encodings as described by "IEEE Standard for Local and metropol...
void SetRequestBackoffStart(uint8_t requestBackoffStart)
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
uint32_t GetFrequency(void) const
uint32_t Deserialize(Buffer::Iterator start)
uint8_t GetSbchnlReqRegionFullParams(void) const
uint8_t m_rangingBackoffEnd
uint8_t m_configurationChangeCount
void SetSbchnlFocContCodes(uint8_t sbchnlFocContCodes)
uint8_t m_rangingBackoffStart
void SetFecCodeType(uint8_t fecCodeType)
static TypeId GetTypeId(void)
OfdmUcdChannelEncodings GetChannelEncodings(void) const
double startTime
void SetUiuc(uint8_t uiuc)
Introspection did not find any typical Config paths.
void SetAllocationStartTime(uint32_t allocationStartTime)
uint8_t GetRangingBackoffStart(void) const
void SetRangingBackoffStart(uint8_t rangingBackoffStart)
uint8_t GetFecCodeType(void) const
void SetDuration(uint16_t duration)
std::string GetName(void) const
std::list< OfdmUlMapIe > GetUlMapElements(void) const
uint8_t GetType(void) const
void SetBwReqOppSize(uint16_t bwReqOppSize)
void AddUlBurstProfile(OfdmUlBurstProfile ulBurstProfile)
uint8_t GetUiuc(void) const
void Print(std::ostream &os) const
Buffer::Iterator Read(Buffer::Iterator start)
uint8_t GetUiuc(void) const
std::vector< OfdmUlBurstProfile > m_ulBurstProfiles
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t GetDuration(void) const
Buffer::Iterator Write(Buffer::Iterator start) const
virtual ~Ucd(void)
uint16_t GetSize(void) const
uint8_t m_reserved
Definition: cid.h:35
Buffer::Iterator Read(Buffer::Iterator start)
void SetMidambleRepetitionInterval(uint8_t midambleRepetitionInterval)
uint8_t GetUcdCount(void) const
void SetRangReqOppSize(uint16_t rangReqOppSize)
uint8_t GetNrUlBurstProfiles(void) const
uint8_t GetSubchannelIndex(void) const
void SetStartTime(uint16_t startTime)
std::string GetName(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint8_t GetSbchnlFocContCodes(void) const
void SetFrequency(uint32_t frequency)
uint8_t GetMidambleRepetitionInterval(void) const
virtual Buffer::Iterator DoRead(Buffer::Iterator start)
std::vector< OfdmUlBurstProfile > GetUlBurstProfiles(void) const
void SetConfigurationChangeCount(uint8_t ucdCount)
This class implements the UCD channel encodings as described by "IEEE Standard for Local and metropol...
Introspection did not find any typical Config paths.
Uiuc
This class implements the UL burst profile as described by "IEEE Standard for Local and metropolitan ...
void SetRequestBackoffEnd(uint8_t requestBackoffEnd)
uint8_t m_midambleRepetitionInterval
uint32_t GetAllocationStartTime(void) const
OfdmUcdChannelEncodings m_channelEncodings
uint8_t GetLength(void) const
uint32_t Deserialize(Buffer::Iterator start)
void Serialize(Buffer::Iterator start) const
uint32_t m_allocationStartTime
void Print(std::ostream &os) const
void AddUlMapElement(OfdmUlMapIe ulMapElement)
a unique identifier for an interface.
Definition: type-id.h:58
void SetUiuc(uint8_t uiuc)
Ucd(void)
This class implements the UCD message as described by "IEEE Standard for Local and metropolitan area ...
uint8_t m_requestBackoffEnd
uint8_t GetRequestBackoffStart(void) const
uint16_t GetBwReqOppSize(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t GetStartTime(void) const
uint8_t GetRangingBackoffEnd(void) const
Buffer::Iterator Read(Buffer::Iterator start)
void SetType(uint8_t type)
uint16_t GetSize(void) const
uint16_t GetSize(void) const