A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
eht-ppdu.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 DERONNE SOFTWARE ENGINEERING
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: Sébastien Deronne <sebastien.deronne@gmail.com>
18 */
19
20#ifndef EHT_PPDU_H
21#define EHT_PPDU_H
22
23#include "ns3/he-ppdu.h"
24
25#include <optional>
26
33namespace ns3
34{
35
42class EhtPpdu : public HePpdu
43{
44 public:
49 {
50 // U-SIG fields
51 uint8_t m_phyVersionId{0};
52 uint8_t m_bandwidth{0};
53 uint8_t m_bssColor{0};
54 uint8_t m_ppduType{0};
55
56 }; // struct EhtTbPhyHeader
57
62 {
63 // U-SIG fields
64 uint8_t m_phyVersionId{0};
65 uint8_t m_bandwidth{0};
66 uint8_t m_bssColor{0};
67 uint8_t m_ppduType{0};
68 uint8_t m_ehtSigMcs{0};
69
70 // EHT-SIG fields
71 uint8_t m_giLtfSize{0};
72
73 std::optional<RuAllocation> m_ruAllocationA;
75 std::optional<RuAllocation> m_ruAllocationB;
77
79 }; // struct EhtMuPhyHeader
80
82 using EhtPhyHeader = std::variant<std::monostate, EhtTbPhyHeader, EhtMuPhyHeader>;
83
96 EhtPpdu(const WifiConstPsduMap& psdus,
97 const WifiTxVector& txVector,
98 const WifiPhyOperatingChannel& channel,
99 Time ppduDuration,
100 uint64_t uid,
101 TxPsdFlag flag);
102
103 WifiPpduType GetType() const override;
104 Ptr<WifiPpdu> Copy() const override;
105
116 static std::pair<std::size_t, std::size_t> GetNumRusPerEhtSigBContentChannel(
117 uint16_t channelWidth,
118 uint8_t ehtPpduType,
119 const std::vector<uint8_t>& ruAllocation);
120
130 uint8_t p20Index);
131
139 static uint32_t GetEhtSigFieldSize(uint16_t channelWidth,
140 const std::vector<uint8_t>& ruAllocation,
141 uint8_t ehtPpduType);
142
143 private:
144 bool IsDlMu() const override;
145 bool IsUlMu() const override;
146 void SetTxVectorFromPhyHeaders(WifiTxVector& txVector) const override;
147
154 void SetPhyHeaders(const WifiTxVector& txVector, Time ppduDuration);
155
161 void SetEhtPhyHeader(const WifiTxVector& txVector);
162
164}; // class EhtPpdu
165
166} // namespace ns3
167
168#endif /* EHT_PPDU_H */
EHT PPDU (11be)
Definition: eht-ppdu.h:43
static HeSigBContentChannels GetEhtSigContentChannels(const WifiTxVector &txVector, uint8_t p20Index)
Get the EHT-SIG content channels for a given PPDU IEEE 802.11be-D3.1 36.3.12.8.2 EHT-SIG content chan...
Definition: eht-ppdu.cc:172
bool IsDlMu() const override
Return true if the PPDU is a DL MU PPDU.
Definition: eht-ppdu.cc:107
static std::pair< std::size_t, std::size_t > GetNumRusPerEhtSigBContentChannel(uint16_t channelWidth, uint8_t ehtPpduType, const std::vector< uint8_t > &ruAllocation)
Get the number of RUs per EHT-SIG-B content channel.
Definition: eht-ppdu.cc:160
bool IsUlMu() const override
Return true if the PPDU is an UL MU PPDU.
Definition: eht-ppdu.cc:113
void SetEhtPhyHeader(const WifiTxVector &txVector)
Fill in the EHT PHY header.
Definition: eht-ppdu.cc:53
std::variant< std::monostate, EhtTbPhyHeader, EhtMuPhyHeader > EhtPhyHeader
type of the EHT PHY header
Definition: eht-ppdu.h:82
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition: eht-ppdu.cc:217
void SetTxVectorFromPhyHeaders(WifiTxVector &txVector) const override
Fill in the TXVECTOR from PHY headers.
Definition: eht-ppdu.cc:119
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the PHY headers.
Definition: eht-ppdu.cc:46
WifiPpduType GetType() const override
Return the PPDU type (.
Definition: eht-ppdu.cc:88
static uint32_t GetEhtSigFieldSize(uint16_t channelWidth, const std::vector< uint8_t > &ruAllocation, uint8_t ehtPpduType)
Get variable length EHT-SIG field size.
Definition: eht-ppdu.cc:184
EhtPhyHeader m_ehtPhyHeader
the EHT PHY header
Definition: eht-ppdu.h:163
HE PPDU (11ax)
Definition: he-ppdu.h:50
std::vector< std::vector< HeSigBUserSpecificField > > HeSigBContentChannels
HE SIG-B Content Channels.
Definition: he-ppdu.h:61
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE porti...
Definition: he-ppdu.h:113
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Class that keeps track of all information about the current PHY operating channel.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
PHY header for EHT MU PPDUs.
Definition: eht-ppdu.h:62
uint8_t m_bandwidth
Bandwidth field.
Definition: eht-ppdu.h:65
HeSigBContentChannels m_contentChannels
EHT-SIG Content Channels.
Definition: eht-ppdu.h:78
uint8_t m_phyVersionId
PHY Version Identifier field.
Definition: eht-ppdu.h:64
uint8_t m_ppduType
PPDU Type And Compressed Mode field.
Definition: eht-ppdu.h:67
uint8_t m_giLtfSize
GI+LTF Size field.
Definition: eht-ppdu.h:71
std::optional< RuAllocation > m_ruAllocationB
RU Allocation-B that are going to be carried in EHT-SIG common subfields.
Definition: eht-ppdu.h:75
uint8_t m_ehtSigMcs
EHT-SIG-B MCS.
Definition: eht-ppdu.h:68
uint8_t m_bssColor
BSS color field.
Definition: eht-ppdu.h:66
std::optional< RuAllocation > m_ruAllocationA
RU Allocation-A that are going to be carried in EHT-SIG common subfields.
Definition: eht-ppdu.h:73
PHY header for EHT TB PPDUs.
Definition: eht-ppdu.h:49
uint8_t m_ppduType
PPDU Type And Compressed Mode field.
Definition: eht-ppdu.h:54
uint8_t m_bandwidth
Bandwidth field.
Definition: eht-ppdu.h:52
uint8_t m_bssColor
BSS color field.
Definition: eht-ppdu.h:53
uint8_t m_phyVersionId
PHY Version Identifier field.
Definition: eht-ppdu.h:51