From: Martin Quinson Date: Sun, 22 Sep 2019 23:19:48 +0000 (+0200) Subject: Merge the two wifi platform files X-Git-Tag: v3.24~68^2^2~14 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a0ce9032017812a92ac71ae557ff6883924314b8 Merge the two wifi platform files And rename the result to simply 'wifi.xml' --- diff --git a/examples/platforms/wifi.xml b/examples/platforms/wifi.xml new file mode 100755 index 0000000000..fed5614afa --- /dev/null +++ b/examples/platforms/wifi.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/platforms/wifi/1STA-1LINK-1NODE.xml b/examples/platforms/wifi/1STA-1LINK-1NODE.xml deleted file mode 100755 index 19991cb9cf..0000000000 --- a/examples/platforms/wifi/1STA-1LINK-1NODE.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/platforms/wifi/2STA.xml b/examples/platforms/wifi/2STA.xml deleted file mode 100755 index bcd9711034..0000000000 --- a/examples/platforms/wifi/2STA.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/teshsuite/surf/wifi_usage/1STA-1LINK-1NODE.tesh b/teshsuite/surf/wifi_usage/1STA-1LINK-1NODE.tesh index accf3d0af9..05194f7883 100644 --- a/teshsuite/surf/wifi_usage/1STA-1LINK-1NODE.tesh +++ b/teshsuite/surf/wifi_usage/1STA-1LINK-1NODE.tesh @@ -1,12 +1,12 @@ #!/usr/bin/env tesh p Test WITH crosstraffic -$ ${bindir:=.}/1STA-1LINK-1NODE ${platfdir}/wifi/1STA-1LINK-1NODE.xml +$ ${bindir:=.}/1STA-1LINK-1NODE ${platfdir}/wifi.xml > [Station 1:sender:(1) 0.000156] [simulator/INFO] Station 1 sent 1000 bytes to NODE1 in 0.000156 seconds from 0.000000 to 0.000156 > [0.000156] [simulator/INFO] Simulation took 0.000156s p Test WITHOUT crosstraffic -$ ${bindir:=.}/1STA-1LINK-1NODE ${platfdir}/wifi/1STA-1LINK-1NODE.xml --cfg=network/crosstraffic:0 +$ ${bindir:=.}/1STA-1LINK-1NODE ${platfdir}/wifi.xml --cfg=network/crosstraffic:0 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/crosstraffic' to '0' > [Station 1:sender:(1) 0.000148] [simulator/INFO] Station 1 sent 1000 bytes to NODE1 in 0.000148 seconds from 0.000000 to 0.000148 > [0.000148] [simulator/INFO] Simulation took 0.000148s diff --git a/teshsuite/surf/wifi_usage/2STA.cpp b/teshsuite/surf/wifi_usage/2STA.cpp index a8d1dbe95c..1ac77c17a5 100644 --- a/teshsuite/surf/wifi_usage/2STA.cpp +++ b/teshsuite/surf/wifi_usage/2STA.cpp @@ -46,14 +46,14 @@ void setup_simulation() { std::vector args, noArgs; - args.push_back("STA2"); + args.push_back("Station 2"); args.push_back("1000"); - simgrid::s4u::Actor::create("STA1", simgrid::s4u::Host::by_name("STA1"), flowActor, args); - simgrid::s4u::Actor::create("STA2", simgrid::s4u::Host::by_name("STA2"), flowActor, noArgs); + simgrid::s4u::Actor::create("sender", simgrid::s4u::Host::by_name("Station 1"), flowActor, args); + simgrid::s4u::Actor::create("receiver", simgrid::s4u::Host::by_name("Station 2"), flowActor, noArgs); simgrid::kernel::resource::NetworkWifiLink* l = (simgrid::kernel::resource::NetworkWifiLink*)simgrid::s4u::Link::by_name("AP1")->get_impl(); - l->set_host_rate(simgrid::s4u::Host::by_name("STA1"), 0); - l->set_host_rate(simgrid::s4u::Host::by_name("STA2"), 0); + l->set_host_rate(simgrid::s4u::Host::by_name("Station 1"), 0); + l->set_host_rate(simgrid::s4u::Host::by_name("Station 2"), 0); } static void flowActor(std::vector args) diff --git a/teshsuite/surf/wifi_usage/2STA.tesh b/teshsuite/surf/wifi_usage/2STA.tesh index d06cd8f76e..b0cf6a2e4d 100644 --- a/teshsuite/surf/wifi_usage/2STA.tesh +++ b/teshsuite/surf/wifi_usage/2STA.tesh @@ -1,10 +1,10 @@ #!/usr/bin/env tesh -$ ${bindir:=.}/2STA ${platfdir}/wifi/2STA.xml --cfg=network/crosstraffic:0 +$ ${bindir:=.}/2STA ${platfdir}/wifi.xml --cfg=network/crosstraffic:0 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/crosstraffic' to '0' -> [STA1:STA1:(1) 0.000296] [simulator/INFO] STA1 sent 1000 bytes to STA2 in 0.000296 seconds from 0.000000 to 0.000296 +> [Station 1:sender:(1) 0.000296] [simulator/INFO] Station 1 sent 1000 bytes to Station 2 in 0.000296 seconds from 0.000000 to 0.000296 > [0.000296] [simulator/INFO] Simulation took 0.000296s -$ ${bindir:=.}/2STA ${platfdir}/wifi/2STA.xml -> [STA1:STA1:(1) 0.000311] [simulator/INFO] STA1 sent 1000 bytes to STA2 in 0.000311 seconds from 0.000000 to 0.000311 +$ ${bindir:=.}/2STA ${platfdir}/wifi.xml +> [Station 1:sender:(1) 0.000311] [simulator/INFO] Station 1 sent 1000 bytes to Station 2 in 0.000311 seconds from 0.000000 to 0.000311 > [0.000311] [simulator/INFO] Simulation took 0.000311s