A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ofdm-ppdu.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Orange Labs
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
* Author: Rediet <getachew.redieteab@orange.com>
18
* Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
19
* Sébastien Deronne <sebastien.deronne@gmail.com> (LSigHeader)
20
*/
21
22
#ifndef OFDM_PPDU_H
23
#define OFDM_PPDU_H
24
25
#include "ns3/header.h"
26
#include "ns3/wifi-phy-band.h"
27
#include "ns3/wifi-ppdu.h"
28
35
namespace
ns3
36
{
37
38
class
WifiPsdu;
39
47
class
OfdmPpdu
:
public
WifiPpdu
48
{
49
public
:
54
class
LSigHeader
:
public
Header
55
{
56
public
:
57
LSigHeader
();
58
63
static
TypeId
GetTypeId
();
64
65
TypeId
GetInstanceTypeId
()
const override
;
66
void
Print
(std::ostream& os)
const override
;
67
uint32_t
GetSerializedSize
()
const override
;
68
void
Serialize
(
Buffer::Iterator
start
)
const override
;
69
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
70
77
void
SetRate
(uint64_t rate, uint16_t channelWidth = 20);
84
uint64_t
GetRate
(uint16_t channelWidth = 20)
const
;
90
void
SetLength
(uint16_t length);
96
uint16_t
GetLength
()
const
;
97
98
private
:
99
uint8_t
m_rate
;
100
uint16_t
m_length
;
101
};
// class LSigHeader
102
114
OfdmPpdu
(
Ptr<const WifiPsdu>
psdu,
115
const
WifiTxVector
& txVector,
116
uint16_t txCenterFreq,
117
WifiPhyBand
band,
118
uint64_t uid,
119
bool
instantiateLSig =
true
);
120
121
Time
GetTxDuration
()
const override
;
122
Ptr<WifiPpdu>
Copy
()
const override
;
123
124
protected
:
125
WifiPhyBand
m_band
;
126
#ifndef NS3_BUILD_PROFILE_DEBUG
127
LSigHeader
m_lSig;
128
#endif
129
130
private
:
131
WifiTxVector
DoGetTxVector
()
const override
;
132
139
void
SetPhyHeaders
(
const
WifiTxVector
& txVector, std::size_t psduSize);
140
148
void
SetLSigHeader
(
LSigHeader
& lSig,
const
WifiTxVector
& txVector, std::size_t psduSize)
const
;
149
156
virtual
void
SetTxVectorFromLSigHeader
(
WifiTxVector
& txVector,
const
LSigHeader
& lSig)
const
;
157
158
uint16_t
m_channelWidth
;
160
};
// class OfdmPpdu
161
162
}
// namespace ns3
163
164
#endif
/* OFDM_PPDU_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:44
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::OfdmPpdu::LSigHeader
OFDM and ERP OFDM L-SIG PHY header.
Definition:
ofdm-ppdu.h:55
ns3::OfdmPpdu::LSigHeader::SetRate
void SetRate(uint64_t rate, uint16_t channelWidth=20)
Fill the RATE field of L-SIG (in bit/s).
Definition:
ofdm-ppdu.cc:159
ns3::OfdmPpdu::LSigHeader::GetRate
uint64_t GetRate(uint16_t channelWidth=20) const
Return the RATE field of L-SIG (in bit/s).
Definition:
ofdm-ppdu.cc:212
ns3::OfdmPpdu::LSigHeader::GetLength
uint16_t GetLength() const
Return the LENGTH field of L-SIG (in bytes).
Definition:
ofdm-ppdu.cc:264
ns3::OfdmPpdu::LSigHeader::m_rate
uint8_t m_rate
RATE field.
Definition:
ofdm-ppdu.h:99
ns3::OfdmPpdu::LSigHeader::Print
void Print(std::ostream &os) const override
Definition:
ofdm-ppdu.cc:147
ns3::OfdmPpdu::LSigHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
ofdm-ppdu.cc:141
ns3::OfdmPpdu::LSigHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
ofdm-ppdu.cc:153
ns3::OfdmPpdu::LSigHeader::SetLength
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition:
ofdm-ppdu.cc:257
ns3::OfdmPpdu::LSigHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
ofdm-ppdu.cc:131
ns3::OfdmPpdu::LSigHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
ofdm-ppdu.cc:270
ns3::OfdmPpdu::LSigHeader::m_length
uint16_t m_length
LENGTH field.
Definition:
ofdm-ppdu.h:100
ns3::OfdmPpdu::LSigHeader::LSigHeader
LSigHeader()
Definition:
ofdm-ppdu.cc:124
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition:
ofdm-ppdu.h:48
ns3::OfdmPpdu::m_band
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Definition:
ofdm-ppdu.h:125
ns3::OfdmPpdu::SetLSigHeader
void SetLSigHeader(LSigHeader &lSig, const WifiTxVector &txVector, std::size_t psduSize) const
Fill in the L-SIG header.
Definition:
ofdm-ppdu.cc:67
ns3::OfdmPpdu::OfdmPpdu
OfdmPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, WifiPhyBand band, uint64_t uid, bool instantiateLSig=true)
Create an OFDM PPDU.
Definition:
ofdm-ppdu.cc:35
ns3::OfdmPpdu::SetPhyHeaders
void SetPhyHeaders(const WifiTxVector &txVector, std::size_t psduSize)
Fill in the PHY headers.
Definition:
ofdm-ppdu.cc:53
ns3::OfdmPpdu::GetTxDuration
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition:
ofdm-ppdu.cc:104
ns3::OfdmPpdu::m_channelWidth
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz (needed to distinguish 5 MHz, 10 MHz or 20 MHz PP...
Definition:
ofdm-ppdu.h:158
ns3::OfdmPpdu::Copy
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition:
ofdm-ppdu.cc:119
ns3::OfdmPpdu::SetTxVectorFromLSigHeader
virtual void SetTxVectorFromLSigHeader(WifiTxVector &txVector, const LSigHeader &lSig) const
Fill in the TXVECTOR from L-SIG header.
Definition:
ofdm-ppdu.cc:95
ns3::OfdmPpdu::DoGetTxVector
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition:
ofdm-ppdu.cc:74
ns3::Ptr< const WifiPsdu >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
ns3::WifiPpdu
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
Definition:
wifi-ppdu.h:56
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition:
wifi-tx-vector.h:101
ns3::WifiPhyBand
WifiPhyBand
Identifies the PHY band.
Definition:
wifi-phy-band.h:33
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
two-ray-to-three-gpp-ch-calibration.start
start
Definition:
two-ray-to-three-gpp-ch-calibration.py:474
src
wifi
model
non-ht
ofdm-ppdu.h
Generated on Fri Mar 31 2023 13:30:53 for ns-3 by
1.9.1