wifi: Make HeConfiguration member variables public
..unless they require non-trivial setter/getter.
This commit is contained in:
@@ -627,44 +627,25 @@ ApWifiMac::GetMuEdcaParameterSet() const
|
||||
MuEdcaParameterSet muEdcaParameters;
|
||||
muEdcaParameters.SetQosInfo(0);
|
||||
|
||||
UintegerValue uintegerValue;
|
||||
TimeValue timeValue;
|
||||
muEdcaParameters.SetMuAifsn(AC_BE, heConfiguration->m_muBeAifsn);
|
||||
muEdcaParameters.SetMuCwMin(AC_BE, heConfiguration->m_muBeCwMin);
|
||||
muEdcaParameters.SetMuCwMax(AC_BE, heConfiguration->m_muBeCwMax);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_BE, heConfiguration->m_beMuEdcaTimer);
|
||||
|
||||
heConfiguration->GetAttribute("MuBeAifsn", uintegerValue);
|
||||
muEdcaParameters.SetMuAifsn(AC_BE, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuBeCwMin", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMin(AC_BE, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuBeCwMax", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMax(AC_BE, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("BeMuEdcaTimer", timeValue);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_BE, timeValue.Get());
|
||||
muEdcaParameters.SetMuAifsn(AC_BK, heConfiguration->m_muBkAifsn);
|
||||
muEdcaParameters.SetMuCwMin(AC_BK, heConfiguration->m_muBkCwMin);
|
||||
muEdcaParameters.SetMuCwMax(AC_BK, heConfiguration->m_muBkCwMax);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_BK, heConfiguration->m_bkMuEdcaTimer);
|
||||
|
||||
heConfiguration->GetAttribute("MuBkAifsn", uintegerValue);
|
||||
muEdcaParameters.SetMuAifsn(AC_BK, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuBkCwMin", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMin(AC_BK, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuBkCwMax", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMax(AC_BK, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("BkMuEdcaTimer", timeValue);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_BK, timeValue.Get());
|
||||
muEdcaParameters.SetMuAifsn(AC_VI, heConfiguration->m_muViAifsn);
|
||||
muEdcaParameters.SetMuCwMin(AC_VI, heConfiguration->m_muViCwMin);
|
||||
muEdcaParameters.SetMuCwMax(AC_VI, heConfiguration->m_muViCwMax);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_VI, heConfiguration->m_viMuEdcaTimer);
|
||||
|
||||
heConfiguration->GetAttribute("MuViAifsn", uintegerValue);
|
||||
muEdcaParameters.SetMuAifsn(AC_VI, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuViCwMin", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMin(AC_VI, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuViCwMax", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMax(AC_VI, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("ViMuEdcaTimer", timeValue);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_VI, timeValue.Get());
|
||||
|
||||
heConfiguration->GetAttribute("MuVoAifsn", uintegerValue);
|
||||
muEdcaParameters.SetMuAifsn(AC_VO, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuVoCwMin", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMin(AC_VO, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("MuVoCwMax", uintegerValue);
|
||||
muEdcaParameters.SetMuCwMax(AC_VO, uintegerValue.Get());
|
||||
heConfiguration->GetAttribute("VoMuEdcaTimer", timeValue);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_VO, timeValue.Get());
|
||||
muEdcaParameters.SetMuAifsn(AC_VO, heConfiguration->m_muVoAifsn);
|
||||
muEdcaParameters.SetMuCwMin(AC_VO, heConfiguration->m_muVoCwMin);
|
||||
muEdcaParameters.SetMuCwMax(AC_VO, heConfiguration->m_muVoCwMax);
|
||||
muEdcaParameters.SetMuEdcaTimer(AC_VO, heConfiguration->m_voMuEdcaTimer);
|
||||
|
||||
// The timers of the MU EDCA Parameter Set must be either all zero or all
|
||||
// non-zero. The information element is advertised if all timers are non-zero
|
||||
@@ -989,7 +970,7 @@ ApWifiMac::GetHeOperation(uint8_t linkId) const
|
||||
nss,
|
||||
11); // TBD: hardcode to 11 for now since we assume all MCS values are supported
|
||||
}
|
||||
operation.m_bssColorInfo.m_bssColor = GetHeConfiguration()->GetBssColor();
|
||||
operation.m_bssColorInfo.m_bssColor = GetHeConfiguration()->m_bssColor;
|
||||
|
||||
if (auto phy = GetWifiPhy(linkId); phy && phy->GetPhyBand() == WIFI_PHY_BAND_6GHZ)
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ ConstantObssPdAlgorithm::ReceiveHeSigA(HeSigAParameters params)
|
||||
|
||||
Ptr<HeConfiguration> heConfiguration = m_device->GetHeConfiguration();
|
||||
NS_ASSERT(heConfiguration);
|
||||
uint8_t bssColor = heConfiguration->GetBssColor();
|
||||
uint8_t bssColor = heConfiguration->m_bssColor;
|
||||
|
||||
if (bssColor == 0)
|
||||
{
|
||||
|
||||
@@ -38,12 +38,11 @@ HeConfiguration::GetTypeId()
|
||||
MakeTimeAccessor(&HeConfiguration::GetGuardInterval,
|
||||
&HeConfiguration::SetGuardInterval),
|
||||
MakeTimeChecker(NanoSeconds(800), NanoSeconds(3200)))
|
||||
.AddAttribute(
|
||||
"BssColor",
|
||||
"The BSS color",
|
||||
UintegerValue(0),
|
||||
MakeUintegerAccessor(&HeConfiguration::GetBssColor, &HeConfiguration::SetBssColor),
|
||||
MakeUintegerChecker<uint8_t>())
|
||||
.AddAttribute("BssColor",
|
||||
"The BSS color",
|
||||
UintegerValue(0),
|
||||
MakeUintegerAccessor(&HeConfiguration::m_bssColor),
|
||||
MakeUintegerChecker<uint8_t>())
|
||||
.AddAttribute("MaxTbPpduDelay",
|
||||
"If positive, the value of this attribute specifies the maximum "
|
||||
"delay with which a TB PPDU can be received after the reception of "
|
||||
@@ -52,8 +51,7 @@ HeConfiguration::GetTypeId()
|
||||
"is anyway capped at the duration of the training fields in the PPDU. "
|
||||
"This attribute is only valid for APs.",
|
||||
TimeValue(Seconds(0)),
|
||||
MakeTimeAccessor(&HeConfiguration::GetMaxTbPpduDelay,
|
||||
&HeConfiguration::SetMaxTbPpduDelay),
|
||||
MakeTimeAccessor(&HeConfiguration::m_maxTbPpduDelay),
|
||||
MakeTimeChecker(Seconds(0)))
|
||||
.AddAttribute("MuBeAifsn",
|
||||
"AIFSN used by BE EDCA when the MU EDCA Timer is running. "
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#ifndef HE_CONFIGURATION_H
|
||||
#define HE_CONFIGURATION_H
|
||||
|
||||
#include "ns3/deprecated.h"
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/object.h"
|
||||
|
||||
@@ -37,29 +38,36 @@ class HeConfiguration : public Object
|
||||
* \param guardInterval the supported HE guard interval
|
||||
*/
|
||||
void SetGuardInterval(Time guardInterval);
|
||||
|
||||
/**
|
||||
* \return the supported HE guard interval
|
||||
*/
|
||||
Time GetGuardInterval() const;
|
||||
|
||||
/**
|
||||
* \param bssColor the BSS color
|
||||
*/
|
||||
NS_DEPRECATED_3_44("Set the m_bssColor member variable instead")
|
||||
void SetBssColor(uint8_t bssColor);
|
||||
|
||||
/**
|
||||
* \return the BSS color
|
||||
*/
|
||||
NS_DEPRECATED_3_44("Get the m_bssColor member variable instead")
|
||||
uint8_t GetBssColor() const;
|
||||
|
||||
/**
|
||||
* \param maxTbPpduDelay the maximum TB PPDU delay
|
||||
*/
|
||||
NS_DEPRECATED_3_44("Set the m_maxTbPpduDelay member variable instead")
|
||||
void SetMaxTbPpduDelay(Time maxTbPpduDelay);
|
||||
|
||||
/**
|
||||
* \return the maximum TB PPDU delay
|
||||
*/
|
||||
NS_DEPRECATED_3_44("Get the m_maxTbPpduDelay member variable instead")
|
||||
Time GetMaxTbPpduDelay() const;
|
||||
|
||||
private:
|
||||
Time m_guardInterval; //!< Supported HE guard interval
|
||||
uint8_t m_bssColor; //!< BSS color
|
||||
Time m_maxTbPpduDelay; //!< Max TB PPDU delay
|
||||
uint8_t m_muBeAifsn; //!< AIFSN for BE in MU EDCA Parameter Set
|
||||
@@ -78,6 +86,9 @@ class HeConfiguration : public Object
|
||||
Time m_bkMuEdcaTimer; //!< Timer for BK in MU EDCA Parameter Set
|
||||
Time m_viMuEdcaTimer; //!< Timer for VI in MU EDCA Parameter Set
|
||||
Time m_voMuEdcaTimer; //!< Timer for VO in MU EDCA Parameter Set
|
||||
|
||||
private:
|
||||
Time m_guardInterval; //!< Supported HE guard interval
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -1582,7 +1582,7 @@ HeFrameExchangeManager::GetHeTbTxVector(CtrlTriggerHeader trigger, Mac48Address
|
||||
|
||||
Ptr<HeConfiguration> heConfiguration = m_mac->GetHeConfiguration();
|
||||
NS_ASSERT_MSG(heConfiguration, "This STA has to be an HE station to send an HE TB PPDU");
|
||||
v.SetBssColor(heConfiguration->GetBssColor());
|
||||
v.SetBssColor(heConfiguration->m_bssColor);
|
||||
|
||||
if (userInfoIt->IsUlTargetRssiMaxTxPower())
|
||||
{
|
||||
@@ -2113,7 +2113,7 @@ HeFrameExchangeManager::IsIntraBssPpdu(Ptr<const WifiPsdu> psdu, const WifiTxVec
|
||||
// This condition is used if the BSS is not disabled ("If a STA determines that the BSS color
|
||||
// is disabled (see 26.17.3.3), then the RXVECTOR parameter BSS_COLOR of a PPDU shall not be
|
||||
// used to classify the PPDU")
|
||||
const auto bssColor = m_mac->GetHeConfiguration()->GetBssColor();
|
||||
const auto bssColor = m_mac->GetHeConfiguration()->m_bssColor;
|
||||
|
||||
// the other two conditions using the RXVECTOR parameter PARTIAL_AID are not implemented
|
||||
return bssColor != 0 && bssColor == txVector.GetBssColor();
|
||||
|
||||
@@ -555,7 +555,7 @@ HePhy::GetBssColor() const
|
||||
Ptr<HeConfiguration> heConfiguration = m_wifiPhy->GetDevice()->GetHeConfiguration();
|
||||
if (heConfiguration)
|
||||
{
|
||||
bssColor = heConfiguration->GetBssColor();
|
||||
bssColor = heConfiguration->m_bssColor;
|
||||
}
|
||||
}
|
||||
return bssColor;
|
||||
@@ -1317,9 +1317,9 @@ HePhy::GetMaxDelayPpduSameUid(const WifiTxVector& txVector)
|
||||
// training fields that are between the start of the HE portion and the start
|
||||
// of the Data field.
|
||||
auto maxDelay = GetDuration(WIFI_PPDU_FIELD_TRAINING, txVector);
|
||||
if (heConfiguration->GetMaxTbPpduDelay().IsStrictlyPositive())
|
||||
if (heConfiguration->m_maxTbPpduDelay.IsStrictlyPositive())
|
||||
{
|
||||
maxDelay = Min(maxDelay, heConfiguration->GetMaxTbPpduDelay());
|
||||
maxDelay = Min(maxDelay, heConfiguration->m_maxTbPpduDelay);
|
||||
}
|
||||
return maxDelay;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ ObssPdAlgorithm::ResetPhy(HeSigAParameters params)
|
||||
// Fetch my BSS color
|
||||
Ptr<HeConfiguration> heConfiguration = m_device->GetHeConfiguration();
|
||||
NS_ASSERT(heConfiguration);
|
||||
uint8_t bssColor = heConfiguration->GetBssColor();
|
||||
uint8_t bssColor = heConfiguration->m_bssColor;
|
||||
NS_LOG_DEBUG("My BSS color " << (uint16_t)bssColor << " received frame "
|
||||
<< (uint16_t)params.bssColor);
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ RrMultiUserScheduler::GetTxVectorForUlMu(std::function<bool(const MasterInfo&)>
|
||||
txVector.SetPreambleType(WIFI_PREAMBLE_HE_TB);
|
||||
txVector.SetChannelWidth(m_allowedWidth);
|
||||
txVector.SetGuardInterval(heConfiguration->GetGuardInterval());
|
||||
txVector.SetBssColor(heConfiguration->GetBssColor());
|
||||
txVector.SetBssColor(heConfiguration->m_bssColor);
|
||||
|
||||
// iterate over the associated stations until an enough number of stations is identified
|
||||
auto staIt = m_staListUl.begin();
|
||||
@@ -792,7 +792,7 @@ RrMultiUserScheduler::TrySendingDlMuPpdu()
|
||||
m_txParams.m_txVector.SetPreambleType(WIFI_PREAMBLE_HE_MU);
|
||||
m_txParams.m_txVector.SetChannelWidth(m_allowedWidth);
|
||||
m_txParams.m_txVector.SetGuardInterval(heConfiguration->GetGuardInterval());
|
||||
m_txParams.m_txVector.SetBssColor(heConfiguration->GetBssColor());
|
||||
m_txParams.m_txVector.SetBssColor(heConfiguration->m_bssColor);
|
||||
|
||||
// The TXOP limit can be exceeded by the TXOP holder if it does not transmit more
|
||||
// than one Data or Management frame in the TXOP and the frame is not in an A-MPDU
|
||||
|
||||
@@ -1716,9 +1716,7 @@ StaWifiMac::UpdateApInfo(const MgtFrameType& frame,
|
||||
if (const auto& heOperation = frame.template Get<HeOperation>();
|
||||
heOperation.has_value())
|
||||
{
|
||||
GetHeConfiguration()->SetAttribute(
|
||||
"BssColor",
|
||||
UintegerValue(heOperation->m_bssColorInfo.m_bssColor));
|
||||
GetHeConfiguration()->m_bssColor = heOperation->m_bssColorInfo.m_bssColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -636,7 +636,7 @@ WifiRemoteStationManager::GetDataTxVector(const WifiMacHeader& header, MHz_u all
|
||||
Ptr<HeConfiguration> heConfiguration = m_wifiPhy->GetDevice()->GetHeConfiguration();
|
||||
if (heConfiguration)
|
||||
{
|
||||
txVector.SetBssColor(heConfiguration->GetBssColor());
|
||||
txVector.SetBssColor(heConfiguration->m_bssColor);
|
||||
}
|
||||
// If both the allowed width and the TXVECTOR channel width are integer multiple
|
||||
// of 20 MHz, then the TXVECTOR channel width must not exceed the allowed width
|
||||
|
||||
@@ -2518,7 +2518,7 @@ TestMultipleHeTbPreambles::DoSetup()
|
||||
preambleDetectionModel->SetAttribute("MinimumRssi", DoubleValue(-82));
|
||||
m_phy->SetPreambleDetectionModel(preambleDetectionModel);
|
||||
Ptr<HeConfiguration> heConfiguration = CreateObject<HeConfiguration>();
|
||||
heConfiguration->SetMaxTbPpduDelay(NanoSeconds(400));
|
||||
heConfiguration->m_maxTbPpduDelay = NanoSeconds(400);
|
||||
dev->SetHeConfiguration(heConfiguration);
|
||||
dev->SetPhy(m_phy);
|
||||
node->AddDevice(dev);
|
||||
|
||||
@@ -422,7 +422,7 @@ WifiPrimaryChannelsTest::DoSetup()
|
||||
for (uint8_t bss = 0; bss < m_nBss; bss++)
|
||||
{
|
||||
auto dev = DynamicCast<WifiNetDevice>(m_apDevices.Get(bss));
|
||||
dev->GetHeConfiguration()->SetBssColor(bss + 1);
|
||||
dev->GetHeConfiguration()->m_bssColor = bss + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ WifiPrimaryChannelsTest::SendDlSuPpdu(uint8_t bss, MHz_u txChannelWidth)
|
||||
auto apDev = DynamicCast<WifiNetDevice>(m_apDevices.Get(bss));
|
||||
auto staDev = DynamicCast<WifiNetDevice>(m_staDevices[bss].Get(0));
|
||||
|
||||
uint8_t bssColor = apDev->GetHeConfiguration()->GetBssColor();
|
||||
uint8_t bssColor = apDev->GetHeConfiguration()->m_bssColor;
|
||||
WifiTxVector txVector = WifiTxVector(HePhy::GetHeMcs8(),
|
||||
0,
|
||||
WIFI_PREAMBLE_HE_SU,
|
||||
@@ -794,7 +794,7 @@ WifiPrimaryChannelsTest::SendDlMuPpdu(uint8_t bss,
|
||||
<< "addressed to " << nRus << " stations (RU type: " << ruType << ")");
|
||||
|
||||
auto apDev = DynamicCast<WifiNetDevice>(m_apDevices.Get(bss));
|
||||
uint8_t bssColor = apDev->GetHeConfiguration()->GetBssColor();
|
||||
uint8_t bssColor = apDev->GetHeConfiguration()->m_bssColor;
|
||||
|
||||
WifiTxVector txVector = WifiTxVector(HePhy::GetHeMcs8(),
|
||||
0,
|
||||
@@ -871,7 +871,7 @@ WifiPrimaryChannelsTest::DoSendHeTbPpdu(uint8_t bss,
|
||||
std::size_t nRus)
|
||||
{
|
||||
auto apDev = DynamicCast<WifiNetDevice>(m_apDevices.Get(bss));
|
||||
uint8_t bssColor = apDev->GetHeConfiguration()->GetBssColor();
|
||||
uint8_t bssColor = apDev->GetHeConfiguration()->m_bssColor;
|
||||
|
||||
WifiMacHeader hdr;
|
||||
hdr.SetType(WIFI_MAC_QOSDATA);
|
||||
|
||||
Reference in New Issue
Block a user