wifi: Add method to indicate whether a PPDU is a SU or a MU PPDU
This commit is contained in:
@@ -349,12 +349,12 @@ WifiPpdu::GetTxVector (void) const
|
||||
Ptr<const WifiPsdu>
|
||||
WifiPpdu::GetPsdu (uint8_t bssColor, uint16_t staId) const
|
||||
{
|
||||
if (m_preamble != WIFI_PREAMBLE_HE_MU) //SU
|
||||
if (!IsMu ())
|
||||
{
|
||||
NS_ASSERT (m_psdus.size () == 1);
|
||||
return m_psdus.at (SU_STA_ID);
|
||||
}
|
||||
else //HE MU
|
||||
else
|
||||
{
|
||||
if (bssColor == m_heSig.GetBssColor ())
|
||||
{
|
||||
@@ -443,6 +443,12 @@ WifiPpdu::GetTxDuration (void) const
|
||||
return ppduDuration;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPpdu::IsMu (void) const
|
||||
{
|
||||
return ((m_preamble == WIFI_PREAMBLE_VHT_MU) || (m_preamble == WIFI_PREAMBLE_HE_MU));
|
||||
}
|
||||
|
||||
void
|
||||
WifiPpdu::Print (std::ostream& os) const
|
||||
{
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
* \return the TXVECTOR of the PPDU.
|
||||
*/
|
||||
WifiTxVector GetTxVector (void) const;
|
||||
|
||||
/**
|
||||
* Get the payload of the PPDU.
|
||||
* \param bssColor the BSS color of the PHY calling this function.
|
||||
@@ -77,21 +78,30 @@ public:
|
||||
* \return the PSDU
|
||||
*/
|
||||
Ptr<const WifiPsdu> GetPsdu (uint8_t bssColor = 64, uint16_t staId = SU_STA_ID) const;
|
||||
|
||||
/**
|
||||
* Return true if the PPDU's transmission was aborted due to transmitter switch off
|
||||
* \return true if the PPDU's transmission was aborted due to transmitter switch off
|
||||
*/
|
||||
bool IsTruncatedTx (void) const;
|
||||
|
||||
/**
|
||||
* Indicate that the PPDU's transmission was aborted due to transmitter switch off.
|
||||
*/
|
||||
void SetTruncatedTx (void);
|
||||
|
||||
/**
|
||||
* Get the total transmission duration of the PPDU.
|
||||
* \return the transmission duration of the PPDU
|
||||
*/
|
||||
Time GetTxDuration () const;
|
||||
|
||||
/**
|
||||
* Return true if the PPDU is a MU PPDU
|
||||
* \return true if the PPDU is a MU PPDU
|
||||
*/
|
||||
bool IsMu (void) const;
|
||||
|
||||
/**
|
||||
* \brief Print the PPDU contents.
|
||||
* \param os output stream in which the data should be printed.
|
||||
|
||||
Reference in New Issue
Block a user