WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU. More...
#include "wifi-ppdu.h"
Public Member Functions | |
WifiPpdu (Ptr< const WifiPsdu > psdu, WifiTxVector txVector, Time ppduDuration, WifiPhyBand band) | |
Create a SU PPDU storing a PSDU. More... | |
WifiPpdu (const WifiConstPsduMap &psdus, WifiTxVector txVector, Time ppduDuration, WifiPhyBand band) | |
Create a MU PPDU storing a vector of PSDUs. More... | |
virtual | ~WifiPpdu () |
WifiModulationClass | GetModulation (void) const |
Get the modulation used for the PPDU. More... | |
Ptr< const WifiPsdu > | GetPsdu (uint8_t bssColor=64, uint16_t staId=SU_STA_ID) const |
Get the payload of the PPDU. More... | |
Time | GetTxDuration () const |
Get the total transmission duration of the PPDU. More... | |
WifiTxVector | GetTxVector (void) const |
Get the TXVECTOR used to send the PPDU. More... | |
bool | IsMu (void) const |
Return true if the PPDU is a MU PPDU. More... | |
bool | IsTruncatedTx (void) const |
Return true if the PPDU's transmission was aborted due to transmitter switch off. More... | |
void | Print (std::ostream &os) const |
Print the PPDU contents. More... | |
void | SetTruncatedTx (void) |
Indicate that the PPDU's transmission was aborted due to transmitter switch off. More... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Private Member Functions | |
void | SetPhyHeaders (WifiTxVector txVector, Time ppduDuration, WifiPhyBand band) |
Fill in the PHY headers. More... | |
Private Attributes | |
WifiPhyBand | m_band |
the WifiPhyBand used to transmit that PPDU More... | |
uint16_t | m_channelWidth |
the channel width used to transmit that PPDU in MHz More... | |
DsssSigHeader | m_dsssSig |
the DSSS SIG PHY header More... | |
HeSigHeader | m_heSig |
the HE-SIG PHY header More... | |
HtSigHeader | m_htSig |
the HT-SIG PHY header More... | |
LSigHeader | m_lSig |
the L-SIG PHY header More... | |
WifiModulationClass | m_modulation |
the modulation used for the transmission of this PPDU More... | |
WifiTxVector::HeMuUserInfoMap | m_muUserInfos |
the HE MU specific per-user information (to be removed once HE-SIG-B headers are implemented) More... | |
WifiPreamble | m_preamble |
the PHY preamble More... | |
WifiConstPsduMap | m_psdus |
the PSDUs contained in this PPDU More... | |
bool | m_truncatedTx |
flag indicating whether the frame's transmission was aborted due to transmitter switch off More... | |
uint8_t | m_txPowerLevel |
the transmission power level (used only for TX and initializing the returned WifiTxVector) More... | |
VhtSigHeader | m_vhtSig |
the VHT-SIG PHY header More... | |
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
This class should be extended later on to handle MU PPDUs.
Definition at line 43 of file wifi-ppdu.h.
ns3::WifiPpdu::WifiPpdu | ( | Ptr< const WifiPsdu > | psdu, |
WifiTxVector | txVector, | ||
Time | ppduDuration, | ||
WifiPhyBand | band | ||
) |
Create a SU PPDU storing a PSDU.
psdu | the PHY payload (PSDU) |
txVector | the TXVECTOR that was used for this PPDU |
ppduDuration | the transmission duration of this PPDU |
band | the WifiPhyBand used for the transmission of this PPDU |
Definition at line 32 of file wifi-ppdu.cc.
References m_psdus, NS_LOG_FUNCTION, SetPhyHeaders(), and SU_STA_ID.
ns3::WifiPpdu::WifiPpdu | ( | const WifiConstPsduMap & | psdus, |
WifiTxVector | txVector, | ||
Time | ppduDuration, | ||
WifiPhyBand | band | ||
) |
Create a MU PPDU storing a vector of PSDUs.
psdus | the PHY payloads (PSDUs) |
txVector | the TXVECTOR that was used for this PPDU |
ppduDuration | the transmission duration of this PPDU |
band | the WifiPhyBand used for the transmission of this PPDU |
Definition at line 45 of file wifi-ppdu.cc.
References ns3::WifiTxVector::GetHeMuUserInfoMap(), m_muUserInfos, m_preamble, NS_LOG_FUNCTION, SetPhyHeaders(), and ns3::WIFI_PREAMBLE_HE_MU.
|
virtual |
Definition at line 62 of file wifi-ppdu.cc.
WifiModulationClass ns3::WifiPpdu::GetModulation | ( | void | ) | const |
Get the modulation used for the PPDU.
Definition at line 476 of file wifi-ppdu.cc.
References m_modulation.
Ptr< const WifiPsdu > ns3::WifiPpdu::GetPsdu | ( | uint8_t | bssColor = 64 , |
uint16_t | staId = SU_STA_ID |
||
) | const |
Get the payload of the PPDU.
bssColor | the BSS color of the PHY calling this function. |
staId | the staId of the PHY calling this function. |
Definition at line 373 of file wifi-ppdu.cc.
References ns3::HeSigHeader::GetBssColor(), IsMu(), m_heSig, m_psdus, NS_ASSERT, and SU_STA_ID.
Time ns3::WifiPpdu::GetTxDuration | ( | void | ) | const |
Get the total transmission duration of the PPDU.
Definition at line 408 of file wifi-ppdu.cc.
References ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiPhy::CalculateTxDuration(), ns3::WifiTxVector::GetGuardInterval(), ns3::HtSigHeader::GetHtLength(), ns3::DsssSigHeader::GetLength(), ns3::LSigHeader::GetLength(), ns3::Time::GetNanoSeconds(), ns3::VhtSigHeader::GetShortGuardInterval(), ns3::VhtSigHeader::GetShortGuardIntervalDisambiguation(), GetTxVector(), m_band, m_dsssSig, m_htSig, m_lSig, m_modulation, m_preamble, m_vhtSig, ns3::MicroSeconds(), ns3::NanoSeconds(), NS_FATAL_ERROR, ns3::Seconds(), ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_ERP_OFDM, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PREAMBLE_HE_MU, ns3::WIFI_PREAMBLE_HE_SU, and ns3::WIFI_PREAMBLE_HE_TB.
WifiTxVector ns3::WifiPpdu::GetTxVector | ( | void | ) | const |
Get the TXVECTOR used to send the PPDU.
Definition at line 172 of file wifi-ppdu.cc.
References ns3::HeSigHeader::GetBssColor(), ns3::HtSigHeader::GetChannelWidth(), ns3::VhtSigHeader::GetChannelWidth(), ns3::HeSigHeader::GetChannelWidth(), ns3::WifiPhy::GetDsssRate11Mbps(), ns3::WifiPhy::GetDsssRate1Mbps(), ns3::WifiPhy::GetDsssRate2Mbps(), ns3::WifiPhy::GetDsssRate5_5Mbps(), ns3::WifiPhy::GetErpOfdmRate12Mbps(), ns3::WifiPhy::GetErpOfdmRate18Mbps(), ns3::WifiPhy::GetErpOfdmRate24Mbps(), ns3::WifiPhy::GetErpOfdmRate36Mbps(), ns3::WifiPhy::GetErpOfdmRate48Mbps(), ns3::WifiPhy::GetErpOfdmRate54Mbps(), ns3::WifiPhy::GetErpOfdmRate6Mbps(), ns3::WifiPhy::GetErpOfdmRate9Mbps(), ns3::HeSigHeader::GetGuardInterval(), ns3::WifiPhy::GetHeMcs(), ns3::WifiPhy::GetHtMcs(), ns3::HtSigHeader::GetMcs(), ns3::HeSigHeader::GetMcs(), ns3::VhtSigHeader::GetNStreams(), ns3::HeSigHeader::GetNStreams(), ns3::WifiPhy::GetOfdmRate12Mbps(), ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate18Mbps(), ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate24Mbps(), ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate36Mbps(), ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate48Mbps(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate54Mbps(), ns3::WifiPhy::GetOfdmRate6Mbps(), ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate9Mbps(), ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz(), ns3::DsssSigHeader::GetRate(), ns3::LSigHeader::GetRate(), ns3::HtSigHeader::GetShortGuardInterval(), ns3::VhtSigHeader::GetShortGuardInterval(), ns3::VhtSigHeader::GetSuMcs(), ns3::WifiPhy::GetVhtMcs(), ns3::VhtSigHeader::IsLdpcCoding(), ns3::HeSigHeader::IsLdpcCoding(), ns3::HtSigHeader::IsLdpcFecCoding(), m_channelWidth, m_dsssSig, m_heSig, m_htSig, m_lSig, m_modulation, m_muUserInfos, m_preamble, m_psdus, m_txPowerLevel, m_vhtSig, NS_ASSERT_MSG, NS_FATAL_ERROR, ns3::WifiTxVector::SetAggregation(), ns3::WifiTxVector::SetBssColor(), ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetHeMuUserInfo(), ns3::WifiTxVector::SetLdpc(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiTxVector::SetPreambleType(), ns3::WifiTxVector::SetTxPowerLevel(), ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_ERP_OFDM, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, and ns3::WIFI_MOD_CLASS_VHT.
Referenced by GetTxDuration().
bool ns3::WifiPpdu::IsMu | ( | void | ) | const |
Return true if the PPDU is a MU PPDU.
Definition at line 470 of file wifi-ppdu.cc.
References m_preamble, ns3::WIFI_PREAMBLE_HE_MU, ns3::WIFI_PREAMBLE_HE_TB, and ns3::WIFI_PREAMBLE_VHT_MU.
Referenced by GetPsdu(), and Print().
bool ns3::WifiPpdu::IsTruncatedTx | ( | void | ) | const |
Return true if the PPDU's transmission was aborted due to transmitter switch off.
Definition at line 395 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 482 of file wifi-ppdu.cc.
References IsMu(), m_modulation, m_preamble, m_psdus, m_truncatedTx, and SU_STA_ID.
Referenced by ns3::operator<<().
|
private |
Fill in the PHY headers.
txVector | the TXVECTOR that was used for this PPDU |
ppduDuration | the transmission duration of this PPDU |
band | the WifiPhyBand used for the transmission of this PPDU |
Definition at line 67 of file wifi-ppdu.cc.
References ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiTxVector::GetBssColor(), ns3::WifiMode::GetDataRate(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiMode::GetMcsValue(), ns3::Time::GetMicroSeconds(), ns3::WifiTxVector::GetMode(), ns3::Time::GetNanoSeconds(), ns3::WifiTxVector::GetNss(), ns3::WifiTxVector::IsAggregation(), ns3::WifiTxVector::IsLdpc(), ns3::WifiTxVector::IsValid(), m_band, m_channelWidth, m_dsssSig, m_heSig, m_htSig, m_lSig, m_modulation, m_preamble, m_psdus, m_vhtSig, NS_ASSERT, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::HtSigHeader::SetAggregation(), ns3::HeSigHeader::SetBssColor(), ns3::HtSigHeader::SetChannelWidth(), ns3::VhtSigHeader::SetChannelWidth(), ns3::HeSigHeader::SetChannelWidth(), ns3::VhtSigHeader::SetCoding(), ns3::HeSigHeader::SetCoding(), ns3::HtSigHeader::SetFecCoding(), ns3::HeSigHeader::SetGuardIntervalAndLtfSize(), ns3::HtSigHeader::SetHtLength(), ns3::DsssSigHeader::SetLength(), ns3::LSigHeader::SetLength(), ns3::HtSigHeader::SetMcs(), ns3::HeSigHeader::SetMcs(), ns3::VhtSigHeader::SetMuFlag(), ns3::HeSigHeader::SetMuFlag(), ns3::VhtSigHeader::SetNStreams(), ns3::HeSigHeader::SetNStreams(), ns3::DsssSigHeader::SetRate(), ns3::LSigHeader::SetRate(), ns3::HtSigHeader::SetShortGuardInterval(), ns3::VhtSigHeader::SetShortGuardInterval(), ns3::VhtSigHeader::SetShortGuardIntervalDisambiguation(), ns3::VhtSigHeader::SetSuMcs(), SU_STA_ID, ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_ERP_OFDM, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PREAMBLE_HE_MU, ns3::WIFI_PREAMBLE_HE_SU, ns3::WIFI_PREAMBLE_HE_TB, and ns3::WIFI_PREAMBLE_VHT_MU.
Referenced by WifiPpdu().
void ns3::WifiPpdu::SetTruncatedTx | ( | void | ) |
Indicate that the PPDU's transmission was aborted due to transmitter switch off.
Definition at line 401 of file wifi-ppdu.cc.
References m_truncatedTx, and NS_LOG_FUNCTION.
|
private |
the WifiPhyBand used to transmit that PPDU
Definition at line 137 of file wifi-ppdu.h.
Referenced by GetTxDuration(), and SetPhyHeaders().
|
private |
the channel width used to transmit that PPDU in MHz
Definition at line 138 of file wifi-ppdu.h.
Referenced by GetTxVector(), and SetPhyHeaders().
|
private |
the DSSS SIG PHY header
Definition at line 128 of file wifi-ppdu.h.
Referenced by GetTxDuration(), GetTxVector(), and SetPhyHeaders().
|
private |
the HE-SIG PHY header
Definition at line 132 of file wifi-ppdu.h.
Referenced by GetPsdu(), GetTxVector(), and SetPhyHeaders().
|
private |
the HT-SIG PHY header
Definition at line 130 of file wifi-ppdu.h.
Referenced by GetTxDuration(), GetTxVector(), and SetPhyHeaders().
|
private |
the L-SIG PHY header
Definition at line 129 of file wifi-ppdu.h.
Referenced by GetTxDuration(), GetTxVector(), and SetPhyHeaders().
|
private |
the modulation used for the transmission of this PPDU
Definition at line 134 of file wifi-ppdu.h.
Referenced by GetModulation(), GetTxDuration(), GetTxVector(), Print(), and SetPhyHeaders().
|
private |
the HE MU specific per-user information (to be removed once HE-SIG-B headers are implemented)
Definition at line 140 of file wifi-ppdu.h.
Referenced by GetTxVector(), and WifiPpdu().
|
private |
the PHY preamble
Definition at line 133 of file wifi-ppdu.h.
Referenced by GetTxDuration(), GetTxVector(), IsMu(), Print(), SetPhyHeaders(), and WifiPpdu().
|
private |
the PSDUs contained in this PPDU
Definition at line 135 of file wifi-ppdu.h.
Referenced by GetPsdu(), GetTxVector(), Print(), SetPhyHeaders(), and WifiPpdu().
|
private |
flag indicating whether the frame's transmission was aborted due to transmitter switch off
Definition at line 136 of file wifi-ppdu.h.
Referenced by IsTruncatedTx(), Print(), and SetTruncatedTx().
|
private |
the transmission power level (used only for TX and initializing the returned WifiTxVector)
Definition at line 139 of file wifi-ppdu.h.
Referenced by GetTxVector().
|
private |
the VHT-SIG PHY header
Definition at line 131 of file wifi-ppdu.h.
Referenced by GetTxDuration(), GetTxVector(), and SetPhyHeaders().