pingapp_lifecycle_2.test 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. %description:
  2. Test ping start followed by node shutdown.
  3. %inifile: omnetpp.ini
  4. [General]
  5. network = Test
  6. tkenv-plugin-path = ../../../etc/plugins
  7. ned-path = .;../../../../src;../../lib
  8. cmdenv-express-mode = false
  9. #omnetpp 5.0 - 5.1 compatibility:
  10. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  11. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  12. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  13. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  14. *.host.numPingApps = 1
  15. *.host.pingApp[0].destAddr = "192.168.0.42"
  16. *.host.pingApp[0].startTime = 3s
  17. *.host.networkLayer.configurator.networkConfiguratorModule = ""
  18. **.hasStatus = true
  19. **.scenarioManager.script = xmldoc("scenario.xml")
  20. %file: test.ned
  21. import inet.node.inet.StandardHost;
  22. import inet.common.lifecycle.LifecycleController;
  23. import inet.common.scenario.ScenarioManager;
  24. network Test
  25. {
  26. submodules:
  27. scenarioManager: ScenarioManager;
  28. lifecycleController: LifecycleController;
  29. host: StandardHost;
  30. }
  31. %file: scenario.xml
  32. <scenario>
  33. <at t="6.0">
  34. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  35. </at>
  36. </scenario>
  37. %#--------------------------------------------------------------------------------------------------------------
  38. %subst: /DEBUG: //
  39. %contains-regex: stdout
  40. .*Event #\d+ t=3 Test\.host\.pingApp\[0\] \(PingApp, id=\d+\)
  41. Starting up: dest=192\.168\.0\.42 src=<none>seqNo=0
  42. Sending ping request #0 to lower layer\.
  43. .*
  44. \*\* Event #\d+ t=5 Test\.host\.pingApp\[0\] \(PingApp, id=\d+\)
  45. Sending ping request #2 to lower layer\.
  46. .*
  47. \*\* Event #\d+ t=6 Test\.scenarioManager \(ScenarioManager, id=2\)
  48. processing <at> command\.\.\.
  49. processing <tell> command\.\.\.
  50. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test\.host
  51. .*
  52. Doing stage 7/8 of operation inet::NodeShutdownOperation on Test\.host
  53. Test\.host shut down
  54. <!> No more events
  55. %#--------------------------------------------------------------------------------------------------------------
  56. %not-contains: stdout
  57. undisposed object:
  58. %not-contains: stdout
  59. -- check module destructor
  60. %#--------------------------------------------------------------------------------------------------------------