A Discrete-Event Network Simulator
API
vht-ppdu.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2019 Orange Labs
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Rediet <getachew.redieteab@orange.com>
19  * Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
20  * S├ębastien Deronne <sebastien.deronne@gmail.com> (VhtSigHeader)
21  */
22 
23 #ifndef VHT_PPDU_H
24 #define VHT_PPDU_H
25 
26 #include "ns3/ofdm-ppdu.h"
27 
34 namespace ns3 {
35 
36 class WifiPsdu;
37 
44 class VhtPpdu : public OfdmPpdu
45 {
46 public:
47 
52  class VhtSigHeader : public Header
53  {
54  public:
55  VhtSigHeader ();
56  virtual ~VhtSigHeader ();
57 
62  static TypeId GetTypeId (void);
63 
64  TypeId GetInstanceTypeId (void) const override;
65  void Print (std::ostream &os) const override;
66  uint32_t GetSerializedSize (void) const override;
67  void Serialize (Buffer::Iterator start) const override;
68  uint32_t Deserialize (Buffer::Iterator start) override;
69 
75  void SetMuFlag (bool mu);
76 
82  void SetChannelWidth (uint16_t channelWidth);
88  uint16_t GetChannelWidth (void) const;
94  void SetNStreams (uint8_t nStreams);
100  uint8_t GetNStreams (void) const;
101 
107  void SetShortGuardInterval (bool sgi);
113  bool GetShortGuardInterval (void) const;
119  void SetShortGuardIntervalDisambiguation (bool disambiguation);
125  bool GetShortGuardIntervalDisambiguation (void) const;
131  void SetSuMcs (uint8_t mcs);
137  uint8_t GetSuMcs (void) const;
138 
139  private:
140  //VHT-SIG-A1 fields
141  uint8_t m_bw;
142  uint8_t m_nsts;
143 
144  //VHT-SIG-A2 fields
145  uint8_t m_sgi;
147  uint8_t m_suMcs;
148 
150  bool m_mu;
151  }; //class VhtSigHeader
152 
162  VhtPpdu (Ptr<const WifiPsdu> psdu, const WifiTxVector& txVector, Time ppduDuration,
163  WifiPhyBand band, uint64_t uid);
167  virtual ~VhtPpdu ();
168 
169  Time GetTxDuration (void) const override;
170  Ptr<WifiPpdu> Copy (void) const override;
171  WifiPpduType GetType (void) const override;
172 
173 private:
174  WifiTxVector DoGetTxVector (void) const override;
175 
177 }; //class VhtPpdu
178 
179 } //namespace ns3
180 
181 #endif /* VHT_PPDU_H */
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition: ofdm-ppdu.h:48
ns3::VhtPpdu::VhtSigHeader::SetShortGuardIntervalDisambiguation
void SetShortGuardIntervalDisambiguation(bool disambiguation)
Fill the short GI NSYM disambiguation field of VHT-SIG-A2.
Definition: vht-ppdu.cc:226
ns3::VhtPpdu::VhtSigHeader::SetMuFlag
void SetMuFlag(bool mu)
Set the Multi-User (MU) flag.
Definition: vht-ppdu.cc:153
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::VhtPpdu
VHT PPDU (11ac)
Definition: vht-ppdu.h:45
ns3::VhtPpdu::VhtSigHeader::GetNStreams
uint8_t GetNStreams(void) const
Return the number of streams.
Definition: vht-ppdu.cc:208
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::VhtPpdu::GetType
WifiPpduType GetType(void) const override
Return the PPDU type (.
Definition: vht-ppdu.cc:93
ns3::VhtPpdu::VhtSigHeader::m_sgi_disambiguation
uint8_t m_sgi_disambiguation
Short GI NSYM Disambiguation.
Definition: vht-ppdu.h:146
ns3::VhtPpdu::VhtSigHeader::VhtSigHeader
VhtSigHeader()
Definition: vht-ppdu.cc:98
ns3::VhtPpdu::VhtSigHeader::m_nsts
uint8_t m_nsts
NSTS.
Definition: vht-ppdu.h:142
ns3::VhtPpdu::VhtSigHeader::SetSuMcs
void SetSuMcs(uint8_t mcs)
Fill the SU VHT MCS field of VHT-SIG-A2.
Definition: vht-ppdu.cc:238
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:71
ns3::VhtPpdu::VhtSigHeader::GetChannelWidth
uint16_t GetChannelWidth(void) const
Return the channel width (in MHz).
Definition: vht-ppdu.cc:180
ns3::VhtPpdu::VhtSigHeader::GetSuMcs
uint8_t GetSuMcs(void) const
Return the SU VHT MCS field of VHT-SIG-A2.
Definition: vht-ppdu.cc:245
ns3::Ptr< const WifiPsdu >
ns3::VhtPpdu::VhtSigHeader::SetChannelWidth
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of VHT-SIG-A1 (in MHz).
Definition: vht-ppdu.cc:159
visualizer.core.start
def start()
Definition: core.py:1855
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:150
ns3::VhtPpdu::VhtSigHeader::GetShortGuardInterval
bool GetShortGuardInterval(void) const
Return the short GI field of VHT-SIG-A2.
Definition: vht-ppdu.cc:220
ns3::VhtPpdu::VhtSigHeader::GetShortGuardIntervalDisambiguation
bool GetShortGuardIntervalDisambiguation(void) const
Return the short GI NSYM disambiguation field of VHT-SIG-A2.
Definition: vht-ppdu.cc:232
ns3::VhtPpdu::VhtSigHeader::m_bw
uint8_t m_bw
BW.
Definition: vht-ppdu.h:141
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::Header
Protocol header serialization and deserialization.
Definition: header.h:43
ns3::VhtPpdu::VhtSigHeader::m_suMcs
uint8_t m_suMcs
SU VHT MCS.
Definition: vht-ppdu.h:147
ns3::VhtPpdu::Copy
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Definition: vht-ppdu.cc:87
ns3::VhtPpdu::VhtSigHeader::m_sgi
uint8_t m_sgi
Short GI.
Definition: vht-ppdu.h:145
ns3::VhtPpdu::VhtSigHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const override
Definition: vht-ppdu.cc:140
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::VhtPpdu::DoGetTxVector
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Definition: vht-ppdu.cc:57
ns3::VhtPpdu::VhtSigHeader
VHT PHY header (VHT-SIG-A1/A2/B).
Definition: vht-ppdu.h:53
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition: buffer.h:99
ns3::VhtPpdu::VhtSigHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition: vht-ppdu.cc:251
ns3::VhtPpdu::VhtSigHeader::~VhtSigHeader
virtual ~VhtSigHeader()
Definition: vht-ppdu.cc:108
ns3::VhtPpdu::VhtPpdu
VhtPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, Time ppduDuration, WifiPhyBand band, uint64_t uid)
Create a VHT PPDU.
Definition: vht-ppdu.cc:33
ns3::WifiPpduType
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
Definition: wifi-phy-common.h:229
ns3::VhtPpdu::VhtSigHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: vht-ppdu.cc:113
ns3::VhtPpdu::~VhtPpdu
virtual ~VhtPpdu()
Destructor for VhtPpdu.
Definition: vht-ppdu.cc:52
ns3::WifiPhyBand
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
ns3::VhtPpdu::VhtSigHeader::SetNStreams
void SetNStreams(uint8_t nStreams)
Fill the number of streams field of VHT-SIG-A1.
Definition: vht-ppdu.cc:201
ns3::VhtPpdu::VhtSigHeader::Print
void Print(std::ostream &os) const override
Definition: vht-ppdu.cc:130
ns3::VhtPpdu::VhtSigHeader::SetShortGuardInterval
void SetShortGuardInterval(bool sgi)
Fill the short guard interval field of VHT-SIG-A2.
Definition: vht-ppdu.cc:214
ns3::VhtPpdu::GetTxDuration
Time GetTxDuration(void) const override
Get the total transmission duration of the PPDU.
Definition: vht-ppdu.cc:70
ns3::VhtPpdu::m_vhtSig
VhtSigHeader m_vhtSig
the VHT-SIG PHY header
Definition: vht-ppdu.h:176
ns3::VhtPpdu::VhtSigHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const override
Get the most derived TypeId for this Object.
Definition: vht-ppdu.cc:124