DSQueue1.ned 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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.IOutputQueue;
  21. import inet.common.queue.PriorityScheduler;
  22. import inet.common.queue.WRRScheduler;
  23. import inet.networklayer.diffserv.BehaviorAggregateClassifier;
  24. //
  25. // Diffserv Queue used in Experiment 1.1 - 1.6 and 5.1.
  26. //
  27. module DSQueue1 like IOutputQueue
  28. {
  29. parameters:
  30. int frameCapacity = default(100);
  31. gates:
  32. input in;
  33. output out;
  34. submodules:
  35. classifier: BehaviorAggregateClassifier {
  36. dscps = "EF AF11 AF21 AF31 AF41";
  37. @display("p=41,284");
  38. }
  39. efQueue: DropTailQueue {
  40. frameCapacity = frameCapacity;
  41. @display("p=195,95");
  42. }
  43. af1xQueue: DropTailQueue {
  44. frameCapacity = frameCapacity;
  45. @display("p=195,224");
  46. }
  47. af2xQueue: DropTailQueue {
  48. frameCapacity = frameCapacity;
  49. @display("p=195,329");
  50. }
  51. af3xQueue: DropTailQueue {
  52. frameCapacity = frameCapacity;
  53. @display("p=195,421");
  54. }
  55. af4xQueue: DropTailQueue {
  56. frameCapacity = frameCapacity;
  57. @display("p=195,537");
  58. }
  59. beQueue: DropTailQueue {
  60. frameCapacity = frameCapacity;
  61. @display("p=195,628");
  62. }
  63. wrr: WRRScheduler {
  64. @display("p=384,368");
  65. }
  66. priority: PriorityScheduler {
  67. @display("p=556,263");
  68. }
  69. connections:
  70. in --> classifier.in;
  71. classifier.outs++ --> efQueue.in;
  72. classifier.outs++ --> af1xQueue.in;
  73. classifier.outs++ --> af2xQueue.in;
  74. classifier.outs++ --> af3xQueue.in;
  75. classifier.outs++ --> af4xQueue.in;
  76. classifier.defaultOut --> beQueue.in;
  77. af1xQueue.out --> wrr.in++;
  78. af2xQueue.out --> wrr.in++;
  79. af3xQueue.out --> wrr.in++;
  80. af4xQueue.out --> wrr.in++;
  81. beQueue.out --> wrr.in++;
  82. efQueue.out --> priority.in++;
  83. wrr.out --> priority.in++;
  84. priority.out --> out;
  85. }