lifecycle_AdhocHost_3.test 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. %description:
  2. Test shutdown and startup operations on AdhocHost.
  3. Test startup operation on AdhocHost that is initially down.
  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. #debugger-attach-on-error = true
  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. **.initialStatus = "down"
  19. **.scenarioManager.script = xmldoc("scenario.xml")
  20. *.host.numRadios=2
  21. *.host.networkLayer.configurator.networkConfiguratorModule = ""
  22. *.host.mobilityType = "StationaryMobility"
  23. **.mobility.constraintAreaMinX = 0m
  24. **.mobility.constraintAreaMinY = 0m
  25. **.mobility.constraintAreaMinZ = 0m
  26. **.mobility.constraintAreaMaxX = 1000m
  27. **.mobility.constraintAreaMaxY = 1000m
  28. **.mobility.constraintAreaMaxZ = 0m
  29. **.mobility.initFromDisplayString = false
  30. **.mobility.initialX = 500m
  31. **.mobility.initialY = 500m
  32. **.mobility.initialZ = 0m
  33. %file: test.ned
  34. import inet.common.lifecycle.LifecycleController;
  35. import inet.node.inet.AdhocHost;
  36. import inet.status.NodeStatus;
  37. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  38. import inet.common.scenario.ScenarioManager;
  39. network Test
  40. {
  41. submodules:
  42. radioMedium: Ieee80211ScalarRadioMedium;
  43. scenarioManager: ScenarioManager;
  44. lifecycleController: LifecycleController;
  45. host: AdhocHost;
  46. }
  47. %file: scenario.xml
  48. <scenario>
  49. <at t="1.0">
  50. <tell module="lifecycleController" target="host" operation="NodeStartOperation"/>
  51. </at>
  52. </scenario>
  53. %contains-regex: stdout
  54. Test.host starting up
  55. .*
  56. Test.host started
  57. %#--------------------------------------------------------------------------------------------------------------
  58. %not-contains: stdout
  59. undisposed object:
  60. %not-contains: stdout
  61. -- check module destructor
  62. %#--------------------------------------------------------------------------------------------------------------