AggregationTest.ned 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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.aggregationtest;
  19. import inet.applications.ethernet.EtherAppCli;
  20. import inet.common.queue.Sink;
  21. import inet.linklayer.ieee80211.Ieee80211Nic;
  22. import inet.mobility.static.StationaryMobility;
  23. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  24. import inet.node.ethernet.Eth100M;
  25. import inet.node.inet.Router;
  26. import inet.node.inet.StandardHost;
  27. import inet.node.inet.WirelessHost;
  28. import inet.node.wireless.AccessPoint;
  29. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  30. module WirelessAPWithSink
  31. {
  32. parameters:
  33. @networkNode();
  34. @labels(node);
  35. @display("i=device/accesspoint");
  36. *.interfaceTableModule = default("");
  37. gates:
  38. input radioIn @directIn;
  39. submodules:
  40. sink: Sink {
  41. parameters:
  42. @display("p=169,124");
  43. }
  44. wlan: Ieee80211Nic {
  45. parameters:
  46. @display("p=89,225;q=queue");
  47. mgmtType = default("Ieee80211MgmtAPSimplified");
  48. mgmt.encapDecap = "false";
  49. }
  50. mobility: StationaryMobility {
  51. parameters:
  52. @display("p=71,121");
  53. }
  54. connections allowunconnected:
  55. radioIn --> { @display("m=s"); } --> wlan.radioIn;
  56. wlan.upperLayerOut --> sink.in++;
  57. }
  58. module SinkClient
  59. {
  60. parameters:
  61. @display("i=device/wifilaptop");
  62. @networkNode();
  63. *.interfaceTableModule = "";
  64. gates:
  65. input radioIn @directIn;
  66. submodules:
  67. sink: Sink {
  68. parameters:
  69. @display("p=65,34");
  70. }
  71. wlan: Ieee80211Nic {
  72. parameters:
  73. @display("p=112,134;q=queue");
  74. mgmtType = default("Ieee80211MgmtSTASimplified");
  75. }
  76. mobility: StationaryMobility {
  77. parameters:
  78. @display("p=50,141");
  79. }
  80. connections allowunconnected:
  81. wlan.radioIn <-- radioIn;
  82. wlan.upperLayerOut --> sink.in++;
  83. }
  84. module ThroughputClient
  85. {
  86. parameters:
  87. @display("i=device/wifilaptop");
  88. @networkNode();
  89. *.interfaceTableModule = "";
  90. gates:
  91. input radioIn @directIn;
  92. submodules:
  93. cli: EtherAppCli {
  94. parameters:
  95. registerSAP = false;
  96. @display("b=40,24;p=180,60,col");
  97. }
  98. wlan: Ieee80211Nic {
  99. parameters:
  100. @display("p=112,134;q=queue");
  101. mgmtType = default("Ieee80211MgmtSTASimplified");
  102. }
  103. mobility: StationaryMobility {
  104. parameters:
  105. @display("p=50,141");
  106. }
  107. connections allowunconnected:
  108. wlan.radioIn <-- radioIn;
  109. cli.out --> wlan.upperLayerIn;
  110. }
  111. network AggregationTest
  112. {
  113. parameters:
  114. int numCli;
  115. @display("b=297,203");
  116. submodules:
  117. cliHost[numCli]: ThroughputClient {
  118. parameters:
  119. @display("r=,,#707070");
  120. }
  121. ap: WirelessAPWithSink {
  122. parameters:
  123. @display("p=200,200;r=,,#707070");
  124. }
  125. radioMedium: Ieee80211ScalarRadioMedium {
  126. parameters:
  127. @display("p=61,46");
  128. }
  129. }
  130. network AggregationTest2
  131. {
  132. @display("bgb=503,221");
  133. submodules:
  134. sender1: WirelessHost {
  135. @display("p=62,35");
  136. }
  137. sender2: WirelessHost {
  138. @display("p=62,117");
  139. }
  140. sink1: WirelessHost {
  141. @display("p=335,130");
  142. }
  143. sink2: WirelessHost {
  144. @display("p=335,35");
  145. }
  146. accessPoint: AccessPoint {
  147. @display("p=205,69");
  148. }
  149. configurator: IPv4NetworkConfigurator {
  150. parameters:
  151. assignDisjunctSubnetAddresses = false;
  152. @display("p=455,178");
  153. }
  154. radioMedium: Ieee80211ScalarRadioMedium {
  155. @display("p=62,165");
  156. }
  157. connections:
  158. }