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 
39 {
40 public:
41  DcdChannelEncodings (void);
42  virtual ~DcdChannelEncodings (void);
43 
48  void SetBsEirp (uint16_t bs_eirp);
53  void SetEirxPIrMax (uint16_t rss_ir_max);
58  void SetFrequency (uint32_t frequency);
59 
64  uint16_t GetBsEirp (void) const;
69  uint16_t GetEirxPIrMax (void) const;
74  uint32_t GetFrequency (void) const;
75 
80  uint16_t GetSize (void) const;
81 
94 private:
100  virtual Buffer::Iterator DoWrite (Buffer::Iterator start) const = 0;
107 
108  uint16_t m_bsEirp;
109  uint16_t m_eirXPIrMax;
110  uint32_t m_frequency;
111 
112 };
113 
114 } // namespace ns3
115 
116 #endif /* DCD_CHANNEL_ENCODINGS_H */
117 
118 // ----------------------------------------------------------------------------------------------------------
119 
120 #ifndef OFDM_DCD_CHANNEL_ENCODINGS_H
121 #define OFDM_DCD_CHANNEL_ENCODINGS_H
122 
123 #include <stdint.h>
124 #include "ns3/mac48-address.h"
125 
126 namespace ns3 {
127 
133 {
134 public:
137 
142  void SetChannelNr (uint8_t channelNr);
147  void SetTtg (uint8_t ttg);
152  void SetRtg (uint8_t rtg);
153 
158  void SetBaseStationId (Mac48Address baseStationId);
163  void SetFrameDurationCode (uint8_t frameDurationCode);
168  void SetFrameNumber (uint32_t frameNumber);
169 
174  uint8_t GetChannelNr (void) const;
179  uint8_t GetTtg (void) const;
184  uint8_t GetRtg (void) const;
185 
190  Mac48Address GetBaseStationId (void) const;
195  uint8_t GetFrameDurationCode (void) const;
200  uint32_t GetFrameNumber (void) const;
201 
206  uint16_t GetSize (void) const;
207 private:
220 
221  uint8_t m_channelNr;
222  uint8_t m_ttg;
223  uint8_t m_rtg;
224 
227  uint32_t m_frameNumber;
228 };
229 
230 } // namespace ns3
231 
232 #endif /* OFDM_DCD_CHANNEL_ENCODINGS_H */
233 
234 // ----------------------------------------------------------------------------------------------------------
235 
236 #ifndef OFDM_DL_BURST_PROFILE_H
237 #define OFDM_DL_BURST_PROFILE_H
238 
239 #include <stdint.h>
240 #include "ns3/buffer.h"
241 
242 namespace ns3 {
243 
251 {
252 public:
254  enum Diuc
255  {
268  // 12 is reserved
269  DIUC_GAP = 13,
271  };
272 
273  OfdmDlBurstProfile (void);
274  ~OfdmDlBurstProfile (void);
275 
280  void SetType (uint8_t type);
285  void SetLength (uint8_t length);
290  void SetDiuc (uint8_t diuc);
291 
296  void SetFecCodeType (uint8_t fecCodeType);
297 
302  uint8_t GetType (void) const;
304  uint8_t GetLength (void) const;
306  uint8_t GetDiuc (void) const;
307 
309  uint8_t GetFecCodeType (void) const;
310 
312  uint16_t GetSize (void) const;
313 
326 private:
327  uint8_t m_type;
328  uint8_t m_length;
329  uint8_t m_diuc;
330 
331  // TLV Encoded information
332  uint8_t m_fecCodeType;
333 };
334 
335 } // namespace ns3
336 
337 #endif /* OFDM_DL_BURST_PROFILE_H */
338 
339 // ----------------------------------------------------------------------------------------------------------
340 
341 #ifndef DCD_H
342 #define DCD_H
343 
344 #include <stdint.h>
345 #include "ns3/header.h"
346 #include <vector>
347 
348 namespace ns3 {
349 
355 class Dcd : public Header
356 {
357 public:
358  Dcd (void);
359  virtual ~Dcd (void);
360 
365  void SetConfigurationChangeCount (uint8_t configurationChangeCount);
370  void SetChannelEncodings (OfdmDcdChannelEncodings channelEncodings);
375  void AddDlBurstProfile (OfdmDlBurstProfile dlBurstProfile);
380  void SetNrDlBurstProfiles (uint8_t nrDlBurstProfiles);
381 
386  uint8_t GetConfigurationChangeCount (void) const;
396  std::vector<OfdmDlBurstProfile> GetDlBurstProfiles (void) const;
401  uint8_t GetNrDlBurstProfiles (void) const;
402 
407  std::string GetName (void) const;
412  static TypeId GetTypeId (void);
413  virtual TypeId GetInstanceTypeId (void) const;
414  void Print (std::ostream &os) const;
415  uint32_t GetSerializedSize (void) const;
416  void Serialize (Buffer::Iterator start) const;
418 private:
419  uint8_t m_reserved;
422  std::vector<OfdmDlBurstProfile> m_dlBurstProfiles;
423 
425 };
426 
427 } // namespace ns3
428 
429 #endif /* DCD_H */
430 
431 // ----------------------------------------------------------------------------------------------------------
432 
433 #ifndef OFDM_DL_MAP_IE_H
434 #define OFDM_DL_MAP_IE_H
435 
436 #include <stdint.h>
437 #include "cid.h"
438 
439 namespace ns3 {
440 
447 {
448 public:
449  OfdmDlMapIe (void);
450  ~OfdmDlMapIe (void);
451 
456  void SetCid (Cid cid);
461  void SetDiuc (uint8_t diuc);
466  void SetPreamblePresent (uint8_t preamblePresent);
471  void SetStartTime (uint16_t startTime);
472 
477  Cid GetCid (void) const;
482  uint8_t GetDiuc (void) const;
487  uint8_t GetPreamblePresent (void) const;
492  uint16_t GetStartTime (void) const;
493 
498  uint16_t GetSize (void) const;
499 
512 private:
514  uint8_t m_diuc;
516  uint16_t m_startTime;
517 
518 };
519 
520 } // namespace ns3
521 
522 #endif /* OFDM_DL_MAP_IE_H */
523 
524 // ----------------------------------------------------------------------------------------------------------
525 
526 #ifndef DL_MAP_H
527 #define DL_MAP_H
528 
529 #include <stdint.h>
530 #include <vector>
531 #include "ns3/header.h"
532 #include "ns3/mac48-address.h"
533 
534 namespace ns3 {
535 
541 class DlMap : public Header
542 {
543 public:
544  DlMap (void);
545  virtual ~DlMap (void);
546 
551  void SetDcdCount (uint8_t dcdCount);
556  void SetBaseStationId (Mac48Address baseStationID);
561  void AddDlMapElement (OfdmDlMapIe dlMapElement);
562 
567  uint8_t GetDcdCount (void) const;
572  Mac48Address GetBaseStationId (void) const;
577  std::list<OfdmDlMapIe> GetDlMapElements (void) const;
578 
583  std::string GetName (void) const;
588  static TypeId GetTypeId (void);
589  virtual TypeId GetInstanceTypeId (void) const;
590  void Print (std::ostream &os) const;
591  uint32_t GetSerializedSize (void) const;
592  void Serialize (Buffer::Iterator start) const;
594 private:
595  uint8_t m_dcdCount;
597  std::list<OfdmDlMapIe> m_dlMapElements;
598  // m_paddingNibble; //fields to be implemented later on:
599 };
600 
601 } // namespace ns3
602 
603 #endif /* DL_MAP_H */
Protocol header serialization and deserialization.
Definition: header.h:42
uint16_t GetSize(void) const
Get size.
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
Read item.
uint32_t GetSerializedSize(void) const
This class implements DL-MAP as described by "IEEE Standard for Local and metropolitan area networks ...
void SetRtg(uint8_t rtg)
Set RTG field.
uint16_t GetStartTime(void) const
Get start time field.
uint8_t m_configurationChangeCount
configuration change count
void SetEirxPIrMax(uint16_t rss_ir_max)
Set EIRX IR MAX field.
void SetLength(uint8_t length)
Set length field.
uint8_t GetDiuc(void) const
void SetBsEirp(uint16_t bs_eirp)
Set BS EIRP field.
uint8_t GetDcdCount(void) const
Get DCD count field.
uint16_t GetSize(void) const
def start()
Definition: core.py:1844
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
static TypeId GetTypeId(void)
Get the type ID.
void Print(std::ostream &os) const
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
Write item.
uint8_t GetFrameDurationCode(void) const
Get frame duration code field.
uint8_t m_frameDurationCode
frame duration code
std::list< OfdmDlMapIe > GetDlMapElements(void) const
Get DL Map elements field.
uint8_t m_channelNr
channel number
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
void SetChannelNr(uint8_t channelNr)
Set channel number field.
uint8_t GetType(void) const
Get type function.
uint8_t GetTtg(void) const
Get TTG field.
void SetType(uint8_t type)
Set type field.
void SetDiuc(uint8_t diuc)
Set DIUC field.
void SetStartTime(uint16_t startTime)
Set start time field.
iterator in a Buffer instance
Definition: buffer.h:98
void SetPreamblePresent(uint8_t preamblePresent)
Set preamble present field.
uint32_t m_frequency
frequency
void SetFrameDurationCode(uint8_t frameDurationCode)
Set frame duration code field.
void SetBaseStationId(Mac48Address baseStationID)
Set base station ID field.
uint8_t m_nrDlBurstProfiles
number DL purst profiles
Mac48Address GetBaseStationId(void) const
Get base station ID field.
void Serialize(Buffer::Iterator start) const
void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles)
Set number DL burst profile field.
uint16_t m_eirXPIrMax
EIRX IR MAX.
void SetDiuc(uint8_t diuc)
Set DIUC field.
uint8_t GetConfigurationChangeCount(void) const
Get configuration change count field.
static TypeId GetTypeId(void)
Get the type ID.
void SetTtg(uint8_t ttg)
Set TTG field.
void SetDcdCount(uint8_t dcdCount)
Set DCD count field.
double startTime
std::list< OfdmDlMapIe > m_dlMapElements
DL Map elements.
std::string GetName(void) const
Get name field.
Buffer::Iterator Write(Buffer::Iterator start) const
Wrtie item.
Diuc
DIUC enumeration.
uint8_t GetChannelNr(void) const
Get channel number field.
void Serialize(Buffer::Iterator start) const
OfdmDcdChannelEncodings m_channelEncodings
TLV Encoded information for the overall channel.
uint16_t GetEirxPIrMax(void) const
Get EIRX IR MAX field.
uint32_t Deserialize(Buffer::Iterator start)
void Print(std::ostream &os) const
Mac48Address GetBaseStationId(void) const
Get base station ID field.
This class implements Downlink channel descriptor as described by "IEEE Standard for Local and metrop...
uint8_t m_dcdCount
DCD count.
void SetFrameNumber(uint32_t frameNumber)
Set frame number field.
virtual ~Dcd(void)
uint8_t m_diuc
DIUC.
uint16_t m_startTime
start time
Mac48Address m_baseStationId
base station ID
uint16_t GetBsEirp(void) const
Get BS EIRP field.
void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings)
Set channel encodings field.
uint16_t GetSize(void) const
Get size field.
uint32_t m_frameNumber
frame number
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string GetName(void) const
Get name field.
uint32_t Deserialize(Buffer::Iterator start)
void SetFrequency(uint32_t frequency)
Set frequency field.
Cid class.
Definition: cid.h:37
void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile)
Add DL burst profile field.
an EUI-48 address
Definition: mac48-address.h:43
uint32_t GetSerializedSize(void) const
This class implements the OFDM DCD channel encodings as described by "IEEE Standard for Local and met...
uint16_t GetSize(void) const
Get size field.
Mac48Address m_baseStationId
base station ID
uint8_t GetDiuc(void) const
Get DIUC field.
std::vector< OfdmDlBurstProfile > m_dlBurstProfiles
vector of download burst profiles
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint8_t GetPreamblePresent(void) const
Get preamble present field.
uint8_t GetNrDlBurstProfiles(void) const
Get number DL burst profiles field.
This class implements the DCD channel encodings as described by "IEEE Standard for Local and metropol...
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const
Write item.
uint8_t GetRtg(void) const
Get RTG field.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t m_bsEirp
BS EIRP.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint8_t m_fecCodeType
FEC code type.
void SetBaseStationId(Mac48Address baseStationId)
Set base station ID field.
void SetCid(Cid cid)
Set CID function.
virtual ~DcdChannelEncodings(void)
uint8_t m_preamblePresent
preamble present
uint32_t GetFrameNumber(void) const
Get frame number field.
void AddDlMapElement(OfdmDlMapIe dlMapElement)
Add DL Map element field.
uint32_t GetFrequency(void) const
Get frequency function.
uint8_t m_reserved
changed as per the amendment 802.16e-2005
a unique identifier for an interface.
Definition: type-id.h:58
uint8_t GetLength(void) const
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
Cid GetCid(void) const
Set CID field.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
This class implements the OFDM DL-MAP information element as described by "IEEE Standard for Local an...
virtual Buffer::Iterator DoRead(Buffer::Iterator start)
Read item.
This class implements the OFDM Downlink burst profile descriptor as described by "IEEE Standard for L...
OfdmDcdChannelEncodings GetChannelEncodings(void) const
Get channel encodings field.
void SetConfigurationChangeCount(uint8_t configurationChangeCount)
Set configuration change count field.
uint8_t GetFecCodeType(void) const
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles(void) const
Get DL burst profile field.
virtual ~DlMap(void)