wifi: Use table-based error model by default
This commit is contained in:
committed by
Sebastien Deronne
parent
7c89eaf663
commit
7969df7089
@@ -50,7 +50,7 @@ cpp_examples = [
|
||||
("wifi-he-network --simulationTime=0.25 --frequency=2.4 --useRts=0 --minExpectedThroughput=6 --maxExpectedThroughput=238", "True", "True"),
|
||||
("wifi-he-network --simulationTime=0.3 --frequency=2.4 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=223", "True", "True"),
|
||||
("wifi-simple-ht-hidden-stations --simulationTime=1 --enableRts=0 --nMpdus=32 --minExpectedThroughput=59 --maxExpectedThroughput=60", "True", "True"),
|
||||
("wifi-simple-ht-hidden-stations --simulationTime=1 --enableRts=1 --nMpdus=32 --minExpectedThroughput=55 --maxExpectedThroughput=56", "True", "True"),
|
||||
("wifi-simple-ht-hidden-stations --simulationTime=1 --enableRts=1 --nMpdus=32 --minExpectedThroughput=56 --maxExpectedThroughput=57", "True", "True"),
|
||||
("wifi-mixed-network --simulationTime=1", "True", "True"),
|
||||
("wifi-aggregation --simulationTime=1 --verifyResults=1", "True", "True"),
|
||||
("wifi-txop-aggregation --simulationTime=1 --verifyResults=1", "True", "True"),
|
||||
|
||||
@@ -712,6 +712,7 @@ Experiment::Run (const WifiHelper &helper, const YansWifiPhyHelper &wifiPhy, con
|
||||
}
|
||||
|
||||
YansWifiPhyHelper phy = wifiPhy;
|
||||
phy.SetErrorRateModel ("ns3::NistErrorRateModel");
|
||||
phy.SetChannel (wifiChannel.Create ());
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ SpectrumWifiPhyHelper::SpectrumWifiPhyHelper ()
|
||||
: m_channel (0)
|
||||
{
|
||||
m_phy.SetTypeId ("ns3::SpectrumWifiPhy");
|
||||
SetErrorRateModel ("ns3::NistErrorRateModel");
|
||||
SetErrorRateModel ("ns3::TableBasedErrorRateModel");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -127,7 +127,7 @@ YansWifiPhyHelper::YansWifiPhyHelper ()
|
||||
: m_channel (0)
|
||||
{
|
||||
m_phy.SetTypeId ("ns3::YansWifiPhy");
|
||||
SetErrorRateModel ("ns3::NistErrorRateModel");
|
||||
SetErrorRateModel ("ns3::TableBasedErrorRateModel");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -2660,20 +2660,20 @@ IdealRateManagerChannelWidthTest::DoRun (void)
|
||||
//Set channel width to 80 MHz & send packet
|
||||
Simulator::Schedule (Seconds (0.5), &IdealRateManagerChannelWidthTest::ChangeChannelWidth, this, 80);
|
||||
Simulator::Schedule (Seconds (1.0), &IdealRateManagerChannelWidthTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
//Selected rate should be VHT-MCS 0
|
||||
Simulator::Schedule (Seconds (1.1), &IdealRateManagerChannelWidthTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs0 ());
|
||||
//Selected rate should be VHT-MCS 1
|
||||
Simulator::Schedule (Seconds (1.1), &IdealRateManagerChannelWidthTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs1 ());
|
||||
|
||||
//Set channel width to 20 MHz & send packet
|
||||
Simulator::Schedule (Seconds (1.5), &IdealRateManagerChannelWidthTest::ChangeChannelWidth, this, 20);
|
||||
Simulator::Schedule (Seconds (2.0), &IdealRateManagerChannelWidthTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
//Selected rate should be VHT-MCS 2 since SNR should be 6 dB higher than previously
|
||||
Simulator::Schedule (Seconds (2.1), &IdealRateManagerChannelWidthTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
//Selected rate should be VHT-MCS 3 since SNR should be 6 dB higher than previously
|
||||
Simulator::Schedule (Seconds (2.1), &IdealRateManagerChannelWidthTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs3 ());
|
||||
|
||||
//Set channel width to 40 MHz & send packet
|
||||
Simulator::Schedule (Seconds (2.5), &IdealRateManagerChannelWidthTest::ChangeChannelWidth, this, 40);
|
||||
Simulator::Schedule (Seconds (3.0), &IdealRateManagerChannelWidthTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
//Selected rate should be VHT-MCS 1 since SNR should be 3 dB lower than previously
|
||||
Simulator::Schedule (Seconds (3.1), &IdealRateManagerChannelWidthTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs1 ());
|
||||
//Selected rate should be VHT-MCS 2 since SNR should be 3 dB lower than previously
|
||||
Simulator::Schedule (Seconds (3.1), &IdealRateManagerChannelWidthTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
|
||||
Simulator::Stop (Seconds (3.2));
|
||||
Simulator::Run ();
|
||||
@@ -2847,8 +2847,8 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
Simulator::Schedule (Seconds (1.1), &IdealRateManagerMimoTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
// Selected NSS should be 1 since both TX and RX support a single antenna
|
||||
Simulator::Schedule (Seconds (1.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be VHT-MCS1 because of settings and distance between TX and RX
|
||||
Simulator::Schedule (Seconds (1.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs1 ());
|
||||
// Selected rate should be VHT-MCS 2 because of settings and distance between TX and RX
|
||||
Simulator::Schedule (Seconds (1.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
|
||||
|
||||
// TX: 1 antenna
|
||||
@@ -2860,8 +2860,8 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
Simulator::Schedule (Seconds (2.1), &IdealRateManagerMimoTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
// Selected NSS should be 1 since both TX and RX support a single antenna
|
||||
Simulator::Schedule (Seconds (2.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be increased to VHT-MCS2 because of RX diversity resulting in SNR improvement of about 3dB
|
||||
Simulator::Schedule (Seconds (2.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
// Selected rate should be increased to VHT-MCS 3 because of RX diversity resulting in SNR improvement of about 3dB
|
||||
Simulator::Schedule (Seconds (2.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs3 ());
|
||||
|
||||
|
||||
// TX: 1 antenna
|
||||
@@ -2874,7 +2874,7 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
// Selected NSS should be 1 since TX supports a single antenna
|
||||
Simulator::Schedule (Seconds (3.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be as previously
|
||||
Simulator::Schedule (Seconds (3.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
Simulator::Schedule (Seconds (3.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs3 ());
|
||||
|
||||
|
||||
// TX: 2 antennas, but only supports 1 spatial stream
|
||||
@@ -2886,8 +2886,8 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
Simulator::Schedule (Seconds (4.1), &IdealRateManagerMimoTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
// Selected NSS should be 1 since both TX and RX support a single antenna
|
||||
Simulator::Schedule (Seconds (4.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be VHT-MCS1 because we do no longer have diversity in this scenario (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (4.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs1 ());
|
||||
// Selected rate should be VHT-MCS 2 because we do no longer have diversity in this scenario (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (4.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
|
||||
|
||||
// TX: 2 antennas, but only supports 1 spatial stream
|
||||
@@ -2899,8 +2899,8 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
Simulator::Schedule (Seconds (5.1), &IdealRateManagerMimoTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
// Selected NSS should be 1 since both TX and RX support a single antenna
|
||||
Simulator::Schedule (Seconds (5.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be increased to VHT-MCS2 because of RX diversity resulting in SNR improvement of about 3dB (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (5.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
// Selected rate should be increased to VHT-MCS 3 because of RX diversity resulting in SNR improvement of about 3dB (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (5.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs3 ());
|
||||
|
||||
|
||||
// TX: 2 antennas, but only supports 1 spatial stream
|
||||
@@ -2913,7 +2913,7 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
// Selected NSS should be 1 since TX supports a single antenna
|
||||
Simulator::Schedule (Seconds (6.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be as previously
|
||||
Simulator::Schedule (Seconds (6.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
Simulator::Schedule (Seconds (6.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs3 ());
|
||||
|
||||
|
||||
// TX: 2 antennas, and supports 2 spatial streams
|
||||
@@ -2925,8 +2925,8 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
Simulator::Schedule (Seconds (7.1), &IdealRateManagerMimoTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
// Selected NSS should be 1 since RX supports a single antenna
|
||||
Simulator::Schedule (Seconds (7.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be VHT-MCS1 because we do no longer have diversity in this scenario (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (7.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs1 ());
|
||||
// Selected rate should be VHT-MCS 2 because we do no longer have diversity in this scenario (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (7.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
|
||||
|
||||
// TX: 2 antennas, and supports 2 spatial streams
|
||||
@@ -2938,8 +2938,8 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
Simulator::Schedule (Seconds (8.1), &IdealRateManagerMimoTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
// Selected NSS should be 1 since RX supports a single antenna
|
||||
Simulator::Schedule (Seconds (8.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
// Selected rate should be increased to VHT-MCS2 because of RX diversity resulting in SNR improvement of about 3dB (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (8.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
// Selected rate should be increased to VHT-MCS 3 because of RX diversity resulting in SNR improvement of about 3dB (more antennas at TX does not result in SNR improvement in AWGN channel)
|
||||
Simulator::Schedule (Seconds (8.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs3 ());
|
||||
|
||||
|
||||
// TX: 2 antennas, and supports 2 spatial streams
|
||||
@@ -2952,7 +2952,7 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
// Selected NSS should be 2 since both TX and RX support 2 antennas
|
||||
Simulator::Schedule (Seconds (9.2), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 2);
|
||||
// Selecte rate should be the same as without diversity, as it uses 2 spatial streams so there is no more benefits from diversity in AWGN channels
|
||||
Simulator::Schedule (Seconds (9.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs1 ());
|
||||
Simulator::Schedule (Seconds (9.2), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
|
||||
|
||||
// Verify we can go back to initial situation
|
||||
@@ -2960,7 +2960,7 @@ IdealRateManagerMimoTest::DoRun (void)
|
||||
Simulator::Schedule (Seconds (9.9), &IdealRateManagerMimoTest::SetStaMimoSettings, this, 1, 1);
|
||||
Simulator::Schedule (Seconds (10.0), &IdealRateManagerMimoTest::SendPacket, this, apDevice.Get (0), staDevice.Get (0)->GetAddress ());
|
||||
Simulator::Schedule (Seconds (10.1), &IdealRateManagerMimoTest::CheckLastSelectedNss, this, 1);
|
||||
Simulator::Schedule (Seconds (10.1), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs1 ());
|
||||
Simulator::Schedule (Seconds (10.1), &IdealRateManagerMimoTest::CheckLastSelectedMode, this, WifiPhy::GetVhtMcs2 ());
|
||||
|
||||
Simulator::Stop (Seconds (10.2));
|
||||
Simulator::Run ();
|
||||
|
||||
Reference in New Issue
Block a user