network-switch.ned 786 B

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