EarthCloud.ned 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // Copyright (C) 2012 OpenSim Ltd.
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU Lesser 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 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.internetcloud.earthcloud;
  18. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  19. import inet.node.ethernet.Eth100M;
  20. import inet.node.inet.Router;
  21. import inet.node.inet.StandardHost;
  22. import inet.node.internetcloud.InternetCloud;
  23. network SimpleContinentCloud
  24. {
  25. parameters:
  26. int numClients;
  27. @display("i=device/lan-ring");
  28. gates:
  29. inout pppg[];
  30. submodules:
  31. router: Router;
  32. client[numClients]: StandardHost;
  33. server: StandardHost;
  34. connections:
  35. for i=0..sizeof(pppg)-1 {
  36. pppg[i] <--> router.pppg++;
  37. }
  38. router.ethg++ <--> Eth100M <--> server.ethg++;
  39. for i=0..numClients-1 {
  40. router.ethg++ <--> Eth100M <--> client[i].ethg++;
  41. }
  42. }
  43. network EarthCloud
  44. {
  45. @display("bgi=maps/world;bgb=875,414");
  46. submodules:
  47. configurator: IPv4NetworkConfigurator {
  48. parameters:
  49. @display("p=75,315");
  50. }
  51. internet: InternetCloud {
  52. @display("p=387,185;is=vl");
  53. }
  54. africa: SimpleContinentCloud {
  55. @display("p=465,288");
  56. }
  57. asia: SimpleContinentCloud {
  58. @display("p=662,121");
  59. }
  60. australia: SimpleContinentCloud {
  61. @display("p=759,299;");
  62. }
  63. europe: SimpleContinentCloud {
  64. @display("p=446,77");
  65. }
  66. northAmerica: SimpleContinentCloud {
  67. @display("p=153,90");
  68. }
  69. southAmerica: SimpleContinentCloud {
  70. @display("p=260,270");
  71. }
  72. connections:
  73. africa.pppg++ <--> { datarate = 100Mbps; delay = 2ms; } <--> internet.pppg++;
  74. asia.pppg++ <--> { datarate = 100Mbps; delay = 2ms; } <--> internet.pppg++;
  75. australia.pppg++ <--> { datarate = 100Mbps; delay = 2ms; } <--> internet.pppg++;
  76. europe.pppg++ <--> { datarate = 100Mbps; delay = 2ms; } <--> internet.pppg++;
  77. northAmerica.pppg++ <--> { datarate = 100Mbps; delay = 2ms; } <--> internet.pppg++;
  78. southAmerica.pppg++ <--> { datarate = 100Mbps; delay = 2ms; } <--> internet.pppg++;
  79. }