VisualizationNetworks.ned 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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.tutorials.visualization;
  16. //networkA
  17. import inet.visualizer.integrated.IntegratedVisualizer;
  18. import inet.common.geometry.common.OsgGeographicCoordinateSystem;
  19. //networkB
  20. import inet.node.inet.WirelessHost;
  21. import inet.node.wireless.AccessPoint;
  22. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  23. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  24. //networkC
  25. import inet.node.ethernet.EtherSwitch;
  26. import inet.node.inet.Router;
  27. import inet.node.inet.StandardHost;
  28. import inet.node.ethernet.Eth100M;
  29. import inet.node.ethernet.Eth1G;
  30. //networkE
  31. import inet.environment.common.PhysicalEnvironment;
  32. //
  33. // TODO documentation
  34. //
  35. network VisualizationA
  36. {
  37. parameters:
  38. @display("bgb=0,0");
  39. submodules:
  40. visualizer: IntegratedVisualizer {
  41. parameters:
  42. @display("p=100,50");
  43. }
  44. }
  45. network VisualizationB extends VisualizationA
  46. {
  47. submodules:
  48. coordinateSystem: OsgGeographicCoordinateSystem {
  49. parameters:
  50. @display("p=100,150");
  51. }
  52. }
  53. network VisualizationC extends VisualizationB
  54. {
  55. parameters:
  56. @display("bgb=800,800");
  57. }
  58. network VisualizationD extends VisualizationC
  59. {
  60. submodules:
  61. pedestrian0: WirelessHost {
  62. parameters:
  63. @display("p=398,89;i=device/cellphone");
  64. }
  65. pedestrian1: WirelessHost {
  66. parameters:
  67. @display("p=548,89;i=device/cellphone");
  68. }
  69. accessPoint0: AccessPoint {
  70. parameters:
  71. @display("p=487,163");
  72. }
  73. configurator: IPv4NetworkConfigurator {
  74. parameters:
  75. @display("p=100,250");
  76. }
  77. radioMedium: Ieee80211ScalarRadioMedium {
  78. parameters:
  79. @display("p=100,350");
  80. }
  81. }
  82. network VisualizationE extends VisualizationD
  83. {
  84. submodules:
  85. pedestrianVideo: WirelessHost {
  86. parameters:
  87. @display("p=351,164;i=device/wifilaptop");
  88. }
  89. router0: Router {
  90. parameters:
  91. @display("p=487,234;i=abstract/router");
  92. }
  93. switch0: EtherSwitch {
  94. parameters:
  95. @display("p=416,327");
  96. }
  97. videoStreamServer: StandardHost {
  98. parameters:
  99. @display("p=487,470");
  100. }
  101. connections:
  102. accessPoint0.ethg++ <--> Eth100M <--> router0.ethg++;
  103. switch0.ethg++ <--> Eth100M <--> router0.ethg++;
  104. videoStreamServer.ethg++ <--> Eth100M <--> switch0.ethg++;
  105. }
  106. network VisualizationF extends VisualizationE
  107. {
  108. submodules:
  109. accessPoint1: AccessPoint {
  110. parameters:
  111. @display("p=601,163");
  112. }
  113. router1: Router {
  114. parameters:
  115. @display("p=601,234;i=abstract/router");
  116. }
  117. connections:
  118. router0.pppg++ <--> Eth100M <--> router1.pppg++;
  119. accessPoint1.ethg++ <--> Eth100M <--> router1.ethg++;
  120. }
  121. network VisualizationG extends VisualizationF
  122. {
  123. submodules:
  124. physicalEnvironment: PhysicalEnvironment {
  125. parameters:
  126. @display("p=100,450");
  127. }
  128. }
  129. network VisualizationH extends VisualizationG
  130. {
  131. submodules:
  132. car: WirelessHost {
  133. @display("p=215,122");
  134. }
  135. accessPoint2: AccessPoint {
  136. @display("p=215,233");
  137. }
  138. router2: Router {
  139. @display("p=316,234");
  140. }
  141. accessPoint3: AccessPoint {
  142. @display("p=215,298");
  143. }
  144. tcpHost[2]: StandardHost {
  145. @display("p=650,431");
  146. }
  147. switch1: EtherSwitch {
  148. @display("p=660,250");
  149. }
  150. router3: Router {
  151. @display("p=316,299");
  152. }
  153. connections:
  154. router0.pppg++ <--> Eth100M <--> router2.pppg++;
  155. router2.ethg++ <--> Eth100M <--> accessPoint2.ethg++;
  156. switch0.ethg++ <--> Eth100M <--> tcpHost[0].ethg++;
  157. switch1.ethg++ <--> Eth100M <--> tcpHost[1].ethg++;
  158. router1.ethg++ <--> Eth100M <--> switch1.ethg++;
  159. router0.pppg++ <--> Eth100M <--> router3.pppg++;
  160. accessPoint3.ethg++ <--> Eth100M <--> router3.ethg++;
  161. }