A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ht-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> (HtSigHeader)
20
*/
21
22
#ifndef HT_PPDU_H
23
#define HT_PPDU_H
24
25
#include "ns3/ofdm-ppdu.h"
26
33
namespace
ns3
34
{
35
36
class
WifiPsdu;
37
44
class
HtPpdu
:
public
OfdmPpdu
45
{
46
public
:
51
class
HtSigHeader
:
public
Header
52
{
53
public
:
54
HtSigHeader
();
55
60
static
TypeId
GetTypeId
();
61
62
TypeId
GetInstanceTypeId
()
const override
;
63
void
Print
(std::ostream& os)
const override
;
64
uint32_t
GetSerializedSize
()
const override
;
65
void
Serialize
(
Buffer::Iterator
start
)
const override
;
66
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
67
73
void
SetMcs
(uint8_t mcs);
79
uint8_t
GetMcs
()
const
;
85
void
SetChannelWidth
(uint16_t channelWidth);
91
uint16_t
GetChannelWidth
()
const
;
97
void
SetAggregation
(
bool
aggregation);
103
bool
GetAggregation
()
const
;
109
void
SetShortGuardInterval
(
bool
sgi);
115
bool
GetShortGuardInterval
()
const
;
121
void
SetHtLength
(uint16_t length);
127
uint16_t
GetHtLength
()
const
;
128
129
private
:
130
uint8_t
m_mcs
;
131
uint8_t
m_cbw20_40
;
132
uint16_t
m_htLength
;
133
uint8_t
m_aggregation
;
134
uint8_t
m_sgi
;
135
};
// HtSigHeader
136
147
HtPpdu
(
Ptr<const WifiPsdu>
psdu,
148
const
WifiTxVector
& txVector,
149
uint16_t txCenterFreq,
150
Time
ppduDuration,
151
WifiPhyBand
band,
152
uint64_t uid);
153
154
Time
GetTxDuration
()
const override
;
155
Ptr<WifiPpdu>
Copy
()
const override
;
156
157
private
:
158
WifiTxVector
DoGetTxVector
()
const override
;
159
167
void
SetPhyHeaders
(
const
WifiTxVector
& txVector,
Time
ppduDuration, std::size_t psduSize);
168
175
virtual
void
SetLSigHeader
(
LSigHeader
& lSig,
Time
ppduDuration)
const
;
176
184
void
SetHtSigHeader
(
HtSigHeader
& htSig,
185
const
WifiTxVector
& txVector,
186
std::size_t psduSize)
const
;
187
195
void
SetTxVectorFromPhyHeaders
(
WifiTxVector
& txVector,
196
const
LSigHeader
& lSig,
197
const
HtSigHeader
& htSig)
const
;
198
199
#ifndef NS3_BUILD_PROFILE_DEBUG
200
HtSigHeader
m_htSig;
201
#endif
202
};
// class HtPpdu
203
204
}
// namespace ns3
205
206
#endif
/* HT_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::HtPpdu::HtSigHeader
HT PHY header (HT-SIG1/2).
Definition:
ht-ppdu.h:52
ns3::HtPpdu::HtSigHeader::Print
void Print(std::ostream &os) const override
Definition:
ht-ppdu.cc:197
ns3::HtPpdu::HtSigHeader::m_mcs
uint8_t m_mcs
Modulation and Coding Scheme index.
Definition:
ht-ppdu.h:130
ns3::HtPpdu::HtSigHeader::GetHtLength
uint16_t GetHtLength() const
Return the HT length field of HT-SIG (in bytes).
Definition:
ht-ppdu.cc:241
ns3::HtPpdu::HtSigHeader::GetMcs
uint8_t GetMcs() const
Return the MCS field of HT-SIG.
Definition:
ht-ppdu.cc:217
ns3::HtPpdu::HtSigHeader::SetHtLength
void SetHtLength(uint16_t length)
Fill the HT length field of HT-SIG (in bytes).
Definition:
ht-ppdu.cc:235
ns3::HtPpdu::HtSigHeader::GetAggregation
bool GetAggregation() const
Return the aggregation field of HT-SIG.
Definition:
ht-ppdu.cc:253
ns3::HtPpdu::HtSigHeader::m_htLength
uint16_t m_htLength
HT length.
Definition:
ht-ppdu.h:132
ns3::HtPpdu::HtSigHeader::SetMcs
void SetMcs(uint8_t mcs)
Fill the MCS field of HT-SIG.
Definition:
ht-ppdu.cc:210
ns3::HtPpdu::HtSigHeader::GetShortGuardInterval
bool GetShortGuardInterval() const
Return the short guard interval field of HT-SIG.
Definition:
ht-ppdu.cc:265
ns3::HtPpdu::HtSigHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
ht-ppdu.cc:191
ns3::HtPpdu::HtSigHeader::HtSigHeader
HtSigHeader()
Definition:
ht-ppdu.cc:171
ns3::HtPpdu::HtSigHeader::GetChannelWidth
uint16_t GetChannelWidth() const
Return the channel width (in MHz).
Definition:
ht-ppdu.cc:229
ns3::HtPpdu::HtSigHeader::SetAggregation
void SetAggregation(bool aggregation)
Fill the aggregation field of HT-SIG.
Definition:
ht-ppdu.cc:247
ns3::HtPpdu::HtSigHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
ht-ppdu.cc:204
ns3::HtPpdu::HtSigHeader::SetChannelWidth
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of HT-SIG (in MHz).
Definition:
ht-ppdu.cc:223
ns3::HtPpdu::HtSigHeader::m_sgi
uint8_t m_sgi
Short Guard Interval.
Definition:
ht-ppdu.h:134
ns3::HtPpdu::HtSigHeader::m_cbw20_40
uint8_t m_cbw20_40
CBW 20/40.
Definition:
ht-ppdu.h:131
ns3::HtPpdu::HtSigHeader::SetShortGuardInterval
void SetShortGuardInterval(bool sgi)
Fill the short guard interval field of HT-SIG.
Definition:
ht-ppdu.cc:259
ns3::HtPpdu::HtSigHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
ht-ppdu.cc:181
ns3::HtPpdu::HtSigHeader::m_aggregation
uint8_t m_aggregation
Aggregation.
Definition:
ht-ppdu.h:133
ns3::HtPpdu::HtSigHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
ht-ppdu.cc:271
ns3::HtPpdu
HT PPDU (11n)
Definition:
ht-ppdu.h:45
ns3::HtPpdu::DoGetTxVector
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition:
ht-ppdu.cc:101
ns3::HtPpdu::Copy
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition:
ht-ppdu.cc:166
ns3::HtPpdu::SetHtSigHeader
void SetHtSigHeader(HtSigHeader &htSig, const WifiTxVector &txVector, std::size_t psduSize) const
Fill in the HT-SIG header.
Definition:
ht-ppdu.cc:91
ns3::HtPpdu::SetLSigHeader
virtual void SetLSigHeader(LSigHeader &lSig, Time ppduDuration) const
Fill in the L-SIG header.
Definition:
ht-ppdu.cc:74
ns3::HtPpdu::SetPhyHeaders
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration, std::size_t psduSize)
Fill in the PHY headers.
Definition:
ht-ppdu.cc:54
ns3::HtPpdu::SetTxVectorFromPhyHeaders
void SetTxVectorFromPhyHeaders(WifiTxVector &txVector, const LSigHeader &lSig, const HtSigHeader &htSig) const
Fill in the TXVECTOR from PHY headers.
Definition:
ht-ppdu.cc:130
ns3::HtPpdu::GetTxDuration
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition:
ht-ppdu.cc:142
ns3::HtPpdu::HtPpdu
HtPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, Time ppduDuration, WifiPhyBand band, uint64_t uid)
Create an HT PPDU.
Definition:
ht-ppdu.cc:36
ns3::OfdmPpdu::LSigHeader
OFDM and ERP OFDM L-SIG PHY header.
Definition:
ofdm-ppdu.h:55
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition:
ofdm-ppdu.h:48
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::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
ht
ht-ppdu.h
Generated on Fri Mar 31 2023 13:30:53 for ns-3 by
1.9.1