Throughput.ned 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. // Copyright (C) 2005 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.hosttohost;
  19. import inet.applications.ethernet.EtherAppCli;
  20. import inet.common.queue.Sink;
  21. import inet.linklayer.ieee80211.Ieee80211Nic;
  22. import inet.mobility.single.CircleMobility;
  23. import inet.mobility.static.StationaryMobility;
  24. import inet.node.wireless.AccessPoint;
  25. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  26. import inet.visualizer.contract.IIntegratedVisualizer;
  27. module ThroughputClient
  28. {
  29. parameters:
  30. @display("i=device/wifilaptop");
  31. @networkNode();
  32. *.interfaceTableModule = "";
  33. gates:
  34. input radioIn @directIn;
  35. submodules:
  36. cli: EtherAppCli {
  37. parameters:
  38. registerSAP = false;
  39. @display("b=40,24;p=180,60,col");
  40. }
  41. wlan: Ieee80211Nic {
  42. parameters:
  43. @display("p=112,134;q=queue");
  44. mgmtType = "Ieee80211MgmtSTASimplified";
  45. }
  46. mobility: CircleMobility {
  47. parameters:
  48. @display("p=50,141");
  49. }
  50. connections allowunconnected:
  51. wlan.radioIn <-- radioIn;
  52. cli.out --> wlan.upperLayerIn;
  53. }
  54. module ThroughputServer
  55. {
  56. parameters:
  57. @display("i=device/wifilaptop");
  58. @networkNode();
  59. *.interfaceTableModule = "";
  60. gates:
  61. input radioIn @directIn;
  62. submodules:
  63. sink: Sink {
  64. parameters:
  65. @display("p=210,68,col");
  66. }
  67. wlan: Ieee80211Nic {
  68. parameters:
  69. @display("p=120,158;q=queue");
  70. mgmtType = "Ieee80211MgmtSTASimplified";
  71. }
  72. mobility: StationaryMobility {
  73. parameters:
  74. @display("p=50,141");
  75. }
  76. connections allowunconnected:
  77. wlan.radioIn <-- radioIn;
  78. sink.in++ <-- wlan.upperLayerOut;
  79. }
  80. network Throughput
  81. {
  82. parameters:
  83. int numCli;
  84. @display("b=297,203");
  85. submodules:
  86. visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
  87. parameters:
  88. @display("p=100,50");
  89. }
  90. radioMedium: Ieee80211ScalarRadioMedium {
  91. parameters:
  92. @display("p=100,150");
  93. }
  94. cliHost[numCli]: ThroughputClient {
  95. parameters:
  96. @display("r=,,#707070");
  97. }
  98. srvHost: ThroughputServer {
  99. parameters:
  100. @display("p=350,350;r=,,#707070");
  101. }
  102. ap: AccessPoint {
  103. parameters:
  104. @display("p=200,200;r=,,#707070");
  105. wlan[*].mgmtType = "Ieee80211MgmtAPSimplified";
  106. }
  107. }