AODVSimpleTest_2.test 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. %description:
  2. This example tests a single route request with two intermediate nodes
  3. between the sender and the receiver. The two intermediate nodes are
  4. placed to the same distance from both the receiver and the sender.
  5. %#--------------------------------------------------------------------------------------------------------------
  6. %file: test.ned
  7. import inet.common.lifecycle.LifecycleController;
  8. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  9. import inet.networklayer.ipv4.RoutingTableRecorder;
  10. import inet.node.aodv.AODVRouter;
  11. import inet.physicallayer.idealradio.IdealRadioMedium;
  12. import inet.common.scenario.ScenarioManager;
  13. network AODVTest
  14. {
  15. parameters:
  16. @display("bgb=961,662");
  17. submodules:
  18. radioMedium: IdealRadioMedium {
  19. parameters:
  20. @display("p=50,50");
  21. }
  22. configurator: IPv4NetworkConfigurator {
  23. parameters:
  24. addDefaultRoutes = false;
  25. addStaticRoutes = false;
  26. addSubnetRoutes = false;
  27. config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
  28. @display("p=50,100");
  29. }
  30. routingTableRecorder: RoutingTableRecorder {
  31. parameters:
  32. @display("p=50,150");
  33. }
  34. lifecycleController: LifecycleController {
  35. parameters:
  36. @display("p=50,200");
  37. }
  38. scenarioManager: ScenarioManager {
  39. parameters:
  40. script = default(xml("<scenario/>"));
  41. @display("p=50,250");
  42. }
  43. sender: AODVRouter {
  44. parameters:
  45. @display("i=device/pocketpc_s;r=,,#707070;p=284,51");
  46. }
  47. intermediateNodeA: AODVRouter {
  48. parameters:
  49. @display("i=device/pocketpc_s;r=,,#707070;p=203,206");
  50. }
  51. intermediateNodeB: AODVRouter {
  52. parameters:
  53. @display("i=device/pocketpc_s;r=,,#707070;p=386,206");
  54. }
  55. receiver: AODVRouter {
  56. parameters:
  57. @display("i=device/pocketpc_s;r=,,#707070;p=284,378");
  58. }
  59. connections allowunconnected:
  60. }
  61. %#--------------------------------------------------------------------------------------------------------------
  62. %inifile: omnetpp.ini
  63. [General]
  64. network = AODVTest
  65. record-eventlog = true
  66. sim-time-limit = 100s
  67. num-rngs = 3
  68. tkenv-plugin-path = ../../../etc/plugins
  69. ned-path = .;../../../../src;../../lib
  70. #omnetpp 5.0 - 5.1 compatibility:
  71. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  72. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  73. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  74. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  75. **.mobility.rng-0 = 1
  76. **.wlan[*].mac.rng-0 = 2
  77. **.aodv.useHelloMessages = false
  78. *.sender.aodv.jitter = 1ms
  79. *.receiver.aodv.jitter = 2ms
  80. *.intermediateNodeA.aodv.jitter = 3ms
  81. *.intermediateNodeB.aodv.jitter = 4ms
  82. # mobility
  83. **.mobilityType = "StationaryMobility"
  84. **.mobility.constraintAreaMinZ = 0m
  85. **.mobility.constraintAreaMaxZ = 0m
  86. **.mobility.constraintAreaMinX = 0m
  87. **.mobility.constraintAreaMinY = 0m
  88. **.mobility.constraintAreaMaxX = 600m
  89. **.mobility.constraintAreaMaxY = 600m
  90. # ping app (host[0] pinged by others)
  91. **.sender.numPingApps = 1
  92. **.sender.pingApp[0].startTime = uniform(1s,5s)
  93. **.sender.pingApp[0].printPing = true
  94. **.sender.pingApp[0].destAddr = "receiver(ipv4)"
  95. # nic settings
  96. **.wlan[*].typename = "IdealWirelessNic"
  97. **.wlan[*].radio.transmitter.communicationRange = 240m
  98. **.wlan[*].bitrate = 2Mbps
  99. **.wlan[*].mac.address = "auto"
  100. **.wlan[*].mac.headerLength = 20B
  101. %#--------------------------------------------------------------------------------------------------------------
  102. %contains-regex: results/General-0.rt
  103. .*
  104. \+R \d+ 3\.1965\d+ 8 145\.236\.0\.2 145\.236\.0\.1 32 145\.236\.0\.1
  105. \+R \d+ 3\.1965\d+ 9 145\.236\.0\.3 145\.236\.0\.1 32 145\.236\.0\.1
  106. \+R \d+ 3\.1998\d+ 7 145\.236\.0\.1 145\.236\.0\.2 32 145\.236\.0\.2
  107. \+R \d+ 3\.1998\d+ 9 145\.236\.0\.3 145\.236\.0\.2 32 145\.236\.0\.2
  108. \+R \d+ 3\.1998\d+ 10 145\.236\.0\.4 145\.236\.0\.2 32 145\.236\.0\.2
  109. \+R \d+ 3\.1998\d+ 10 145\.236\.0\.4 145\.236\.0\.1 32 145\.236\.0\.2
  110. \+R \d+ 3\.2004\d+ 8 145\.236\.0\.2 145\.236\.0\.4 32 145\.236\.0\.4
  111. \+R \d+ 3\.2008\d+ 8 145\.236\.0\.2 145\.236\.0\.3 32 145\.236\.0\.3
  112. \+R \d+ 3\.2008\d+ 7 145\.236\.0\.1 145\.236\.0\.3 32 145\.236\.0\.3
  113. \+R \d+ 3\.2008\d+ 10 145\.236\.0\.4 145\.236\.0\.3 32 145\.236\.0\.3
  114. \+R \d+ 3\.2041\d+ 7 145\.236\.0\.1 145\.236\.0\.4 32 145\.236\.0\.2
  115. \-R \d+ 21\.1998\d+ 9 145\.236\.0\.3 145\.236\.0\.2 32 145\.236\.0\.2
  116. \-R \d+ 21\.2008\d+ 8 145\.236\.0\.2 145\.236\.0\.3 32 145\.236\.0\.3
  117. \-R \d+ 21\.2008\d+ 7 145\.236\.0\.1 145\.236\.0\.3 32 145\.236\.0\.3
  118. \-R \d+ 21\.2008\d+ 10 145\.236\.0\.4 145\.236\.0\.3 32 145\.236\.0\.3
  119. \-R \d+ 23\.7165\d+ 9 145\.236\.0\.3 145\.236\.0\.1 32 145\.236\.0\.1
  120. %#--------------------------------------------------------------------------------------------------------------
  121. %not-contains: stdout
  122. undisposed object:
  123. %not-contains: stdout
  124. -- check module destructor
  125. %#--------------------------------------------------------------------------------------------------------------