From a64aed48492ad73ccd5c40c1d82e737d976728a2 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Mon, 26 Aug 2024 17:53:40 +0200 Subject: [PATCH] wifi: EHT network example can use other EMLSR managers than the default one Also, use the advanced EMLSR manager in some of the regression runs --- examples/wireless/examples-to-run.py | 6 +++--- examples/wireless/wifi-eht-network.cc | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/wireless/examples-to-run.py b/examples/wireless/examples-to-run.py index 78fa3f140..8a8ef09ed 100755 --- a/examples/wireless/examples-to-run.py +++ b/examples/wireless/examples-to-run.py @@ -205,12 +205,12 @@ cpp_examples = [ "True", ), ( - "wifi-eht-network --simulationTime=0.2s --frequency=2.4 --frequency2=5 --guardInterval=1600 --udp=0 --downlink=1 --useRts=1 --mpduBufferSize=512 --emlsrLinks=0,1 --emlsrPaddingDelay=64 --emlsrTransitionDelay=64 --channelSwitchDelay=64us --emlsrAuxSwitch=False --emlsrAuxTxCapable=True --minExpectedThroughput=5 --maxExpectedThroughput=190", + "wifi-eht-network --simulationTime=0.2s --frequency=2.4 --frequency2=5 --guardInterval=1600 --udp=0 --downlink=1 --useRts=1 --mpduBufferSize=512 --emlsrLinks=0,1 --emlsrPaddingDelay=64 --emlsrTransitionDelay=64 --channelSwitchDelay=64us --emlsrMgrTypeId=ns3::AdvancedEmlsrManager --emlsrAuxSwitch=False --emlsrAuxTxCapable=True --minExpectedThroughput=5 --maxExpectedThroughput=190", "True", "True", ), ( - "wifi-eht-network --simulationTime=0.2s --frequency=2.4 --frequency2=5 --guardInterval=1600 --udp=0 --downlink=0 --useRts=0 --mpduBufferSize=512 --emlsrLinks=0,1 --emlsrPaddingDelay=0 --emlsrTransitionDelay=0 --channelSwitchDelay=1ns --emlsrAuxSwitch=False --emlsrAuxTxCapable=False --minExpectedThroughput=5 --maxExpectedThroughput=40 --RngRun=2", + "wifi-eht-network --simulationTime=0.2s --frequency=2.4 --frequency2=5 --guardInterval=1600 --udp=0 --downlink=0 --useRts=0 --mpduBufferSize=512 --emlsrLinks=0,1 --emlsrPaddingDelay=0 --emlsrTransitionDelay=0 --channelSwitchDelay=1ns --emlsrMgrTypeId=ns3::AdvancedEmlsrManager --emlsrAuxSwitch=False --emlsrAuxTxCapable=False --minExpectedThroughput=5 --maxExpectedThroughput=40 --RngRun=2", "True", "True", ), @@ -225,7 +225,7 @@ cpp_examples = [ "True", ), ( - "wifi-eht-network --simulationTime=0.3s --frequency=2.4 --frequency2=5 --frequency3=6 --guardInterval=1600 --udp=0 --downlink=0 --useRts=1 --mpduBufferSize=512 --emlsrLinks=0,1,2 --emlsrPaddingDelay=0 --emlsrTransitionDelay=0 --channelSwitchDelay=1ns --emlsrAuxSwitch=False --emlsrAuxTxCapable=False --nStations=4 --dlAckType=ACK-SU-FORMAT --enableUlOfdma=1 --enableBsrp=1 --mcs=1,5,8,11 --minExpectedThroughput=8 --maxExpectedThroughput=88", + "wifi-eht-network --simulationTime=0.3s --frequency=2.4 --frequency2=5 --frequency3=6 --guardInterval=1600 --udp=0 --downlink=0 --useRts=1 --mpduBufferSize=512 --emlsrLinks=0,1,2 --emlsrPaddingDelay=0 --emlsrTransitionDelay=0 --channelSwitchDelay=1ns --emlsrMgrTypeId=ns3::AdvancedEmlsrManager --emlsrAuxSwitch=False --emlsrAuxTxCapable=False --nStations=4 --dlAckType=ACK-SU-FORMAT --enableUlOfdma=1 --enableBsrp=1 --mcs=1,5,8,11 --minExpectedThroughput=8 --maxExpectedThroughput=88", "True", "True", ), diff --git a/examples/wireless/wifi-eht-network.cc b/examples/wireless/wifi-eht-network.cc index 49ed4428b..5ebbd9d73 100644 --- a/examples/wireless/wifi-eht-network.cc +++ b/examples/wireless/wifi-eht-network.cc @@ -138,6 +138,7 @@ main(int argc, char* argv[]) bool useRts{false}; bool use80Plus80{false}; uint16_t mpduBufferSize{512}; + std::string emlsrMgrTypeId{"ns3::DefaultEmlsrManager"}; std::string emlsrLinks; uint16_t paddingDelayUsec{32}; uint16_t transitionDelayUsec{128}; @@ -182,6 +183,7 @@ main(int argc, char* argv[]) "Whether the third link operates in the 2.4, 5 or 6 GHz band (0 means the device has up to " "two links, otherwise the band must be different than first link and second link)", frequency3); + cmd.AddValue("emlsrMgrTypeId", "The ns-3 TypeId of the EMLSR manager to use", emlsrMgrTypeId); cmd.AddValue("emlsrLinks", "The comma separated list of IDs of EMLSR links (for MLDs only)", emlsrLinks); @@ -433,7 +435,7 @@ main(int argc, char* argv[]) phy.Set("ChannelSwitchDelay", TimeValue(channelSwitchDelay)); mac.SetType("ns3::StaWifiMac", "Ssid", SsidValue(ssid)); - mac.SetEmlsrManager("ns3::DefaultEmlsrManager", + mac.SetEmlsrManager(emlsrMgrTypeId, "EmlsrLinkSet", StringValue(emlsrLinks), "EmlsrPaddingDelay",