wifi: Add EHT_PPDU_TYPE to TXVECTOR
This commit is contained in:
committed by
Stefano Avallone
parent
babdde901e
commit
99cd2667d4
@@ -44,7 +44,8 @@ WifiTxVector::WifiTxVector()
|
||||
m_length(0),
|
||||
m_modeInitialized(false),
|
||||
m_inactiveSubchannels(),
|
||||
m_ruAllocation()
|
||||
m_ruAllocation(),
|
||||
m_ehtPpduType(1) // SU transmission by default
|
||||
{
|
||||
}
|
||||
|
||||
@@ -76,7 +77,8 @@ WifiTxVector::WifiTxVector(WifiMode mode,
|
||||
m_length(length),
|
||||
m_modeInitialized(true),
|
||||
m_inactiveSubchannels(),
|
||||
m_ruAllocation()
|
||||
m_ruAllocation(),
|
||||
m_ehtPpduType(1) // SU transmission by default
|
||||
{
|
||||
}
|
||||
|
||||
@@ -97,7 +99,8 @@ WifiTxVector::WifiTxVector(const WifiTxVector& txVector)
|
||||
m_modeInitialized(txVector.m_modeInitialized),
|
||||
m_inactiveSubchannels(txVector.m_inactiveSubchannels),
|
||||
m_sigBMcs(txVector.m_sigBMcs),
|
||||
m_ruAllocation(txVector.m_ruAllocation)
|
||||
m_ruAllocation(txVector.m_ruAllocation),
|
||||
m_ehtPpduType(txVector.m_ehtPpduType)
|
||||
{
|
||||
m_muUserInfos.clear();
|
||||
if (!txVector.m_muUserInfos.empty()) // avoids crashing for loop
|
||||
@@ -374,6 +377,19 @@ WifiTxVector::GetRuAllocation() const
|
||||
return m_ruAllocation;
|
||||
}
|
||||
|
||||
void
|
||||
WifiTxVector::SetEhtPpduType(uint8_t type)
|
||||
{
|
||||
NS_ASSERT(IsEht(m_preamble));
|
||||
m_ehtPpduType = type;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
WifiTxVector::GetEhtPpduType() const
|
||||
{
|
||||
return m_ehtPpduType;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiTxVector::IsValid() const
|
||||
{
|
||||
@@ -585,6 +601,10 @@ operator<<(std::ostream& os, const WifiTxVector& v)
|
||||
puncturedSubchannels.cend(),
|
||||
std::ostream_iterator<bool>(os, ", "));
|
||||
}
|
||||
if (IsEht(v.GetPreambleType()))
|
||||
{
|
||||
os << " EHT PPDU type: " << +v.GetEhtPpduType();
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@@ -452,6 +452,17 @@ class WifiTxVector
|
||||
*/
|
||||
ContentChannelAllocation GetContentChannelAllocation() const;
|
||||
|
||||
/**
|
||||
* Set the EHT_PPDU_TYPE parameter
|
||||
* \param type the EHT_PPDU_TYPE parameter
|
||||
*/
|
||||
void SetEhtPpduType(uint8_t type);
|
||||
/**
|
||||
* Get the EHT_PPDU_TYPE parameter
|
||||
* \return the EHT_PPDU_TYPE parameter
|
||||
*/
|
||||
uint8_t GetEhtPpduType() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Derive the RU allocation from the TXVECTOR for which its RU allocation has not been set yet.
|
||||
@@ -493,6 +504,7 @@ class WifiTxVector
|
||||
|
||||
mutable RuAllocation m_ruAllocation; /**< RU allocations that are going to be carried
|
||||
in SIG-B common field per Table 27-1 IEEE */
|
||||
uint8_t m_ehtPpduType; /**< EHT_PPDU_TYPE per Table 36-1 IEEE 802.11be D2.3 */
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user