WirelessAPWithSink.ned 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // Copyright (C) 2006 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.throughput;
  19. import inet.common.queue.Sink;
  20. import inet.linklayer.ieee80211.Ieee80211Nic;
  21. import inet.mobility.static.StationaryMobility;
  22. //
  23. // Well, this models a 802.11 Access Point with a Sink.
  24. //
  25. module WirelessAPWithSink
  26. {
  27. parameters:
  28. @networkNode();
  29. @labels(node);
  30. @display("i=device/accesspoint");
  31. *.interfaceTableModule = default("");
  32. gates:
  33. input radioIn @directIn;
  34. submodules:
  35. sink: Sink {
  36. parameters:
  37. @display("p=169,124");
  38. }
  39. wlan: Ieee80211Nic {
  40. parameters:
  41. @display("p=89,225;q=queue");
  42. mgmtType = default("Ieee80211MgmtAPSimplified");
  43. mgmt.encapDecap = "false";
  44. }
  45. mobility: StationaryMobility {
  46. parameters:
  47. @display("p=71,121");
  48. }
  49. connections allowunconnected:
  50. radioIn --> { @display("m=s"); } --> wlan.radioIn;
  51. wlan.upperLayerOut --> sink.in++;
  52. }