AODVSmallNetworks.ned 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. //
  2. // Copyright (C) 2014
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Lesser General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public License
  15. // along with this program. If not, see http://www.gnu.org/licenses/.
  16. //
  17. package inet.examples.aodv;
  18. import inet.common.lifecycle.LifecycleController;
  19. import inet.common.scenario.ScenarioManager;
  20. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  21. import inet.networklayer.ipv4.RoutingTableRecorder;
  22. import inet.node.aodv.AODVRouter;
  23. import inet.physicallayer.idealradio.IdealRadioMedium;
  24. network SimpleRREQ
  25. {
  26. parameters:
  27. @display("bgb=525,437");
  28. submodules:
  29. radioMedium: IdealRadioMedium {
  30. parameters:
  31. @display("p=50,50");
  32. }
  33. configurator: IPv4NetworkConfigurator {
  34. parameters:
  35. addDefaultRoutes = false;
  36. addStaticRoutes = false;
  37. addSubnetRoutes = false;
  38. config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
  39. @display("p=50,100");
  40. }
  41. routingTableRecorder: RoutingTableRecorder {
  42. parameters:
  43. @display("p=50,150");
  44. }
  45. lifecycleController: LifecycleController {
  46. parameters:
  47. @display("p=50,200");
  48. }
  49. scenarioManager: ScenarioManager {
  50. parameters:
  51. script = default(xml("<scenario/>"));
  52. @display("p=50,250");
  53. }
  54. sender: AODVRouter {
  55. parameters:
  56. @display("i=device/pocketpc_s;r=,,#707070;p=270,51");
  57. }
  58. intermediateNode: AODVRouter {
  59. parameters:
  60. @display("i=device/pocketpc_s;r=,,#707070;p=270,214");
  61. }
  62. receiver: AODVRouter {
  63. parameters:
  64. @display("i=device/pocketpc_s;r=,,#707070;p=270,377");
  65. }
  66. connections allowunconnected:
  67. }
  68. network SimpleRREQ2
  69. {
  70. parameters:
  71. @display("bgb=961,662");
  72. submodules:
  73. radioMedium: IdealRadioMedium {
  74. parameters:
  75. @display("p=50,50");
  76. }
  77. configurator: IPv4NetworkConfigurator {
  78. parameters:
  79. addDefaultRoutes = false;
  80. addStaticRoutes = false;
  81. addSubnetRoutes = false;
  82. config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
  83. @display("p=50,100");
  84. }
  85. routingTableRecorder: RoutingTableRecorder {
  86. parameters:
  87. @display("p=50,150");
  88. }
  89. lifecycleController: LifecycleController {
  90. parameters:
  91. @display("p=50,200");
  92. }
  93. scenarioManager: ScenarioManager {
  94. parameters:
  95. script = default(xml("<scenario/>"));
  96. @display("p=50,250");
  97. }
  98. sender: AODVRouter {
  99. parameters:
  100. @display("i=device/pocketpc_s;r=,,#707070;p=284,51");
  101. }
  102. intermediateNodeA: AODVRouter {
  103. parameters:
  104. @display("i=device/pocketpc_s;r=,,#707070;p=203,206");
  105. }
  106. intermediateNodeB: AODVRouter {
  107. parameters:
  108. @display("i=device/pocketpc_s;r=,,#707070;p=386,206");
  109. }
  110. receiver: AODVRouter {
  111. parameters:
  112. @display("i=device/pocketpc_s;r=,,#707070;p=284,378");
  113. }
  114. connections allowunconnected:
  115. }
  116. network ShortestPath
  117. {
  118. parameters:
  119. @display("bgb=961,662");
  120. submodules:
  121. radioMedium: IdealRadioMedium {
  122. parameters:
  123. @display("p=50,50");
  124. }
  125. configurator: IPv4NetworkConfigurator {
  126. parameters:
  127. addDefaultRoutes = false;
  128. addStaticRoutes = false;
  129. addSubnetRoutes = false;
  130. config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
  131. @display("p=50,100");
  132. }
  133. routingTableRecorder: RoutingTableRecorder {
  134. parameters:
  135. @display("p=50,150");
  136. }
  137. lifecycleController: LifecycleController {
  138. parameters:
  139. @display("p=50,200");
  140. }
  141. scenarioManager: ScenarioManager {
  142. parameters:
  143. script = default(xml("<scenario/>"));
  144. @display("p=50,250");
  145. }
  146. sender: AODVRouter {
  147. parameters:
  148. @display("i=device/pocketpc_s;r=,,#707070;p=283,63");
  149. }
  150. intermediateNodeA: AODVRouter {
  151. parameters:
  152. @display("i=device/pocketpc_s;r=,,#707070;p=203,206");
  153. }
  154. intermediateNodeB: AODVRouter {
  155. parameters:
  156. @display("i=device/pocketpc_s;r=,,#707070;p=385,256");
  157. }
  158. intermediateNodeC: AODVRouter {
  159. parameters:
  160. @display("i=device/pocketpc_s;r=,,#707070;p=292,325");
  161. }
  162. receiver: AODVRouter {
  163. parameters:
  164. @display("i=device/pocketpc_s;r=,,#707070;p=292,454");
  165. }
  166. connections allowunconnected:
  167. }