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;
106  virtual Buffer::Iterator DoRead (Buffer::Iterator start) = 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:
219  virtual Buffer::Iterator DoRead (Buffer::Iterator start);
220 
221  uint8_t m_channelNr;
222  uint8_t m_ttg;
223  uint8_t m_rtg;
224 
228  uint32_t m_frameNumber;
229 };
230 
231 } // namespace ns3
232 
233 #endif /* OFDM_DCD_CHANNEL_ENCODINGS_H */
234 
235 // ----------------------------------------------------------------------------------------------------------
236 
237 #ifndef OFDM_DL_BURST_PROFILE_H
238 #define OFDM_DL_BURST_PROFILE_H
239 
240 #include <stdint.h>
241 #include "ns3/buffer.h"
242 
243 namespace ns3 {
244 
252 {
253 public:
255  enum Diuc
256  {
269  // 12 is reserved
270  DIUC_GAP = 13,
272  };
273 
274  OfdmDlBurstProfile (void);
275  ~OfdmDlBurstProfile (void);
276 
281  void SetType (uint8_t type);
286  void SetLength (uint8_t length);
291  void SetDiuc (uint8_t diuc);
292 
297  void SetFecCodeType (uint8_t fecCodeType);
298 
303  uint8_t GetType (void) const;
305  uint8_t GetLength (void) const;
307  uint8_t GetDiuc (void) const;
308 
310  uint8_t GetFecCodeType (void) const;
311 
313  uint16_t GetSize (void) const;
314 
327 private:
328  uint8_t m_type;
329  uint8_t m_length;
330  uint8_t m_diuc;
331 
332  // TLV Encoded information
333  uint8_t m_fecCodeType;
334 };
335 
336 } // namespace ns3
337 
338 #endif /* OFDM_DL_BURST_PROFILE_H */
339 
340 // ----------------------------------------------------------------------------------------------------------
341 
342 #ifndef DCD_H
343 #define DCD_H
344 
345 #include <stdint.h>
346 #include "ns3/header.h"
347 #include <vector>
348 
349 namespace ns3 {
350 
356 class Dcd : public Header
357 {
358 public:
359  Dcd (void);
360  virtual ~Dcd (void);
361 
366  void SetConfigurationChangeCount (uint8_t configurationChangeCount);
371  void SetChannelEncodings (OfdmDcdChannelEncodings channelEncodings);
376  void AddDlBurstProfile (OfdmDlBurstProfile dlBurstProfile);
381  void SetNrDlBurstProfiles (uint8_t nrDlBurstProfiles);
382 
387  uint8_t GetConfigurationChangeCount (void) const;
397  std::vector<OfdmDlBurstProfile> GetDlBurstProfiles (void) const;
402  uint8_t GetNrDlBurstProfiles (void) const;
403 
408  std::string GetName (void) const;
413  static TypeId GetTypeId (void);
414  virtual TypeId GetInstanceTypeId (void) const;
415  void Print (std::ostream &os) const;
416  uint32_t GetSerializedSize (void) const;
417  void Serialize (Buffer::Iterator start) const;
418  uint32_t Deserialize (Buffer::Iterator start);
419 private:
420  uint8_t m_reserved;
423  std::vector<OfdmDlBurstProfile> m_dlBurstProfiles;
424 
426 };
427 
428 } // namespace ns3
429 
430 #endif /* DCD_H */
431 
432 // ----------------------------------------------------------------------------------------------------------
433 
434 #ifndef OFDM_DL_MAP_IE_H
435 #define OFDM_DL_MAP_IE_H
436 
437 #include <stdint.h>
438 #include "cid.h"
439 
440 namespace ns3 {
441 
448 {
449 public:
450  OfdmDlMapIe (void);
451  ~OfdmDlMapIe (void);
452 
457  void SetCid (Cid cid);
462  void SetDiuc (uint8_t diuc);
467  void SetPreamblePresent (uint8_t preamblePresent);
472  void SetStartTime (uint16_t startTime);
473 
478  Cid GetCid (void) const;
483  uint8_t GetDiuc (void) const;
488  uint8_t GetPreamblePresent (void) const;
493  uint16_t GetStartTime (void) const;
494 
499  uint16_t GetSize (void) const;
500 
513 private:
515  uint8_t m_diuc;
517  uint16_t m_startTime;
518 
519 };
520 
521 } // namespace ns3
522 
523 #endif /* OFDM_DL_MAP_IE_H */
524 
525 // ----------------------------------------------------------------------------------------------------------
526 
527 #ifndef DL_MAP_H
528 #define DL_MAP_H
529 
530 #include <stdint.h>
531 #include <vector>
532 #include "ns3/header.h"
533 #include "ns3/mac48-address.h"
534 
535 namespace ns3 {
536 
542 class DlMap : public Header
543 {
544 public:
545  DlMap (void);
546  virtual ~DlMap (void);
547 
552  void SetDcdCount (uint8_t dcdCount);
557  void SetBaseStationId (Mac48Address baseStationID);
562  void AddDlMapElement (OfdmDlMapIe dlMapElement);
563 
568  uint8_t GetDcdCount (void) const;
573  Mac48Address GetBaseStationId (void) const;
578  std::list<OfdmDlMapIe> GetDlMapElements (void) const;
579 
584  std::string GetName (void) const;
589  static TypeId GetTypeId (void);
590  virtual TypeId GetInstanceTypeId (void) const;
591  void Print (std::ostream &os) const;
592  uint32_t GetSerializedSize (void) const;
593  void Serialize (Buffer::Iterator start) const;
594  uint32_t Deserialize (Buffer::Iterator start);
595 private:
596  uint8_t m_dcdCount;
598  std::list<OfdmDlMapIe> m_dlMapElements;
599  // m_paddingNibble; //fields to be implemented later on:
600 };
601 
602 } // namespace ns3
603 
604 #endif /* DL_MAP_H */
Protocol header serialization and deserialization.
Definition: header.h:42
uint8_t GetFecCodeType(void) const
OfdmDcdChannelEncodings GetChannelEncodings(void) const
Get channel encodings field.
uint8_t GetPreamblePresent(void) const
Get preamble present field.
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
Read item.
This class implements DL-MAP as described by "IEEE Standard for Local and metropolitan area networks ...
uint16_t GetSize(void) const
Get size field.
void SetRtg(uint8_t rtg)
Set RTG field.
uint8_t m_configurationChangeCount
configuration change count
void SetEirxPIrMax(uint16_t rss_ir_max)
Set EIRX IR MAX field.
uint8_t GetFrameDurationCode(void) const
Get frame duration code field.
std::list< OfdmDlMapIe > GetDlMapElements(void) const
Get DL Map elements field.
void SetLength(uint8_t length)
Set length field.
void SetBsEirp(uint16_t bs_eirp)
Set BS EIRP field.
std::string GetName(void) const
Get name field.
def start()
Definition: core.py:1790
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
static TypeId GetTypeId(void)
Get the type ID.
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
Write item.
uint8_t GetConfigurationChangeCount(void) const
Get configuration change count field.
void Serialize(Buffer::Iterator start) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint8_t m_frameDurationCode
frame duration code
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 GetDcdCount(void) const
Get DCD count field.
void SetType(uint8_t type)
Set type field.
uint16_t GetSize(void) const
Get size 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
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 GetLength(void) const
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
uint32_t GetSerializedSize(void) const
void Print(std::ostream &os) const
std::list< OfdmDlMapIe > m_dlMapElements
DL Map elements.
uint32_t GetSerializedSize(void) const
uint8_t GetRtg(void) const
Get RTG field.
Diuc
DIUC enumeration.
uint8_t GetChannelNr(void) const
Get channel number field.
OfdmDcdChannelEncodings m_channelEncodings
TLV Encoded information for the overall channel.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint32_t Deserialize(Buffer::Iterator start)
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.
uint16_t GetSize(void) const
Get size.
virtual ~Dcd(void)
uint8_t m_diuc
DIUC.
uint16_t GetEirxPIrMax(void) const
Get EIRX IR MAX field.
uint8_t GetTtg(void) const
Get TTG field.
uint16_t m_startTime
start time
Mac48Address m_baseStationId
base station ID
void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings)
Set channel encodings field.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint32_t m_frameNumber
frame number
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t GetBsEirp(void) const
Get BS EIRP field.
uint16_t GetSize(void) const
uint32_t Deserialize(Buffer::Iterator start)
void SetFrequency(uint32_t frequency)
Set frequency field.
Cid class.
Definition: cid.h:37
uint32_t GetFrequency(void) const
Get frequency functon.
void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile)
Add DL burst profile field.
an EUI-48 address
Definition: mac48-address.h:43
void Print(std::ostream &os) const
This class implements the OFDM DCD channel encodings as described by "IEEE Standard for Local and met...
Mac48Address GetBaseStationId(void) const
Get base station ID field.
uint8_t GetType(void) const
Get type functon.
Cid GetCid(void) const
Set CID field.
Mac48Address m_baseStationId
base station ID
uint8_t GetNrDlBurstProfiles(void) const
Get number DL burst profiles field.
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const
Write item.
std::vector< OfdmDlBurstProfile > m_dlBurstProfiles
vector of download burst profiles
This class implements the DCD channel encodings as described by "IEEE Standard for Local and metropol...
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles(void) const
Get DL burst profile field.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t GetStartTime(void) const
Get start time field.
uint16_t m_bsEirp
BS EIRP.
std::string GetName(void) const
Get name field.
uint8_t m_fecCodeType
FEC code type.
uint8_t GetDiuc(void) const
Get DIUC field.
void SetBaseStationId(Mac48Address baseStationId)
Set base station ID field.
uint8_t GetDiuc(void) const
void SetCid(Cid cid)
Set CID functon.
virtual ~DcdChannelEncodings(void)
uint8_t m_preamblePresent
preamble present
void AddDlMapElement(OfdmDlMapIe dlMapElement)
Add DL Map element field.
uint32_t GetFrameNumber(void) const
Get frame number field.
Mac48Address GetBaseStationId(void) const
Get base station ID field.
uint8_t m_reserved
changed as per the amendment 802.16e-2005
a unique identifier for an interface.
Definition: type-id.h:58
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...
void SetConfigurationChangeCount(uint8_t configurationChangeCount)
Set configuration change count field.
Buffer::Iterator Write(Buffer::Iterator start) const
Wrtie item.
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
uint32_t m_chnlSwitchFrameNr
channel switch frame number
virtual ~DlMap(void)
void Serialize(Buffer::Iterator start) const