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, 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... | |
| virtual bool | CanBeReceived (uint16_t p20MinFreq, uint16_t p20MaxFreq) const |
| Check whether the given PPDU can be received on the specified primary channel. More... | |
| virtual Ptr< WifiPpdu > | Copy () const |
| Copy this instance. 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 WifiPsdu > | GetPsdu () 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... | |
| virtual uint16_t | GetTransmissionChannelWidth () const |
| Get the channel width over which the PPDU will effectively be transmitted. More... | |
| virtual Time | GetTxDuration () const |
| Get the total transmission duration of the PPDU. More... | |
| WifiTxVector | GetTxVector () 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 | SetTruncatedTx () |
| 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 () const |
| Get the reference count of the object. More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. More... | |
| void | Ref () const |
| Increment the reference count. More... | |
| void | Unref () const |
| Decrement the reference count. More... | |
Protected Member Functions | |
| virtual std::string | PrintPayload () const |
| Print the payload of the PPDU. More... | |
Protected Attributes | |
| WifiModulationClass | m_modulation |
| the modulation used for the transmission of 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... | |
| uint64_t | m_uid |
| the unique ID of this PPDU More... | |
Private Member Functions | |
| virtual WifiTxVector | DoGetTxVector () const |
| Get the TXVECTOR used to send the PPDU. More... | |
Private Attributes | |
| bool | m_truncatedTx |
| flag indicating whether the frame's transmission was aborted due to transmitter switch off More... | |
| uint8_t | m_txAntennas |
| the number of antennas used to transmit this PPDU More... | |
| uint8_t | m_txPowerLevel |
| the transmission power level (used only for TX and initializing the returned WifiTxVector) More... | |
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
This class should be subclassed for each amendment.
Definition at line 53 of file wifi-ppdu.h.
| ns3::WifiPpdu::WifiPpdu | ( | Ptr< const WifiPsdu > | psdu, |
| const WifiTxVector & | txVector, | ||
| uint16_t | txCenterFreq, | ||
| 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 |
| txCenterFreq | the center frequency (MHz) that was used for this PPDU |
| uid | the unique ID of this PPDU |
Definition at line 32 of file wifi-ppdu.cc.
References m_psdus, NS_LOG_FUNCTION, and SU_STA_ID.
| ns3::WifiPpdu::WifiPpdu | ( | const WifiConstPsduMap & | psdus, |
| const WifiTxVector & | txVector, | ||
| uint16_t | txCenterFreq, | ||
| 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 |
| txCenterFreq | the center frequency (MHz) that was used for this PPDU |
| uid | the unique ID of this PPDU |
Definition at line 47 of file wifi-ppdu.cc.
References m_psdus, and NS_LOG_FUNCTION.
|
virtual |
|
virtual |
Check whether the given PPDU can be received on the specified primary channel.
Normally, a PPDU can be received if it is transmitted over a channel that overlaps the primary20 channel of a PHY entity.
| p20MinFreq | the minimum frequency (MHz) of the primary channel |
| p20MaxFreq | the maximum frequency (MHz) of the primary channel |
Reimplemented in ns3::HePpdu.
Definition at line 165 of file wifi-ppdu.cc.
References DoesOverlapChannel(), NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by ns3::HePpdu::CanBeReceived().
Here is the call graph for this function:
Here is the caller graph for this function:Copy this instance.
Reimplemented in ns3::EhtPpdu, ns3::HePpdu, ns3::HtPpdu, ns3::DsssPpdu, ns3::ErpOfdmPpdu, ns3::OfdmPpdu, and ns3::VhtPpdu.
Definition at line 226 of file wifi-ppdu.cc.
References GetPsdu(), GetTxVector(), m_txCenterFreq, and NS_FATAL_ERROR.
Here is the call graph for this function:| bool ns3::WifiPpdu::DoesOverlapChannel | ( | uint16_t | minFreq, |
| uint16_t | maxFreq | ||
| ) | const |
Check whether the given PPDU overlaps a given channel.
| minFreq | the minimum frequency (MHz) of the channel |
| maxFreq | the maximum frequency (MHz) 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 122 of file wifi-ppdu.cc.
References ns3::WifiTxVector::GetChannelWidth(), GetTxVector(), m_txCenterFreq, and NS_LOG_FUNCTION.
Referenced by CanBeReceived().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Get the TXVECTOR used to send the PPDU.
Reimplemented in ns3::EhtPpdu, ns3::HePpdu, ns3::HtPpdu, ns3::DsssPpdu, ns3::ErpOfdmPpdu, ns3::OfdmPpdu, and ns3::VhtPpdu.
Definition at line 83 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 110 of file wifi-ppdu.cc.
References m_modulation.
| WifiPreamble ns3::WifiPpdu::GetPreamble | ( | ) | const |
Get the preamble of the PPDU.
Definition at line 184 of file wifi-ppdu.cc.
References m_preamble.
Get the payload of the PPDU.
Definition at line 91 of file wifi-ppdu.cc.
References m_psdus.
Referenced by Copy(), ns3::HtPpdu::Copy(), ns3::DsssPpdu::Copy(), ns3::ErpOfdmPpdu::Copy(), ns3::OfdmPpdu::Copy(), ns3::VhtPpdu::Copy(), ns3::VhtPpdu::DoGetTxVector(), and PrintPayload().
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 196 of file wifi-ppdu.cc.
References SU_STA_ID.
|
virtual |
Get the channel width over which the PPDU will effectively be transmitted.
Reimplemented in ns3::HePpdu.
Definition at line 116 of file wifi-ppdu.cc.
References ns3::WifiTxVector::GetChannelWidth(), and GetTxVector().
Referenced by ns3::HePpdu::GetTransmissionChannelWidth().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Get the total transmission duration of the PPDU.
Reimplemented in ns3::HePpdu, ns3::HtPpdu, ns3::DsssPpdu, ns3::OfdmPpdu, and ns3::VhtPpdu.
Definition at line 202 of file wifi-ppdu.cc.
References ns3::MicroSeconds(), and NS_FATAL_ERROR.
Here is the call graph for this function:| WifiTxVector ns3::WifiPpdu::GetTxVector | ( | ) | const |
Get the TXVECTOR used to send the PPDU.
Definition at line 74 of file wifi-ppdu.cc.
References DoGetTxVector(), m_txAntennas, m_txPowerLevel, ns3::WifiTxVector::SetNTx(), and ns3::WifiTxVector::SetTxPowerLevel().
Referenced by Copy(), ns3::HtPpdu::Copy(), ns3::DsssPpdu::Copy(), ns3::ErpOfdmPpdu::Copy(), ns3::OfdmPpdu::Copy(), ns3::VhtPpdu::Copy(), DoesOverlapChannel(), GetTransmissionChannelWidth(), ns3::HePpdu::GetTransmissionChannelWidth(), ns3::HePpdu::GetTxDuration(), ns3::HtPpdu::GetTxDuration(), ns3::DsssPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), and ns3::VhtPpdu::GetTxDuration().
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 190 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 178 of file wifi-ppdu.cc.
References m_uid.
| bool ns3::WifiPpdu::IsTruncatedTx | ( | ) | const |
Definition at line 97 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 210 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 218 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::SetTruncatedTx | ( | ) |
Indicate that the PPDU's transmission was aborted due to transmitter switch off.
Definition at line 103 of file wifi-ppdu.cc.
References m_truncatedTx, and NS_LOG_FUNCTION.
|
protected |
the modulation used for the transmission of this PPDU
Definition at line 194 of file wifi-ppdu.h.
Referenced by GetModulation(), and Print().
|
protected |
the PHY preamble
Definition at line 193 of file wifi-ppdu.h.
Referenced by ns3::VhtPpdu::VhtPpdu(), ns3::EhtPpdu::DoGetTxVector(), ns3::HePpdu::DoGetTxVector(), ns3::HtPpdu::DoGetTxVector(), ns3::DsssPpdu::DoGetTxVector(), ns3::ErpOfdmPpdu::DoGetTxVector(), ns3::OfdmPpdu::DoGetTxVector(), ns3::VhtPpdu::DoGetTxVector(), GetPreamble(), ns3::EhtPpdu::GetType(), ns3::HePpdu::GetType(), ns3::VhtPpdu::GetType(), ns3::HePpdu::IsDlMu(), ns3::EhtPpdu::IsDlMu(), ns3::HePpdu::IsUlMu(), ns3::EhtPpdu::IsUlMu(), and Print().
|
protected |
the PSDUs contained in this PPDU
Definition at line 195 of file wifi-ppdu.h.
Referenced by ns3::HePpdu::HePpdu(), WifiPpdu(), ~WifiPpdu(), ns3::EhtPpdu::DoGetTxVector(), ns3::HePpdu::DoGetTxVector(), GetPsdu(), ns3::HePpdu::GetPsdu(), ns3::HePpdu::GetStaId(), and ns3::HePpdu::PrintPayload().
|
private |
flag indicating whether the frame's transmission was aborted due to transmitter switch off
Definition at line 207 of file wifi-ppdu.h.
Referenced by IsTruncatedTx(), Print(), and SetTruncatedTx().
|
private |
the number of antennas used to transmit this PPDU
Definition at line 211 of file wifi-ppdu.h.
Referenced by GetTxVector().
|
protected |
the center frequency (MHz) used for the transmission of this PPDU
Definition at line 196 of file wifi-ppdu.h.
Referenced by Copy(), ns3::HtPpdu::Copy(), ns3::DsssPpdu::Copy(), ns3::ErpOfdmPpdu::Copy(), ns3::OfdmPpdu::Copy(), ns3::VhtPpdu::Copy(), and DoesOverlapChannel().
|
private |
the transmission power level (used only for TX and initializing the returned WifiTxVector)
Definition at line 209 of file wifi-ppdu.h.
Referenced by GetTxVector().
|
protected |
the unique ID of this PPDU
Definition at line 197 of file wifi-ppdu.h.
Referenced by ns3::HtPpdu::Copy(), ns3::DsssPpdu::Copy(), ns3::ErpOfdmPpdu::Copy(), ns3::OfdmPpdu::Copy(), ns3::VhtPpdu::Copy(), GetUid(), and Print().