DSQueue2.ned 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. package inet.examples.diffserv.onedomain;
  19. import inet.common.queue.DropTailQueue;
  20. import inet.common.queue.FIFOQueue;
  21. import inet.common.queue.IOutputQueue;
  22. import inet.common.queue.REDDropper;
  23. import inet.common.queue.WRRScheduler;
  24. import inet.networklayer.diffserv.BehaviorAggregateClassifier;
  25. //
  26. // Diffserv Queue used in Experiment 2.1 - 2.4.
  27. //
  28. module DSQueue2 like IOutputQueue
  29. {
  30. gates:
  31. input in;
  32. output out;
  33. submodules:
  34. classifier: BehaviorAggregateClassifier {
  35. dscps = "AF11 AF12 AF13";
  36. @display("p=50,181");
  37. }
  38. red: REDDropper {
  39. numGates = 3;
  40. @display("p=142,94");
  41. }
  42. afQueue: FIFOQueue {
  43. @display("p=266,94");
  44. }
  45. beQueue: DropTailQueue {
  46. @display("p=204,277");
  47. }
  48. wrr: WRRScheduler {
  49. @display("p=347,181");
  50. }
  51. connections:
  52. in --> classifier.in;
  53. classifier.outs++ --> red.in[0];
  54. classifier.outs++ --> red.in[1];
  55. classifier.outs++ --> red.in[2];
  56. classifier.defaultOut --> beQueue.in;
  57. red.out[0] --> afQueue.in++;
  58. red.out[1] --> afQueue.in++;
  59. red.out[2] --> afQueue.in++;
  60. beQueue.out --> wrr.in++;
  61. afQueue.out --> wrr.in++;
  62. wrr.out --> out;
  63. }