A Discrete-Event Network Simulator
API
vht-ppdu.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 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> (VhtSigHeader)
20 */
21
22#ifndef VHT_PPDU_H
23#define VHT_PPDU_H
24
25#include "ns3/ofdm-ppdu.h"
26
33namespace ns3
34{
35
36class WifiPsdu;
37
44class VhtPpdu : public OfdmPpdu
45{
46 public:
51 class VhtSigHeader : public Header
52 {
53 public:
55 ~VhtSigHeader() override;
56
61 static TypeId GetTypeId();
62
63 TypeId GetInstanceTypeId() const override;
64 void Print(std::ostream& os) const override;
65 uint32_t GetSerializedSize() const override;
66 void Serialize(Buffer::Iterator start) const override;
68
74 void SetMuFlag(bool mu);
75
81 void SetChannelWidth(uint16_t channelWidth);
87 uint16_t GetChannelWidth() const;
93 void SetNStreams(uint8_t nStreams);
99 uint8_t GetNStreams() const;
100
106 void SetShortGuardInterval(bool sgi);
112 bool GetShortGuardInterval() const;
118 void SetShortGuardIntervalDisambiguation(bool disambiguation);
130 void SetSuMcs(uint8_t mcs);
136 uint8_t GetSuMcs() const;
137
138 private:
139 // VHT-SIG-A1 fields
140 uint8_t m_bw;
141 uint8_t m_nsts;
142
143 // VHT-SIG-A2 fields
144 uint8_t m_sgi;
146 uint8_t m_suMcs;
147
149 bool m_mu;
150 }; // class VhtSigHeader
151
163 const WifiTxVector& txVector,
164 uint16_t txCenterFreq,
165 Time ppduDuration,
166 WifiPhyBand band,
167 uint64_t uid);
171 ~VhtPpdu() override;
172
173 Time GetTxDuration() const override;
174 Ptr<WifiPpdu> Copy() const override;
175 WifiPpduType GetType() const override;
176
177 private:
178 WifiTxVector DoGetTxVector() const override;
179
181}; // class VhtPpdu
182
183} // namespace ns3
184
185#endif /* VHT_PPDU_H */
iterator in a Buffer instance
Definition: buffer.h:100
Protocol header serialization and deserialization.
Definition: header.h:44
OFDM PPDU (11a)
Definition: ofdm-ppdu.h:48
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:60
VHT PHY header (VHT-SIG-A1/A2/B).
Definition: vht-ppdu.h:52
uint8_t m_suMcs
SU VHT MCS.
Definition: vht-ppdu.h:146
bool m_mu
This is used to decide whether MU SIG-B should be added or not.
Definition: vht-ppdu.h:149
static TypeId GetTypeId()
Get the type ID.
Definition: vht-ppdu.cc:139
void SetNStreams(uint8_t nStreams)
Fill the number of streams field of VHT-SIG-A1.
Definition: vht-ppdu.cc:223
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of VHT-SIG-A1 (in MHz).
Definition: vht-ppdu.cc:181
uint16_t GetChannelWidth() const
Return the channel width (in MHz).
Definition: vht-ppdu.cc:202
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: vht-ppdu.cc:149
uint32_t Deserialize(Buffer::Iterator start) override
Definition: vht-ppdu.cc:299
uint8_t GetSuMcs() const
Return the SU VHT MCS field of VHT-SIG-A2.
Definition: vht-ppdu.cc:267
uint8_t GetNStreams() const
Return the number of streams.
Definition: vht-ppdu.cc:230
bool GetShortGuardInterval() const
Return the short GI field of VHT-SIG-A2.
Definition: vht-ppdu.cc:242
uint8_t m_sgi_disambiguation
Short GI NSYM Disambiguation.
Definition: vht-ppdu.h:145
void Serialize(Buffer::Iterator start) const override
Definition: vht-ppdu.cc:273
void SetMuFlag(bool mu)
Set the Multi-User (MU) flag.
Definition: vht-ppdu.cc:175
uint8_t m_sgi
Short GI.
Definition: vht-ppdu.h:144
void SetSuMcs(uint8_t mcs)
Fill the SU VHT MCS field of VHT-SIG-A2.
Definition: vht-ppdu.cc:260
void SetShortGuardIntervalDisambiguation(bool disambiguation)
Fill the short GI NSYM disambiguation field of VHT-SIG-A2.
Definition: vht-ppdu.cc:248
bool GetShortGuardIntervalDisambiguation() const
Return the short GI NSYM disambiguation field of VHT-SIG-A2.
Definition: vht-ppdu.cc:254
uint32_t GetSerializedSize() const override
Definition: vht-ppdu.cc:162
void SetShortGuardInterval(bool sgi)
Fill the short guard interval field of VHT-SIG-A2.
Definition: vht-ppdu.cc:236
void Print(std::ostream &os) const override
Definition: vht-ppdu.cc:155
VHT PPDU (11ac)
Definition: vht-ppdu.h:45
VhtSigHeader m_vhtSig
the VHT-SIG PHY header
Definition: vht-ppdu.h:180
VhtPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, Time ppduDuration, WifiPhyBand band, uint64_t uid)
Create a VHT PPDU.
Definition: vht-ppdu.cc:35
WifiPpduType GetType() const override
Return the PPDU type (.
Definition: vht-ppdu.cc:119
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition: vht-ppdu.cc:75
~VhtPpdu() override
Destructor for VhtPpdu.
Definition: vht-ppdu.cc:70
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition: vht-ppdu.cc:88
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition: vht-ppdu.cc:108
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1861