14#include "ns3/ofdm-ppdu.h"
92 std::optional<Center26ToneRuIndication>
97 using HeSigHeader = std::variant<std::monostate, HeSuSigHeader, HeTbSigHeader, HeMuSigHeader>;
194 bool sigBCompression,
195 uint8_t numMuMimoUsers);
218 bool sigBCompression,
219 std::size_t numMuMimoUsers);
240 const HeSigBContentChannels& contentChannels,
241 bool sigBCompression,
242 uint8_t numMuMimoUsers)
const;
341 virtual bool IsMu()
const;
347 virtual bool IsDlMu()
const;
353 virtual bool IsUlMu()
const;
HeSigHeader m_heSig
the HE-SIG PHY header
void SetTxPsdFlag(TxPsdFlag flag) const
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
virtual void SetTxVectorFromPhyHeaders(WifiTxVector &txVector) const
Fill in the TXVECTOR from PHY headers.
void UpdateTxVectorForUlMu(const std::optional< WifiTxVector > &trigVector) const
Update the TXVECTOR for HE TB PPDUs, since the information to decode HE TB PPDUs is not available fro...
Ptr< WifiPpdu > Copy() const override
Copy this instance.
MHz_u GetTxChannelWidth() const override
Get the channel width over which the PPDU will effectively be transmitted.
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE porti...
@ PSD_HE_PORTION
HE portion of an HE PPDU.
@ PSD_NON_HE_PORTION
Non-HE portion of an HE PPDU.
virtual bool IsDlMu() const
Return true if the PPDU is a DL MU PPDU.
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
virtual bool IsUlMu() const
Return true if the PPDU is an UL MU PPDU.
static uint32_t GetSigBFieldSize(MHz_u channelWidth, const RuAllocation &ruAllocation, bool sigBCompression, std::size_t numMuMimoUsers)
Get variable length HE SIG-B field size.
static uint8_t GetNstsEncodingFromNss(uint8_t nss)
Convert number of spatial streams to NSTS field encoding in HE-SIG-A.
void SetHeSigHeader(const WifiTxVector &txVector)
Fill in the HE-SIG header.
static uint8_t GetNssFromNstsEncoding(uint8_t nsts)
Convert number of spatial streams from NSTS field encoding in HE-SIG-A.
static Time GetGuardIntervalFromEncoding(uint8_t giAndNltfSize)
Convert guard interval from its encoding in HE-SIG-A.
std::variant< std::monostate, HeSuSigHeader, HeTbSigHeader, HeMuSigHeader > HeSigHeader
type of the HE-SIG PHY header
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the PHY headers.
std::string PrintPayload() const override
Print the payload of the PPDU.
uint16_t GetStaId() const override
Get the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise.
static HeSigBContentChannels GetHeSigBContentChannels(const WifiTxVector &txVector, uint8_t p20Index)
Get the HE SIG-B content channels for a given PPDU IEEE 802.11ax-2021 27.3.11.8.2 HE-SIG-B content ch...
void SetHeMuUserInfos(WifiTxVector &txVector, const RuAllocation &ruAllocation, const HeSigBContentChannels &contentChannels, bool sigBCompression, uint8_t numMuMimoUsers) const
Reconstruct HeMuUserInfoMap from HE-SIG-B header.
std::vector< std::vector< HeSigBUserSpecificField > > HeSigBContentChannels
HE SIG-B Content Channels.
WifiPpduType GetType() const override
Return the PPDU type (.
static std::pair< std::size_t, std::size_t > GetNumRusPerHeSigBContentChannel(MHz_u channelWidth, const RuAllocation &ruAllocation, bool sigBCompression, uint8_t numMuMimoUsers)
Get the number of STAs per HE-SIG-B content channel.
TxPsdFlag GetTxPsdFlag() const
static uint8_t GetMuMimoUsersEncoding(uint8_t nUsers)
Convert number of MU-MIMO users to its encoding in HE-SIG-A.
static MHz_u GetChannelWidthMhzFromEncoding(uint8_t bandwidth)
Convert channel width expressed in MHz from bandwidth field encoding in HE-SIG-A.
virtual bool IsMu() const
Return true if the PPDU is a MU PPDU.
static uint8_t GetChannelWidthEncodingFromMhz(MHz_u channelWidth)
Convert channel width expressed in MHz to bandwidth field encoding in HE-SIG-A.
void SetLSigHeader(Time ppduDuration)
Fill in the L-SIG header.
HePpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, Time ppduDuration, uint64_t uid)
Create an SU HE PPDU, storing a PSDU.
static uint8_t GetGuardIntervalAndNltfEncoding(Time guardInterval, uint8_t nltf)
Convert guard interval and NLTF to its encoding in HE-SIG-A.
TxPsdFlag m_txPsdFlag
the transmit power spectral density flag
static uint8_t GetMuMimoUsersFromEncoding(uint8_t encoding)
Convert number of MU-MIMO users from its encoding in HE-SIG-A.
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.
WifiPsdu stores an MPDU, S-MPDU or A-MPDU, by keeping header(s) and payload(s) separate for each cons...
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.
std::ostream & operator<<(std::ostream &os, const Angles &a)
double MHz_u
MHz weak type.
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
constexpr size_t WIFI_MAX_NUM_HE_SIGB_CONTENT_CHANNELS
HE SIG-B Content Channels.
std::vector< uint16_t > RuAllocation
9 bits RU_ALLOCATION per 20 MHz
User Specific Fields in HE-SIG-Bs.
uint8_t nss
number of spatial streams