network-switch.ned 815 B

123456789101112131415161718192021222324252627282930313233
  1. package inet.tests.ethernet;
  2. import inet.node.ethernet.EtherHost2;
  3. import inet.node.ethernet.EtherSwitch;
  4. import ned.DatarateChannel;
  5. network HostsWithSwitch
  6. {
  7. @display("bgl=2");
  8. types:
  9. submodules:
  10. hostA: EtherHost2 {
  11. parameters:
  12. @display("p=113,43");
  13. }
  14. hostB: EtherHost2 {
  15. parameters:
  16. @display("p=106,136");
  17. }
  18. hostC: EtherHost2 {
  19. parameters:
  20. @display("p=397,68");
  21. }
  22. switch: EtherSwitch {
  23. parameters:
  24. @display("p=260,79");
  25. }
  26. connections:
  27. hostA.ethg <--> DatarateChannel <--> switch.ethg++;
  28. hostB.ethg <--> DatarateChannel <--> switch.ethg++;
  29. hostC.ethg <--> DatarateChannel <--> switch.ethg++;
  30. }