lifecycle_WirelessHost_5.test 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. %description:
  2. Test shutdown and startup operations on WirelessHost when receiving.
  3. %#--------------------------------------------------------------------------------------------------------------
  4. %inifile: omnetpp.ini
  5. [General]
  6. network = Test
  7. tkenv-plugin-path = ../../../etc/plugins
  8. ned-path = .;../../../../src;../../lib
  9. cmdenv-express-mode = false
  10. record-eventlog = true
  11. sim-time-limit = 100s
  12. #omnetpp 5.0 - 5.1 compatibility:
  13. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  14. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  15. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  16. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  17. **.hasStatus = true
  18. **.scenarioManager.script = xmldoc("scenario.xml")
  19. *.host*.numRadios=1
  20. *.host*.networkLayer.configurator.networkConfiguratorModule = ""
  21. *.hostsender.numUdpApps = 1
  22. *.hostsender.udpApp[0].typename = "DHCPClient"
  23. *.host*.mobilityType = "StationaryMobility"
  24. **.mobility.constraintAreaMinX = 0m
  25. **.mobility.constraintAreaMinY = 0m
  26. **.mobility.constraintAreaMinZ = 0m
  27. **.mobility.constraintAreaMaxX = 1000m
  28. **.mobility.constraintAreaMaxY = 1000m
  29. **.mobility.constraintAreaMaxZ = 0m
  30. **.mobility.initFromDisplayString = false
  31. **.host.mobility.initialX = 100m
  32. **.hostsender.mobility.initialX = 900m
  33. **.host*.mobility.initialY = 500m
  34. **.mobility.initialZ = 0m
  35. %#--------------------------------------------------------------------------------------------------------------
  36. %file: test.ned
  37. import inet.common.lifecycle.LifecycleController;
  38. import inet.common.scenario.ScenarioManager;
  39. import inet.node.inet.AdhocHost;
  40. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  41. network Test
  42. {
  43. submodules:
  44. radioMedium: Ieee80211ScalarRadioMedium;
  45. scenarioManager: ScenarioManager;
  46. lifecycleController: LifecycleController;
  47. host: AdhocHost;
  48. hostsender: AdhocHost;
  49. }
  50. %#--------------------------------------------------------------------------------------------------------------
  51. %file: scenario.xml
  52. <scenario>
  53. <at t="0.003">
  54. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  55. </at>
  56. <at t="10.0">
  57. <tell module="lifecycleController" target="host" operation="NodeStartOperation"/>
  58. </at>
  59. <at t="10.003">
  60. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  61. </at>
  62. </scenario>
  63. %#--------------------------------------------------------------------------------------------------------------
  64. %contains-regex: stdout
  65. Test.host shutting down
  66. .*
  67. Test.host shut down
  68. .*
  69. Test.host starting up
  70. .*
  71. Test.host started
  72. .*
  73. Test.host shutting down
  74. .*
  75. Test.host shut down
  76. %#--------------------------------------------------------------------------------------------------------------
  77. %not-contains: stdout
  78. undisposed object:
  79. %not-contains: stdout
  80. -- check module destructor
  81. %#--------------------------------------------------------------------------------------------------------------