Permalink
Browse files

examples: added a simulation with wired hosts and a wireless host and…

… an access point with UDP communication

--example
  • Loading branch information...
1 parent e86e84d commit 68c20aef904f2024025c24a744bda32cbfc58110 @ZoltanBojthe ZoltanBojthe committed Aug 23, 2012
@@ -0,0 +1,47 @@
+//
+// This program is property of its copyright holder. All rights reserved.
+//
+
+package inet.examples.wireless.wiredandwirelesshostswithap;
+
+import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
+import inet.nodes.ethernet.Eth100M;
+import inet.nodes.inet.Router;
+import inet.nodes.inet.StandardHost;
+import inet.nodes.inet.WirelessHost;
+import inet.nodes.wireless.AccessPoint;
+import inet.world.radio.ChannelControl;
+
+
+network WiredAndWirelessHostsWithAP
+{
+ @display("bgb=503,221");
+ submodules:
+ wirelessHost1: WirelessHost {
+ @display("p=62,69");
+ }
+ wiredHost1: StandardHost {
+ @display("p=296,134");
+ }
+ wiredHost2: StandardHost {
+ @display("p=412,70");
+ }
+ router: Router {
+ @display("p=296,69");
+ }
+ accessPoint: AccessPoint {
+ @display("p=205,69");
+ }
+ iPv4NetworkConfigurator: IPv4NetworkConfigurator {
+ parameters:
+ assignDisjunctSubnetAddresses = false;
+ @display("p=367,165");
+ }
+ channelControl: ChannelControl {
+ @display("p=115,165");
+ }
+ connections:
+ accessPoint.ethg++ <--> Eth100M <--> router.ethg++;
+ wiredHost1.ethg++ <--> Eth100M <--> accessPoint.ethg++;
+ wiredHost2.ethg++ <--> Eth100M <--> router.ethg++;
+}
@@ -0,0 +1,34 @@
+[General]
+
+sim-time-limit = 400s
+tkenv-plugin-path = ../../../etc/plugins
+
+network = WiredAndWirelessHostsWithAP
+
+
+**.*Host*.numUdpApps = 3
+
+**.*Host*.udpApp[0].typename = "UDPEchoApp"
+**.*Host*.udpApp[0].localPort = 1000
+
+**.*Host*.udpApp[*].typename = "UDPBasicApp"
+**.wiredHost1.udpApp[1].destAddresses = "wirelessHost1"
+**.wiredHost1.udpApp[2].destAddresses = "wiredHost2"
+**.wiredHost2.udpApp[1].destAddresses = "wirelessHost1"
+**.wiredHost2.udpApp[2].destAddresses = "wiredHost1"
+**.wirelessHost1.udpApp[1].destAddresses = "wiredHost1"
+**.wirelessHost1.udpApp[2].destAddresses = "wiredHost2"
+**.*Host*.udpApp[1..].destPort = 1000
+**.*Host*.udpApp[1..].messageLength = 100B
+**.*Host*.udpApp[1..].sendInterval = 1s
+**.*Host*.udpApp[1..].stopTime = 300s
+
+*.iPv4NetworkConfigurator.config = xml( \
+ "<config> \
+ <interface hosts='wirelessHost1 wiredHost1' address='10.0.1.x' netmask='255.255.255.0'/> \
+ <interface hosts='router' names='eth0' address='10.0.1.x' netmask='255.255.255.0'/> \
+ <interface among='router wiredHost2' address='10.0.2.x' netmask='255.255.255.0'/> \
+ <route hosts='wirelessHost1' gateway='router>accessPoint' destination='10.0.2.0' netmask='255.255.255.0' interface='wlan0' /> \
+ <route hosts='wiredHost1' gateway='router>accessPoint' destination='10.0.2.0' netmask='255.255.255.0' /> \
+ <route hosts='wiredHost2' gateway='router>wiredHost2' destination='10.0.1.0' netmask='255.255.255.0' /> \
+ </config>")
@@ -236,3 +236,4 @@
/examples/wireless/synchronized/, -f omnetpp.ini -c NonSynchronized -r 0, 2s, da44-c60b
/examples/wireless/throughput/, -f omnetpp.ini -c Throughput1 -r 0, 20s, e023-1ed2
/examples/wireless/throughput/, -f omnetpp.ini -c Throughput2 -r 0, 10s, 8a77-7fb2
+/examples/wireless/wiredandwirelesshostswithap/, -f omnetpp.ini -c General -r 0, 100s, b457-7c3c
View
@@ -266,3 +266,4 @@
/examples/wireless/synchronized/, -f omnetpp.ini -c NonSynchronized -r 0
/examples/wireless/throughput/, -f omnetpp.ini -c Throughput1 -r 0
/examples/wireless/throughput/, -f omnetpp.ini -c Throughput2 -r 0
+/examples/wireless/wiredandwirelesshostswithap/, -f omnetpp.ini -c General -r 0

0 comments on commit 68c20ae

Please sign in to comment.