NClients.ned 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // Copyright (C) 2004 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.examples.sctp.nclients;
  19. import inet.common.misc.ThruputMeteringChannel;
  20. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  21. import inet.node.inet.Router;
  22. import inet.node.inet.StandardHost;
  23. network NClients
  24. {
  25. parameters:
  26. int n;
  27. types:
  28. channel fiberline extends ThruputMeteringChannel
  29. {
  30. delay = 1us;
  31. datarate = 512Mbps;
  32. thruputDisplayFormat = "u";
  33. }
  34. channel ethernetline extends ThruputMeteringChannel
  35. {
  36. delay = 0.1us;
  37. datarate = 10Mbps;
  38. thruputDisplayFormat = "u";
  39. }
  40. submodules:
  41. configurator: IPv4NetworkConfigurator {
  42. parameters:
  43. @display("p=185,50");
  44. }
  45. r1: Router {
  46. parameters:
  47. @display("p=186,250");
  48. }
  49. r2: Router {
  50. parameters:
  51. @display("p=304,220");
  52. }
  53. r3: Router {
  54. parameters:
  55. @display("p=433,250");
  56. }
  57. cli[n]: StandardHost {
  58. parameters:
  59. @display("i=device/laptop");
  60. }
  61. srv: StandardHost {
  62. parameters:
  63. @display("p=544,194;i=device/server_l");
  64. }
  65. connections:
  66. for i=0..n-1 {
  67. cli[i].pppg++ <--> ethernetline <--> r1.pppg++;
  68. }
  69. r1.pppg++ <--> ethernetline <--> r2.pppg++;
  70. r2.pppg++ <--> ethernetline <--> r3.pppg++;
  71. r3.pppg++ <--> ethernetline <--> srv.pppg++;
  72. }