MultiRadio.ned 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // This program is property of its copyright holder. All rights reserved.
  3. //
  4. package inet.examples.wireless.multiradio;
  5. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  6. import inet.node.inet.Router;
  7. import inet.node.inet.WirelessHost;
  8. import inet.node.wireless.AccessPoint;
  9. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  10. import inet.visualizer.contract.IIntegratedVisualizer;
  11. import ned.DatarateChannel;
  12. network MultiRadio
  13. {
  14. parameters:
  15. @display("bgb=500,300");
  16. bool useEthernetSwitching = default(true);
  17. bool useRouting = default(false);
  18. submodules:
  19. visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
  20. parameters:
  21. @display("p=100,50");
  22. }
  23. radioMedium: Ieee80211ScalarRadioMedium {
  24. parameters:
  25. @display("p=100,150");
  26. }
  27. configurator: IPv4NetworkConfigurator {
  28. parameters:
  29. @display("p=100,250");
  30. }
  31. host1: WirelessHost {
  32. parameters:
  33. @display("p=85,203");
  34. }
  35. host2: WirelessHost {
  36. parameters:
  37. @display("p=454,203");
  38. }
  39. accessPoint1: AccessPoint {
  40. parameters:
  41. @display("p=150,99");
  42. }
  43. accessPoint2: AccessPoint {
  44. parameters:
  45. @display("p=354,99");
  46. }
  47. router: Router if useRouting {
  48. parameters:
  49. @display("p=255,168");
  50. }
  51. connections:
  52. accessPoint1.ethg++ <--> DatarateChannel { datarate = 100Mbps; } <--> accessPoint2.ethg++ if useEthernetSwitching;
  53. }