A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
vht-ppdu.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Orange Labs
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Rediet <getachew.redieteab@orange.com>
7
* Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
8
* Sébastien Deronne <sebastien.deronne@gmail.com> (VhtSigHeader)
9
*/
10
11
#ifndef VHT_PPDU_H
12
#define VHT_PPDU_H
13
14
#include "ns3/ofdm-ppdu.h"
15
#include "ns3/wifi-phy-operating-channel.h"
16
17
/**
18
* @file
19
* @ingroup wifi
20
* Declaration of ns3::VhtPpdu class.
21
*/
22
23
namespace
ns3
24
{
25
26
class
WifiPsdu;
27
28
/**
29
* @brief VHT PPDU (11ac)
30
* @ingroup wifi
31
*
32
* VhtPpdu stores a preamble, PHY headers and a PSDU of a PPDU with VHT header
33
*/
34
class
VhtPpdu
:
public
OfdmPpdu
35
{
36
public
:
37
/**
38
* VHT PHY header (VHT-SIG-A1/A2/B).
39
* See section 21.3.8 in IEEE 802.11-2016.
40
*/
41
class
VhtSigHeader
42
{
43
public
:
44
VhtSigHeader
();
45
46
/**
47
* Set the Multi-User (MU) flag.
48
*
49
* @param mu the MU flag
50
*/
51
void
SetMuFlag
(
bool
mu);
52
53
/**
54
* Fill the channel width field of VHT-SIG-A1.
55
*
56
* @param channelWidth the channel width
57
*/
58
void
SetChannelWidth
(
MHz_u
channelWidth);
59
/**
60
* Return the channel width.
61
*
62
* @return the channel width
63
*/
64
MHz_u
GetChannelWidth
()
const
;
65
/**
66
* Fill the number of streams field of VHT-SIG-A1.
67
*
68
* @param nStreams the number of streams
69
*/
70
void
SetNStreams
(uint8_t nStreams);
71
/**
72
* Return the number of streams.
73
*
74
* @return the number of streams
75
*/
76
uint8_t
GetNStreams
()
const
;
77
78
/**
79
* Fill the short guard interval field of VHT-SIG-A2.
80
*
81
* @param sgi whether short guard interval is used or not
82
*/
83
void
SetShortGuardInterval
(
bool
sgi);
84
/**
85
* Return the short GI field of VHT-SIG-A2.
86
*
87
* @return the short GI field of VHT-SIG-A2
88
*/
89
bool
GetShortGuardInterval
()
const
;
90
/**
91
* Fill the short GI NSYM disambiguation field of VHT-SIG-A2.
92
*
93
* @param disambiguation whether short GI NSYM disambiguation is set or not
94
*/
95
void
SetShortGuardIntervalDisambiguation
(
bool
disambiguation);
96
/**
97
* Return the short GI NSYM disambiguation field of VHT-SIG-A2.
98
*
99
* @return the short GI NSYM disambiguation field of VHT-SIG-A2
100
*/
101
bool
GetShortGuardIntervalDisambiguation
()
const
;
102
/**
103
* Fill the SU VHT MCS field of VHT-SIG-A2.
104
*
105
* @param mcs the SU VHT MCS field of VHT-SIG-A2
106
*/
107
void
SetSuMcs
(uint8_t mcs);
108
/**
109
* Return the SU VHT MCS field of VHT-SIG-A2.
110
*
111
* @return the SU VHT MCS field of VHT-SIG-A2
112
*/
113
uint8_t
GetSuMcs
()
const
;
114
115
private
:
116
// VHT-SIG-A1 fields
117
uint8_t
m_bw
;
///< BW
118
uint8_t
m_nsts
;
///< NSTS
119
120
// VHT-SIG-A2 fields
121
uint8_t
m_sgi
;
///< Short GI
122
uint8_t
m_sgi_disambiguation
;
///< Short GI NSYM Disambiguation
123
uint8_t
m_suMcs
;
///< SU VHT MCS
124
125
/// This is used to decide whether MU SIG-B should be added or not
126
bool
m_mu
;
127
};
// class VhtSigHeader
128
129
/**
130
* Create a VHT PPDU.
131
*
132
* @param psdu the PHY payload (PSDU)
133
* @param txVector the TXVECTOR that was used for this PPDU
134
* @param channel the operating channel of the PHY used to transmit this PPDU
135
* @param ppduDuration the transmission duration of this PPDU
136
* @param uid the unique ID of this PPDU
137
*/
138
VhtPpdu
(
Ptr<const WifiPsdu>
psdu,
139
const
WifiTxVector
& txVector,
140
const
WifiPhyOperatingChannel
& channel,
141
Time
ppduDuration,
142
uint64_t uid);
143
144
Time
GetTxDuration
()
const override
;
145
Ptr<WifiPpdu>
Copy
()
const override
;
146
WifiPpduType
GetType
()
const override
;
147
148
private
:
149
WifiTxVector
DoGetTxVector
()
const override
;
150
151
/**
152
* Fill in the PHY headers.
153
*
154
* @param txVector the TXVECTOR that was used for this PPDU
155
* @param ppduDuration the transmission duration of this PPDU
156
*/
157
virtual
void
SetPhyHeaders
(
const
WifiTxVector
& txVector,
Time
ppduDuration);
158
159
/**
160
* Fill in the L-SIG header.
161
*
162
* @param lSig the L-SIG header to fill in
163
* @param ppduDuration the transmission duration of this PPDU
164
*/
165
virtual
void
SetLSigHeader
(
LSigHeader
& lSig,
Time
ppduDuration)
const
;
166
167
/**
168
* Fill in the VHT-SIG header.
169
*
170
* @param vhtSig the VHT-SIG header to fill in
171
* @param txVector the TXVECTOR that was used for this PPDU
172
* @param ppduDuration the transmission duration of this PPDU
173
*/
174
void
SetVhtSigHeader
(
VhtSigHeader
& vhtSig,
175
const
WifiTxVector
& txVector,
176
Time
ppduDuration)
const
;
177
178
/**
179
* Fill in the TXVECTOR from PHY headers.
180
*
181
* @param txVector the TXVECTOR to fill in
182
* @param lSig the L-SIG header
183
* @param vhtSig the VHT-SIG header
184
*/
185
void
SetTxVectorFromPhyHeaders
(
WifiTxVector
& txVector,
186
const
LSigHeader
& lSig,
187
const
VhtSigHeader
& vhtSig)
const
;
188
189
VhtSigHeader
m_vhtSig
;
//!< the VHT-SIG PHY header
190
};
// class VhtPpdu
191
192
}
// namespace ns3
193
194
#endif
/* VHT_PPDU_H */
double
ns3::OfdmPpdu::LSigHeader
OFDM and ERP OFDM L-SIG PHY header.
Definition
ofdm-ppdu.h:43
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition
ofdm-ppdu.h:36
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::VhtPpdu::VhtSigHeader
VHT PHY header (VHT-SIG-A1/A2/B).
Definition
vht-ppdu.h:42
ns3::VhtPpdu::VhtSigHeader::m_suMcs
uint8_t m_suMcs
SU VHT MCS.
Definition
vht-ppdu.h:123
ns3::VhtPpdu::VhtSigHeader::m_mu
bool m_mu
This is used to decide whether MU SIG-B should be added or not.
Definition
vht-ppdu.h:126
ns3::VhtPpdu::VhtSigHeader::m_nsts
uint8_t m_nsts
NSTS.
Definition
vht-ppdu.h:118
ns3::VhtPpdu::VhtSigHeader::SetNStreams
void SetNStreams(uint8_t nStreams)
Fill the number of streams field of VHT-SIG-A1.
Definition
vht-ppdu.cc:193
ns3::VhtPpdu::VhtSigHeader::m_bw
uint8_t m_bw
BW.
Definition
vht-ppdu.h:117
ns3::VhtPpdu::VhtSigHeader::GetChannelWidth
MHz_u GetChannelWidth() const
Return the channel width.
Definition
vht-ppdu.cc:172
ns3::VhtPpdu::VhtSigHeader::VhtSigHeader
VhtSigHeader()
Definition
vht-ppdu.cc:134
ns3::VhtPpdu::VhtSigHeader::GetSuMcs
uint8_t GetSuMcs() const
Return the SU VHT MCS field of VHT-SIG-A2.
Definition
vht-ppdu.cc:237
ns3::VhtPpdu::VhtSigHeader::GetNStreams
uint8_t GetNStreams() const
Return the number of streams.
Definition
vht-ppdu.cc:200
ns3::VhtPpdu::VhtSigHeader::GetShortGuardInterval
bool GetShortGuardInterval() const
Return the short GI field of VHT-SIG-A2.
Definition
vht-ppdu.cc:212
ns3::VhtPpdu::VhtSigHeader::m_sgi_disambiguation
uint8_t m_sgi_disambiguation
Short GI NSYM Disambiguation.
Definition
vht-ppdu.h:122
ns3::VhtPpdu::VhtSigHeader::SetMuFlag
void SetMuFlag(bool mu)
Set the Multi-User (MU) flag.
Definition
vht-ppdu.cc:145
ns3::VhtPpdu::VhtSigHeader::m_sgi
uint8_t m_sgi
Short GI.
Definition
vht-ppdu.h:121
ns3::VhtPpdu::VhtSigHeader::SetSuMcs
void SetSuMcs(uint8_t mcs)
Fill the SU VHT MCS field of VHT-SIG-A2.
Definition
vht-ppdu.cc:230
ns3::VhtPpdu::VhtSigHeader::SetChannelWidth
void SetChannelWidth(MHz_u channelWidth)
Fill the channel width field of VHT-SIG-A1.
Definition
vht-ppdu.cc:151
ns3::VhtPpdu::VhtSigHeader::SetShortGuardIntervalDisambiguation
void SetShortGuardIntervalDisambiguation(bool disambiguation)
Fill the short GI NSYM disambiguation field of VHT-SIG-A2.
Definition
vht-ppdu.cc:218
ns3::VhtPpdu::VhtSigHeader::GetShortGuardIntervalDisambiguation
bool GetShortGuardIntervalDisambiguation() const
Return the short GI NSYM disambiguation field of VHT-SIG-A2.
Definition
vht-ppdu.cc:224
ns3::VhtPpdu::VhtSigHeader::SetShortGuardInterval
void SetShortGuardInterval(bool sgi)
Fill the short guard interval field of VHT-SIG-A2.
Definition
vht-ppdu.cc:206
ns3::VhtPpdu
VHT PPDU (11ac)
Definition
vht-ppdu.h:35
ns3::VhtPpdu::m_vhtSig
VhtSigHeader m_vhtSig
the VHT-SIG PHY header
Definition
vht-ppdu.h:189
ns3::VhtPpdu::SetPhyHeaders
virtual void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the PHY headers.
Definition
vht-ppdu.cc:41
ns3::VhtPpdu::GetType
WifiPpduType GetType() const override
Return the PPDU type (.
Definition
vht-ppdu.cc:129
ns3::VhtPpdu::DoGetTxVector
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition
vht-ppdu.cc:81
ns3::VhtPpdu::VhtPpdu
VhtPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, Time ppduDuration, uint64_t uid)
Create a VHT PPDU.
Definition
vht-ppdu.cc:25
ns3::VhtPpdu::SetTxVectorFromPhyHeaders
void SetTxVectorFromPhyHeaders(WifiTxVector &txVector, const LSigHeader &lSig, const VhtSigHeader &vhtSig) const
Fill in the TXVECTOR from PHY headers.
Definition
vht-ppdu.cc:90
ns3::VhtPpdu::SetVhtSigHeader
void SetVhtSigHeader(VhtSigHeader &vhtSig, const WifiTxVector &txVector, Time ppduDuration) const
Fill in the VHT-SIG header.
Definition
vht-ppdu.cc:59
ns3::VhtPpdu::GetTxDuration
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition
vht-ppdu.cc:102
ns3::VhtPpdu::Copy
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition
vht-ppdu.cc:123
ns3::VhtPpdu::SetLSigHeader
virtual void SetLSigHeader(LSigHeader &lSig, Time ppduDuration) const
Fill in the L-SIG header.
Definition
vht-ppdu.cc:49
ns3::WifiPhyOperatingChannel
Class that keeps track of all information about the current PHY operating channel.
Definition
wifi-phy-operating-channel.h:62
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::WifiPpduType
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
Definition
wifi-phy-common.h:378
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
vht
vht-ppdu.h
Generated on Wed Dec 4 2024 18:20:52 for ns-3 by
1.11.0