NetworkPathVisualizerShowcase.ned 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. //
  2. // This program is free software: you can redistribute it and/or modify
  3. // it under the terms of the GNU Lesser General Public License as published by
  4. // the Free Software Foundation, either version 3 of the License, or
  5. // (at your option) any later version.
  6. //
  7. // This program is distributed in the hope that it will be useful,
  8. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. // GNU Lesser General Public License for more details.
  11. //
  12. // You should have received a copy of the GNU Lesser General Public License
  13. // along with this program. If not, see http://www.gnu.org/licenses/.
  14. //
  15. package inet.showcases.visualizer.networkpathactivity;
  16. import inet.common.lifecycle.LifecycleController;
  17. import inet.common.scenario.ScenarioManager;
  18. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  19. import inet.node.aodv.AODVRouter;
  20. import inet.node.ethernet.Eth100M;
  21. import inet.node.ethernet.EtherSwitch;
  22. import inet.node.inet.Router;
  23. import inet.node.inet.StandardHost;
  24. import inet.node.inet.WirelessHost;
  25. import inet.node.wireless.AccessPoint;
  26. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  27. import inet.visualizer.integrated.IntegratedVisualizer;
  28. import inet.visualizer.networklayer.NetworkRouteVisualizer;
  29. //
  30. // TODO documentation
  31. //
  32. network NetworkPathSimpleShowcase
  33. {
  34. @display("bgb=600,250");
  35. submodules:
  36. pathVisualizer: NetworkRouteVisualizer {
  37. parameters:
  38. @display("p=100,50");
  39. }
  40. configurator: IPv4NetworkConfigurator {
  41. parameters:
  42. @display("p=100,150");
  43. }
  44. source: StandardHost {
  45. @display("p=200,125");
  46. }
  47. destination: StandardHost {
  48. @display("p=500,125");
  49. }
  50. connections:
  51. source.ethg++ <--> Eth100M <--> destination.ethg++;
  52. }
  53. //
  54. // TODO documentation
  55. //
  56. network NetworkPathComplexShowcase
  57. {
  58. @display("bgb=1050,720");
  59. submodules:
  60. visualizer: IntegratedVisualizer {
  61. parameters:
  62. @display("p=100,50");
  63. }
  64. configurator: IPv4NetworkConfigurator {
  65. parameters:
  66. @display("p=100,150");
  67. }
  68. source1: StandardHost {
  69. @display("p=250,50");
  70. }
  71. source2: StandardHost {
  72. @display("p=947.52496,110.439995");
  73. }
  74. destination1: StandardHost {
  75. @display("p=749.235,611.185");
  76. }
  77. destination2: StandardHost {
  78. @display("p=131.856,533.856");
  79. }
  80. host1: StandardHost {
  81. @display("p=379.488,49.848");
  82. }
  83. videoClient: StandardHost {
  84. @display("p=831.336,109.344");
  85. }
  86. host2: StandardHost {
  87. @display("p=894.048,533.856");
  88. }
  89. videoServer: StandardHost {
  90. @display("p=249.24,639.984");
  91. }
  92. etherSwitch0: EtherSwitch {
  93. @display("p=249.24,160.8");
  94. }
  95. etherSwitch1: EtherSwitch {
  96. @display("p=947.52496,229.665");
  97. }
  98. etherSwitch2: EtherSwitch {
  99. @display("p=279.865,515.805");
  100. }
  101. etherSwitch3: EtherSwitch {
  102. @display("p=731.665,448.03497");
  103. }
  104. router1: Router {
  105. @display("p=749.235,230.92");
  106. }
  107. router2: Router {
  108. @display("p=249.745,346.38");
  109. }
  110. router3: Router {
  111. @display("p=461.496,448.632");
  112. }
  113. router4: Router {
  114. @display("p=575.664,313.56");
  115. }
  116. router0: Router {
  117. @display("p=484.008,180.09601");
  118. }
  119. connections:
  120. source1.ethg++ <--> Eth100M <--> etherSwitch0.ethg++;
  121. etherSwitch0.ethg++ <--> Eth100M <--> router0.ethg++;
  122. router3.ethg++ <--> Eth100M <--> etherSwitch3.ethg++;
  123. etherSwitch3.ethg++ <--> Eth100M <--> destination1.ethg++;
  124. etherSwitch1.ethg++ <--> Eth100M <--> router1.ethg++;
  125. etherSwitch1.ethg++ <--> Eth100M <--> source2.ethg++;
  126. router2.ethg++ <--> Eth100M <--> etherSwitch2.ethg++;
  127. destination2.ethg++ <--> Eth100M <--> etherSwitch2.ethg++;
  128. router2.pppg++ <--> Eth100M <--> router3.pppg++;
  129. etherSwitch0.ethg++ <--> Eth100M <--> host1.ethg++;
  130. etherSwitch1.ethg++ <--> Eth100M <--> videoClient.ethg++;
  131. etherSwitch3.ethg++ <--> Eth100M <--> host2.ethg++;
  132. etherSwitch2.ethg++ <--> Eth100M <--> videoServer.ethg++;
  133. router1.pppg++ <--> Eth100M <--> router0.pppg++;
  134. router0.pppg++ <--> Eth100M <--> router2.pppg++;
  135. router4.pppg++ <--> Eth100M <--> router3.pppg++;
  136. router4.pppg++ <--> Eth100M <--> router2.pppg++;
  137. router4.pppg++ <--> Eth100M <--> router1.pppg++;
  138. router0.pppg++ <--> Eth100M <--> router4.pppg++;
  139. }
  140. //
  141. // TODO documentation
  142. //
  143. network NetworkPathMobileShowcase
  144. {
  145. @display("bgb=660,630");
  146. submodules:
  147. visualizer: IntegratedVisualizer {
  148. @display("p=100,50");
  149. }
  150. configurator: IPv4NetworkConfigurator {
  151. @display("p=100,150");
  152. }
  153. radioMedium: Ieee80211ScalarRadioMedium {
  154. @display("p=100,250");
  155. }
  156. source: AODVRouter {
  157. @display("p=229,46");
  158. }
  159. destination: AODVRouter {
  160. @display("p=488.832,512.952");
  161. }
  162. aodvRouter1: AODVRouter {
  163. @display("p=421.296,295.872");
  164. }
  165. aodvRouter2: AODVRouter {
  166. @display("p=273.36002,440.592");
  167. }
  168. aodvRouter3: AODVRouter {
  169. @display("p=305.52,188.136");
  170. }
  171. aodvRouter4: AODVRouter {
  172. @display("p=562.8,328.032");
  173. }
  174. aodvRouter5: AODVRouter {
  175. @display("p=421.296,77.184");
  176. }
  177. }
  178. //
  179. // TODO documentation
  180. //
  181. network NetworkPathRIPShowcase
  182. {
  183. @display("bgb=1100,680");
  184. submodules:
  185. visualizer: IntegratedVisualizer {
  186. parameters:
  187. @display("p=100,50");
  188. }
  189. configurator: IPv4NetworkConfigurator {
  190. parameters:
  191. @display("p=100,150");
  192. }
  193. radioMedium: Ieee80211ScalarRadioMedium {
  194. parameters:
  195. @display("p=100,250");
  196. }
  197. scenarioManager: ScenarioManager {
  198. parameters:
  199. @display("p=100,350");
  200. }
  201. lifecycleController: LifecycleController {
  202. @display("p=100,450");
  203. }
  204. wiredSource: StandardHost {
  205. @display("p=257.28,535.464");
  206. }
  207. wiredDestination: StandardHost {
  208. @display("p=802.392,149.544");
  209. }
  210. wirelessSource: WirelessHost {
  211. @display("p=406.824,80.4");
  212. }
  213. wirelessDestination: WirelessHost {
  214. @display("p=786.312,567.624");
  215. }
  216. host1: StandardHost {
  217. @display("p=445.41602,535.464");
  218. }
  219. host2: StandardHost {
  220. @display("p=993.744,149.544");
  221. }
  222. accessPoint0: AccessPoint {
  223. @display("p=319.992,154.368");
  224. }
  225. accessPoint1: AccessPoint {
  226. @display("p=876.36,479.184");
  227. }
  228. etherSwitch0: EtherSwitch {
  229. @display("p=876.36,276.576");
  230. }
  231. etherSwitch1: EtherSwitch {
  232. @display("p=329.64,402");
  233. }
  234. router0: Router {
  235. @display("p=383.73126,279.6875");
  236. }
  237. router1: Router {
  238. @display("p=633.552,192.96");
  239. }
  240. router2: Router {
  241. @display("p=787.60004,404.98752");
  242. }
  243. router3: Router {
  244. @display("p=554.76,458.28");
  245. }
  246. connections:
  247. router0.pppg++ <--> Eth100M <--> router1.pppg++;
  248. router0.pppg++ <--> Eth100M <--> router3.pppg++;
  249. router1.pppg++ <--> Eth100M <--> router2.pppg++;
  250. router2.pppg++ <--> Eth100M <--> router3.pppg++;
  251. router2.ethg++ <--> Eth100M <--> etherSwitch0.ethg++;
  252. etherSwitch0.ethg++ <--> Eth100M <--> wiredDestination.ethg++;
  253. router2.ethg++ <--> Eth100M <--> accessPoint1.ethg++;
  254. router0.ethg++ <--> Eth100M <--> etherSwitch1.ethg++;
  255. etherSwitch1.ethg++ <--> Eth100M <--> wiredSource.ethg++;
  256. router0.ethg++ <--> Eth100M <--> accessPoint0.ethg++;
  257. host1.ethg++ <--> Eth100M <--> etherSwitch1.ethg++;
  258. host2.ethg++ <--> Eth100M <--> etherSwitch0.ethg++;
  259. }