pingapp_lifecycle_7.test 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. %description:
  2. Test node shutdown followed by ping start.
  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 = 6s
  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. %#--------------------------------------------------------------------------------------------------------------
  32. %file: scenario.xml
  33. <scenario>
  34. <at t="3.0">
  35. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  36. </at>
  37. </scenario>
  38. %#--------------------------------------------------------------------------------------------------------------
  39. %subst: /DEBUG: //
  40. %#--------------------------------------------------------------------------------------------------------------
  41. %contains: stdout
  42. Running simulation...
  43. ** Event #1 t=0 Test.host.networkLayer.ip (IPv4, id=12)
  44. ** Event #2 t=0 Test.host.networkLayer.ip (IPv4, id=12)
  45. ** Event #3 t=3 Test.scenarioManager (ScenarioManager, id=2)
  46. processing <at> command...
  47. processing <tell> command...
  48. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test.host
  49. Test.host shutting down
  50. %#--------------------------------------------------------------------------------------------------------------
  51. %contains: stdout
  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. %#--------------------------------------------------------------------------------------------------------------
  59. %not-contains: stdout
  60. -- check module destructor
  61. %#--------------------------------------------------------------------------------------------------------------