wifi: Cleanup unused function and obsolete attributes
This commit is contained in:
@@ -146,9 +146,7 @@ Bug772ChainTest::CreateDevices()
|
||||
"DataMode",
|
||||
StringValue("OfdmRate6Mbps"),
|
||||
"RtsCtsThreshold",
|
||||
StringValue("2200"),
|
||||
"MaxSlrc",
|
||||
UintegerValue(7));
|
||||
StringValue("2200"));
|
||||
NetDeviceContainer devices = wifi.Install(wifiPhy, wifiMac, *m_nodes);
|
||||
|
||||
// Assign fixed stream numbers to wifi and channel random variables
|
||||
|
||||
@@ -2713,11 +2713,8 @@ main(int argc, char* argv[])
|
||||
Config::SetDefault("ns3::WifiRemoteStationManager::FragmentationThreshold",
|
||||
StringValue("22000"));
|
||||
Config::SetDefault("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue("22000"));
|
||||
// Disable short retransmission failure (make retransmissions persistent)
|
||||
Config::SetDefault("ns3::WifiRemoteStationManager::MaxSlrc",
|
||||
UintegerValue(std::numeric_limits<uint32_t>::max()));
|
||||
Config::SetDefault("ns3::WifiRemoteStationManager::MaxSsrc",
|
||||
UintegerValue(std::numeric_limits<uint32_t>::max()));
|
||||
// Make CW stay equal to CWmax until a packet is acknowledged
|
||||
Config::SetDefault("ns3::WifiMac::FrameRetryLimit", UintegerValue(65535));
|
||||
// Set maximum queue size to the largest value and set maximum queue delay to be larger than the
|
||||
// simulation time
|
||||
Config::SetDefault(
|
||||
|
||||
@@ -217,19 +217,15 @@ main(int argc, char* argv[])
|
||||
StandardInfo serverSelectedStandard;
|
||||
StandardInfo clientSelectedStandard;
|
||||
bool infrastructure = false;
|
||||
uint32_t maxSlrc = 7;
|
||||
uint32_t maxSsrc = 7;
|
||||
uint32_t maxRetryCount = 7;
|
||||
|
||||
RngSeedManager::SetSeed(1);
|
||||
RngSeedManager::SetRun(2);
|
||||
|
||||
CommandLine cmd(__FILE__);
|
||||
cmd.AddValue("maxSsrc",
|
||||
"The maximum number of retransmission attempts for a RTS packet",
|
||||
maxSsrc);
|
||||
cmd.AddValue("maxSlrc",
|
||||
cmd.AddValue("maxRetryCount",
|
||||
"The maximum number of retransmission attempts for a Data packet",
|
||||
maxSlrc);
|
||||
maxRetryCount);
|
||||
cmd.AddValue("rtsThreshold", "RTS threshold", rtsThreshold);
|
||||
cmd.AddValue("maxAmpduSize", "Max A-MPDU size", maxAmpduSize);
|
||||
cmd.AddValue("stepSize", "Power between steps (dBm)", stepSize);
|
||||
@@ -588,8 +584,7 @@ main(int argc, char* argv[])
|
||||
std::ofstream outfile(dataName);
|
||||
Gnuplot gnuplot = Gnuplot(plotName);
|
||||
|
||||
Config::SetDefault("ns3::WifiRemoteStationManager::MaxSlrc", UintegerValue(maxSlrc));
|
||||
Config::SetDefault("ns3::WifiRemoteStationManager::MaxSsrc", UintegerValue(maxSsrc));
|
||||
Config::SetDefault("ns3::WifiMac::FrameRetryLimit", UintegerValue(maxRetryCount));
|
||||
Config::SetDefault("ns3::MinstrelWifiManager::PrintStats", BooleanValue(true));
|
||||
Config::SetDefault("ns3::MinstrelWifiManager::PrintSamples", BooleanValue(true));
|
||||
Config::SetDefault("ns3::MinstrelHtWifiManager::PrintStats", BooleanValue(true));
|
||||
|
||||
@@ -274,9 +274,19 @@ class MinstrelHtWifiManager : public WifiRemoteStationManager
|
||||
uint8_t dataNss) override;
|
||||
std::list<Ptr<WifiMpdu>> DoGetMpdusToDropOnTxFailure(WifiRemoteStation* station,
|
||||
Ptr<WifiPsdu> psdu) override;
|
||||
bool DoNeedRetransmission(WifiRemoteStation* st,
|
||||
Ptr<const Packet> packet,
|
||||
bool normally) override;
|
||||
|
||||
/**
|
||||
* @param st the station that we need to communicate
|
||||
* @param packet the packet to send
|
||||
* @param normally indicates whether the normal 802.11 data retransmission mechanism
|
||||
* would request that the data is retransmitted or not.
|
||||
* @return true if we want to resend a packet after a failed transmission attempt,
|
||||
* false otherwise.
|
||||
*
|
||||
* Note: This method is called after any unicast packet transmission (control, management,
|
||||
* or data) has been attempted and has failed.
|
||||
*/
|
||||
bool DoNeedRetransmission(WifiRemoteStation* st, Ptr<const Packet> packet, bool normally);
|
||||
|
||||
/**
|
||||
* Check the validity of a combination of number of streams, chWidth and mode.
|
||||
|
||||
@@ -254,9 +254,19 @@ class MinstrelWifiManager : public WifiRemoteStationManager
|
||||
WifiTxVector DoGetRtsTxVector(WifiRemoteStation* station) override;
|
||||
std::list<Ptr<WifiMpdu>> DoGetMpdusToDropOnTxFailure(WifiRemoteStation* station,
|
||||
Ptr<WifiPsdu> psdu) override;
|
||||
bool DoNeedRetransmission(WifiRemoteStation* st,
|
||||
Ptr<const Packet> packet,
|
||||
bool normally) override;
|
||||
|
||||
/**
|
||||
* @param st the station that we need to communicate
|
||||
* @param packet the packet to send
|
||||
* @param normally indicates whether the normal 802.11 data retransmission mechanism
|
||||
* would request that the data is retransmitted or not.
|
||||
* @return true if we want to resend a packet after a failed transmission attempt,
|
||||
* false otherwise.
|
||||
*
|
||||
* Note: This method is called after any unicast packet transmission (control, management,
|
||||
* or data) has been attempted and has failed.
|
||||
*/
|
||||
bool DoNeedRetransmission(WifiRemoteStation* st, Ptr<const Packet> packet, bool normally);
|
||||
|
||||
/**
|
||||
* Estimate the TxTime of a packet with a given mode.
|
||||
|
||||
@@ -50,14 +50,18 @@ WifiRemoteStationManager::GetTypeId()
|
||||
"This value will not have any effect on some rate control algorithms.",
|
||||
UintegerValue(7),
|
||||
MakeUintegerAccessor(&WifiRemoteStationManager::SetMaxSsrc),
|
||||
MakeUintegerChecker<uint32_t>())
|
||||
MakeUintegerChecker<uint32_t>(),
|
||||
TypeId::OBSOLETE,
|
||||
"Use WifiMac::FrameRetryLimit instead")
|
||||
.AddAttribute("MaxSlrc",
|
||||
"The maximum number of retransmission attempts for any packet with size "
|
||||
"> RtsCtsThreshold. "
|
||||
"This value will not have any effect on some rate control algorithms.",
|
||||
UintegerValue(4),
|
||||
MakeUintegerAccessor(&WifiRemoteStationManager::SetMaxSlrc),
|
||||
MakeUintegerChecker<uint32_t>())
|
||||
MakeUintegerChecker<uint32_t>(),
|
||||
TypeId::OBSOLETE,
|
||||
"Use WifiMac::FrameRetryLimit instead")
|
||||
.AddAttribute(
|
||||
"IncrementRetryCountUnderBa",
|
||||
"The 802.11-2020 standard states that the retry count for frames that are part of "
|
||||
@@ -1297,32 +1301,6 @@ WifiRemoteStationManager::GetUseNonHtProtection() const
|
||||
return m_useNonHtProtection;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::NeedRetransmission(Ptr<const WifiMpdu> mpdu)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << *mpdu);
|
||||
NS_ASSERT(!mpdu->GetHeader().GetAddr1().IsGroup());
|
||||
AcIndex ac =
|
||||
QosUtilsMapTidToAc((mpdu->GetHeader().IsQosData()) ? mpdu->GetHeader().GetQosTid() : 0);
|
||||
bool longMpdu = (mpdu->GetSize() > m_rtsCtsThreshold);
|
||||
uint32_t retryCount;
|
||||
uint32_t maxRetryCount;
|
||||
if (longMpdu)
|
||||
{
|
||||
retryCount = m_slrc[ac];
|
||||
maxRetryCount = m_maxSlrc;
|
||||
}
|
||||
else
|
||||
{
|
||||
retryCount = m_ssrc[ac];
|
||||
maxRetryCount = m_maxSsrc;
|
||||
}
|
||||
bool normally = retryCount < maxRetryCount;
|
||||
NS_LOG_DEBUG("WifiRemoteStationManager::NeedRetransmission count: "
|
||||
<< retryCount << " result: " << std::boolalpha << normally);
|
||||
return DoNeedRetransmission(Lookup(mpdu->GetHeader().GetAddr1()), mpdu->GetPacket(), normally);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::NeedFragmentation(Ptr<const WifiMpdu> mpdu)
|
||||
{
|
||||
@@ -1955,14 +1933,6 @@ WifiRemoteStationManager::DoNeedRts(WifiRemoteStation* station, uint32_t size, b
|
||||
return normally;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::DoNeedRetransmission(WifiRemoteStation* station,
|
||||
Ptr<const Packet> packet,
|
||||
bool normally)
|
||||
{
|
||||
return normally;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::DoNeedFragmentation(WifiRemoteStation* station,
|
||||
Ptr<const Packet> packet,
|
||||
|
||||
@@ -936,15 +936,13 @@ class WifiRemoteStationManager : public Object
|
||||
double dataSnr,
|
||||
WifiTxVector dataTxVector);
|
||||
/**
|
||||
* Should be invoked after calling ReportRtsFailed if
|
||||
* NeedRetransmission returns false
|
||||
* Should be invoked after calling ReportRtsFailed if frames are dropped
|
||||
*
|
||||
* @param header MAC header of the DATA packet
|
||||
*/
|
||||
void ReportFinalRtsFailed(const WifiMacHeader& header);
|
||||
/**
|
||||
* Should be invoked after calling ReportDataFailed if
|
||||
* NeedRetransmission returns false
|
||||
* Should be invoked after calling ReportDataFailed if frames are dropped
|
||||
*
|
||||
* @param mpdu the MPDU which was discarded
|
||||
*/
|
||||
@@ -1004,13 +1002,6 @@ class WifiRemoteStationManager : public Object
|
||||
*/
|
||||
bool NeedCtsToSelf(WifiTxVector txVector);
|
||||
|
||||
/**
|
||||
* @param mpdu the MPDU to send
|
||||
*
|
||||
* @return true if we want to resend a packet after a failed transmission attempt,
|
||||
* false otherwise.
|
||||
*/
|
||||
bool NeedRetransmission(Ptr<const WifiMpdu> mpdu);
|
||||
/**
|
||||
* @param mpdu the MPDU to send
|
||||
*
|
||||
@@ -1335,20 +1326,6 @@ class WifiRemoteStationManager : public Object
|
||||
* Note: This method is called before a unicast packet is sent on the medium.
|
||||
*/
|
||||
virtual bool DoNeedRts(WifiRemoteStation* station, uint32_t size, bool normally);
|
||||
/**
|
||||
* @param station the station that we need to communicate
|
||||
* @param packet the packet to send
|
||||
* @param normally indicates whether the normal 802.11 data retransmission mechanism
|
||||
* would request that the data is retransmitted or not.
|
||||
* @return true if we want to resend a packet after a failed transmission attempt,
|
||||
* false otherwise.
|
||||
*
|
||||
* Note: This method is called after any unicast packet transmission (control, management,
|
||||
* or data) has been attempted and has failed.
|
||||
*/
|
||||
virtual bool DoNeedRetransmission(WifiRemoteStation* station,
|
||||
Ptr<const Packet> packet,
|
||||
bool normally);
|
||||
/**
|
||||
* @param station the station that we need to communicate
|
||||
* @param packet the packet to send
|
||||
|
||||
@@ -35,7 +35,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Aarf --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Aarf --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
@@ -62,7 +62,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Aarfcd --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Aarfcd --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
@@ -93,7 +93,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Amrr --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Amrr --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
@@ -120,7 +120,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Arf --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Arf --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
@@ -147,7 +147,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Cara --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Cara --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
@@ -174,7 +174,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Onoe --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Onoe --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
@@ -201,7 +201,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Rraa --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Rraa --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
@@ -232,7 +232,7 @@ cpp_examples = [
|
||||
"True",
|
||||
),
|
||||
(
|
||||
"wifi-manager-example --wifiManager=Minstrel --standard=802.11a --maxSlrc=1 --stepTime=0.1",
|
||||
"wifi-manager-example --wifiManager=Minstrel --standard=802.11a --maxRetryCount=1 --stepTime=0.1",
|
||||
"True",
|
||||
"True",
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user