16#include "ns3/wifi-phy-operating-channel.h"
17#include "ns3/wifi-phy.h"
18#include "ns3/wifi-psdu.h"
29 bool instantiateLSig )
30 :
WifiPpdu(psdu, txVector, channel, uid),
31 m_channelWidth(txVector.IsNonHtDuplicate() ? 20 : txVector.GetChannelWidth())
96 if (channelWidth == 5)
100 else if (channelWidth == 10)
180 if (channelWidth == 5)
184 else if (channelWidth == 10)
static WifiMode GetOfdmRate(uint64_t rate, MHz_u bw=20)
Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20,...
void SetLSigHeader(LSigHeader &lSig, const WifiTxVector &txVector, std::size_t psduSize) const
Fill in the L-SIG header.
void SetPhyHeaders(const WifiTxVector &txVector, std::size_t psduSize)
Fill in the PHY headers.
MHz_u m_channelWidth
the channel width used to transmit that PPDU (needed to distinguish 5 MHz, 10 MHz or 20 MHz PPDUs)
OfdmPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, uint64_t uid, bool instantiateLSig=true)
Create an OFDM PPDU.
LSigHeader m_lSig
the L-SIG PHY header
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Ptr< WifiPpdu > Copy() const override
Copy this instance.
virtual void SetTxVectorFromLSigHeader(WifiTxVector &txVector, const LSigHeader &lSig) const
Fill in the TXVECTOR from L-SIG header.
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
uint64_t GetDataRate(MHz_u channelWidth, Time guardInterval, uint8_t nss) const
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
Class that keeps track of all information about the current PHY operating channel.
bool IsSet() const
Return true if a valid channel has been set, false otherwise.
WifiPhyBand GetPhyBand() const
Return the PHY band of the operating channel.
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
const WifiPhyOperatingChannel & m_operatingChannel
the operating channel of the PHY
WifiPreamble m_preamble
the PHY preamble
const WifiTxVector & GetTxVector() const
Get the TXVECTOR used to send the PPDU.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode.
void SetChannelWidth(MHz_u channelWidth)
Sets the selected channelWidth.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Declaration of ns3::OfdmPhy class and ns3::OfdmPhyVariant enum.
Declaration of ns3::OfdmPpdu class.