A Discrete-Event Network Simulator
API
ns3::WifiPpdu Class Reference

WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU. More...

#include "wifi-ppdu.h"

+ Inheritance diagram for ns3::WifiPpdu:
+ Collaboration diagram for ns3::WifiPpdu:

Public Member Functions

 WifiPpdu (Ptr< const WifiPsdu > psdu, WifiTxVector txVector, Time ppduDuration, WifiPhyBand band)
 Create a single user PPDU storing a PSDU. More...
 
virtual ~WifiPpdu ()
 
Ptr< const WifiPsduGetPsdu (void) const
 Get the payload of the PPDU. More...
 
Time GetTxDuration () const
 Get the total transmission duration of the PPDU. More...
 
WifiTxVector GetTxVector (void) const
 Get the TXVECTOR used to send the PPDU. More...
 
bool IsTruncatedTx (void) const
 Return true if the PPDU's transmission was aborted due to transmitter switch off. More...
 
void Print (std::ostream &os) const
 Print the PPDU contents. More...
 
void SetTruncatedTx (void)
 Indicate that the PPDU's transmission was aborted due to transmitter switch off. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< WifiPpdu >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Private Attributes

WifiPhyBand m_band
 the WifiPhyBand used to transmit that PPDU More...
 
uint16_t m_channelWidth
 the channel width used to transmit that PPDU in MHz More...
 
DsssSigHeader m_dsssSig
 the DSSS SIG PHY header More...
 
HeSigHeader m_heSig
 the HE-SIG PHY header More...
 
HtSigHeader m_htSig
 the HT-SIG PHY header More...
 
LSigHeader m_lSig
 the L-SIG PHY header More...
 
WifiModulationClass m_modulation
 the modulation used for the transmission of this PPDU More...
 
WifiPreamble m_preamble
 the PHY preamble More...
 
Ptr< const WifiPsdum_psdu
 the PSDU contained in this PPDU More...
 
bool m_truncatedTx
 flag indicating whether the frame's transmission was aborted due to transmitter switch off More...
 
uint8_t m_txPowerLevel
 the transmission power level (used only for TX and initializing the returned WifiTxVector) More...
 
VhtSigHeader m_vhtSig
 the VHT-SIG PHY header More...
 

Detailed Description

WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.

This class should be extended later on to handle MU PPDUs.

Definition at line 40 of file wifi-ppdu.h.

Constructor & Destructor Documentation

◆ WifiPpdu()

ns3::WifiPpdu::WifiPpdu ( Ptr< const WifiPsdu psdu,
WifiTxVector  txVector,
Time  ppduDuration,
WifiPhyBand  band 
)

Create a single user PPDU storing a PSDU.

Parameters
psduthe PHY payload (PSDU)
txVectorthe TXVECTOR that was used for this PPDU
ppduDurationthe transmission duration of this PPDU
bandthe WifiPhyBand used for the transmission of this PPDU

Definition at line 32 of file wifi-ppdu.cc.

References ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiTxVector::GetBssColor(), ns3::WifiMode::GetDataRate(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiMode::GetMcsValue(), ns3::Time::GetMicroSeconds(), ns3::WifiTxVector::GetMode(), ns3::Time::GetNanoSeconds(), ns3::WifiTxVector::GetNss(), ns3::WifiTxVector::IsAggregation(), ns3::WifiTxVector::IsValid(), m_band, m_channelWidth, m_dsssSig, m_heSig, m_htSig, m_lSig, m_modulation, m_preamble, m_vhtSig, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::HtSigHeader::SetAggregation(), ns3::HeSigHeader::SetBssColor(), ns3::HtSigHeader::SetChannelWidth(), ns3::VhtSigHeader::SetChannelWidth(), ns3::HeSigHeader::SetChannelWidth(), ns3::HeSigHeader::SetGuardIntervalAndLtfSize(), ns3::HtSigHeader::SetHtLength(), ns3::DsssSigHeader::SetLength(), ns3::LSigHeader::SetLength(), ns3::HtSigHeader::SetMcs(), ns3::HeSigHeader::SetMcs(), ns3::VhtSigHeader::SetMuFlag(), ns3::HeSigHeader::SetMuFlag(), ns3::VhtSigHeader::SetNStreams(), ns3::HeSigHeader::SetNStreams(), ns3::DsssSigHeader::SetRate(), ns3::LSigHeader::SetRate(), ns3::HtSigHeader::SetShortGuardInterval(), ns3::VhtSigHeader::SetShortGuardInterval(), ns3::VhtSigHeader::SetShortGuardIntervalDisambiguation(), ns3::VhtSigHeader::SetSuMcs(), ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_ERP_OFDM, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PREAMBLE_HE_MU, ns3::WIFI_PREAMBLE_HE_SU, and ns3::WIFI_PREAMBLE_VHT_MU.

+ Here is the call graph for this function:

◆ ~WifiPpdu()

ns3::WifiPpdu::~WifiPpdu ( )
virtual

Definition at line 127 of file wifi-ppdu.cc.

Member Function Documentation

◆ GetPsdu()

Ptr< const WifiPsdu > ns3::WifiPpdu::GetPsdu ( void  ) const

Get the payload of the PPDU.

Returns
the PSDU

Definition at line 328 of file wifi-ppdu.cc.

References m_psdu.

◆ GetTxDuration()

◆ GetTxVector()

WifiTxVector ns3::WifiPpdu::GetTxVector ( void  ) const

Get the TXVECTOR used to send the PPDU.

Returns
the TXVECTOR of the PPDU.

Definition at line 132 of file wifi-ppdu.cc.

References ns3::HtSigHeader::GetAggregation(), ns3::HeSigHeader::GetBssColor(), ns3::HtSigHeader::GetChannelWidth(), ns3::VhtSigHeader::GetChannelWidth(), ns3::HeSigHeader::GetChannelWidth(), ns3::WifiPhy::GetDsssRate11Mbps(), ns3::WifiPhy::GetDsssRate1Mbps(), ns3::WifiPhy::GetDsssRate2Mbps(), ns3::WifiPhy::GetDsssRate5_5Mbps(), ns3::WifiPhy::GetErpOfdmRate12Mbps(), ns3::WifiPhy::GetErpOfdmRate18Mbps(), ns3::WifiPhy::GetErpOfdmRate24Mbps(), ns3::WifiPhy::GetErpOfdmRate36Mbps(), ns3::WifiPhy::GetErpOfdmRate48Mbps(), ns3::WifiPhy::GetErpOfdmRate54Mbps(), ns3::WifiPhy::GetErpOfdmRate6Mbps(), ns3::WifiPhy::GetErpOfdmRate9Mbps(), ns3::HeSigHeader::GetGuardInterval(), ns3::WifiPhy::GetHeMcs(), ns3::WifiPhy::GetHtMcs(), ns3::HtSigHeader::GetMcs(), ns3::HeSigHeader::GetMcs(), ns3::VhtSigHeader::GetNStreams(), ns3::HeSigHeader::GetNStreams(), ns3::WifiPhy::GetOfdmRate12Mbps(), ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate18Mbps(), ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate24Mbps(), ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate36Mbps(), ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate48Mbps(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate54Mbps(), ns3::WifiPhy::GetOfdmRate6Mbps(), ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate9Mbps(), ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz(), ns3::DsssSigHeader::GetRate(), ns3::LSigHeader::GetRate(), ns3::HtSigHeader::GetShortGuardInterval(), ns3::VhtSigHeader::GetShortGuardInterval(), ns3::VhtSigHeader::GetSuMcs(), ns3::WifiPhy::GetVhtMcs(), m_channelWidth, m_dsssSig, m_heSig, m_htSig, m_lSig, m_modulation, m_preamble, m_psdu, m_txPowerLevel, m_vhtSig, NS_ASSERT_MSG, NS_FATAL_ERROR, ns3::WifiTxVector::SetAggregation(), ns3::WifiTxVector::SetBssColor(), ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiTxVector::SetPreambleType(), ns3::WifiTxVector::SetTxPowerLevel(), ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_ERP_OFDM, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, and ns3::WIFI_MOD_CLASS_VHT.

Referenced by GetTxDuration().

+ Here is the caller graph for this function:

◆ IsTruncatedTx()

bool ns3::WifiPpdu::IsTruncatedTx ( void  ) const

Return true if the PPDU's transmission was aborted due to transmitter switch off.

Returns
true if the PPDU's transmission was aborted due to transmitter switch off

Definition at line 334 of file wifi-ppdu.cc.

References m_truncatedTx.

◆ Print()

void ns3::WifiPpdu::Print ( std::ostream &  os) const

Print the PPDU contents.

Parameters
osoutput stream in which the data should be printed.

Definition at line 409 of file wifi-ppdu.cc.

References m_modulation, m_preamble, m_psdu, and m_truncatedTx.

Referenced by ns3::operator<<().

+ Here is the caller graph for this function:

◆ SetTruncatedTx()

void ns3::WifiPpdu::SetTruncatedTx ( void  )

Indicate that the PPDU's transmission was aborted due to transmitter switch off.

Definition at line 340 of file wifi-ppdu.cc.

References m_truncatedTx, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_band

WifiPhyBand ns3::WifiPpdu::m_band
private

the WifiPhyBand used to transmit that PPDU

Definition at line 96 of file wifi-ppdu.h.

Referenced by GetTxDuration(), and WifiPpdu().

◆ m_channelWidth

uint16_t ns3::WifiPpdu::m_channelWidth
private

the channel width used to transmit that PPDU in MHz

Definition at line 97 of file wifi-ppdu.h.

Referenced by GetTxVector(), and WifiPpdu().

◆ m_dsssSig

DsssSigHeader ns3::WifiPpdu::m_dsssSig
private

the DSSS SIG PHY header

Definition at line 87 of file wifi-ppdu.h.

Referenced by GetTxDuration(), GetTxVector(), and WifiPpdu().

◆ m_heSig

HeSigHeader ns3::WifiPpdu::m_heSig
private

the HE-SIG PHY header

Definition at line 91 of file wifi-ppdu.h.

Referenced by GetTxVector(), and WifiPpdu().

◆ m_htSig

HtSigHeader ns3::WifiPpdu::m_htSig
private

the HT-SIG PHY header

Definition at line 89 of file wifi-ppdu.h.

Referenced by GetTxDuration(), GetTxVector(), and WifiPpdu().

◆ m_lSig

LSigHeader ns3::WifiPpdu::m_lSig
private

the L-SIG PHY header

Definition at line 88 of file wifi-ppdu.h.

Referenced by GetTxDuration(), GetTxVector(), and WifiPpdu().

◆ m_modulation

WifiModulationClass ns3::WifiPpdu::m_modulation
private

the modulation used for the transmission of this PPDU

Definition at line 93 of file wifi-ppdu.h.

Referenced by GetTxDuration(), GetTxVector(), Print(), and WifiPpdu().

◆ m_preamble

WifiPreamble ns3::WifiPpdu::m_preamble
private

the PHY preamble

Definition at line 92 of file wifi-ppdu.h.

Referenced by GetTxDuration(), GetTxVector(), Print(), and WifiPpdu().

◆ m_psdu

Ptr<const WifiPsdu> ns3::WifiPpdu::m_psdu
private

the PSDU contained in this PPDU

Definition at line 94 of file wifi-ppdu.h.

Referenced by GetPsdu(), GetTxVector(), and Print().

◆ m_truncatedTx

bool ns3::WifiPpdu::m_truncatedTx
private

flag indicating whether the frame's transmission was aborted due to transmitter switch off

Definition at line 95 of file wifi-ppdu.h.

Referenced by IsTruncatedTx(), Print(), and SetTruncatedTx().

◆ m_txPowerLevel

uint8_t ns3::WifiPpdu::m_txPowerLevel
private

the transmission power level (used only for TX and initializing the returned WifiTxVector)

Definition at line 98 of file wifi-ppdu.h.

Referenced by GetTxVector().

◆ m_vhtSig

VhtSigHeader ns3::WifiPpdu::m_vhtSig
private

the VHT-SIG PHY header

Definition at line 90 of file wifi-ppdu.h.

Referenced by GetTxDuration(), GetTxVector(), and WifiPpdu().


The documentation for this class was generated from the following files: