ClientServer.ned 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // Copyright (C) 2000 Institut fuer Telematik, Universitaet Karlsruhe
  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. import ned.DatarateChannel;
  19. import inet.util.NetAnimTrace;
  20. import inet.node.inet.StandardHost;
  21. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  22. network ClientServer
  23. {
  24. parameters:
  25. double per = default(0);
  26. @display("bgb=232,193");
  27. types:
  28. channel C extends DatarateChannel
  29. {
  30. datarate = 10Mbps;
  31. delay = 0.1us;
  32. per = per;
  33. }
  34. submodules:
  35. client: StandardHost {
  36. parameters:
  37. @display("p=53,67;i=device/pc3");
  38. }
  39. server: StandardHost {
  40. parameters:
  41. @display("p=181,67;i=device/pc2");
  42. }
  43. configurator: IPv4NetworkConfigurator {
  44. parameters:
  45. @display("p=53,134");
  46. }
  47. connections:
  48. client.pppg++ <--> C <--> server.pppg++;
  49. }