MultiRadio.ned 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // Copyright (C) 2010 Alfonso Ariza
  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.manetrouting.multiradio;
  18. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  19. import inet.node.dymo.DYMORouter;
  20. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  21. //
  22. // Models a network with several hosts. Each host may contain one or
  23. // more radios. Nodes are using adhoc routing to pass information.
  24. //
  25. network MultiRadio
  26. {
  27. parameters:
  28. int numHosts;
  29. submodules:
  30. radioMedium: Ieee80211ScalarRadioMedium {
  31. @display("p=83,15");
  32. }
  33. configurator: IPv4NetworkConfigurator {
  34. config=xml("<config><interface hosts='*' address='10.0.0.x' netmask='255.255.255.0'/></config>");
  35. addStaticRoutes = false;
  36. addDefaultRoutes = false;
  37. addSubnetRoutes = false;
  38. @display("p=253,15");
  39. }
  40. mobileHost[numHosts]: DYMORouter {
  41. @display("p=100,100;r=,,#000040");
  42. }
  43. connections allowunconnected:
  44. }