A Discrete-Event Network Simulator
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
33namespace ns3
34{
35
36class WifiPsdu;
37
44class HtPpdu : public OfdmPpdu
45{
46 public:
51 class HtSigHeader : public Header
52 {
53 public:
55 ~HtSigHeader() 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 SetMcs(uint8_t mcs);
80 uint8_t GetMcs() const;
86 void SetChannelWidth(uint16_t channelWidth);
92 uint16_t GetChannelWidth() const;
98 void SetAggregation(bool aggregation);
104 bool GetAggregation() const;
110 void SetShortGuardInterval(bool sgi);
116 bool GetShortGuardInterval() const;
122 void SetHtLength(uint16_t length);
128 uint16_t GetHtLength() const;
129
130 private:
131 uint8_t m_mcs;
132 uint8_t m_cbw20_40;
133 uint16_t m_htLength;
135 uint8_t m_sgi;
136 }; // HtSigHeader
137
149 const WifiTxVector& txVector,
150 uint16_t txCenterFreq,
151 Time ppduDuration,
152 WifiPhyBand band,
153 uint64_t uid);
157 ~HtPpdu() override;
158
159 Time GetTxDuration() const override;
160 Ptr<WifiPpdu> Copy() const override;
161
162 private:
163 WifiTxVector DoGetTxVector() const override;
164
166}; // class HtPpdu
167
168} // namespace ns3
169
170#endif /* HT_PPDU_H */
iterator in a Buffer instance
Definition: buffer.h:100
Protocol header serialization and deserialization.
Definition: header.h:44
HT PHY header (HT-SIG1/2).
Definition: ht-ppdu.h:52
void Print(std::ostream &os) const override
Definition: ht-ppdu.cc:131
uint8_t m_mcs
Modulation and Coding Scheme index.
Definition: ht-ppdu.h:131
uint16_t GetHtLength() const
Return the HT length field of HT-SIG (in bytes).
Definition: ht-ppdu.cc:175
uint8_t GetMcs() const
Return the MCS field of HT-SIG.
Definition: ht-ppdu.cc:151
void SetHtLength(uint16_t length)
Fill the HT length field of HT-SIG (in bytes).
Definition: ht-ppdu.cc:169
bool GetAggregation() const
Return the aggregation field of HT-SIG.
Definition: ht-ppdu.cc:187
uint16_t m_htLength
HT length.
Definition: ht-ppdu.h:133
void SetMcs(uint8_t mcs)
Fill the MCS field of HT-SIG.
Definition: ht-ppdu.cc:144
bool GetShortGuardInterval() const
Return the short guard interval field of HT-SIG.
Definition: ht-ppdu.cc:199
uint32_t Deserialize(Buffer::Iterator start) override
Definition: ht-ppdu.cc:219
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: ht-ppdu.cc:125
uint16_t GetChannelWidth() const
Return the channel width (in MHz).
Definition: ht-ppdu.cc:163
void SetAggregation(bool aggregation)
Fill the aggregation field of HT-SIG.
Definition: ht-ppdu.cc:181
uint32_t GetSerializedSize() const override
Definition: ht-ppdu.cc:138
~HtSigHeader() override
Definition: ht-ppdu.cc:110
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of HT-SIG (in MHz).
Definition: ht-ppdu.cc:157
uint8_t m_sgi
Short Guard Interval.
Definition: ht-ppdu.h:135
uint8_t m_cbw20_40
CBW 20/40.
Definition: ht-ppdu.h:132
void SetShortGuardInterval(bool sgi)
Fill the short guard interval field of HT-SIG.
Definition: ht-ppdu.cc:193
static TypeId GetTypeId()
Get the type ID.
Definition: ht-ppdu.cc:115
uint8_t m_aggregation
Aggregation.
Definition: ht-ppdu.h:134
void Serialize(Buffer::Iterator start) const override
Definition: ht-ppdu.cc:205
HT PPDU (11n)
Definition: ht-ppdu.h:45
HtSigHeader m_htSig
the HT-SIG PHY header
Definition: ht-ppdu.h:165
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition: ht-ppdu.cc:74
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition: ht-ppdu.cc:96
~HtPpdu() override
Destructor for HtPpdu.
Definition: ht-ppdu.cc:69
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition: ht-ppdu.cc:87
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
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
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1861