pingapp_lifecycle_4.test 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. %description:
  2. Test ping stop 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 = 0s
  17. *.host.pingApp[0].stopTime = 4.1s
  18. *.host.networkLayer.configurator.networkConfiguratorModule = ""
  19. **.hasStatus = true
  20. **.scenarioManager.script = xmldoc("scenario.xml")
  21. %file: test.ned
  22. import inet.node.inet.StandardHost;
  23. import inet.common.lifecycle.LifecycleController;
  24. import inet.common.scenario.ScenarioManager;
  25. network Test
  26. {
  27. submodules:
  28. scenarioManager: ScenarioManager;
  29. lifecycleController: LifecycleController;
  30. host: StandardHost;
  31. }
  32. %#--------------------------------------------------------------------------------------------------------------
  33. %file: scenario.xml
  34. <scenario>
  35. <at t="6.0">
  36. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  37. </at>
  38. </scenario>
  39. %#--------------------------------------------------------------------------------------------------------------
  40. %subst: /DEBUG: //
  41. %contains-regex: stdout
  42. \*\* Event #\d+ t=0 Test\.host\.pingApp\[0\] \(PingApp, id=\d+\)
  43. Starting up: dest=192\.168\.0\.42 src=<none>seqNo=0
  44. Sending ping request #0 to lower layer\.
  45. .*
  46. \*\* Event #\d+ t=3 Test\.host\.pingApp\[0\] \(PingApp, id=\d+\)
  47. Sending ping request #3 to lower layer\.
  48. .*
  49. \*\* Event #\d+ t=6 Test\.scenarioManager \(ScenarioManager, id=\d+\)
  50. processing <at> command\.\.\.
  51. processing <tell> command\.\.\.
  52. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test\.host
  53. Test\.host shutting down
  54. .*
  55. Doing stage 7/8 of operation inet::NodeShutdownOperation on Test\.host
  56. Test\.host shut down
  57. <!> No more events
  58. %#--------------------------------------------------------------------------------------------------------------
  59. %not-contains: stdout
  60. undisposed object:
  61. %#--------------------------------------------------------------------------------------------------------------
  62. %not-contains: stdout
  63. -- check module destructor
  64. %#--------------------------------------------------------------------------------------------------------------