VoIPStreamTest.ned 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // Copyright (C) 2006 Andras Varga
  3. //
  4. // This library 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;
  7. // either version 2 of the License, or any later version.
  8. // The library is distributed in the hope that it will be useful,
  9. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. // See the GNU Lesser General Public License for more details.
  12. //
  13. package inet.examples.voipstream.VoIPStreamTest;
  14. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  15. import inet.node.ethernet.EtherSwitch;
  16. import inet.node.inet.Router;
  17. import inet.node.inet.StandardHost;
  18. network VoIPStreamTest
  19. {
  20. types:
  21. channel line1 extends ned.DatarateChannel
  22. {
  23. parameters:
  24. delay = 100us;
  25. datarate = 100Mbps;
  26. }
  27. channel line2 extends ned.DatarateChannel
  28. {
  29. parameters:
  30. delay = 100us;
  31. datarate = 100Mbps;
  32. }
  33. submodules:
  34. client: StandardHost {
  35. parameters:
  36. @display("p=71,64;i=device/laptop_l");
  37. }
  38. switch: EtherSwitch {
  39. parameters:
  40. @display("p=202,156;i=device/switch");
  41. }
  42. net: Router {
  43. parameters:
  44. @display("p=394,166;i=misc/cloud_l");
  45. }
  46. router: Router {
  47. parameters:
  48. @display("p=311,74;i=abstract/router");
  49. }
  50. server: StandardHost {
  51. parameters:
  52. @display("p=512,58;i=device/server_l");
  53. }
  54. configurator: IPv4NetworkConfigurator {
  55. parameters:
  56. config = xml("<config><interface hosts='*' address='10.x.x.x' netmask='255.x.x.x'/></config>");
  57. @display("p=495,160;i=block/cogwheel_s");
  58. }
  59. connections:
  60. client.ethg++ <--> line1 <--> switch.ethg++;
  61. router.ethg++ <--> line1 <--> switch.ethg++;
  62. router.ethg++ <--> line2 <--> net.ethg++;
  63. server.ethg++ <--> line2 <--> net.ethg++;
  64. }