A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dl-mac-messages.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008,2009 INRIA, UDcast
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19 * <amine.ismail@UDcast.com>
20 */
21
22#ifndef DCD_CHANNEL_ENCODINGS_H
23#define DCD_CHANNEL_ENCODINGS_H
24
25#include "ns3/buffer.h"
26
27#include <list>
28#include <stdint.h>
29
30namespace ns3
31{
32
40{
41 public:
43 virtual ~DcdChannelEncodings();
44
49 void SetBsEirp(uint16_t bs_eirp);
54 void SetEirxPIrMax(uint16_t rss_ir_max);
59 void SetFrequency(uint32_t frequency);
60
65 uint16_t GetBsEirp() const;
70 uint16_t GetEirxPIrMax() const;
75 uint32_t GetFrequency() const;
76
81 uint16_t GetSize() const;
82
95
96 private:
102 virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const = 0;
109
110 uint16_t m_bsEirp;
111 uint16_t m_eirXPIrMax;
113};
114
115} // namespace ns3
116
117#endif /* DCD_CHANNEL_ENCODINGS_H */
118
119// ----------------------------------------------------------------------------------------------------------
120
121#ifndef OFDM_DCD_CHANNEL_ENCODINGS_H
122#define OFDM_DCD_CHANNEL_ENCODINGS_H
123
124#include "ns3/mac48-address.h"
125
126#include <stdint.h>
127
128namespace ns3
129{
130
137{
138 public:
140 ~OfdmDcdChannelEncodings() override;
141
146 void SetChannelNr(uint8_t channelNr);
151 void SetTtg(uint8_t ttg);
156 void SetRtg(uint8_t rtg);
157
162 void SetBaseStationId(Mac48Address baseStationId);
167 void SetFrameDurationCode(uint8_t frameDurationCode);
172 void SetFrameNumber(uint32_t frameNumber);
173
178 uint8_t GetChannelNr() const;
183 uint8_t GetTtg() const;
188 uint8_t GetRtg() const;
189
199 uint8_t GetFrameDurationCode() const;
204 uint32_t GetFrameNumber() const;
205
210 uint16_t GetSize() const;
211
212 private:
218 Buffer::Iterator DoWrite(Buffer::Iterator start) const override;
225
226 uint8_t m_channelNr;
227 uint8_t m_ttg;
228 uint8_t m_rtg;
229
233};
234
235} // namespace ns3
236
237#endif /* OFDM_DCD_CHANNEL_ENCODINGS_H */
238
239// ----------------------------------------------------------------------------------------------------------
240
241#ifndef OFDM_DL_BURST_PROFILE_H
242#define OFDM_DL_BURST_PROFILE_H
243
244#include "ns3/buffer.h"
245
246#include <stdint.h>
247
248namespace ns3
249{
250
258{
259 public:
261 enum Diuc
262 {
275 // 12 is reserved
278 };
279
282
287 void SetType(uint8_t type);
292 void SetLength(uint8_t length);
297 void SetDiuc(uint8_t diuc);
298
303 void SetFecCodeType(uint8_t fecCodeType);
304
309 uint8_t GetType() const;
311 uint8_t GetLength() const;
313 uint8_t GetDiuc() const;
314
316 uint8_t GetFecCodeType() const;
317
319 uint16_t GetSize() const;
320
333
334 private:
335 uint8_t m_type;
336 uint8_t m_length;
337 uint8_t m_diuc;
338
339 // TLV Encoded information
341};
342
343} // namespace ns3
344
345#endif /* OFDM_DL_BURST_PROFILE_H */
346
347// ----------------------------------------------------------------------------------------------------------
348
349#ifndef DCD_H
350#define DCD_H
351
352#include "ns3/header.h"
353
354#include <stdint.h>
355#include <vector>
356
357namespace ns3
358{
359
365class Dcd : public Header
366{
367 public:
368 Dcd();
369 ~Dcd() override;
370
375 void SetConfigurationChangeCount(uint8_t configurationChangeCount);
380 void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings);
385 void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile);
390 void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles);
391
396 uint8_t GetConfigurationChangeCount() const;
406 std::vector<OfdmDlBurstProfile> GetDlBurstProfiles() const;
411 uint8_t GetNrDlBurstProfiles() const;
412
417 std::string GetName() const;
422 static TypeId GetTypeId();
423 TypeId GetInstanceTypeId() const override;
424 void Print(std::ostream& os) const override;
425 uint32_t GetSerializedSize() const override;
426 void Serialize(Buffer::Iterator start) const override;
427 uint32_t Deserialize(Buffer::Iterator start) override;
428
429 private:
430 uint8_t m_reserved;
433 std::vector<OfdmDlBurstProfile> m_dlBurstProfiles;
434
436};
437
438} // namespace ns3
439
440#endif /* DCD_H */
441
442// ----------------------------------------------------------------------------------------------------------
443
444#ifndef OFDM_DL_MAP_IE_H
445#define OFDM_DL_MAP_IE_H
446
447#include "cid.h"
448
449#include <stdint.h>
450
451namespace ns3
452{
453
460{
461 public:
462 OfdmDlMapIe();
463 ~OfdmDlMapIe();
464
469 void SetCid(Cid cid);
474 void SetDiuc(uint8_t diuc);
479 void SetPreamblePresent(uint8_t preamblePresent);
484 void SetStartTime(uint16_t startTime);
485
490 Cid GetCid() const;
495 uint8_t GetDiuc() const;
500 uint8_t GetPreamblePresent() const;
505 uint16_t GetStartTime() const;
506
511 uint16_t GetSize() const;
512
525
526 private:
528 uint8_t m_diuc;
530 uint16_t m_startTime;
531};
532
533} // namespace ns3
534
535#endif /* OFDM_DL_MAP_IE_H */
536
537// ----------------------------------------------------------------------------------------------------------
538
539#ifndef DL_MAP_H
540#define DL_MAP_H
541
542#include "ns3/header.h"
543#include "ns3/mac48-address.h"
544
545#include <stdint.h>
546#include <vector>
547
548namespace ns3
549{
550
556class DlMap : public Header
557{
558 public:
559 DlMap();
560 ~DlMap() override;
561
566 void SetDcdCount(uint8_t dcdCount);
571 void SetBaseStationId(Mac48Address baseStationID);
576 void AddDlMapElement(OfdmDlMapIe dlMapElement);
577
582 uint8_t GetDcdCount() const;
592 std::list<OfdmDlMapIe> GetDlMapElements() const;
593
598 std::string GetName() const;
603 static TypeId GetTypeId();
604 TypeId GetInstanceTypeId() const override;
605 void Print(std::ostream& os) const override;
606 uint32_t GetSerializedSize() const override;
607 void Serialize(Buffer::Iterator start) const override;
608 uint32_t Deserialize(Buffer::Iterator start) override;
609
610 private:
611 uint8_t m_dcdCount;
613 std::list<OfdmDlMapIe> m_dlMapElements;
614 // m_paddingNibble; //fields to be implemented later on:
615};
616
617} // namespace ns3
618
619#endif /* DL_MAP_H */
iterator in a Buffer instance
Definition: buffer.h:100
Cid class.
Definition: cid.h:37
This class implements the DCD channel encodings as described by "IEEE Standard for Local and metropol...
uint16_t GetEirxPIrMax() const
Get EIRX IR MAX field.
uint32_t m_frequency
frequency
uint16_t GetSize() const
Get size field.
uint16_t GetBsEirp() const
Get BS EIRP field.
void SetBsEirp(uint16_t bs_eirp)
Set BS EIRP field.
void SetFrequency(uint32_t frequency)
Set frequency field.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
void SetEirxPIrMax(uint16_t rss_ir_max)
Set EIRX IR MAX field.
uint32_t GetFrequency() const
Get frequency function.
virtual Buffer::Iterator DoWrite(Buffer::Iterator start) const =0
Write item.
uint16_t m_eirXPIrMax
EIRX IR MAX.
virtual Buffer::Iterator DoRead(Buffer::Iterator start)=0
Read item.
uint16_t m_bsEirp
BS EIRP.
This class implements Downlink channel descriptor as described by "IEEE Standard for Local and metrop...
OfdmDcdChannelEncodings m_channelEncodings
TLV Encoded information for the overall channel.
uint8_t m_nrDlBurstProfiles
number DL purst profiles
void SetConfigurationChangeCount(uint8_t configurationChangeCount)
Set configuration change count field.
void Print(std::ostream &os) const override
void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles)
Set number DL burst profile field.
uint8_t m_reserved
changed as per the amendment 802.16e-2005
uint32_t Deserialize(Buffer::Iterator start) override
uint8_t m_configurationChangeCount
configuration change count
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles() const
Get DL burst profile field.
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
OfdmDcdChannelEncodings GetChannelEncodings() const
Get channel encodings field.
std::string GetName() const
Get name field.
uint8_t GetConfigurationChangeCount() const
Get configuration change count field.
void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile)
Add DL burst profile field.
~Dcd() override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(Buffer::Iterator start) const override
uint8_t GetNrDlBurstProfiles() const
Get number DL burst profiles field.
void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings)
Set channel encodings field.
std::vector< OfdmDlBurstProfile > m_dlBurstProfiles
vector of download burst profiles
This class implements DL-MAP as described by "IEEE Standard for Local and metropolitan area networks ...
void SetDcdCount(uint8_t dcdCount)
Set DCD count field.
void Serialize(Buffer::Iterator start) const override
static TypeId GetTypeId()
Get the type ID.
void AddDlMapElement(OfdmDlMapIe dlMapElement)
Add DL Map element field.
Mac48Address GetBaseStationId() const
Get base station ID field.
std::list< OfdmDlMapIe > GetDlMapElements() const
Get DL Map elements field.
std::list< OfdmDlMapIe > m_dlMapElements
DL Map elements.
void SetBaseStationId(Mac48Address baseStationID)
Set base station ID field.
uint32_t GetSerializedSize() const override
uint8_t m_dcdCount
DCD count.
std::string GetName() const
Get name field.
void Print(std::ostream &os) const override
uint32_t Deserialize(Buffer::Iterator start) override
uint8_t GetDcdCount() const
Get DCD count field.
Mac48Address m_baseStationId
base station ID
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
~DlMap() override
Protocol header serialization and deserialization.
Definition: header.h:44
an EUI-48 address
Definition: mac48-address.h:46
This class implements the OFDM DCD channel encodings as described by "IEEE Standard for Local and met...
uint8_t GetTtg() const
Get TTG field.
uint32_t GetFrameNumber() const
Get frame number field.
uint8_t GetFrameDurationCode() const
Get frame duration code field.
uint8_t m_channelNr
channel number
uint16_t GetSize() const
Get size field.
Buffer::Iterator DoRead(Buffer::Iterator start) override
Read item.
void SetChannelNr(uint8_t channelNr)
Set channel number field.
uint8_t GetChannelNr() const
Get channel number field.
void SetTtg(uint8_t ttg)
Set TTG field.
void SetFrameDurationCode(uint8_t frameDurationCode)
Set frame duration code field.
uint8_t m_frameDurationCode
frame duration code
Mac48Address GetBaseStationId() const
Get base station ID field.
Buffer::Iterator DoWrite(Buffer::Iterator start) const override
Write item.
uint32_t m_frameNumber
frame number
void SetRtg(uint8_t rtg)
Set RTG field.
void SetFrameNumber(uint32_t frameNumber)
Set frame number field.
Mac48Address m_baseStationId
base station ID
uint8_t GetRtg() const
Get RTG field.
void SetBaseStationId(Mac48Address baseStationId)
Set base station ID field.
This class implements the OFDM Downlink burst profile descriptor as described by "IEEE Standard for L...
uint16_t GetSize() const
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint8_t GetFecCodeType() const
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
void SetLength(uint8_t length)
Set length field.
void SetType(uint8_t type)
Set type field.
uint8_t GetType() const
Get type function.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
uint8_t m_fecCodeType
FEC code type.
void SetDiuc(uint8_t diuc)
Set DIUC field.
This class implements the OFDM DL-MAP information element as described by "IEEE Standard for Local an...
void SetStartTime(uint16_t startTime)
Set start time field.
uint8_t GetDiuc() const
Get DIUC field.
void SetCid(Cid cid)
Set CID function.
uint8_t m_preamblePresent
preamble present
Cid GetCid() const
Set CID field.
uint16_t m_startTime
start time
void SetDiuc(uint8_t diuc)
Set DIUC field.
void SetPreamblePresent(uint8_t preamblePresent)
Set preamble present field.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item.
uint16_t GetStartTime() const
Get start time field.
Buffer::Iterator Read(Buffer::Iterator start)
Read item.
uint8_t GetPreamblePresent() const
Get preamble present field.
uint16_t GetSize() const
Get size.
uint8_t m_diuc
DIUC.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.