123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- %description:
- This example tests the AODV's lifecycle capability. When intermediateNodeA shuts down at 12.3s
- sender gets a link break signal and then discovers a new route to the receiver node.
- %#--------------------------------------------------------------------------------------------------------------
- %file: test.ned
- import inet.common.lifecycle.LifecycleController;
- import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
- import inet.networklayer.ipv4.RoutingTableRecorder;
- import inet.node.aodv.AODVRouter;
- import inet.physicallayer.idealradio.IdealRadioMedium;
- import inet.common.scenario.ScenarioManager;
- network AODVTest
- {
- 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:
- }
- %#--------------------------------------------------------------------------------------------------------------
- %inifile: omnetpp.ini
- [General]
- network = AODVTest
- record-eventlog = true
- sim-time-limit = 100s
- num-rngs = 3
- tkenv-plugin-path = ../../../etc/plugins
- ned-path = .;../../../../src;../../lib
- #omnetpp 5.0 - 5.1 compatibility:
- eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
- output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
- output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
- snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
- **.mobility.rng-0 = 1
- **.wlan[*].mac.rng-0 = 2
- **.aodv.useHelloMessages = false
- *.sender.aodv.jitter = 1ms
- *.receiver.aodv.jitter = 2ms
- *.intermediateNodeA.aodv.jitter = 3ms
- *.intermediateNodeB.aodv.jitter = 4ms
- # mobility
- **.mobilityType = "StationaryMobility"
- **.mobility.constraintAreaMinZ = 0m
- **.mobility.constraintAreaMaxZ = 0m
- **.mobility.constraintAreaMinX = 0m
- **.mobility.constraintAreaMinY = 0m
- **.mobility.constraintAreaMaxX = 600m
- **.mobility.constraintAreaMaxY = 600m
- # ping app (host[0] pinged by others)
- **.sender.numPingApps = 1
- **.sender.pingApp[0].startTime = uniform(1s,5s)
- **.sender.pingApp[0].printPing = true
- **.sender.pingApp[0].destAddr = "receiver(ipv4)"
- # nic settings
- **.wlan[*].typename = "IdealWirelessNic"
- **.wlan[*].radio.transmitter.communicationRange = 240m
- **.wlan[*].bitrate = 2Mbps
- **.wlan[*].mac.address = "auto"
- **.wlan[*].mac.headerLength = 20B
- **.hasStatus = true
- *.scenarioManager.script = xmldoc("scenario.xml")
- %#--------------------------------------------------------------------------------------------------------------
- %file: scenario.xml
- <scenario>
- <at t="12.3">
- <tell module="lifecycleController" target="intermediateNodeA" operation="NodeShutdownOperation"/>
- </at>
- </scenario>
- %#--------------------------------------------------------------------------------------------------------------
- %contains-regex: results/General-0.rt
- \+R \d+ 3\.1965\d+ 8 145\.236\.0\.2 145\.236\.0\.1 32 145\.236\.0\.1
- \+R \d+ 3\.1965\d+ 9 145\.236\.0\.3 145\.236\.0\.1 32 145\.236\.0\.1
- \+R \d+ 3\.1998\d+ 7 145\.236\.0\.1 145\.236\.0\.2 32 145\.236\.0\.2
- \+R \d+ 3\.1998\d+ 9 145\.236\.0\.3 145\.236\.0\.2 32 145\.236\.0\.2
- \+R \d+ 3\.1998\d+ 10 145\.236\.0\.4 145\.236\.0\.2 32 145\.236\.0\.2
- \+R \d+ 3\.1998\d+ 10 145\.236\.0\.4 145\.236\.0\.1 32 145\.236\.0\.2
- \+R \d+ 3\.2004\d+ 8 145\.236\.0\.2 145\.236\.0\.4 32 145\.236\.0\.4
- \+R \d+ 3\.2008\d+ 8 145\.236\.0\.2 145\.236\.0\.3 32 145\.236\.0\.3
- \+R \d+ 3\.2008\d+ 7 145\.236\.0\.1 145\.236\.0\.3 32 145\.236\.0\.3
- \+R \d+ 3\.2008\d+ 10 145\.236\.0\.4 145\.236\.0\.3 32 145\.236\.0\.3
- \+R \d+ 3\.2041\d+ 7 145\.236\.0\.1 145\.236\.0\.4 32 145\.236\.0\.2
- \-R \d+ 12\.3 8 145\.236\.0\.2 145\.236\.0\.1 32 145\.236\.0\.1
- \-R \d+ 12\.3 8 145\.236\.0\.2 145\.236\.0\.3 32 145\.236\.0\.3
- \-R \d+ 12\.3 8 145\.236\.0\.2 145\.236\.0\.4 32 145\.236\.0\.4
- \-R \d+ 12\.3 8 145\.236\.0\.2 145\.236\.0\.0 16 <unspec>
- \-R \d+ 12\.3 8 145\.236\.0\.2 127\.0\.0\.0 8 <unspec>
- \*R \d+ 14\.2008\d+ 10 145\.236\.0\.4 145\.236\.0\.1 32 145\.236\.0\.3
- \+R \d+ 14\.2014\d+ 9 145\.236\.0\.3 145\.236\.0\.4 32 145\.236\.0\.4
- \*R \d+ 14\.2061\d+ 7 145\.236\.0\.1 145\.236\.0\.4 32 145\.236\.0\.3
- \-R \d+ 21\.1998\d+ 9 145\.236\.0\.3 145\.236\.0\.2 32 145\.236\.0\.2
- \-R \d+ 28\.2952\d+ 7 145\.236\.0\.1 145\.236\.0\.2 32 145\.236\.0\.2
- \-R \d+ 30\.1960\d+ 10 145\.236\.0\.4 145\.236\.0\.2 32 145\.236\.0\.2
- %#--------------------------------------------------------------------------------------------------------------
- %not-contains: stdout
- undisposed object:
- %not-contains: stdout
- -- check module destructor
- %#--------------------------------------------------------------------------------------------------------------
|