DynamicRadioNetwork.ned 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // Copyright (C) 2006 Andras Varga
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU General Public License
  6. // as published by the Free Software Foundation; either version 2
  7. // of the License, or (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. //
  18. package inet.examples.wireless.dynamic;
  19. import inet.common.scenario.ScenarioManager;
  20. import inet.networklayer.configurator.ipv4.HostAutoConfigurator;
  21. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  22. import inet.node.inet.AdhocHost;
  23. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  24. import inet.visualizer.contract.IIntegratedVisualizer;
  25. module DynamicHost extends AdhocHost
  26. {
  27. parameters:
  28. networkLayer.configurator.networkConfiguratorModule = "";
  29. submodules:
  30. autoConfigurator: HostAutoConfigurator {
  31. @display("p=171,335");
  32. }
  33. }
  34. network DynamicRadioNetwork
  35. {
  36. submodules:
  37. visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
  38. parameters:
  39. @display("p=100,50");
  40. }
  41. configurator: IPv4NetworkConfigurator {
  42. parameters:
  43. @display("p=100,150");
  44. }
  45. radioMedium: Ieee80211ScalarRadioMedium {
  46. parameters:
  47. @display("p=100,250");
  48. }
  49. destinationNode: DynamicHost {
  50. parameters:
  51. @display("p=250,50");
  52. }
  53. sourceNode[0]: DynamicHost {
  54. parameters:
  55. @dynamic(true);
  56. @display("p=250,150");
  57. }
  58. scenarioManager: ScenarioManager {
  59. parameters:
  60. @display("p=100,250");
  61. }
  62. }