MpduGen.ned 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // This program is free software: you can redistribute it and/or modify
  3. // it under the terms of the GNU Lesser General Public License as published by
  4. // the Free Software Foundation, either version 3 of the License, or
  5. // (at your option) any later version.
  6. //
  7. // This program is distributed in the hope that it will be useful,
  8. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. // GNU Lesser General Public License for more details.
  11. //
  12. // You should have received a copy of the GNU Lesser General Public License
  13. // along with this program. If not, see http://www.gnu.org/licenses/.
  14. //
  15. package ieee80211retransmissiontest;
  16. import inet.applications.contract.IUDPApp;
  17. //
  18. // A very simple MPDU generator module
  19. //
  20. simple MpduGen like IUDPApp
  21. {
  22. // List of packets genereted by this module.
  23. // S means short data packet (SendDataWithACKFrame)
  24. // L means long data packet that is preceded by an RTS frame (SendDataWithRtsCts)
  25. // Example: packets = "SLS"
  26. string packets;
  27. string packetName = default("MPDU");
  28. int longPacketSize @unit(B) = default(1700B);
  29. int shortPacketSize @unit(B) = default(500B);
  30. string interfaceTableModule; // The path to the InterfaceTable module
  31. int localPort = default(-1); // local port (-1: use ephemeral port)
  32. int destPort;
  33. string destAddress;
  34. string localAddress = default("");
  35. double startTime @unit(s) = default(0.05s);
  36. @display("i=block/app");
  37. @signal[sentPk](type=cPacket);
  38. @signal[rcvdPk](type=cPacket);
  39. @statistic[rcvdPk](title="packets received"; source=rcvdPk; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
  40. @statistic[sentPk](title="packets sent"; source=sentPk; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
  41. gates:
  42. input udpIn @labels(UDPControlInfo/up);
  43. output udpOut @labels(UDPControlInfo/down);
  44. }