lifecycle_WirelessHost_switchingtime.test 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. %description:
  2. Test shutdown and startup operations on WirelessHost with nonzero radiostate switching times.
  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. #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. **.scenarioManager.script = xmldoc("scenario.xml")
  18. *.host.numRadios=2
  19. *.host.networkLayer.configurator.networkConfiguratorModule = ""
  20. *.host.mobilityType = "StationaryMobility"
  21. **.mobility.constraintAreaMinX = 0m
  22. **.mobility.constraintAreaMinY = 0m
  23. **.mobility.constraintAreaMinZ = 0m
  24. **.mobility.constraintAreaMaxX = 1000m
  25. **.mobility.constraintAreaMaxY = 1000m
  26. **.mobility.constraintAreaMaxZ = 0m
  27. **.mobility.initFromDisplayString = false
  28. **.mobility.initialX = 500m
  29. **.mobility.initialY = 500m
  30. **.mobility.initialZ = 0m
  31. **.switchingTimes = "ms 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10"
  32. %#--------------------------------------------------------------------------------------------------------------
  33. %file: test.ned
  34. import inet.common.lifecycle.LifecycleController;
  35. import inet.node.inet.AdhocHost;
  36. import inet.node.inet.WirelessHost;
  37. import inet.status.NodeStatus;
  38. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  39. import inet.common.scenario.ScenarioManager;
  40. network Test
  41. {
  42. submodules:
  43. radioMedium: Ieee80211ScalarRadioMedium;
  44. scenarioManager: ScenarioManager;
  45. lifecycleController: LifecycleController;
  46. host: AdhocHost;
  47. }
  48. %#--------------------------------------------------------------------------------------------------------------
  49. %file: scenario.xml
  50. <scenario>
  51. <at t="1.0">
  52. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  53. </at>
  54. <at t="2.0">
  55. <tell module="lifecycleController" target="host" operation="NodeStartOperation"/>
  56. </at>
  57. <at t="2.5">
  58. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  59. </at>
  60. </scenario>
  61. %#--------------------------------------------------------------------------------------------------------------
  62. %contains-regex: stdout
  63. Test.host shutting down
  64. .*
  65. Test.host shut down
  66. .*
  67. Test.host starting up
  68. .*
  69. Test.host started
  70. .*
  71. Test.host shutting down
  72. .*
  73. Test.host shut down
  74. %#--------------------------------------------------------------------------------------------------------------
  75. %not-contains: stdout
  76. undisposed object:
  77. %not-contains: stdout
  78. -- check module destructor
  79. %#--------------------------------------------------------------------------------------------------------------