WiredAndWirelessHostsWithAP.ned 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // This program is property of its copyright holder. All rights reserved.
  3. //
  4. package inet.examples.wireless.wiredandwirelesshostswithap;
  5. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  6. import inet.node.ethernet.Eth100M;
  7. import inet.node.inet.Router;
  8. import inet.node.inet.StandardHost;
  9. import inet.node.inet.WirelessHost;
  10. import inet.node.wireless.AccessPoint;
  11. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  12. import inet.visualizer.contract.IIntegratedVisualizer;
  13. network WiredAndWirelessHostsWithAP
  14. {
  15. @display("bgb=500,300");
  16. submodules:
  17. visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
  18. parameters:
  19. @display("p=100,50");
  20. }
  21. configurator: IPv4NetworkConfigurator {
  22. parameters:
  23. assignDisjunctSubnetAddresses = false;
  24. @display("p=100,150");
  25. }
  26. radioMedium: Ieee80211ScalarRadioMedium {
  27. parameters:
  28. @display("p=100,250");
  29. }
  30. wirelessHost1: WirelessHost {
  31. parameters:
  32. @display("p=62,69");
  33. }
  34. wiredHost1: StandardHost {
  35. parameters:
  36. @display("p=296,134");
  37. }
  38. wiredHost2: StandardHost {
  39. parameters:
  40. @display("p=412,70");
  41. }
  42. router: Router {
  43. parameters:
  44. @display("p=296,69");
  45. }
  46. accessPoint: AccessPoint {
  47. parameters:
  48. @display("p=205,69");
  49. }
  50. connections:
  51. accessPoint.ethg++ <--> Eth100M <--> router.ethg++;
  52. wiredHost1.ethg++ <--> Eth100M <--> accessPoint.ethg++;
  53. wiredHost2.ethg++ <--> Eth100M <--> router.ethg++;
  54. }