MeterTestApp.ned 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // Copyright (C) 2012 Opensim Ltd.
  3. // Author: Tamas Borbely
  4. //
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with this program; if not, see <http://www.gnu.org/licenses/>.
  17. //
  18. //
  19. // This module can be used to test Diffserv meter components.
  20. // It is a traffic generator for the meter, and it also
  21. // receives the packets from the meter. The different gates
  22. // of the meter (corresponding to the conformance levels)
  23. // should be connected to the input gates of MetersTestApp.
  24. // The names of the conformance levels (colors) must be
  25. // specified as a parameter.
  26. //
  27. // A report is written for each packet into resultFile.
  28. //
  29. simple MeterTestApp
  30. {
  31. parameters:
  32. double startTime @unit(s) = default(0s);
  33. double stopTime @unit(s) = default(-1s);
  34. int numPackets = default(0); // 0 = unlimited
  35. volatile double iaTime @unit(s);
  36. volatile int packetSize @unit(B);
  37. string colors; // specify here as many colors, as many input gate is connected (e.g. "green yellow red")
  38. string resultFile = default("result.txt");
  39. gates:
  40. output out;
  41. input in[];
  42. }