lifecycle_AccessPoint_2.test 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. %description:
  2. Test crash and startup operations on AccessPoint.
  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. sim-time-limit = 3s
  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.mobilityType = "StationaryMobility"
  20. **.mobility.constraintAreaMinX = 0m
  21. **.mobility.constraintAreaMinY = 0m
  22. **.mobility.constraintAreaMinZ = 0m
  23. **.mobility.constraintAreaMaxX = 1000m
  24. **.mobility.constraintAreaMaxY = 1000m
  25. **.mobility.constraintAreaMaxZ = 0m
  26. **.mobility.initFromDisplayString = false
  27. **.mobility.initialX = 500m
  28. **.mobility.initialY = 500m
  29. **.mobility.initialZ = 0m
  30. %file: test.ned
  31. import inet.common.lifecycle.LifecycleController;
  32. import inet.node.wireless.AccessPoint;
  33. import inet.status.NodeStatus;
  34. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  35. import inet.common.scenario.ScenarioManager;
  36. network Test
  37. {
  38. submodules:
  39. radioMedium: Ieee80211ScalarRadioMedium;
  40. scenarioManager: ScenarioManager;
  41. lifecycleController: LifecycleController;
  42. host: AccessPoint;
  43. }
  44. %file: scenario.xml
  45. <scenario>
  46. <at t="1.0">
  47. <tell module="lifecycleController" target="host" operation="NodeCrashOperation"/>
  48. </at>
  49. <at t="2.0">
  50. <tell module="lifecycleController" target="host" operation="NodeStartOperation"/>
  51. </at>
  52. </scenario>
  53. %contains-regex: stdout
  54. Test.host crashing
  55. .*
  56. Test.host crashed
  57. .*
  58. Test.host starting up
  59. .*
  60. Test.host started
  61. %#--------------------------------------------------------------------------------------------------------------
  62. %not-contains: stdout
  63. undisposed object:
  64. %not-contains: stdout
  65. -- check module destructor
  66. %#--------------------------------------------------------------------------------------------------------------