CloudAndHosts.ned 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.cloudandhosts;
  18. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  19. import inet.node.inet.StandardHost;
  20. import inet.node.internetcloud.InternetCloud;
  21. import ned.DatarateChannel;
  22. network CloudAndHosts
  23. {
  24. parameters:
  25. int numSenders;
  26. types:
  27. channel C extends DatarateChannel
  28. {
  29. delay = 10ms;
  30. datarate = 5Mbps;
  31. }
  32. submodules:
  33. configurator: IPv4NetworkConfigurator {
  34. parameters:
  35. @display("p=61,163");
  36. }
  37. sender[numSenders]: StandardHost;
  38. recip: StandardHost;
  39. internet: InternetCloud;
  40. connections:
  41. recip.pppg++ <--> C <--> internet.pppg++;
  42. for i=0..numSenders-1 {
  43. sender[i].pppg++ <--> C <--> internet.pppg++;
  44. }
  45. }