PageRenderTime 46ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/src/networklayer/manetrouting/Batman.ned

http://github.com/inet-framework/inet
Unknown | 60 lines | 55 code | 5 blank | 0 comment | 0 complexity | f52fc756c0cda488f29b73b68357e91f MD5 | raw file
Possible License(s): Apache-2.0, GPL-2.0
  1. //
  2. // Copyright (C) 2009 by Alfonso Ariza
  3. // Malaga University
  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.networklayer.manetrouting;
  18. import inet.networklayer.manetrouting.base.BaseRouting;
  19. import inet.networklayer.IManetRouting;
  20. //
  21. // Better Approach To Mobile Ad-hoc Networking (B.A.T.M.A.N.) Routing Protocol
  22. //
  23. // @see http://open-mesh.org/projects/batmand
  24. //
  25. // NOTE:
  26. // - The initialization of the routing component is done in stage=4
  27. //
  28. simple Batman extends BaseRouting like IManetRouting
  29. {
  30. parameters:
  31. @class(Batman);
  32. int debugLevel = default(4);
  33. double purgeTimeout @unit(s) = default(200s);
  34. double originatorInterval @unit(s) = default(1s); // originator message interval
  35. string preferedGateWay = default("0.0.0.0");
  36. int routingClass = default(0); // this parameter is used to set the routing behaviour
  37. // * 0: set no default route
  38. // * 1: use fast internet connection (gw_flags * TQ)
  39. // * 2: use stable internet connection (TQ)
  40. // * 3: use fast-switch internet connection (TQ but switch as soon as a better gateway appears)
  41. bool aggregationEnable = default(true); // enable/disable multiple batman packet sending/receiving in one UDP packet
  42. int GWClass_download_speed @unit(kbps) = default(0); // internet access download speed on preferedGateway, 0 means: this node doesn't have direct internet access
  43. int GWClass_upload_speed @unit(kbps) = default(0); // internet access upload speed on preferedGateway, 0 means download speed / 5
  44. volatile double jitter @unit(s) = default(uniform (0s,0.1s)); // 0..JITTER
  45. volatile double jitter2 @unit(s) = default(uniform (-0.1s,0.1s)); // -JITTER..+JITTER
  46. double MAX_AGGREGATION_MS @unit(s) = default(0.1s); // MAX_AGGREGATION_MS >= JITTER
  47. int MAX_AGGREGATION_BYTES @unit(B) = default(512B);
  48. double desynchronized @unit(s) = default(0s);
  49. volatile double broadcastDelay @unit("s") = default(uniform(0s,0.005s)); // the delay added to broadcast operations if EqualDelay is set (used to model processing time)
  50. bool PublicRoutingTables = default(false);
  51. string announcedNetworks = default(""); // space separated list of announced network/netmask pairs
  52. gates:
  53. input from_ip;
  54. output to_ip;
  55. }