|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #include "ns3/wifi-phy.h"
24 #include "ns3/wifi-psdu.h"
35 bool instantiateLSig )
38 m_channelWidth (txVector.GetChannelWidth ())
94 .SetGroupName (
"Wifi")
109 os <<
"SIGNAL=" << GetRate ()
110 <<
" LENGTH=" << m_length;
122 if (channelWidth == 5)
126 else if (channelWidth == 10)
206 if (channelWidth == 5)
210 else if (channelWidth == 10)
237 byte |= (m_length & 0x07) << 5;
238 start.WriteU8 (
byte);
240 bytes |= (m_length & 0x0ff8) >> 3;
241 start.WriteU16 (bytes);
249 uint8_t
byte = i.
ReadU8 ();
250 m_rate =
byte & 0x0f;
251 m_length = (
byte >> 5) & 0x07;
254 m_length |= (bytes << 3) & 0x0ff8;
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
uint32_t GetDistanceFrom(Iterator const &o) const
WifiTxVector GetTxVector(void) const
Get the TXVECTOR used to send the PPDU.
OfdmPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, WifiPhyBand band, uint64_t uid, bool instantiateLSig=true)
Create an OFDM PPDU.
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual ~OfdmPpdu()
Destructor for OfdmPpdu.
LSigHeader m_lSig
the L-SIG PHY header
uint32_t GetSize(void) const
Return the size of the PSDU in bytes.
Time GetTxDuration(void) const override
Get the total transmission duration of the PPDU.
Simulation virtual time values and global simulation resolution.
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Declaration of ns3::OfdmPhy class and ns3::OfdmPhyVariant enum.
iterator in a Buffer instance
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Time Seconds(double value)
Construct a Time in the indicated unit.
Declaration of ns3::OfdmPpdu class.
static WifiMode GetOfdmRate(uint64_t rate, uint16_t bw=20)
Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20,...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
WifiPhyBand
Identifies the PHY band.
uint64_t m_uid
the unique ID of this PPDU
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Ptr< const WifiPsdu > GetPsdu(void) const
Get the payload of the PPDU.
WifiPreamble m_preamble
the PHY preamble
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
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.