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 (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. | |
| virtual Ptr< WifiPpdu > | Copy () const |
| Copy this instance. | |
| 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 WifiPsdu > | GetPsdu () 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_u > | GetTxCenterFreqs () const |
| virtual MHz_u | GetTxChannelWidth () const |
| Get the channel width over which the PPDU will effectively be transmitted. | |
| virtual Time | GetTxDuration () const |
| Get the total transmission duration of the PPDU. | |
| const WifiTxVector & | GetTxVector () 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. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
Protected Member Functions | |
| virtual std::string | PrintPayload () const |
| Print the payload of the PPDU. | |
Protected Attributes | |
| WifiModulationClass | m_modulation |
| the modulation used for the transmission of this PPDU | |
| const WifiPhyOperatingChannel & | m_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_u > | m_txCenterFreqs |
| the center frequency per segment used for the transmission of this PPDU | |
| std::optional< WifiTxVector > | m_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 | |
| virtual WifiTxVector | DoGetTxVector () const |
| Get the TXVECTOR used to send the PPDU. | |
Private Attributes | |
| bool | m_truncatedTx |
| flag indicating whether the frame's transmission was aborted due to transmitter switch off | |
| uint8_t | m_txAntennas |
| the number of antennas used to transmit this PPDU | |
| MHz_u | m_txChannelWidth |
| The channel width used for the transmission of this PPDU. | |
| uint8_t | m_txPowerLevel |
| the transmission power level (used only for TX and initializing the returned WifiTxVector) | |
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
This class should be subclassed for each amendment.
Definition at line 46 of file wifi-ppdu.h.
| ns3::WifiPpdu::WifiPpdu | ( | Ptr< const WifiPsdu > | psdu, |
| const WifiTxVector & | txVector, | ||
| const WifiPhyOperatingChannel & | channel, | ||
| uint64_t | uid = UINT64_MAX ) |
Create a PPDU storing a PSDU.
| psdu | the PHY payload (PSDU) |
| txVector | the TXVECTOR that was used for this PPDU |
| channel | the operating channel of the PHY used to transmit this PPDU |
| uid | the unique ID of this PPDU |
Definition at line 64 of file wifi-ppdu.cc.
References m_modulation, m_operatingChannel, m_preamble, m_psdus, m_truncatedTx, m_txAntennas, m_txCenterFreqs, m_txChannelWidth, m_txPowerLevel, m_txVector, m_uid, NS_LOG_FUNCTION, ns3::SU_STA_ID, and ns3::WIFI_MOD_CLASS_UNKNOWN.
Referenced by ns3::DsssPpdu::DsssPpdu(), ns3::OfdmPpdu::OfdmPpdu(), and Copy().
Here is the caller graph for this function:| ns3::WifiPpdu::WifiPpdu | ( | const WifiConstPsduMap & | psdus, |
| const WifiTxVector & | txVector, | ||
| const WifiPhyOperatingChannel & | channel, | ||
| uint64_t | uid ) |
Create a PPDU storing a map of PSDUs.
| psdus | the PHY payloads (PSDUs) |
| txVector | the TXVECTOR that was used for this PPDU |
| channel | the operating channel of the PHY used to transmit this PPDU |
| uid | the unique ID of this PPDU |
Definition at line 83 of file wifi-ppdu.cc.
References m_modulation, m_operatingChannel, m_preamble, m_psdus, m_truncatedTx, m_txAntennas, m_txCenterFreqs, m_txChannelWidth, m_txPowerLevel, m_txVector, m_uid, NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_UNKNOWN.
|
virtualdefault |
Destructor for WifiPpdu.
Copy this instance.
Reimplemented in ns3::DsssPpdu, ns3::EhtPpdu, ns3::ErpOfdmPpdu, ns3::HePpdu, ns3::HtPpdu, ns3::OfdmPpdu, and ns3::VhtPpdu.
Definition at line 274 of file wifi-ppdu.cc.
References WifiPpdu(), and NS_FATAL_ERROR.
Here is the call graph for this function:Check whether the given PPDU overlaps a given channel.
| minFreq | the minimum frequency of the channel |
| maxFreq | the maximum frequency of the channel |
The PPDU does not overlap the channel in two cases.
First non-overlapping case:
┌─────────┐
PPDU │ Nominal │
│ Band │
└─────────┘
minTxFreq maxTxFreq
minFreq maxFreq
┌──────────────────────────────┐
│ Channel │
└──────────────────────────────┘
Second non-overlapping case:
┌─────────┐
PPDU │ Nominal │ │ Band │ └─────────┘ minTxFreq maxTxFreq
minFreq maxFreq
┌──────────────────────────────┐
│ Channel │
└──────────────────────────────┘
Definition at line 179 of file wifi-ppdu.cc.
References m_txCenterFreqs, m_txChannelWidth, and NS_LOG_FUNCTION.
|
privatevirtual |
Get the TXVECTOR used to send the PPDU.
Reimplemented in ns3::DsssPpdu, ns3::HePpdu, ns3::HtPpdu, ns3::OfdmPpdu, and ns3::VhtPpdu.
Definition at line 119 of file wifi-ppdu.cc.
References NS_FATAL_ERROR.
Referenced by GetTxVector().
Here is the caller graph for this function:| WifiModulationClass ns3::WifiPpdu::GetModulation | ( | ) | const |
Get the modulation used for the PPDU.
Definition at line 161 of file wifi-ppdu.cc.
References m_modulation.
Referenced by ns3::HePpdu::UpdateTxVectorForUlMu().
Here is the caller graph for this function:| WifiPreamble ns3::WifiPpdu::GetPreamble | ( | ) | const |
Get the preamble of the PPDU.
Definition at line 232 of file wifi-ppdu.cc.
References m_preamble.
Get the payload of the PPDU.
Definition at line 142 of file wifi-ppdu.cc.
References m_psdus.
Referenced by PrintPayload(), and ns3::VhtPpdu::SetTxVectorFromPhyHeaders().
Here is the caller graph for this function:
|
virtual |
Get the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise.
Reimplemented in ns3::HePpdu.
Definition at line 244 of file wifi-ppdu.cc.
References ns3::SU_STA_ID.
| std::vector< MHz_u > ns3::WifiPpdu::GetTxCenterFreqs | ( | ) | const |
Definition at line 173 of file wifi-ppdu.cc.
References m_txCenterFreqs.
|
virtual |
Get the channel width over which the PPDU will effectively be transmitted.
Reimplemented in ns3::HePpdu.
Definition at line 167 of file wifi-ppdu.cc.
References m_txChannelWidth.
Referenced by ns3::HePpdu::GetTxChannelWidth().
Here is the caller graph for this function:
|
virtual |
Get the total transmission duration of the PPDU.
Reimplemented in ns3::DsssPpdu, ns3::HePpdu, ns3::HtPpdu, ns3::OfdmPpdu, and ns3::VhtPpdu.
Definition at line 250 of file wifi-ppdu.cc.
References ns3::MicroSeconds(), and NS_FATAL_ERROR.
Here is the call graph for this function:| const WifiTxVector & ns3::WifiPpdu::GetTxVector | ( | ) | const |
Get the TXVECTOR used to send the PPDU.
Definition at line 106 of file wifi-ppdu.cc.
References DoGetTxVector(), m_txAntennas, m_txChannelWidth, m_txPowerLevel, and m_txVector.
Referenced by ns3::HePpdu::GetTxChannelWidth(), ns3::DsssPpdu::GetTxDuration(), ns3::HePpdu::GetTxDuration(), ns3::HtPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), ns3::VhtPpdu::GetTxDuration(), and ns3::HePpdu::UpdateTxVectorForUlMu().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Return the PPDU type (.
Reimplemented in ns3::EhtPpdu, ns3::HePpdu, and ns3::VhtPpdu.
Definition at line 238 of file wifi-ppdu.cc.
References ns3::WIFI_PPDU_TYPE_SU.
| uint64_t ns3::WifiPpdu::GetUid | ( | ) | const |
Get the UID of the PPDU.
Definition at line 226 of file wifi-ppdu.cc.
References m_uid.
| bool ns3::WifiPpdu::IsTruncatedTx | ( | ) | const |
Definition at line 148 of file wifi-ppdu.cc.
References m_truncatedTx.
| void ns3::WifiPpdu::Print | ( | std::ostream & | os | ) | const |
Print the PPDU contents.
| os | output stream in which the data should be printed. |
Definition at line 258 of file wifi-ppdu.cc.
References m_modulation, m_preamble, m_truncatedTx, m_uid, and PrintPayload().
Here is the call graph for this function:
|
protectedvirtual |
Print the payload of the PPDU.
Reimplemented in ns3::HePpdu.
Definition at line 266 of file wifi-ppdu.cc.
References GetPsdu().
Referenced by Print().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::WifiPpdu::ResetTxVector | ( | ) | const |
Reset the TXVECTOR.
Definition at line 127 of file wifi-ppdu.cc.
References m_txVector, and NS_LOG_FUNCTION.
Referenced by UpdateTxVector().
Here is the caller graph for this function:| void ns3::WifiPpdu::SetTruncatedTx | ( | ) |
Indicate that the PPDU's transmission was aborted due to transmitter switch off.
Definition at line 154 of file wifi-ppdu.cc.
References m_truncatedTx, and NS_LOG_FUNCTION.
| void ns3::WifiPpdu::UpdateTxVector | ( | const WifiTxVector & | updatedTxVector | ) | const |
Update the TXVECTOR based on some information known at the receiver.
| updatedTxVector | the updated TXVECTOR. |
Definition at line 134 of file wifi-ppdu.cc.
References m_txVector, NS_LOG_FUNCTION, and ResetTxVector().
Here is the call graph for this function:
|
protected |
the modulation used for the transmission of this PPDU
Definition at line 193 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), GetModulation(), and Print().
|
protected |
the operating channel of the PHY
Definition at line 201 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), ns3::EhtPpdu::GetRuSpec(), ns3::HePpdu::GetRuSpec(), ns3::HePpdu::GetTxDuration(), ns3::HtPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), ns3::EhtPpdu::SetEhtPhyHeader(), ns3::HePpdu::SetHeSigHeader(), ns3::HePpdu::SetLSigHeader(), ns3::HtPpdu::SetLSigHeader(), ns3::EhtPpdu::SetTxVectorFromPhyHeaders(), and ns3::HePpdu::SetTxVectorFromPhyHeaders().
|
protected |
the PHY preamble
Definition at line 192 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), ns3::DsssPpdu::DoGetTxVector(), ns3::HePpdu::DoGetTxVector(), ns3::HtPpdu::DoGetTxVector(), ns3::OfdmPpdu::DoGetTxVector(), ns3::VhtPpdu::DoGetTxVector(), GetPreamble(), ns3::EhtPpdu::GetType(), ns3::HePpdu::GetType(), ns3::VhtPpdu::GetType(), ns3::EhtPpdu::IsDlMu(), ns3::HePpdu::IsDlMu(), ns3::EhtPpdu::IsUlMu(), ns3::HePpdu::IsUlMu(), Print(), ns3::EhtPpdu::SetEhtPhyHeader(), ns3::HePpdu::SetHeSigHeader(), ns3::EhtPpdu::SetTxVectorFromPhyHeaders(), and ns3::VhtPpdu::SetVhtSigHeader().
|
protected |
the PSDUs contained in this PPDU
Definition at line 194 of file wifi-ppdu.h.
Referenced by ns3::HePpdu::HePpdu(), WifiPpdu(), WifiPpdu(), ns3::EhtPpdu::GetPsdu(), ns3::HePpdu::GetPsdu(), GetPsdu(), ns3::HePpdu::GetStaId(), ns3::EhtPpdu::GetType(), ns3::EhtPpdu::IsDlMu(), ns3::EhtPpdu::IsUlMu(), ns3::HePpdu::PrintPayload(), ns3::EhtPpdu::SetTxVectorFromPhyHeaders(), and ns3::HePpdu::SetTxVectorFromPhyHeaders().
|
private |
flag indicating whether the frame's transmission was aborted due to transmitter switch off
Definition at line 211 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), IsTruncatedTx(), Print(), and SetTruncatedTx().
|
private |
the number of antennas used to transmit this PPDU
Definition at line 215 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), and GetTxVector().
|
protected |
the center frequency per segment used for the transmission of this PPDU
Definition at line 195 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), DoesOverlapChannel(), and GetTxCenterFreqs().
|
private |
The channel width used for the transmission of this PPDU.
This has to be stored since channel width can not always be obtained from the PHY headers, especially for non-HT PPDU, since we do not sense the spectrum to determine the occupied channel width for simplicity.
Definition at line 217 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), DoesOverlapChannel(), GetTxChannelWidth(), and GetTxVector().
|
private |
the transmission power level (used only for TX and initializing the returned WifiTxVector)
Definition at line 213 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), and GetTxVector().
|
mutableprotected |
the TXVECTOR at TX PHY or the reconstructed TXVECTOR at RX PHY (or std::nullopt if TXVECTOR has not been reconstructed yet)
Definition at line 199 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), GetTxVector(), ResetTxVector(), UpdateTxVector(), and ns3::HePpdu::UpdateTxVectorForUlMu().
|
protected |
the unique ID of this PPDU
Definition at line 197 of file wifi-ppdu.h.
Referenced by WifiPpdu(), WifiPpdu(), GetUid(), and Print().