AODVSimpleTest.test 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. %description:
  2. This example tests a single route request with one intermediate node
  3. between the sender and the receiver.
  4. %#--------------------------------------------------------------------------------------------------------------
  5. %file: test.ned
  6. import inet.common.lifecycle.LifecycleController;
  7. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  8. import inet.networklayer.ipv4.RoutingTableRecorder;
  9. import inet.node.aodv.AODVRouter;
  10. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  11. import inet.common.scenario.ScenarioManager;
  12. network AODVTest
  13. {
  14. parameters:
  15. @display("bgb=525,437");
  16. submodules:
  17. radioMedium: Ieee80211ScalarRadioMedium {
  18. parameters:
  19. @display("p=50,50");
  20. }
  21. configurator: IPv4NetworkConfigurator {
  22. parameters:
  23. addDefaultRoutes = false;
  24. addStaticRoutes = false;
  25. addSubnetRoutes = false;
  26. config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
  27. @display("p=50,100");
  28. }
  29. routingTableRecorder: RoutingTableRecorder {
  30. parameters:
  31. @display("p=50,150");
  32. }
  33. lifecycleController: LifecycleController {
  34. parameters:
  35. @display("p=50,200");
  36. }
  37. scenarioManager: ScenarioManager {
  38. parameters:
  39. script = default(xml("<scenario/>"));
  40. @display("p=50,250");
  41. }
  42. sender: AODVRouter {
  43. parameters:
  44. @display("i=device/pocketpc_s;r=,,#707070;p=270,51");
  45. }
  46. intermediateNode: AODVRouter {
  47. parameters:
  48. @display("i=device/pocketpc_s;r=,,#707070;p=270,214");
  49. }
  50. receiver: AODVRouter {
  51. parameters:
  52. @display("i=device/pocketpc_s;r=,,#707070;p=270,377");
  53. }
  54. connections allowunconnected:
  55. }
  56. %#--------------------------------------------------------------------------------------------------------------
  57. %inifile: omnetpp.ini
  58. [General]
  59. network = AODVTest
  60. record-eventlog = true
  61. tkenv-plugin-path = ../../../etc/plugins
  62. ned-path = .;../../../../src;../../lib
  63. #omnetpp 5.0 - 5.1 compatibility:
  64. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  65. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  66. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  67. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  68. num-rngs = 3
  69. **.mobility.rng-0 = 1
  70. **.wlan[*].mac.rng-0 = 2
  71. **.aodv.useHelloMessages = false
  72. sim-time-limit = 100s
  73. # channel physical parameters
  74. *.radioMedium.mediumLimitCache.carrierFrequency = 2.4GHz
  75. *.radioMedium.mediumLimitCache.maxTransmissionPower = 2.0mW
  76. # mobility
  77. **.mobilityType = "StationaryMobility"
  78. **.mobility.constraintAreaMinZ = 0m
  79. **.mobility.constraintAreaMaxZ = 0m
  80. **.mobility.constraintAreaMinX = 0m
  81. **.mobility.constraintAreaMinY = 0m
  82. **.mobility.constraintAreaMaxX = 600m
  83. **.mobility.constraintAreaMaxY = 600m
  84. # ping app (host[0] pinged by others)
  85. **.sender.numPingApps = 1
  86. **.sender.pingApp[0].startTime = uniform(1s,5s)
  87. **.sender.pingApp[0].printPing = true
  88. **.sender.pingApp[0].destAddr = "receiver(ipv4)"
  89. # nic settings
  90. **.wlan[*].bitrate = 2Mbps
  91. **.wlan[*].mgmt.frameCapacity = 10
  92. **.wlan[*].mac.address = "auto"
  93. **.wlan[*].mac.maxQueueSize = 14
  94. **.wlan[*].mac.rtsThresholdBytes = 3000B
  95. **.wlan[*].mac.retryLimit = 7
  96. **.wlan[*].mac.cwMinData = 7
  97. **.wlan[*].mac.cwMinMulticast = 31
  98. **.wlan[*].radio.transmitter.power = 2mW
  99. **.wlan[*].radio.receiver.sensitivity = -85dBm
  100. **.wlan[*].radio.receiver.snirThreshold = 4dB
  101. %#--------------------------------------------------------------------------------------------------------------
  102. %contains-regex: results/General-0.rt
  103. \+R \d+ 3\.1987\d+ 8 145\.236\.0\.2 145\.236\.0\.1 32 145\.236\.0\.1
  104. \+R \d+ 3\.2035\d+ 7 145\.236\.0\.1 145\.236\.0\.2 32 145\.236\.0\.2
  105. \+R \d+ 3\.2035\d+ 9 145\.236\.0\.3 145\.236\.0\.2 32 145\.236\.0\.2
  106. \+R \d+ 3\.2035\d+ 9 145\.236\.0\.3 145\.236\.0\.1 32 145\.236\.0\.2
  107. \+R \d+ 3\.2056\d+ 8 145\.236\.0\.2 145\.236\.0\.3 32 145\.236\.0\.3
  108. \+R \d+ 3\.2096\d+ 7 145\.236\.0\.1 145\.236\.0\.3 32 145\.236\.0\.2
  109. %#--------------------------------------------------------------------------------------------------------------
  110. %not-contains: stdout
  111. undisposed object:
  112. %not-contains: stdout
  113. -- check module destructor
  114. %#--------------------------------------------------------------------------------------------------------------