DLLTest.ned.off 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. channel fiberline extends DatarateChannel
  19. {
  20. parameters:
  21. delay = 1us;
  22. datarate = 512*1000000;
  23. }
  24. channel ethernetline extends DatarateChannel
  25. {
  26. parameters:
  27. delay = 0.1us;
  28. datarate = 10*1000000;
  29. }
  30. network DLLTest
  31. {
  32. parameters:
  33. int n;
  34. submodules:
  35. configurator: FlatNetworkConfigurator;
  36. r1: Router;
  37. r2: Router;
  38. r3: Router;
  39. cli[n]: StandardHost {
  40. @display("i=device/laptop");
  41. }
  42. srv: StandardHost {
  43. @display("i=device/server_l");
  44. }
  45. connections allowunconnected:
  46. for i=0..n-1 {
  47. cli[i].out++ --> ethernetline --> r1.in++;
  48. cli[i].in++ <-- ethernetline <-- r1.out++;
  49. }
  50. r1.out++ --> ethernetline --> r2.in++;
  51. r1.in++ <-- ethernetline <-- r2.out++;
  52. r2.out++ --> ethernetline --> r3.in++;
  53. r2.in++ <-- ethernetline <-- r3.out++;
  54. r3.out++ --> ethernetline --> srv.in++;
  55. r3.in++ <-- ethernetline <-- srv.out++;
  56. }