Skip to content
This repository has been archived by the owner on Oct 20, 2018. It is now read-only.

Commit

Permalink
Put hosts in vector
Browse files Browse the repository at this point in the history
getSimulation()->getSystemModule()->getSubmodule("host", 1);
  • Loading branch information
ZiroKyl committed Jun 24, 2017
1 parent 981659d commit f479cf4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
8 changes: 4 additions & 4 deletions LLTR/simulations/omnetpp.ini
Expand Up @@ -6,8 +6,8 @@ network = lltr.Network
**.csmacdSupport = false
**.eth[*].mac.duplexMode = true

**.host0.app[0].typename = "inet.applications.lltrapp.LLTRSuperApp"
**.host[0].app[0].typename = "inet.applications.lltrapp.LLTRSuperApp"

**.host?.numApps = 1
**.host?.app[0].typename = "inet.applications.lltrapp.LLTRApp"
**.host?.app[0].port = 1100
**.host[*].numApps = 1
**.host[*].app[0].typename = "inet.applications.lltrapp.LLTRApp"
**.host[*].app[0].port = 1100
31 changes: 19 additions & 12 deletions LLTR/simulations/package.ned
Expand Up @@ -10,23 +10,30 @@ import inet.node.ethernet.Eth100M;

network Network
{
@display("bgb=693,416,grey99");
parameters:
@display("bgb=693,416,grey99");
host[0].p_x=149; host[0].p_y=269;
host[1].p_x=149; host[1].p_y=141;
host[2].p_x=500; host[2].p_y=269;
host[3].p_x=500; host[3].p_y=141;
types:
module Host extends SimpleUdpTcpHost {
@display("p=$p_x,$p_y");
int p_x = default(0);
int p_y = default(0);
}
submodules:
configurator: IPv4NetworkConfigurator {
parameters:
@display("p=62,31");
config = xmldoc("config.xml");
@display("p=62,31");
config = xmldoc("config.xml");
}
switch0: EtherSwitch { @display("p=240,203"); }
switch1: EtherSwitch { @display("p=408,203"); }
host0: SimpleUdpTcpHost { @display("p=149,269"); }
host1: SimpleUdpTcpHost { @display("p=149,141"); }
host2: SimpleUdpTcpHost { @display("p=500,269"); }
host3: SimpleUdpTcpHost { @display("p=500,141"); }
host[4]: Host;
connections:
switch0.ethg++ <--> Eth100M <--> host0.ethg++;
switch0.ethg++ <--> Eth100M <--> host1.ethg++;
switch1.ethg++ <--> Eth100M <--> host2.ethg++;
switch1.ethg++ <--> Eth100M <--> host3.ethg++;
switch0.ethg++ <--> Eth100M <--> host[0].ethg++;
switch0.ethg++ <--> Eth100M <--> host[1].ethg++;
switch1.ethg++ <--> Eth100M <--> host[2].ethg++;
switch1.ethg++ <--> Eth100M <--> host[3].ethg++;
switch0.ethg++ <--> Eth100M <--> switch1.ethg++;
}

0 comments on commit f479cf4

Please sign in to comment.