123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- //
- // Copyright (C) 2014
- //
- // 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.examples.aodv;
- import inet.common.lifecycle.LifecycleController;
- import inet.common.scenario.ScenarioManager;
- import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
- import inet.networklayer.ipv4.RoutingTableRecorder;
- import inet.node.aodv.AODVRouter;
- import inet.physicallayer.idealradio.IdealRadioMedium;
- network SimpleRREQ
- {
- parameters:
- @display("bgb=525,437");
- submodules:
- radioMedium: IdealRadioMedium {
- parameters:
- @display("p=50,50");
- }
- configurator: IPv4NetworkConfigurator {
- parameters:
- addDefaultRoutes = false;
- addStaticRoutes = false;
- addSubnetRoutes = false;
- config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
- @display("p=50,100");
- }
- routingTableRecorder: RoutingTableRecorder {
- parameters:
- @display("p=50,150");
- }
- lifecycleController: LifecycleController {
- parameters:
- @display("p=50,200");
- }
- scenarioManager: ScenarioManager {
- parameters:
- script = default(xml("<scenario/>"));
- @display("p=50,250");
- }
- sender: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=270,51");
- }
- intermediateNode: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=270,214");
- }
- receiver: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=270,377");
- }
- connections allowunconnected:
- }
- network SimpleRREQ2
- {
- parameters:
- @display("bgb=961,662");
- submodules:
- radioMedium: IdealRadioMedium {
- parameters:
- @display("p=50,50");
- }
- configurator: IPv4NetworkConfigurator {
- parameters:
- addDefaultRoutes = false;
- addStaticRoutes = false;
- addSubnetRoutes = false;
- config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
- @display("p=50,100");
- }
- routingTableRecorder: RoutingTableRecorder {
- parameters:
- @display("p=50,150");
- }
- lifecycleController: LifecycleController {
- parameters:
- @display("p=50,200");
- }
- scenarioManager: ScenarioManager {
- parameters:
- script = default(xml("<scenario/>"));
- @display("p=50,250");
- }
- sender: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=284,51");
- }
- intermediateNodeA: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=203,206");
- }
- intermediateNodeB: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=386,206");
- }
- receiver: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=284,378");
- }
- connections allowunconnected:
- }
- network ShortestPath
- {
- parameters:
- @display("bgb=961,662");
- submodules:
- radioMedium: IdealRadioMedium {
- parameters:
- @display("p=50,50");
- }
- configurator: IPv4NetworkConfigurator {
- parameters:
- addDefaultRoutes = false;
- addStaticRoutes = false;
- addSubnetRoutes = false;
- config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
- @display("p=50,100");
- }
- routingTableRecorder: RoutingTableRecorder {
- parameters:
- @display("p=50,150");
- }
- lifecycleController: LifecycleController {
- parameters:
- @display("p=50,200");
- }
- scenarioManager: ScenarioManager {
- parameters:
- script = default(xml("<scenario/>"));
- @display("p=50,250");
- }
- sender: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=283,63");
- }
- intermediateNodeA: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=203,206");
- }
- intermediateNodeB: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=385,256");
- }
- intermediateNodeC: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=292,325");
- }
- receiver: AODVRouter {
- parameters:
- @display("i=device/pocketpc_s;r=,,#707070;p=292,454");
- }
- connections allowunconnected:
- }
|