Files
scandocs/uni/masterarbeit/source/simulations/moversight/PeerPlacingNetwork.ned
2014-06-30 13:58:10 +02:00

72 lines
2.5 KiB
Plaintext

package ubeeme.moversight.simulations;
@namespace(ubeeme::moversight);
//
// @brief Represents a IEEE 802.11b WLAN channel
// delay = average packet delay (see also [1] fig. 8: 802.11 with 11Mbit/s)
// calculated depending on number of nodes n and delay
// n=5 , delay=0.005s = 5ms
// n=10, delay=0.01s = 10ms
// n=15, delay=0.015s = 15ms
// n=20, delay=0.02s = 20ms
//
// => delay = (0.05s / 4) = 0.0125s = 13ms
//
// quelle: [1]: http://www3.interscience.wiley.com/cgi-bin/fulltext/112622237/PDFSTART
//
import inet.networklayer.autorouting.FlatNetworkConfigurator;
import inet.nodes.ethernet.EtherSwitch;
import inet.nodes.inet.Router;
import ned.DatarateChannel;
import ubeeme.moversight.simulations.MoversightPeer;
channel WLAN2 extends ned.DatarateChannel
{
datarate = 11Mbps;
delay = 13ms;
per = 0.0;
}
network PeerPlacingNetwork
{
@display("bgl=2");
submodules:
configurator: FlatNetworkConfigurator;
p[15]: MoversightPeer{
parameters:
IPForward = false;
@display("i=device/laptop_s");
}
connections:
//master 1
p[0].pppg++ <--> WLAN2 <--> p[1].pppg++;
p[0].pppg++ <--> WLAN2 <--> p[2].pppg++;
p[0].pppg++ <--> WLAN2 <--> p[3].pppg++;
p[0].pppg++ <--> WLAN2 <--> p[4].pppg++;
p[0].pppg++ <--> WLAN2 <--> p[5].pppg++;
p[0].pppg++ <--> WLAN2 <--> p[10].pppg++;
//master 2
p[1].pppg++ <--> WLAN2 <--> p[2].pppg++;
p[1].pppg++ <--> WLAN2 <--> p[3].pppg++;
p[1].pppg++ <--> WLAN2 <--> p[4].pppg++;
p[1].pppg++ <--> WLAN2 <--> p[6].pppg++;
p[1].pppg++ <--> WLAN2 <--> p[11].pppg++;
//master 3
p[2].pppg++ <--> WLAN2 <--> p[3].pppg++;
p[2].pppg++ <--> WLAN2 <--> p[4].pppg++;
p[2].pppg++ <--> WLAN2 <--> p[7].pppg++;
p[2].pppg++ <--> WLAN2 <--> p[12].pppg++;
//master 4
p[3].pppg++ <--> WLAN2 <--> p[4].pppg++;
p[3].pppg++ <--> WLAN2 <--> p[8].pppg++;
p[3].pppg++ <--> WLAN2 <--> p[13].pppg++;
//master 5
p[4].pppg++ <--> WLAN2 <--> p[9].pppg++;
p[4].pppg++ <--> WLAN2 <--> p[14].pppg++;
//if master 1 leaves
p[5].pppg++ <--> WLAN2 <--> p[1].pppg++;
p[5].pppg++ <--> WLAN2 <--> p[2].pppg++;
p[5].pppg++ <--> WLAN2 <--> p[3].pppg++;
p[5].pppg++ <--> WLAN2 <--> p[4].pppg++;
p[5].pppg++ <--> WLAN2 <--> p[10].pppg++;
}