INET Framework for OMNeT++/OMNEST
AnsaQosSystem.cc File Reference
#include <omnetpp.h>
#include "AnsaQosSystem.h"
#include "RoutingTableAccess.h"

Go to the source code of this file.

Functions

 Define_Module (AnsaQosSystem)
std::ostream & operator<< (std::ostream &ostr, ANSAQOS::QueueConfig config)

Function Documentation

std::ostream& operator<< ( std::ostream &  ostr,
ANSAQOS::QueueConfig  config 
)

Definition at line 772 of file AnsaQosSystem.cc.

{ 
  switch (config.getQueueType())
  {
    case ANSAQOS::Q_FIFO :
      ostr  << "Strategy: fifo;  Queue: ";
      ostr  << config.getCurrentHold() << "/";
      ostr  << config.getDroped() << "/";
      ostr  << config.getHoldCapacity() << " (size/dropped/max)";
      break;
    case ANSAQOS::Q_WFQ : 
      ostr  << "Strategy: weighted fair;  Queue: ";
      ostr  << config.getCurrentHold() << "/";
      ostr  << config.getHoldCapacity() << "/";
      ostr  << config.getCdt() << "/";
      ostr  << config.getDroped() << " (size/max total/threshold/drops); Conversations: ";
      ostr  << config.getNumQueues() << "/";
      ostr  << config.getMaxActQueues() << "/";
      ostr  << config.getMaxQueues() << " (active/max active/max total)";
      break;
    case ANSAQOS::Q_PQ : 
      ostr  << "Strategy: priority-list " << config.getListId();
      switch (config.getDefaultQueueId())
      {
        case 1 :
          ostr  << " (Default queue: High)";
          break;
        case 2 :
          ostr  << " (Default queue: Medium)";
          break;
        case 3 :
          ostr  << " (Default queue: Normal)";
          break;
        case 4 :
          ostr  << " (Default queue: Low)";
          break;
        default:
          ostr  << " (Default queue: Error)";
      }
      break;
    case ANSAQOS::Q_CQ : 
      ostr  << "Strategy: custom-list " << config.getListId();
      ostr  << " (Default queue: " << config.getDefaultQueueId() << ")";
      break;
    default :
      ostr  << "Error";
  }    
  
  return ostr;
}