VisualizationTutorial.ned 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //
  2. // Copyright (C) 2006 Andras Varga
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU General Public License
  6. // as published by the Free Software Foundation; either version 2
  7. // of the License, or (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 General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. //
  18. package inet.tutorials.visualization;
  19. import inet.common.geometry.common.OsgGeographicCoordinateSystem;
  20. import inet.environment.common.PhysicalEnvironment;
  21. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  22. import inet.node.ethernet.Eth1G;
  23. import inet.node.inet.AdhocHost;
  24. import inet.node.inet.Router;
  25. import inet.node.inet.StandardHost;
  26. import inet.node.inet.WirelessHost;
  27. import inet.node.wireless.AccessPoint;
  28. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  29. import inet.visualizer.integrated.IntegratedVisualizer;
  30. network VisualizationTutorialA
  31. {
  32. parameters:
  33. @display("bgb=0,0");
  34. submodules:
  35. physicalEnvironment: PhysicalEnvironment {
  36. parameters:
  37. @display("p=100,50");
  38. }
  39. configurator: IPv4NetworkConfigurator {
  40. parameters:
  41. @display("p=100,150");
  42. }
  43. radioMedium: Ieee80211ScalarRadioMedium {
  44. parameters:
  45. @display("p=100,250");
  46. }
  47. server[2]: StandardHost {
  48. parameters:
  49. @display("p=300,100");
  50. }
  51. router[3]: Router {
  52. parameters:
  53. @display("p=300,200");
  54. }
  55. accessPoint[3]: AccessPoint {
  56. parameters:
  57. @display("p=300,300");
  58. }
  59. car[2]: WirelessHost {
  60. parameters:
  61. @display("p=300,400");
  62. }
  63. pedestrian[2]: WirelessHost {
  64. parameters:
  65. @display("p=300,500;i=device/cellphone");
  66. }
  67. connections:
  68. accessPoint[0].ethg++ <--> Eth1G <--> router[0].ethg++;
  69. accessPoint[1].ethg++ <--> Eth1G <--> router[1].ethg++;
  70. accessPoint[2].ethg++ <--> Eth1G <--> router[2].ethg++;
  71. router[0].ethg++ <--> Eth1G <--> server[0].ethg++;
  72. router[1].ethg++ <--> Eth1G <--> server[1].ethg++;
  73. router[0].pppg++ <--> Eth1G <--> router[1].pppg++;
  74. router[1].pppg++ <--> Eth1G <--> router[2].pppg++;
  75. }
  76. network VisualizationTutorialB extends VisualizationTutorialA
  77. {
  78. parameters:
  79. @display("bgb=0,0");
  80. submodules:
  81. visualizer: IntegratedVisualizer {
  82. parameters:
  83. @display("p=100,350");
  84. }
  85. }
  86. network VisualizationTutorialC extends VisualizationTutorialB
  87. {
  88. parameters:
  89. @display("bgb=0,0");
  90. submodules:
  91. coordinateSystem: OsgGeographicCoordinateSystem {
  92. parameters:
  93. @display("p=100,450");
  94. }
  95. }