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

HE PPDU (11ax) More...

#include "he-ppdu.h"

+ Inheritance diagram for ns3::HePpdu:
+ Collaboration diagram for ns3::HePpdu:

Classes

class  HeSigHeader
 HE-SIG PHY header (HE-SIG-A1/A2/B) More...
 

Public Types

enum  TxPsdFlag { PSD_NON_HE_PORTION , PSD_HE_PORTION }
 The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE portions. More...
 

Public Member Functions

 HePpdu (const WifiConstPsduMap &psdus, const WifiTxVector &txVector, uint16_t txCenterFreq, Time ppduDuration, WifiPhyBand band, uint64_t uid, TxPsdFlag flag)
 Create an MU HE PPDU, storing a map of PSDUs. More...
 
 HePpdu (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, Time ppduDuration, WifiPhyBand band, uint64_t uid)
 Create an SU HE PPDU, storing a PSDU. More...
 
Ptr< WifiPpduCopy () const override
 Copy this instance. More...
 
Ptr< const WifiPsduGetPsdu (uint8_t bssColor, uint16_t staId=SU_STA_ID) const
 Get the payload of the PPDU. More...
 
uint16_t GetStaId () const override
 Get the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise. More...
 
uint16_t GetTransmissionChannelWidth () const override
 Get the channel width over which the PPDU will effectively be transmitted. More...
 
Time GetTxDuration () const override
 Get the total transmission duration of the PPDU. More...
 
TxPsdFlag GetTxPsdFlag () const
 
WifiPpduType GetType () const override
 Return the PPDU type (. More...
 
bool IsAllocated (uint16_t staId) const
 Check if STA ID is allocated. More...
 
bool IsStaInContentChannel (uint16_t staId, size_t channelId) const
 Check if STA ID is in HE SIG-B Content Channel ID. More...
 
void SetTxPsdFlag (TxPsdFlag flag) const
 
void UpdateTxVectorForUlMu (const std::optional< WifiTxVector > &trigVector) const
 Update the TXVECTOR for HE TB PPDUs, since the information to decode HE TB PPDUs is not available from the PHY headers but it requires information from the TRIGVECTOR of the AP expecting these HE TB PPDUs. More...
 
- Public Member Functions inherited from ns3::OfdmPpdu
 OfdmPpdu (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, WifiPhyBand band, 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, uint16_t txCenterFreq, uint64_t uid)
 Create a PPDU storing a map of PSDUs. More...
 
 WifiPpdu (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, 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...
 
uint16_t GetTxCenterFreq () const
 
const WifiTxVectorGetTxVector () const
 Get the TXVECTOR used to send the PPDU. 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...
 

Protected Member Functions

virtual void SetTxVectorFromPhyHeaders (WifiTxVector &txVector, const LSigHeader &lSig, const HeSigHeader &heSig) const
 Fill in the TXVECTOR from PHY headers. More...
 

Protected Attributes

ContentChannelAllocation m_contentChannelAlloc
 HE SIG-B Content Channel allocation (to be removed once HE-SIG-B headers are implemented) More...
 
WifiTxVector::HeMuUserInfoMap m_muUserInfos
 HE MU specific per-user information (to be removed once HE-SIG-B headers are implemented) More...
 
RuAllocation m_ruAllocation
 RU_ALLOCATION in SIG-B common field (to be removed once HE-SIG-B headers are implemented) More...
 
TxPsdFlag m_txPsdFlag
 the transmit power spectral density flag More...
 
- Protected Attributes inherited from ns3::OfdmPpdu
WifiPhyBand m_band
 the WifiPhyBand used to transmit that PPDU More...
 
- Protected Attributes inherited from ns3::WifiPpdu
WifiModulationClass m_modulation
 the modulation used for the transmission of this PPDU More...
 
Ptr< Packetm_phyHeaders
 the PHY headers contained in this PPDU 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...
 

Private Member Functions

WifiTxVector DoGetTxVector () const override
 Get the TXVECTOR used to send the PPDU. More...
 
virtual bool IsDlMu () const
 Return true if the PPDU is a DL MU PPDU. More...
 
virtual bool IsMu () const
 Return true if the PPDU is a MU PPDU. More...
 
virtual bool IsUlMu () const
 Return true if the PPDU is an UL MU PPDU. More...
 
std::string PrintPayload () const override
 Print the payload of the PPDU. More...
 
void SetHeSigHeader (HeSigHeader &heSig, const WifiTxVector &txVector) const
 Fill in the HE-SIG header. More...
 
virtual void SetLSigHeader (LSigHeader &lSig, Time ppduDuration) const
 Fill in the L-SIG header. More...
 
virtual void SetPhyHeaders (const WifiTxVector &txVector, Time ppduDuration)
 Fill in the PHY headers. More...
 

Detailed Description

HE PPDU (11ax)

HePpdu stores a preamble, PHY headers and a map of PSDUs of a PPDU with HE header

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

Member Enumeration Documentation

◆ TxPsdFlag

The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE portions.

Enumerator
PSD_NON_HE_PORTION 

Non-HE portion of an HE PPDU.

PSD_HE_PORTION 

HE portion of an HE PPDU.

Definition at line 155 of file he-ppdu.h.

Constructor & Destructor Documentation

◆ HePpdu() [1/2]

ns3::HePpdu::HePpdu ( Ptr< const WifiPsdu psdu,
const WifiTxVector txVector,
uint16_t  txCenterFreq,
Time  ppduDuration,
WifiPhyBand  band,
uint64_t  uid 
)

Create an SU HE PPDU, storing a PSDU.

Parameters
psduthe PHY payload (PSDU)
txVectorthe TXVECTOR that was used for this PPDU
txCenterFreqthe center frequency (MHz) that was used for this PPDU
ppduDurationthe transmission duration of this PPDU
bandthe WifiPhyBand used for the transmission of this PPDU
uidthe unique ID of this PPDU

Definition at line 86 of file he-ppdu.cc.

References IsMu(), NS_ASSERT, NS_LOG_FUNCTION, PSD_NON_HE_PORTION, SetPhyHeaders(), and SetTxPsdFlag().

Referenced by Copy().

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

◆ HePpdu() [2/2]

ns3::HePpdu::HePpdu ( const WifiConstPsduMap psdus,
const WifiTxVector txVector,
uint16_t  txCenterFreq,
Time  ppduDuration,
WifiPhyBand  band,
uint64_t  uid,
TxPsdFlag  flag 
)

Create an MU HE PPDU, storing a map of PSDUs.

This PPDU can either be UL or DL.

Parameters
psdusthe PHY payloads (PSDUs)
txVectorthe TXVECTOR that was used for this PPDU
txCenterFreqthe center frequency (MHz) that was used for this PPDU
ppduDurationthe transmission duration of this PPDU
bandthe WifiPhyBand used for the transmission of this PPDU
uidthe unique ID of this PPDU or of the triggering PPDU if this is an HE TB PPDU
flagthe flag indicating the type of Tx PSD to build

Definition at line 51 of file he-ppdu.cc.

References ns3::WifiTxVector::GetContentChannelAllocation(), ns3::WifiTxVector::GetHeMuUserInfoMap(), ns3::WifiTxVector::GetRuAllocation(), ns3::WifiTxVector::IsMu(), m_contentChannelAlloc, m_muUserInfos, ns3::WifiPpdu::m_psdus, m_ruAllocation, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, SetPhyHeaders(), and SetTxPsdFlag().

+ Here is the call graph for this function:

Member Function Documentation

◆ Copy()

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

Copy this instance.

Returns
a Ptr to a copy of this instance.

Reimplemented from ns3::WifiPpdu.

Definition at line 261 of file he-ppdu.cc.

References HePpdu().

+ Here is the call graph for this function:

◆ DoGetTxVector()

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

Get the TXVECTOR used to send the PPDU.

Returns
the TXVECTOR of the PPDU.

Reimplemented from ns3::WifiPpdu.

Definition at line 165 of file he-ppdu.cc.

References ns3::Packet::Copy(), ns3::WifiPpdu::m_phyHeaders, ns3::WifiPpdu::m_preamble, NS_FATAL_ERROR, ns3::WifiTxVector::SetPreambleType(), and SetTxVectorFromPhyHeaders().

+ Here is the call graph for this function:

◆ GetPsdu()

Ptr< const WifiPsdu > ns3::HePpdu::GetPsdu ( uint8_t  bssColor,
uint16_t  staId = SU_STA_ID 
) const

Get the payload of the PPDU.

Parameters
bssColorthe BSS color of the PHY calling this function.
staIdthe STA-ID of the PHY calling this function.
Returns
the PSDU

Definition at line 299 of file he-ppdu.cc.

References ns3::Packet::Copy(), ns3::HePpdu::HeSigHeader::GetBssColor(), IsMu(), IsUlMu(), ns3::WifiPpdu::m_phyHeaders, ns3::WifiPpdu::m_psdus, NS_ASSERT, and SU_STA_ID.

+ Here is the call graph for this function:

◆ GetStaId()

uint16_t ns3::HePpdu::GetStaId ( ) const
overridevirtual

Get the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise.

Returns
the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise

Reimplemented from ns3::WifiPpdu.

Definition at line 342 of file he-ppdu.cc.

References IsUlMu(), ns3::WifiPpdu::m_psdus, and NS_ASSERT.

Referenced by GetTransmissionChannelWidth(), and UpdateTxVectorForUlMu().

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

◆ GetTransmissionChannelWidth()

uint16_t ns3::HePpdu::GetTransmissionChannelWidth ( ) const
overridevirtual

Get the channel width over which the PPDU will effectively be transmitted.

Returns
the effective channel width (in MHz) used for the tranmsission

Reimplemented from ns3::WifiPpdu.

Definition at line 349 of file he-ppdu.cc.

References ns3::HeRu::GetBandwidth(), ns3::WifiTxVector::GetRu(), GetStaId(), ns3::WifiPpdu::GetTransmissionChannelWidth(), GetTxPsdFlag(), ns3::WifiPpdu::GetTxVector(), ns3::WifiTxVector::IsUlMu(), NS_LOG_INFO, PSD_NON_HE_PORTION, and SU_STA_ID.

+ Here is the call graph for this function:

◆ GetTxDuration()

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

◆ GetTxPsdFlag()

HePpdu::TxPsdFlag ns3::HePpdu::GetTxPsdFlag ( ) const
Returns
the transmit PSD flag set for this PPDU
See also
TxPsdFlag

Definition at line 368 of file he-ppdu.cc.

References m_txPsdFlag.

Referenced by GetTransmissionChannelWidth().

+ Here is the caller graph for this function:

◆ GetType()

WifiPpduType ns3::HePpdu::GetType ( ) const
overridevirtual

Return the PPDU type (.

See also
WifiPpduType)
Returns
the PPDU type

Reimplemented from ns3::WifiPpdu.

Definition at line 267 of file he-ppdu.cc.

References ns3::WifiPpdu::m_preamble, ns3::WIFI_PPDU_TYPE_DL_MU, ns3::WIFI_PPDU_TYPE_SU, ns3::WIFI_PPDU_TYPE_UL_MU, ns3::WIFI_PREAMBLE_HE_MU, and ns3::WIFI_PREAMBLE_HE_TB.

Referenced by UpdateTxVectorForUlMu().

+ Here is the caller graph for this function:

◆ IsAllocated()

bool ns3::HePpdu::IsAllocated ( uint16_t  staId) const

Check if STA ID is allocated.

Parameters
staIdSTA ID
Returns
true if allocated, false otherwise

Definition at line 417 of file he-ppdu.cc.

References m_muUserInfos.

◆ IsDlMu()

bool ns3::HePpdu::IsDlMu ( ) const
privatevirtual

Return true if the PPDU is a DL MU PPDU.

Returns
true if the PPDU is a DL MU PPDU

Reimplemented in ns3::EhtPpdu.

Definition at line 287 of file he-ppdu.cc.

References ns3::WifiPpdu::m_preamble, and ns3::WIFI_PREAMBLE_HE_MU.

Referenced by GetTxDuration(), IsMu(), SetLSigHeader(), and SetTxVectorFromPhyHeaders().

+ Here is the caller graph for this function:

◆ IsMu()

bool ns3::HePpdu::IsMu ( ) const
privatevirtual

Return true if the PPDU is a MU PPDU.

Returns
true if the PPDU is a MU PPDU

Definition at line 281 of file he-ppdu.cc.

References IsDlMu(), and IsUlMu().

Referenced by HePpdu(), GetPsdu(), PrintPayload(), and SetTxVectorFromPhyHeaders().

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

◆ IsStaInContentChannel()

bool ns3::HePpdu::IsStaInContentChannel ( uint16_t  staId,
size_t  channelId 
) const

Check if STA ID is in HE SIG-B Content Channel ID.

Parameters
staIdSTA ID
channelIdContent Channel ID
Returns
true if STA ID in content channel ID, false otherwise

Definition at line 423 of file he-ppdu.cc.

References m_contentChannelAlloc, and NS_ASSERT_MSG.

◆ IsUlMu()

bool ns3::HePpdu::IsUlMu ( ) const
privatevirtual

Return true if the PPDU is an UL MU PPDU.

Returns
true if the PPDU is an UL MU PPDU

Reimplemented in ns3::EhtPpdu.

Definition at line 293 of file he-ppdu.cc.

References ns3::WifiPpdu::m_preamble, and ns3::WIFI_PREAMBLE_HE_TB.

Referenced by GetPsdu(), GetStaId(), IsMu(), and SetTxVectorFromPhyHeaders().

+ Here is the caller graph for this function:

◆ PrintPayload()

std::string ns3::HePpdu::PrintPayload ( ) const
overrideprivatevirtual

Print the payload of the PPDU.

Returns
information on the payload part of the PPDU

Reimplemented from ns3::WifiPpdu.

Definition at line 432 of file he-ppdu.cc.

References IsMu(), ns3::WifiPpdu::m_psdus, m_txPsdFlag, and SU_STA_ID.

+ Here is the call graph for this function:

◆ SetHeSigHeader()

◆ SetLSigHeader()

void ns3::HePpdu::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 126 of file he-ppdu.cc.

References ns3::Time::GetNanoSeconds(), IsDlMu(), two-ray-to-three-gpp-ch-calibration::m, ns3::OfdmPpdu::m_band, 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::HePpdu::SetPhyHeaders ( const WifiTxVector txVector,
Time  ppduDuration 
)
privatevirtual

Fill in the PHY headers.

Parameters
txVectorthe TXVECTOR that was used for this PPDU
ppduDurationthe transmission duration of this PPDU

Definition at line 106 of file he-ppdu.cc.

References ns3::Packet::AddHeader(), ns3::WifiPpdu::m_phyHeaders, NS_LOG_FUNCTION, SetHeSigHeader(), and SetLSigHeader().

Referenced by HePpdu().

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

◆ SetTxPsdFlag()

void ns3::HePpdu::SetTxPsdFlag ( TxPsdFlag  flag) const
Parameters
flagthe transmit PSD flag set for this PPDU
See also
TxPsdFlag

Definition at line 374 of file he-ppdu.cc.

References m_txPsdFlag, and NS_LOG_FUNCTION.

Referenced by HePpdu().

+ Here is the caller graph for this function:

◆ SetTxVectorFromPhyHeaders()

◆ UpdateTxVectorForUlMu()

void ns3::HePpdu::UpdateTxVectorForUlMu ( const std::optional< WifiTxVector > &  trigVector) const

Update the TXVECTOR for HE TB PPDUs, since the information to decode HE TB PPDUs is not available from the PHY headers but it requires information from the TRIGVECTOR of the AP expecting these HE TB PPDUs.

Parameters
trigVectorthe TRIGVECTOR or std::nullopt if no TRIGVECTOR is available at the caller

Definition at line 381 of file he-ppdu.cc.

References ns3::WifiPpdu::GetModulation(), ns3::HeRu::GetRuType(), GetStaId(), ns3::WifiPpdu::GetTxVector(), GetType(), ns3::WifiPpdu::m_txVector, NS_ASSERT, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HE, and ns3::WIFI_PPDU_TYPE_UL_MU.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_contentChannelAlloc

ContentChannelAllocation ns3::HePpdu::m_contentChannelAlloc
protected

HE SIG-B Content Channel allocation (to be removed once HE-SIG-B headers are implemented)

Definition at line 271 of file he-ppdu.h.

Referenced by ns3::EhtPpdu::EhtPpdu(), HePpdu(), and IsStaInContentChannel().

◆ m_muUserInfos

WifiTxVector::HeMuUserInfoMap ns3::HePpdu::m_muUserInfos
protected

HE MU specific per-user information (to be removed once HE-SIG-B headers are implemented)

Definition at line 268 of file he-ppdu.h.

Referenced by HePpdu(), ns3::EhtPpdu::GetType(), IsAllocated(), ns3::EhtPpdu::IsDlMu(), ns3::EhtPpdu::IsUlMu(), SetTxVectorFromPhyHeaders(), and ns3::EhtPpdu::SetTxVectorFromPhyHeaders().

◆ m_ruAllocation

RuAllocation ns3::HePpdu::m_ruAllocation
protected

RU_ALLOCATION in SIG-B common field (to be removed once HE-SIG-B headers are implemented)

Definition at line 273 of file he-ppdu.h.

Referenced by ns3::EhtPpdu::EhtPpdu(), HePpdu(), SetTxVectorFromPhyHeaders(), and ns3::EhtPpdu::SetTxVectorFromPhyHeaders().

◆ m_txPsdFlag

TxPsdFlag ns3::HePpdu::m_txPsdFlag
mutableprotected

the transmit power spectral density flag

Definition at line 266 of file he-ppdu.h.

Referenced by GetTxPsdFlag(), PrintPayload(), and SetTxPsdFlag().


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