From 1c0809c31e8a68520a68f4ac485dd08614189283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 27 Mar 2024 19:48:18 +0100 Subject: [PATCH] examples: Fix conditions to check boundaries of measured throughput for wifi HT/VHT/HE/EHT networks --- examples/wireless/examples-to-run.py | 8 ++++---- examples/wireless/wifi-eht-network.cc | 4 ++-- examples/wireless/wifi-he-network.cc | 4 ++-- examples/wireless/wifi-ht-network.cc | 4 ++-- examples/wireless/wifi-vht-network.cc | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/wireless/examples-to-run.py b/examples/wireless/examples-to-run.py index 14a28a7d8..161f40b9d 100755 --- a/examples/wireless/examples-to-run.py +++ b/examples/wireless/examples-to-run.py @@ -125,7 +125,7 @@ cpp_examples = [ "True", ), ( - "wifi-he-network --simulationTime=0.3 --frequency=2.4 --udp=0 --downlink=1 --useRts=1 --nStations=5 --dlAckType=MU-BAR --enableUlOfdma=1 --enableBsrp=1 --mcs=5 --minExpectedThroughput=27 --maxExpectedThroughput=50", + "wifi-he-network --simulationTime=0.3 --frequency=2.4 --udp=0 --downlink=1 --useRts=1 --nStations=5 --dlAckType=MU-BAR --enableUlOfdma=1 --enableBsrp=1 --mcs=5 --minExpectedThroughput=21 --maxExpectedThroughput=56", "True", "True", ), @@ -150,12 +150,12 @@ cpp_examples = [ "True", ), ( - "wifi-eht-network --simulationTime=0.1 --frequency=5 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=547", + "wifi-eht-network --simulationTime=0.1 --frequency=5 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=660", "True", "True", ), ( - "wifi-eht-network --simulationTime=0.1 --frequency=2.4 --useRts=0 --mpduBufferSize=512 --frequency2=5 --minExpectedThroughput=7 --maxExpectedThroughput=330", + "wifi-eht-network --simulationTime=0.1 --frequency=2.4 --useRts=0 --mpduBufferSize=512 --frequency2=5 --minExpectedThroughput=7 --maxExpectedThroughput=512", "True", "True", ), @@ -165,7 +165,7 @@ cpp_examples = [ "True", ), ( - "wifi-eht-network --simulationTime=0.23 --udp=0 --downlink=1 --useRts=0 --nStations=4 --dlAckType=ACK-SU-FORMAT --enableUlOfdma=1 --enableBsrp=0 --mcs=5 --frequency2=6 --minExpectedThroughput=35 --maxExpectedThroughput=280", + "wifi-eht-network --simulationTime=0.23 --udp=0 --downlink=1 --useRts=0 --nStations=4 --dlAckType=ACK-SU-FORMAT --enableUlOfdma=1 --enableBsrp=0 --mcs=5 --frequency2=6 --minExpectedThroughput=35 --maxExpectedThroughput=404", "True", "True", ), diff --git a/examples/wireless/wifi-eht-network.cc b/examples/wireless/wifi-eht-network.cc index 47370acfc..643b38303 100644 --- a/examples/wireless/wifi-eht-network.cc +++ b/examples/wireless/wifi-eht-network.cc @@ -566,7 +566,7 @@ main(int argc, char* argv[]) << throughput << " Mbit/s" << std::endl; // test first element - if (mcs == 0 && channelWidth == 20 && gi == 3200) + if (mcs == minMcs && channelWidth == 20 && gi == 3200) { if (throughput * (1 + tolerance) < minExpectedThroughput) { @@ -575,7 +575,7 @@ main(int argc, char* argv[]) } } // test last element - if (mcs == 11 && channelWidth == 160 && gi == 800) + if (mcs == maxMcs && channelWidth == maxChannelWidth && gi == 800) { if (maxExpectedThroughput > 0 && throughput > maxExpectedThroughput * (1 + tolerance)) diff --git a/examples/wireless/wifi-he-network.cc b/examples/wireless/wifi-he-network.cc index 7d4bbc591..1292762ac 100644 --- a/examples/wireless/wifi-he-network.cc +++ b/examples/wireless/wifi-he-network.cc @@ -451,7 +451,7 @@ main(int argc, char* argv[]) << throughput << " Mbit/s" << std::endl; // test first element - if (mcs == 0 && channelWidth == 20 && gi == 3200) + if (mcs == minMcs && channelWidth == 20 && gi == 3200) { if (throughput * (1 + tolerance) < minExpectedThroughput) { @@ -460,7 +460,7 @@ main(int argc, char* argv[]) } } // test last element - if (mcs == 11 && channelWidth == 160 && gi == 800) + if (mcs == maxMcs && channelWidth == maxChannelWidth && gi == 800) { if (maxExpectedThroughput > 0 && throughput > maxExpectedThroughput * (1 + tolerance)) diff --git a/examples/wireless/wifi-ht-network.cc b/examples/wireless/wifi-ht-network.cc index b65100430..4ca3a5cf8 100644 --- a/examples/wireless/wifi-ht-network.cc +++ b/examples/wireless/wifi-ht-network.cc @@ -291,7 +291,7 @@ main(int argc, char* argv[]) << sgi << "\t\t\t" << throughput << " Mbit/s" << std::endl; // test first element - if (mcs == 0 && channelWidth == 20 && !sgi) + if (mcs == minMcs && channelWidth == 20 && !sgi) { if (throughput < minExpectedThroughput) { @@ -299,7 +299,7 @@ main(int argc, char* argv[]) } } // test last element - if (mcs == 7 && channelWidth == 40 && sgi) + if (mcs == maxMcs && channelWidth == 40 && sgi) { if (maxExpectedThroughput > 0 && throughput > maxExpectedThroughput) { diff --git a/examples/wireless/wifi-vht-network.cc b/examples/wireless/wifi-vht-network.cc index cee36bea6..8369fa9db 100644 --- a/examples/wireless/wifi-vht-network.cc +++ b/examples/wireless/wifi-vht-network.cc @@ -272,7 +272,7 @@ main(int argc, char* argv[]) << sgi << "\t\t\t" << throughput << " Mbit/s" << std::endl; // test first element - if (mcs == 0 && channelWidth == 20 && !sgi) + if (mcs == minMcs && channelWidth == 20 && !sgi) { if (throughput < minExpectedThroughput) { @@ -281,7 +281,7 @@ main(int argc, char* argv[]) } } // test last element - if (mcs == 9 && channelWidth == 160 && sgi) + if (mcs == maxMcs && channelWidth == 160 && sgi) { if (maxExpectedThroughput > 0 && throughput > maxExpectedThroughput) {