--- /dev/null
+<?xml version='1.0'?>
+
+<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+<platform version="4.1">
+ <zone id="world" routing="Full">
+
+ <zone id="WIFI zone" routing="Cluster">
+ <!-- First declare the Access Point (ie, the wifi media) -->
+ <link id="AP1" sharing_policy="WIFI" bandwidth="54Mbps" latency="0ms" />
+
+ <!-- Two stations in the wifi zone -->
+ <host id="Station 1" speed="100.0Mf,50.0Mf,20.0Mf" />
+ <host id="Station 2" speed="100.0Mf,50.0Mf,20.0Mf" />
+
+ <!-- Specify that stations use the WIFI link for every communication (incoming or outgoing) -->
+ <host_link id="Station 1" up="AP1" down="AP1"/>
+ <host_link id="Station 2" up="AP1" down="AP1"/>
+
+ <router id="WIFI router"/>
+ </zone>
+
+
+ <!-- NODE1 AS -->
+ <zone id="Wired zone" routing="Full">
+ <host id="NODE1" speed="100.0Mf,50.0Mf,20.0Mf" />
+ </zone>
+
+
+ <!-- AS Routing -->
+ <link id="Collector" sharing_policy="SHARED" bandwidth="100Mbps" latency="0ms" />
+ <zoneRoute src="WIFI zone" dst="Wired zone" gw_src="WIFI router" gw_dst="NODE1">
+ <link_ctn id="Collector" />
+ </zoneRoute>
+
+ </zone>
+</platform>
+++ /dev/null
-<?xml version='1.0'?>
-
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
- <zone id="world" routing="Full">
-
- <!-- WIFI cell -->
- <zone id="AP1 zone" routing="Cluster">
- <host id="STA1" speed="100.0Mf,50.0Mf,20.0Mf" />
- <router id="AP1 router"/>
-
- <!-- Access Point -->
- <link id="AP1" sharing_policy="WIFI" bandwidth="54Mbps" latency="0ms" />
-
- <host_link id="STA1" up="AP1" down="AP1"/>
- </zone>
-
-
- <!-- NODE1 AS -->
- <zone id="AS1" routing="Full">
- <host id="NODE1" speed="100.0Mf,50.0Mf,20.0Mf" />
- </zone>
-
-
- <!-- AS Routing -->
- <link id="LINK1" sharing_policy="SHARED" bandwidth="100Mbps" latency="0ms" />
- <zoneRoute src="AP1 zone" dst="AS1" gw_src="AP1 router" gw_dst="NODE1">
- <link_ctn id="LINK1" />
- </zoneRoute>
-
- </zone>
-</platform>
+++ /dev/null
-<?xml version='1.0'?>
-
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
- <zone id="world" routing="Cluster">
- <!-- Access Point -->
- <link id="AP1" sharing_policy="WIFI" bandwidth="54Mbps" latency="0ms" />
-
- <host id="STA1" speed="100.0Mf,50.0Mf,20.0Mf" />
- <host_link id="STA1" up="AP1" down="AP1"/>
-
- <host id="STA2" speed="100.0Mf,50.0Mf,20.0Mf" />
- <host_link id="STA2" up="AP1" down="AP1"/>
- </zone>
-</platform>
#!/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
{
std::vector<std::string> 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<std::string> args)
#!/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