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

HT PPDU (11n) More...

#include "ht-ppdu.h"

+ Inheritance diagram for ns3::HtPpdu:
+ Collaboration diagram for ns3::HtPpdu:

Classes

class  HtSigHeader
 HT PHY header (HT-SIG1/2). More...
 

Public Member Functions

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

Private Member Functions

WifiTxVector DoGetTxVector () const override
 Get the TXVECTOR used to send the PPDU. More...
 
void SetHtSigHeader (HtSigHeader &htSig, const WifiTxVector &txVector, std::size_t psduSize) const
 Fill in the HT-SIG header. More...
 
virtual void SetLSigHeader (LSigHeader &lSig, Time ppduDuration) const
 Fill in the L-SIG header. More...
 
void SetPhyHeaders (const WifiTxVector &txVector, Time ppduDuration, std::size_t psduSize)
 Fill in the PHY headers. More...
 
void SetTxVectorFromPhyHeaders (WifiTxVector &txVector, const LSigHeader &lSig, const HtSigHeader &htSig) const
 Fill in the TXVECTOR from PHY headers. More...
 

Private Attributes

HtSigHeader m_htSig
 the HT-SIG PHY header More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::WifiPpdu
virtual std::string PrintPayload () const
 Print the payload of the PPDU. More...
 
- Protected Attributes inherited from ns3::OfdmPpdu
LSigHeader m_lSig
 the L-SIG PHY header More...
 
- Protected Attributes inherited from ns3::WifiPpdu
WifiModulationClass m_modulation
 the modulation used for the transmission of this PPDU More...
 
const WifiPhyOperatingChannelm_operatingChannel
 the operating channel of the PHY More...
 
WifiPreamble m_preamble
 the PHY preamble More...
 
WifiConstPsduMap m_psdus
 the PSDUs contained in this PPDU More...
 
uint16_t m_txCenterFreq
 the center frequency (MHz) used for the transmission of this PPDU More...
 
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) More...
 
uint64_t m_uid
 the unique ID of this PPDU More...
 

Detailed Description

HT PPDU (11n)

HtPpdu stores a preamble, PHY headers and a PSDU of a PPDU with HT header

Definition at line 44 of file ht-ppdu.h.

Constructor & Destructor Documentation

◆ HtPpdu()

ns3::HtPpdu::HtPpdu ( Ptr< const WifiPsdu psdu,
const WifiTxVector txVector,
const WifiPhyOperatingChannel channel,
Time  ppduDuration,
uint64_t  uid 
)

Create an HT 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
ppduDurationthe transmission duration of this PPDU
uidthe unique ID of this PPDU

Definition at line 37 of file ht-ppdu.cc.

References third::channel, ns3::WifiPsdu::GetSize(), 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::HtPpdu::Copy ( void  ) const
overridevirtual

Copy this instance.

Returns
a Ptr to a copy of this instance.

Reimplemented from ns3::WifiPpdu.

Definition at line 119 of file ht-ppdu.cc.

References HtPpdu().

+ Here is the call graph for this function:

◆ DoGetTxVector()

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

Get the TXVECTOR used to send the PPDU.

Returns
the TXVECTOR of the PPDU.

Reimplemented from ns3::WifiPpdu.

Definition at line 89 of file ht-ppdu.cc.

References m_htSig, ns3::OfdmPpdu::m_lSig, ns3::WifiPpdu::m_preamble, ns3::WifiTxVector::SetPreambleType(), and SetTxVectorFromPhyHeaders().

+ Here is the call graph for this function:

◆ GetTxDuration()

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

Get the total transmission duration of the PPDU.

Returns
the transmission duration of the PPDU

Reimplemented from ns3::WifiPpdu.

Definition at line 110 of file ht-ppdu.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::HtPpdu::HtSigHeader::GetHtLength(), ns3::WifiPhyOperatingChannel::GetPhyBand(), ns3::WifiPpdu::GetTxVector(), ns3::WifiPhyOperatingChannel::IsSet(), m_htSig, ns3::WifiPpdu::m_operatingChannel, and NS_ASSERT.

+ Here is the call graph for this function:

◆ SetHtSigHeader()

void ns3::HtPpdu::SetHtSigHeader ( HtSigHeader htSig,
const WifiTxVector txVector,
std::size_t  psduSize 
) const
private

Fill in the HT-SIG header.

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

Definition at line 79 of file ht-ppdu.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiMode::GetMcsValue(), ns3::WifiTxVector::GetMode(), ns3::WifiTxVector::IsAggregation(), ns3::HtPpdu::HtSigHeader::SetAggregation(), ns3::HtPpdu::HtSigHeader::SetChannelWidth(), ns3::HtPpdu::HtSigHeader::SetHtLength(), ns3::HtPpdu::HtSigHeader::SetMcs(), and ns3::HtPpdu::HtSigHeader::SetShortGuardInterval().

Referenced by SetPhyHeaders().

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

◆ SetLSigHeader()

void ns3::HtPpdu::SetLSigHeader ( LSigHeader lSig,
Time  ppduDuration 
) const
privatevirtual

Fill in the L-SIG header.

Parameters
lSigthe L-SIG header to fill in
ppduDurationthe transmission duration of this PPDU

Definition at line 61 of file ht-ppdu.cc.

References ns3::Time::GetNanoSeconds(), ns3::WifiPhyOperatingChannel::GetPhyBand(), ns3::WifiPhyOperatingChannel::IsSet(), ns3::WifiPpdu::m_operatingChannel, NS_ASSERT, ns3::OfdmPpdu::LSigHeader::SetLength(), and ns3::WIFI_PHY_BAND_2_4GHZ.

Referenced by SetPhyHeaders().

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

◆ SetPhyHeaders()

void ns3::HtPpdu::SetPhyHeaders ( const WifiTxVector txVector,
Time  ppduDuration,
std::size_t  psduSize 
)
private

Fill in the PHY headers.

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

Definition at line 53 of file ht-ppdu.cc.

References m_htSig, ns3::OfdmPpdu::m_lSig, NS_LOG_FUNCTION, SetHtSigHeader(), and SetLSigHeader().

Referenced by HtPpdu().

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

◆ SetTxVectorFromPhyHeaders()

void ns3::HtPpdu::SetTxVectorFromPhyHeaders ( WifiTxVector txVector,
const LSigHeader lSig,
const HtSigHeader htSig 
) const
private

Fill in the TXVECTOR from PHY headers.

Parameters
txVectorthe TXVECTOR to fill in
lSigthe L-SIG header
htSigthe HT-SIG header

Definition at line 98 of file ht-ppdu.cc.

References ns3::HtPpdu::HtSigHeader::GetAggregation(), ns3::HtPpdu::HtSigHeader::GetChannelWidth(), ns3::HtPhy::GetHtMcs(), ns3::HtPpdu::HtSigHeader::GetMcs(), ns3::HtPpdu::HtSigHeader::GetShortGuardInterval(), ns3::WifiTxVector::SetAggregation(), ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetMode(), and ns3::WifiTxVector::SetNss().

Referenced by DoGetTxVector().

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

Member Data Documentation

◆ m_htSig

HtSigHeader ns3::HtPpdu::m_htSig
private

the HT-SIG PHY header

Definition at line 185 of file ht-ppdu.h.

Referenced by DoGetTxVector(), GetTxDuration(), and SetPhyHeaders().


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