pingapp_lifecycle_1.test 2.1 KB

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