AODVNetwork.ned 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // Copyright (C) 2014 OpenSim Ltd.
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Lesser General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (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 Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public License
  15. // along with this program. If not, see http://www.gnu.org/licenses/.
  16. //
  17. package inet.examples.aodv;
  18. import inet.common.lifecycle.LifecycleController;
  19. import inet.common.scenario.ScenarioManager;
  20. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  21. import inet.networklayer.ipv4.RoutingTableRecorder;
  22. import inet.node.aodv.AODVRouter;
  23. import inet.physicallayer.idealradio.IdealRadioMedium;
  24. network AODVNetwork
  25. {
  26. parameters:
  27. int numHosts;
  28. submodules:
  29. radioMedium: IdealRadioMedium {
  30. parameters:
  31. @display("p=50,50");
  32. }
  33. configurator: IPv4NetworkConfigurator {
  34. parameters:
  35. config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
  36. @display("p=50,100");
  37. }
  38. routingTableRecorder: RoutingTableRecorder {
  39. parameters:
  40. @display("p=50,150");
  41. }
  42. lifecycleController: LifecycleController {
  43. parameters:
  44. @display("p=50,200");
  45. }
  46. scenarioManager: ScenarioManager {
  47. parameters:
  48. script = default(xml("<scenario/>"));
  49. @display("p=50,250");
  50. }
  51. host[numHosts]: AODVRouter {
  52. parameters:
  53. @display("i=device/pocketpc_s;r=,,#707070");
  54. }
  55. connections allowunconnected:
  56. }