lifecycle_3.test 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. %description:
  2. Test startup operation on StandardHost that is initially down.
  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. record-eventlog = true
  10. #debugger-attach-on-error = true
  11. #omnetpp 5.0 - 5.1 compatibility:
  12. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  13. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  14. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  15. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  16. **.hasStatus = true
  17. **.initialStatus = "down"
  18. **.scenarioManager.script = xmldoc("scenario.xml")
  19. *.host.hasTcp = true
  20. *.host.hasUdp = true
  21. *.host.hasSctp = true
  22. *.host.eth[0].csmacdSupport = true
  23. *.host.eth[1].csmacdSupport = false
  24. *.host.networkLayer.configurator.networkConfiguratorModule = ""
  25. %file: test.ned
  26. import inet.node.inet.StandardHost;
  27. import inet.common.lifecycle.LifecycleController;
  28. import inet.status.NodeStatus;
  29. import inet.common.scenario.ScenarioManager;
  30. network Test
  31. {
  32. submodules:
  33. scenarioManager: ScenarioManager;
  34. lifecycleController: LifecycleController;
  35. host: StandardHost
  36. {
  37. gates:
  38. ethg[2];
  39. pppg[2];
  40. }
  41. connections:
  42. host.ethg[0] <--> {datarate=10Mbps; delay=10us;} <--> host.ethg[1];
  43. host.pppg[0] <--> {datarate=10Mbps; delay=10us;} <--> host.pppg[1];
  44. }
  45. %file: scenario.xml
  46. <scenario>
  47. <at t="1.0">
  48. <tell module="lifecycleController" target="host" operation="NodeStartOperation"/>
  49. </at>
  50. </scenario>
  51. %contains-regex: stdout
  52. Test.host starting up
  53. .*
  54. Test.host started
  55. %#--------------------------------------------------------------------------------------------------------------
  56. %not-contains: stdout
  57. undisposed object:
  58. %not-contains: stdout
  59. -- check module destructor
  60. %#--------------------------------------------------------------------------------------------------------------