123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- //
- // This program is free software: you can redistribute it and/or modify
- // it under the terms of the GNU Lesser General Public License as published by
- // the Free Software Foundation, either version 3 of the License, or
- // (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU Lesser General Public License for more details.
- //
- // You should have received a copy of the GNU Lesser General Public License
- // along with this program. If not, see http://www.gnu.org/licenses/.
- //
- package inet.tutorials.visualization;
- //networkA
- import inet.visualizer.integrated.IntegratedVisualizer;
- import inet.common.geometry.common.OsgGeographicCoordinateSystem;
- //networkB
- import inet.node.inet.WirelessHost;
- import inet.node.wireless.AccessPoint;
- import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
- import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
- //networkC
- import inet.node.ethernet.EtherSwitch;
- import inet.node.inet.Router;
- import inet.node.inet.StandardHost;
- import inet.node.ethernet.Eth100M;
- import inet.node.ethernet.Eth1G;
- //networkE
- import inet.environment.common.PhysicalEnvironment;
- //
- // TODO documentation
- //
- network VisualizationA
- {
- parameters:
- @display("bgb=0,0");
- submodules:
- visualizer: IntegratedVisualizer {
- parameters:
- @display("p=100,50");
- }
- }
- network VisualizationB extends VisualizationA
- {
- submodules:
- coordinateSystem: OsgGeographicCoordinateSystem {
- parameters:
- @display("p=100,150");
- }
- }
- network VisualizationC extends VisualizationB
- {
- parameters:
- @display("bgb=800,800");
- }
- network VisualizationD extends VisualizationC
- {
- submodules:
- pedestrian0: WirelessHost {
- parameters:
- @display("p=398,89;i=device/cellphone");
- }
- pedestrian1: WirelessHost {
- parameters:
- @display("p=548,89;i=device/cellphone");
- }
- accessPoint0: AccessPoint {
- parameters:
- @display("p=487,163");
- }
- configurator: IPv4NetworkConfigurator {
- parameters:
- @display("p=100,250");
- }
- radioMedium: Ieee80211ScalarRadioMedium {
- parameters:
- @display("p=100,350");
- }
- }
- network VisualizationE extends VisualizationD
- {
- submodules:
- pedestrianVideo: WirelessHost {
- parameters:
- @display("p=351,164;i=device/wifilaptop");
- }
- router0: Router {
- parameters:
- @display("p=487,234;i=abstract/router");
- }
- switch0: EtherSwitch {
- parameters:
- @display("p=416,327");
- }
- videoStreamServer: StandardHost {
- parameters:
- @display("p=487,470");
- }
- connections:
- accessPoint0.ethg++ <--> Eth100M <--> router0.ethg++;
- switch0.ethg++ <--> Eth100M <--> router0.ethg++;
- videoStreamServer.ethg++ <--> Eth100M <--> switch0.ethg++;
- }
- network VisualizationF extends VisualizationE
- {
- submodules:
- accessPoint1: AccessPoint {
- parameters:
- @display("p=601,163");
- }
- router1: Router {
- parameters:
- @display("p=601,234;i=abstract/router");
- }
- connections:
- router0.pppg++ <--> Eth100M <--> router1.pppg++;
- accessPoint1.ethg++ <--> Eth100M <--> router1.ethg++;
- }
- network VisualizationG extends VisualizationF
- {
- submodules:
- physicalEnvironment: PhysicalEnvironment {
- parameters:
- @display("p=100,450");
- }
- }
- network VisualizationH extends VisualizationG
- {
- submodules:
- car: WirelessHost {
- @display("p=215,122");
- }
- accessPoint2: AccessPoint {
- @display("p=215,233");
- }
- router2: Router {
- @display("p=316,234");
- }
- accessPoint3: AccessPoint {
- @display("p=215,298");
- }
- tcpHost[2]: StandardHost {
- @display("p=650,431");
- }
- switch1: EtherSwitch {
- @display("p=660,250");
- }
- router3: Router {
- @display("p=316,299");
- }
- connections:
- router0.pppg++ <--> Eth100M <--> router2.pppg++;
- router2.ethg++ <--> Eth100M <--> accessPoint2.ethg++;
- switch0.ethg++ <--> Eth100M <--> tcpHost[0].ethg++;
- switch1.ethg++ <--> Eth100M <--> tcpHost[1].ethg++;
- router1.ethg++ <--> Eth100M <--> switch1.ethg++;
- router0.pppg++ <--> Eth100M <--> router3.pppg++;
- accessPoint3.ethg++ <--> Eth100M <--> router3.ethg++;
- }
|