A Discrete-Event Network Simulator
API
dl-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 #ifndef DCD_CHANNEL_ENCODINGS_H
24 #define DCD_CHANNEL_ENCODINGS_H
25 
26 #include <stdint.h>
27 #include "ns3/buffer.h"
28 #include <list>
29 
30 namespace ns3 {
31 
40 {
41 public:
42  DcdChannelEncodings (void);
43  virtual ~DcdChannelEncodings (void);
44 
45  void SetBsEirp (uint16_t bs_eirp);
46  void SetEirxPIrMax (uint16_t rss_ir_max);
47  void SetFrequency (uint32_t frequency);
48 
49  uint16_t GetBsEirp (void) const;
50  uint16_t GetEirxPIrMax (void) const;
51  uint32_t GetFrequency (void) const;
52 
53  uint16_t GetSize (void) const;
54 
57 private:
58  virtual Buffer::Iterator DoWrite (Buffer::Iterator start) const = 0;
59  virtual Buffer::Iterator DoRead (Buffer::Iterator start) = 0;
60 
61  uint16_t m_bsEirp;
62  uint16_t m_eirXPIrMax;
63  uint32_t m_frequency;
64 
65 };
66 
67 } // namespace ns3
68 
69 #endif /* DCD_CHANNEL_ENCODINGS_H */
70 
71 // ----------------------------------------------------------------------------------------------------------
72 
73 #ifndef OFDM_DCD_CHANNEL_ENCODINGS_H
74 #define OFDM_DCD_CHANNEL_ENCODINGS_H
75 
76 #include <stdint.h>
77 #include "ns3/mac48-address.h"
78 
79 namespace ns3 {
80 
82 {
90 public:
93 
94  void SetChannelNr (uint8_t channelNr);
95  void SetTtg (uint8_t ttg);
96  void SetRtg (uint8_t rtg);
97 
98  void SetBaseStationId (Mac48Address baseStationId);
99  void SetFrameDurationCode (uint8_t frameDurationCode);
100  void SetFrameNumber (uint32_t frameNumber);
101 
102  uint8_t GetChannelNr (void) const;
103  uint8_t GetTtg (void) const;
104  uint8_t GetRtg (void) const;
105 
106  Mac48Address GetBaseStationId (void) const;
107  uint8_t GetFrameDurationCode (void) const;
108  uint32_t GetFrameNumber (void) const;
109 
110  uint16_t GetSize (void) const;
111 private:
113  virtual Buffer::Iterator DoRead (Buffer::Iterator start);
114 
115  uint8_t m_channelNr;
116  uint8_t m_ttg;
117  uint8_t m_rtg;
118 
122  uint32_t m_frameNumber;
123 };
124 
125 } // namespace ns3
126 
127 #endif /* OFDM_DCD_CHANNEL_ENCODINGS_H */
128 
129 // ----------------------------------------------------------------------------------------------------------
130 
131 #ifndef OFDM_DL_BURST_PROFILE_H
132 #define OFDM_DL_BURST_PROFILE_H
133 
134 #include <stdint.h>
135 #include "ns3/buffer.h"
136 
137 namespace ns3 {
138 
140 {
147 public:
148  enum Diuc
149  {
162  // 12 is reserved
163  DIUC_GAP = 13,
165  };
166 
167  OfdmDlBurstProfile (void);
168  ~OfdmDlBurstProfile (void);
169 
170  void SetType (uint8_t type);
171  void SetLength (uint8_t length);
172  void SetDiuc (uint8_t diuc);
173 
174  void SetFecCodeType (uint8_t fecCodeType);
175 
176  uint8_t GetType (void) const;
177  uint8_t GetLength (void) const;
178  uint8_t GetDiuc (void) const;
179 
180  uint8_t GetFecCodeType (void) const;
181 
182  uint16_t GetSize (void) const;
183 
186 private:
187  uint8_t m_type;
188  uint8_t m_length;
189  uint8_t m_diuc;
190 
191  // TLV Encoded information
192  uint8_t m_fecCodeType;
193 };
194 
195 } // namespace ns3
196 
197 #endif /* OFDM_DL_BURST_PROFILE_H */
198 
199 // ----------------------------------------------------------------------------------------------------------
200 
201 #ifndef DCD_H
202 #define DCD_H
203 
204 #include <stdint.h>
205 #include "ns3/header.h"
206 #include <vector>
207 
208 namespace ns3 {
209 
210 class Dcd : public Header
211 {
218 public:
219  Dcd (void);
220  virtual ~Dcd (void);
221 
222  void SetConfigurationChangeCount (uint8_t configurationChangeCount);
223  void SetChannelEncodings (OfdmDcdChannelEncodings channelEncodings);
224  void AddDlBurstProfile (OfdmDlBurstProfile dlBurstProfile);
225  void SetNrDlBurstProfiles (uint8_t nrDlBurstProfiles);
226 
227  uint8_t GetConfigurationChangeCount (void) const;
229  std::vector<OfdmDlBurstProfile> GetDlBurstProfiles (void) const;
230  uint8_t GetNrDlBurstProfiles (void) const;
231 
232  std::string GetName (void) const;
233  static TypeId GetTypeId (void);
234  virtual TypeId GetInstanceTypeId (void) const;
235  void Print (std::ostream &os) const;
236  uint32_t GetSerializedSize (void) const;
237  void Serialize (Buffer::Iterator start) const;
238  uint32_t Deserialize (Buffer::Iterator start);
239 private:
240  uint8_t m_reserved; // changed as per the amendment 802.16e-2005
242  OfdmDcdChannelEncodings m_channelEncodings; // TLV Encoded information for the overall channel
243  std::vector<OfdmDlBurstProfile> m_dlBurstProfiles; // vector of download burst profiles
244 
246 };
247 
248 } // namespace ns3
249 
250 #endif /* DCD_H */
251 
252 // ----------------------------------------------------------------------------------------------------------
253 
254 #ifndef OFDM_DL_MAP_IE_H
255 #define OFDM_DL_MAP_IE_H
256 
257 #include <stdint.h>
258 #include "cid.h"
259 
260 namespace ns3 {
261 
263 {
270 public:
271  OfdmDlMapIe (void);
272  ~OfdmDlMapIe (void);
273 
274  void SetCid (Cid cid);
275  void SetDiuc (uint8_t diuc);
276  void SetPreamblePresent (uint8_t preamblePresent);
277  void SetStartTime (uint16_t startTime);
278 
279  Cid GetCid (void) const;
280  uint8_t GetDiuc (void) const;
281  uint8_t GetPreamblePresent (void) const;
282  uint16_t GetStartTime (void) const;
283 
284  uint16_t GetSize (void) const;
285 
288 private:
290  uint8_t m_diuc;
292  uint16_t m_startTime;
293 
294 };
295 
296 } // namespace ns3
297 
298 #endif /* OFDM_DL_MAP_IE_H */
299 
300 // ----------------------------------------------------------------------------------------------------------
301 
302 #ifndef DL_MAP_H
303 #define DL_MAP_H
304 
305 #include <stdint.h>
306 #include <vector>
307 #include "ns3/header.h"
308 #include "ns3/mac48-address.h"
309 
310 namespace ns3 {
311 
312 class DlMap : public Header
313 {
321 public:
322  DlMap (void);
323  virtual ~DlMap (void);
324 
325  void SetDcdCount (uint8_t dcdCount);
326  void SetBaseStationId (Mac48Address baseStationID);
327  void AddDlMapElement (OfdmDlMapIe dlMapElement);
328 
329  uint8_t GetDcdCount (void) const;
330  Mac48Address GetBaseStationId (void) const;
331  std::list<OfdmDlMapIe> GetDlMapElements (void) const;
332 
333  std::string GetName (void) const;
334  static TypeId GetTypeId (void);
335  virtual TypeId GetInstanceTypeId (void) const;
336  void Print (std::ostream &os) const;
337  uint32_t GetSerializedSize (void) const;
338  void Serialize (Buffer::Iterator start) const;
339  uint32_t Deserialize (Buffer::Iterator start);
340 private:
341  uint8_t m_dcdCount;
343  std::list<OfdmDlMapIe> m_dlMapElements;
344  // m_paddingNibble; //fields to be implemented later on:
345 };
346 
347 } // namespace ns3
348 
349 #endif /* DL_MAP_H */
Protocol header serialization and deserialization.
Definition: header.h:42
uint8_t GetFecCodeType(void) const
OfdmDcdChannelEncodings GetChannelEncodings(void) const
uint8_t GetPreamblePresent(void) const
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
Introspection did not find any typical Config paths.
uint16_t GetSize(void) const
uint8_t m_configurationChangeCount
void SetEirxPIrMax(uint16_t rss_ir_max)
uint8_t GetFrameDurationCode(void) const
std::list< OfdmDlMapIe > GetDlMapElements(void) const
void SetLength(uint8_t length)
void SetBsEirp(uint16_t bs_eirp)
std::string GetName(void) const
def start()
Definition: core.py:1482
Buffer::Iterator Read(Buffer::Iterator start)
static TypeId GetTypeId(void)
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
uint8_t GetConfigurationChangeCount(void) const
void Serialize(Buffer::Iterator start) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Buffer::Iterator Read(Buffer::Iterator start)
void SetChannelNr(uint8_t channelNr)
uint8_t GetDcdCount(void) const
void SetType(uint8_t type)
uint16_t GetSize(void) const
void SetDiuc(uint8_t diuc)
OfdmDcdChannelEncodings(void)
This class implements the DCD channel encodings as described by "IEEE Standard for Local and metropol...
void SetStartTime(uint16_t startTime)
iterator in a Buffer instance
Definition: buffer.h:98
void SetPreamblePresent(uint8_t preamblePresent)
void SetFrameDurationCode(uint8_t frameDurationCode)
void SetBaseStationId(Mac48Address baseStationID)
uint8_t m_nrDlBurstProfiles
void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles)
void SetDiuc(uint8_t diuc)
uint8_t GetLength(void) const
static TypeId GetTypeId(void)
void SetDcdCount(uint8_t dcdCount)
double startTime
uint32_t GetSerializedSize(void) const
void Print(std::ostream &os) const
std::list< OfdmDlMapIe > m_dlMapElements
uint32_t GetSerializedSize(void) const
uint8_t GetRtg(void) const
Diuc
This class implements the OFDM Downlink burst profile descriptor as described by "IEEE Standard for L...
uint8_t GetChannelNr(void) const
OfdmDcdChannelEncodings m_channelEncodings
Buffer::Iterator Write(Buffer::Iterator start) const
uint32_t Deserialize(Buffer::Iterator start)
Introspection did not find any typical Config paths.
uint8_t m_dcdCount
void SetFrameNumber(uint32_t frameNumber)
uint16_t GetSize(void) const
virtual ~Dcd(void)
uint16_t GetEirxPIrMax(void) const
uint8_t GetTtg(void) const
void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings)
Buffer::Iterator Write(Buffer::Iterator start) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t GetBsEirp(void) const
uint16_t GetSize(void) const
DlMap(void)
This class implements DL-map ie as described by "IEEE Standard for Local and metropolitan area networ...
OfdmDlMapIe(void)
This class implements DL-map ie as described by "IEEE Standard for Local and metropolitan area networ...
uint32_t Deserialize(Buffer::Iterator start)
void SetFrequency(uint32_t frequency)
Definition: cid.h:35
uint32_t GetFrequency(void) const
void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile)
an EUI-48 address
Definition: mac48-address.h:43
void Print(std::ostream &os) const
Mac48Address GetBaseStationId(void) const
uint8_t GetType(void) const
Cid GetCid(void) const
Mac48Address m_baseStationId
uint8_t GetNrDlBurstProfiles(void) const
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const
std::vector< OfdmDlBurstProfile > m_dlBurstProfiles
This class implements the DCD channel encodings as described by "IEEE Standard for Local and metropol...
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t GetStartTime(void) const
std::string GetName(void) const
uint8_t GetDiuc(void) const
void SetBaseStationId(Mac48Address baseStationId)
uint8_t GetDiuc(void) const
void SetCid(Cid cid)
virtual ~DcdChannelEncodings(void)
void AddDlMapElement(OfdmDlMapIe dlMapElement)
uint32_t GetFrameNumber(void) const
Mac48Address GetBaseStationId(void) const
uint8_t m_reserved
a unique identifier for an interface.
Definition: type-id.h:58
Dcd(void)
This class implements Downlink channel descriptor as described by "IEEE Standard for Local and metrop...
Buffer::Iterator Read(Buffer::Iterator start)
virtual Buffer::Iterator DoRead(Buffer::Iterator start)
void SetConfigurationChangeCount(uint8_t configurationChangeCount)
Buffer::Iterator Write(Buffer::Iterator start) const
void SetFecCodeType(uint8_t fecCodeType)
virtual ~DlMap(void)
void Serialize(Buffer::Iterator start) const