25 #include "ns3/ofdm-ppdu.h"
103 std::optional<Center26ToneRuIndication>
108 using HeSigHeader = std::variant<std::monostate, HeSuSigHeader, HeTbSigHeader, HeMuSigHeader>;
203 uint16_t channelWidth,
205 bool sigBCompression,
206 uint8_t numMuMimoUsers);
229 bool sigBCompression,
230 std::size_t numMuMimoUsers);
252 bool sigBCompression,
253 uint8_t numMuMimoUsers)
const;
352 virtual bool IsMu()
const;
358 virtual bool IsDlMu()
const;
364 virtual bool IsUlMu()
const;
std::vector< std::vector< HeSigBUserSpecificField > > HeSigBContentChannels
HE SIG-B Content Channels.
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.
static uint16_t GetGuardIntervalFromEncoding(uint8_t giAndNltfSize)
Convert guard interval (in ns) from its encoding in HE-SIG-A.
static uint16_t GetChannelWidthMhzFromEncoding(uint8_t bandwidth)
Convert channel width expressed in MHz from bandwidth field encoding in HE-SIG-A.
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 std::pair< std::size_t, std::size_t > GetNumRusPerHeSigBContentChannel(uint16_t channelWidth, const RuAllocation &ruAllocation, bool sigBCompression, uint8_t numMuMimoUsers)
Get the number of STAs per HE-SIG-B content channel.
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.
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.
uint16_t GetTxChannelWidth() const override
Get the channel width over which the PPDU will effectively be transmitted.
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.
WifiPpduType GetType() const override
Return the PPDU type (.
TxPsdFlag GetTxPsdFlag() const
static uint8_t GetMuMimoUsersEncoding(uint8_t nUsers)
Convert number of MU-MIMO users to its encoding in HE-SIG-A.
virtual bool IsMu() const
Return true if the PPDU is a MU PPDU.
static uint8_t GetGuardIntervalAndNltfEncoding(uint16_t gi, uint8_t nltf)
Convert guard interval (in ns) and NLTF to its 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 uint32_t GetSigBFieldSize(uint16_t channelWidth, const RuAllocation &ruAllocation, bool sigBCompression, std::size_t numMuMimoUsers)
Get variable length HE SIG-B field size.
static uint8_t GetChannelWidthEncodingFromMhz(uint16_t channelWidth)
Convert channel width expressed in MHz to bandwidth field 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.
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::vector< uint8_t > RuAllocation
8 bit RU_ALLOCATION per 20 MHz
std::ostream & operator<<(std::ostream &os, const Angles &a)
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.
User Specific Fields in HE-SIG-Bs.
uint8_t nss
number of spatial streams