%description: Test shutdown and startup operations on EtherAppCli/EtherAppSrv/EtherLLC modules. The EtherSwitch, EtherMAC modules tested, too. sender[0] and recip start at down %#-------------------------------------------------------------------------------------------------------------- %inifile: omnetpp.ini [General] network = Test tkenv-plugin-path = ../../../etc/plugins ned-path = .;../../../../src;../../lib cmdenv-express-mode = false #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" **.hasStatus = true *.sender[0].*.initialStatus = "down" *.recip.*.initialStatus = "down" **.scenarioManager.script = xmldoc("scenario.xml") # app config **.sender[0].cli.startTime = 1.0s **.sender[1].cli.startTime = 1.1s **.sender[*].cli.sendInterval = 0.5s **.sender[*].cli.stopTime = 10s **.sender[*].cli.reqLength = 800B **.sender[*].cli.respLength = 100B **.sender[*].cli.destAddress = "recip" %#-------------------------------------------------------------------------------------------------------------- %file: test.ned import inet.common.lifecycle.LifecycleController; import inet.node.ethernet.EtherHost; import inet.node.ethernet.EtherSwitch; import inet.common.scenario.ScenarioManager; network Test { submodules: scenarioManager: ScenarioManager { @display("p=450,50"); } lifecycleController: LifecycleController { @display("p=150,50"); } sender[2]: EtherHost { @display("p=100,350,r,150"); } recip: EtherHost { @display("p=500,350"); } switch: EtherSwitch { @display("p=300,180"); } connections: sender[0].ethg <--> { datarate = 10Mbps; delay = 10us; } <--> switch.ethg++; sender[1].ethg <--> { datarate = 10Mbps; delay = 10us; } <--> switch.ethg++; recip.ethg <--> { datarate = 10Mbps; delay = 10us; } <--> switch.ethg++; } %#-------------------------------------------------------------------------------------------------------------- %file: scenario.xml %#-------------------------------------------------------------------------------------------------------------- %subst: /DEBUG: // %#-------------------------------------------------------------------------------------------------------------- %#-------------------------------------------------------------------------------------------------------------- %# sender[0] %#-------------------------------------------------------------------------------------------------------------- %not-contains-regex: stdout \*\* Event \#\d+ t=[01](\.d+)? Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-\d+' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=2 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Test\.sender\[0\] starting up Doing stage 1/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Doing stage 2/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Doing stage 3/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Doing stage 4/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Doing stage 5/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Doing stage 6/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Starting application Test\.sender\[0\]\.srv registering DSAP 241 Doing stage 7/8 of operation inet::NodeStartOperation on Test\.sender\[0\] Test\.sender\[0\] started \*\* Event #\d+ t= %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=2 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Test\.sender\[0\]\.cli registering DSAP 240 Generating packet `req-\d+-1' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=2\.5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-2' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=3 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-3' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=3\.5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-4' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=4 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-5' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=4\.5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-6' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-7' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=5\.5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-8' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=6 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-9' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=6\.5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-10' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=7 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-11' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=7\.5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-12' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=8 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-13' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=8\.5 Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-14' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=9 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test.sender\[0\] Test\.sender\[0\] shutting down Doing stage 1/8 of operation inet::NodeShutdownOperation on Test\.sender\[0\] Stop the application Doing stage 2/8 of operation inet::NodeShutdownOperation on Test\.sender\[0\] Doing stage 3/8 of operation inet::NodeShutdownOperation on Test\.sender\[0\] Doing stage 4/8 of operation inet::NodeShutdownOperation on Test\.sender\[0\] Doing stage 5/8 of operation inet::NodeShutdownOperation on Test\.sender\[0\] Doing stage 6/8 of operation inet::NodeShutdownOperation on Test\.sender\[0\] Doing stage 7/8 of operation inet::NodeShutdownOperation on Test\.sender\[0\] Test\.sender\[0\] shut down %#-------------------------------------------------------------------------------------------------------------- %not-contains-regex: stdout \*\* Event \#\d+ t=9(\.d+)? Test\.sender\[0\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-\d+' %#-------------------------------------------------------------------------------------------------------------- %#-------------------------------------------------------------------------------------------------------------- %# sender[1] %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=1.1 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Test\.sender\[1\]\.cli registering DSAP 240 Generating packet `req-\d+-1' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=1\.6 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-2' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=2\.1 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-3' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=2\.6 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-4' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=3\.1 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-5' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=3\.6 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-6' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=4\.1 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-7' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=4\.6 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-8' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=5\.1 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test.sender\[1\] Test\.sender\[1\] shutting down Doing stage 1/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Stop the application Doing stage 2/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 3/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 4/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 5/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 6/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 7/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Test\.sender\[1\] shut down %#-------------------------------------------------------------------------------------------------------------- %not-contains-regex: stdout \*\* Event \#\d+ t=5(\.d+)? Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-\d+' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=6\.1 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Test\.sender\[1\] starting up Doing stage 1/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Doing stage 2/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Doing stage 3/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Doing stage 4/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Doing stage 5/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Doing stage 6/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Starting application Test\.sender\[1\]\.srv registering DSAP 241 Doing stage 7/8 of operation inet::NodeStartOperation on Test\.sender\[1\] Test.sender\[1\] started \*\* Event #\d+ t= %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=6\.1 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Test\.sender\[1\]\.cli registering DSAP 240 Generating packet `req-\d+-9' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=6\.6 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-10' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=7\.1 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-11' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=7\.6 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-12' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=8\.1 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-13' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event \#\d+ t=8\.6 Test\.sender\[1\]\.cli \(EtherAppCli, id=\d+\) Generating packet `req-\d+-14' %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=9\.1 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test.sender\[1\] Test\.sender\[1\] shutting down Doing stage 1/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Stop the application Doing stage 2/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 3/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 4/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 5/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 6/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Doing stage 7/8 of operation inet::NodeShutdownOperation on Test\.sender\[1\] Test\.sender\[1\] shut down %#-------------------------------------------------------------------------------------------------------------- %#-------------------------------------------------------------------------------------------------------------- %# recip %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=1\.7 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeStartOperation on Test\.recip Test\.recip starting up Doing stage 1/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 2/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 3/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 4/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 5/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 6/8 of operation inet::NodeStartOperation on Test\.recip Starting application Test\.recip\.srv registering DSAP 241 Doing stage 7/8 of operation inet::NodeStartOperation on Test\.recip Test\.recip started \*\* Event #\d+ t= %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=3\.2 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test.recip Test\.recip shutting down Doing stage 1/8 of operation inet::NodeShutdownOperation on Test\.recip Stop the application Doing stage 2/8 of operation inet::NodeShutdownOperation on Test\.recip Doing stage 3/8 of operation inet::NodeShutdownOperation on Test\.recip Doing stage 4/8 of operation inet::NodeShutdownOperation on Test\.recip Doing stage 5/8 of operation inet::NodeShutdownOperation on Test\.recip Doing stage 6/8 of operation inet::NodeShutdownOperation on Test\.recip Doing stage 7/8 of operation inet::NodeShutdownOperation on Test\.recip Test\.recip shut down \*\* Event #\d+ t= %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=4\.2 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeStartOperation on Test\.recip Test\.recip starting up Doing stage 1/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 2/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 3/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 4/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 5/8 of operation inet::NodeStartOperation on Test\.recip Doing stage 6/8 of operation inet::NodeStartOperation on Test\.recip Starting application Test\.recip\.srv registering DSAP 241 Doing stage 7/8 of operation inet::NodeStartOperation on Test\.recip Test\.recip started \*\* Event #\d+ t= %#-------------------------------------------------------------------------------------------------------------- %#-------------------------------------------------------------------------------------------------------------- %# switch %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=7\.3 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test.switch Test\.switch shutting down Doing stage 1/8 of operation inet::NodeShutdownOperation on Test\.switch Doing stage 2/8 of operation inet::NodeShutdownOperation on Test\.switch Doing stage 3/8 of operation inet::NodeShutdownOperation on Test\.switch Doing stage 4/8 of operation inet::NodeShutdownOperation on Test\.switch Doing stage 5/8 of operation inet::NodeShutdownOperation on Test\.switch Doing stage 6/8 of operation inet::NodeShutdownOperation on Test\.switch Doing stage 7/8 of operation inet::NodeShutdownOperation on Test\.switch Test\.switch shut down \*\* Event #\d+ t= %#-------------------------------------------------------------------------------------------------------------- %contains-regex: stdout \*\* Event #\d+ t=8\.3 Test\.scenarioManager \(ScenarioManager, id=\d+\) processing command\.\.\. Doing stage 0/8 of operation inet::NodeStartOperation on Test\.switch Test\.switch starting up Doing stage 1/8 of operation inet::NodeStartOperation on Test\.switch Doing stage 2/8 of operation inet::NodeStartOperation on Test\.switch Doing stage 3/8 of operation inet::NodeStartOperation on Test\.switch Doing stage 4/8 of operation inet::NodeStartOperation on Test\.switch Doing stage 5/8 of operation inet::NodeStartOperation on Test\.switch Doing stage 6/8 of operation inet::NodeStartOperation on Test\.switch Doing stage 7/8 of operation inet::NodeStartOperation on Test\.switch Test\.switch started \*\* Event #\d+ t= %#-------------------------------------------------------------------------------------------------------------- %#-------------------------------------------------------------------------------------------------------------- %# result.sca %#-------------------------------------------------------------------------------------------------------------- %contains: results/General-0.sca scalar Test.sender[0].cli sentPk:count 14 attr %#-------------------------------------------------------------------------------------------------------------- %contains: results/General-0.sca scalar Test.sender[0].cli rcvdPk:count 10 attr %#-------------------------------------------------------------------------------------------------------------- %contains: results/General-0.sca scalar Test.sender[1].cli sentPk:count 14 attr %#-------------------------------------------------------------------------------------------------------------- %contains: results/General-0.sca scalar Test.sender[1].cli rcvdPk:count 8 attr %#-------------------------------------------------------------------------------------------------------------- %contains: results/General-0.sca scalar Test.recip.srv rcvdPk:count 18 attr %#-------------------------------------------------------------------------------------------------------------- %contains: results/General-0.sca scalar Test.recip.srv sentPk:count 18 attr %#-------------------------------------------------------------------------------------------------------------- %not-contains: stdout undisposed object: %not-contains: stdout -- check module destructor %#--------------------------------------------------------------------------------------------------------------