wifi: TypeId must be defined before setting ObjectFactory attributes

This commit is contained in:
Stefano Avallone
2024-05-16 16:25:14 +02:00
parent 26d4a1399e
commit f8a20c404f
2 changed files with 6 additions and 1 deletions

View File

@@ -50,6 +50,10 @@ WifiMacHelper::WifiMacHelper()
it->second.SetTypeId("ns3::QosTxop");
}
m_channelAccessManager.SetTypeId("ns3::ChannelAccessManager");
// Setting FEM attributes requires setting a TypeId first. We initialize the TypeId to the FEM
// of the latest standard, in order to allow users to set the attributes of all the FEMs. The
// Create method will set the requested standard before creating the FEM(s).
m_frameExchangeManager.SetTypeId(GetFrameExchangeManagerTypeIdName(WIFI_STANDARD_COUNT, true));
m_assocManager.SetTypeId("ns3::WifiDefaultAssocManager");
m_queueScheduler.SetTypeId("ns3::FcfsWifiQueueScheduler");
m_protectionManager.SetTypeId("ns3::WifiDefaultProtectionManager");

View File

@@ -45,7 +45,8 @@ enum WifiStandard
WIFI_STANDARD_80211ac,
WIFI_STANDARD_80211ad,
WIFI_STANDARD_80211ax,
WIFI_STANDARD_80211be
WIFI_STANDARD_80211be,
WIFI_STANDARD_COUNT
};
/**