lifecycle_IdealRadio_AP_2.test 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. # nic
  31. *.host*.wlan[*].typename = "IdealWirelessNic"
  32. *.host.wlan[*].bitrate = 54Mbps
  33. *.host*.wlan[*].mac.headerLength = 10B
  34. *.host*.wlan[*].mac.fullDuplex = false
  35. *.host*.wlan[*].radioType = "IdealRadio"
  36. *.host*.wlan[*].radio.transmitter.bitrate = 2Mbps
  37. *.host*.wlan[*].radio.transmitter.communicationRange = 1km
  38. *.host*.wlan[*].radio.transmitter.interferenceRange = 5km
  39. *.host*.wlan[*].radio.transmitter.detectionRange = 10km
  40. *.host*.wlan[*].radio.receiver.ignoreInterference = true
  41. %file: test.ned
  42. import inet.common.lifecycle.LifecycleController;
  43. import inet.node.wireless.AccessPoint;
  44. import inet.physicallayer.idealradio.IdealRadioMedium;
  45. import inet.common.scenario.ScenarioManager;
  46. network Test
  47. {
  48. submodules:
  49. radioMedium: IdealRadioMedium;
  50. scenarioManager: ScenarioManager;
  51. lifecycleController: LifecycleController;
  52. host: AccessPoint;
  53. }
  54. %file: scenario.xml
  55. <scenario>
  56. <at t="1.0">
  57. <tell module="lifecycleController" target="host" operation="NodeCrashOperation"/>
  58. </at>
  59. <at t="2.0">
  60. <tell module="lifecycleController" target="host" operation="NodeStartOperation"/>
  61. </at>
  62. </scenario>
  63. %contains-regex: stdout
  64. Test.host crashing
  65. .*
  66. Test.host crashed
  67. .*
  68. Test.host starting up
  69. .*
  70. Test.host started
  71. %#--------------------------------------------------------------------------------------------------------------
  72. %not-contains: stdout
  73. undisposed object:
  74. %not-contains: stdout
  75. -- check module destructor
  76. %#--------------------------------------------------------------------------------------------------------------