A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::OfdmPpdu Class Reference

OFDM PPDU (11a) More...

#include "ofdm-ppdu.h"

+ Inheritance diagram for ns3::OfdmPpdu:
+ Collaboration diagram for ns3::OfdmPpdu:

Classes

class  LSigHeader
 OFDM and ERP OFDM L-SIG PHY header. More...
 

Public Member Functions

 OfdmPpdu (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, uint64_t uid, bool instantiateLSig=true)
 Create an OFDM PPDU.
 
Ptr< WifiPpduCopy () const override
 Copy this instance.
 
Time GetTxDuration () const override
 Get the total transmission duration of the PPDU.
 
- Public Member Functions inherited from ns3::WifiPpdu
 WifiPpdu (const WifiConstPsduMap &psdus, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, uint64_t uid)
 Create a PPDU storing a map of PSDUs.
 
 WifiPpdu (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, uint64_t uid=UINT64_MAX)
 Create a PPDU storing a PSDU.
 
virtual ~WifiPpdu ()
 Destructor for WifiPpdu.
 
bool DoesOverlapChannel (MHz_u minFreq, MHz_u maxFreq) const
 Check whether the given PPDU overlaps a given channel.
 
WifiModulationClass GetModulation () const
 Get the modulation used for the PPDU.
 
WifiPreamble GetPreamble () const
 Get the preamble of the PPDU.
 
Ptr< const WifiPsduGetPsdu () const
 Get the payload of the PPDU.
 
virtual uint16_t GetStaId () const
 Get the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise.
 
std::vector< MHz_uGetTxCenterFreqs () const
 
virtual MHz_u GetTxChannelWidth () const
 Get the channel width over which the PPDU will effectively be transmitted.
 
const WifiTxVectorGetTxVector () const
 Get the TXVECTOR used to send the PPDU.
 
virtual WifiPpduType GetType () const
 Return the PPDU type (.
 
uint64_t GetUid () const
 Get the UID of the PPDU.
 
bool IsTruncatedTx () const
 
void Print (std::ostream &os) const
 Print the PPDU contents.
 
void ResetTxVector () const
 Reset the TXVECTOR.
 
void SetTruncatedTx ()
 Indicate that the PPDU's transmission was aborted due to transmitter switch off.
 
void UpdateTxVector (const WifiTxVector &updatedTxVector) const
 Update the TXVECTOR based on some information known at the receiver.
 
- Public Member Functions inherited from ns3::SimpleRefCount< WifiPpdu >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Protected Attributes

LSigHeader m_lSig
 the L-SIG PHY header
 
- Protected Attributes inherited from ns3::WifiPpdu
WifiModulationClass m_modulation
 the modulation used for the transmission of this PPDU
 
const WifiPhyOperatingChannelm_operatingChannel
 the operating channel of the PHY
 
WifiPreamble m_preamble
 the PHY preamble
 
WifiConstPsduMap m_psdus
 the PSDUs contained in this PPDU
 
std::vector< MHz_um_txCenterFreqs
 the center frequency per segment used for the transmission of this PPDU
 
std::optional< WifiTxVectorm_txVector
 the TXVECTOR at TX PHY or the reconstructed TXVECTOR at RX PHY (or std::nullopt if TXVECTOR has not been reconstructed yet)
 
uint64_t m_uid
 the unique ID of this PPDU
 

Private Member Functions

WifiTxVector DoGetTxVector () const override
 Get the TXVECTOR used to send the PPDU.
 
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.
 
virtual void SetTxVectorFromLSigHeader (WifiTxVector &txVector, const LSigHeader &lSig) const
 Fill in the TXVECTOR from L-SIG header.
 

Private Attributes

MHz_u m_channelWidth
 the channel width used to transmit that PPDU (needed to distinguish 5 MHz, 10 MHz or 20 MHz PPDUs)
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::WifiPpdu
virtual std::string PrintPayload () const
 Print the payload of the PPDU.
 

Detailed Description

OFDM PPDU (11a)

OfdmPpdu stores a preamble, PHY headers and a PSDU of a PPDU with non-HT header, i.e., PPDU that uses OFDM modulation.

Definition at line 35 of file ofdm-ppdu.h.

Constructor & Destructor Documentation

◆ OfdmPpdu()

ns3::OfdmPpdu::OfdmPpdu ( Ptr< const WifiPsdu > psdu,
const WifiTxVector & txVector,
const WifiPhyOperatingChannel & channel,
uint64_t uid,
bool instantiateLSig = true )

Create an OFDM PPDU.

Parameters
psduthe PHY payload (PSDU)
txVectorthe TXVECTOR that was used for this PPDU
channelthe operating channel of the PHY used to transmit this PPDU
uidthe unique ID of this PPDU
instantiateLSigflag used to instantiate LSigHeader (set LSigHeader's rate and length), should be disabled by child classes

Definition at line 25 of file ofdm-ppdu.cc.

References NS_LOG_FUNCTION, and SetPhyHeaders().

Referenced by Copy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ Copy()

Ptr< WifiPpdu > ns3::OfdmPpdu::Copy ( ) const
overridevirtual

Copy this instance.

Returns
a Ptr to a copy of this instance.

Reimplemented from ns3::WifiPpdu.

Reimplemented in ns3::VhtPpdu.

Definition at line 82 of file ofdm-ppdu.cc.

References OfdmPpdu().

+ Here is the call graph for this function:

◆ DoGetTxVector()

WifiTxVector ns3::OfdmPpdu::DoGetTxVector ( ) const
overrideprivatevirtual

Get the TXVECTOR used to send the PPDU.

Returns
the TXVECTOR of the PPDU.

Reimplemented from ns3::WifiPpdu.

Reimplemented in ns3::VhtPpdu.

Definition at line 55 of file ofdm-ppdu.cc.

References m_lSig, ns3::WifiPpdu::m_preamble, ns3::WifiTxVector::SetPreambleType(), and SetTxVectorFromLSigHeader().

+ Here is the call graph for this function:

◆ GetTxDuration()

Time ns3::OfdmPpdu::GetTxDuration ( ) const
overridevirtual

Get the total transmission duration of the PPDU.

Returns
the transmission duration of the PPDU

Reimplemented from ns3::WifiPpdu.

Reimplemented in ns3::VhtPpdu.

Definition at line 73 of file ofdm-ppdu.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::OfdmPpdu::LSigHeader::GetLength(), ns3::WifiPhyOperatingChannel::GetPhyBand(), ns3::WifiPpdu::GetTxVector(), ns3::WifiPhyOperatingChannel::IsSet(), m_lSig, ns3::WifiPpdu::m_operatingChannel, and NS_ASSERT.

+ Here is the call graph for this function:

◆ SetLSigHeader()

void ns3::OfdmPpdu::SetLSigHeader ( LSigHeader & lSig,
const WifiTxVector & txVector,
std::size_t psduSize ) const
private

Fill in the L-SIG header.

Parameters
lSigthe L-SIG header to fill in
txVectorthe TXVECTOR that was used for this PPDU
psduSizethe size duration of the PHY payload (PSDU)

Definition at line 48 of file ofdm-ppdu.cc.

References ns3::WifiMode::GetDataRate(), ns3::WifiTxVector::GetMode(), m_channelWidth, ns3::OfdmPpdu::LSigHeader::SetLength(), and ns3::OfdmPpdu::LSigHeader::SetRate().

Referenced by SetPhyHeaders().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetPhyHeaders()

void ns3::OfdmPpdu::SetPhyHeaders ( const WifiTxVector & txVector,
std::size_t psduSize )
private

Fill in the PHY headers.

Parameters
txVectorthe TXVECTOR that was used for this PPDU
psduSizethe size duration of the PHY payload (PSDU)

Definition at line 41 of file ofdm-ppdu.cc.

References m_lSig, NS_LOG_FUNCTION, and SetLSigHeader().

Referenced by OfdmPpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetTxVectorFromLSigHeader()

void ns3::OfdmPpdu::SetTxVectorFromLSigHeader ( WifiTxVector & txVector,
const LSigHeader & lSig ) const
privatevirtual

Fill in the TXVECTOR from L-SIG header.

Parameters
txVectorthe TXVECTOR to fill in
lSigthe L-SIG header

Reimplemented in ns3::ErpOfdmPpdu.

Definition at line 64 of file ofdm-ppdu.cc.

References ns3::OfdmPhy::GetOfdmRate(), ns3::OfdmPpdu::LSigHeader::GetRate(), m_channelWidth, NS_ASSERT, ns3::WifiTxVector::SetChannelWidth(), and ns3::WifiTxVector::SetMode().

Referenced by DoGetTxVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelWidth

MHz_u ns3::OfdmPpdu::m_channelWidth
private

the channel width used to transmit that PPDU (needed to distinguish 5 MHz, 10 MHz or 20 MHz PPDUs)

Definition at line 129 of file ofdm-ppdu.h.

Referenced by SetLSigHeader(), and SetTxVectorFromLSigHeader().

◆ m_lSig


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