12#include "ns3/he-ppdu.h"
71 using EhtPhyHeader = std::variant<std::monostate, EhtTbPhyHeader, EhtMuPhyHeader>;
112 std::size_t numMuMimoUsers);
138 std::size_t numMuMimoUsers);
150 static uint8_t
GetPuncturedInfo(
const std::vector<bool>& inactiveSubchannels,
152 std::optional<bool> isLow80MHz);
158 std::size_t phyIndex)
const override;
161 bool IsDlMu()
const override;
162 bool IsUlMu()
const override;
static uint32_t GetEhtSigFieldSize(MHz_u channelWidth, const RuAllocation &ruAllocation, uint8_t ehtPpduType, bool compression, std::size_t numMuMimoUsers)
Get variable length EHT-SIG field size.
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...
bool IsDlMu() const override
Return true if the PPDU is a DL MU PPDU.
static MHz_u GetChannelWidthMhzFromEncoding(uint8_t bandwidth)
Convert channel width expressed in MHz from bandwidth field encoding in U-SIG.
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration) override
Fill in the PHY headers.
WifiRu::RuSpec GetRuSpec(std::size_t ruAllocIndex, MHz_u bw, RuType ruType, std::size_t phyIndex) const override
Get the RU specification that has been assigned a given user.
static uint8_t GetChannelWidthEncodingFromMhz(MHz_u channelWidth, const WifiPhyOperatingChannel &channel)
Convert channel width expressed in MHz to bandwidth field encoding in U-SIG.
bool IsUlMu() const override
Return true if the PPDU is an UL MU PPDU.
void SetEhtPhyHeader(const WifiTxVector &txVector)
Fill in the EHT PHY header.
std::variant< std::monostate, EhtTbPhyHeader, EhtMuPhyHeader > EhtPhyHeader
type of the EHT PHY header
static std::pair< std::size_t, std::size_t > GetNumRusPerEhtSigBContentChannel(MHz_u channelWidth, uint8_t ehtPpduType, const RuAllocation &ruAllocation, bool compression, std::size_t numMuMimoUsers)
Get the number of RUs per EHT-SIG-B content channel.
Ptr< WifiPpdu > Copy() const override
Copy this instance.
void SetTxVectorFromPhyHeaders(WifiTxVector &txVector) const override
Fill in the TXVECTOR from PHY headers.
WifiPpduType GetType() const override
Return the PPDU type (.
static uint8_t GetPuncturedInfo(const std::vector< bool > &inactiveSubchannels, uint8_t ehtPpduType, std::optional< bool > isLow80MHz)
Get the Punctured Channel Information field in the U-SIG.
EhtPhyHeader m_ehtPhyHeader
the EHT PHY header
EhtPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, Time ppduDuration, uint64_t uid, TxPsdFlag flag)
Create an EHT PPDU, storing a map of PSDUs.
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE porti...
std::vector< std::vector< HeSigBUserSpecificField > > HeSigBContentChannels
HE SIG-B Content Channels.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Class that keeps track of all information about the current PHY operating channel.
Ptr< const WifiPsdu > GetPsdu() const
Get the payload of the PPDU.
std::variant< HeRu::RuSpec, EhtRu::RuSpec > RuSpec
variant of the RU specification
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.
RuType
The different Resource Unit (RU) types.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
std::vector< uint16_t > RuAllocation
9 bits RU_ALLOCATION per 20 MHz