User Manual, Developers Guide and API Documentation

wns::scheduler::queue::SimpleQueue Class Reference

the queues handled by this class all use a FIFO strategy the queues are organized by ConnectionID cid (several per user)

#include <scheduler/queue/SimpleQueue.hpp>

Inheritance diagram for wns::scheduler::queue::SimpleQueue:

Inheritance graph
[legend]
Collaboration diagram for wns::scheduler::queue::SimpleQueue:

Collaboration graph
[legend]

List of all members.

Public Member Functions

ConnectionSet filterQueuedCids (ConnectionSet connections)
 Returns the set of connections for which the queue has backlogged PDUs.
void frameStarts ()
 May be called to signal that a frame starts.
ConnectionSet getActiveConnections () const
 Returns a ConnectionSet of all connections who have backlogged PDUs in his queue.
wns::ldk::CompoundPtr getHeadOfLinePDU (ConnectionID cid)
 compound out
int getHeadOfLinePDUbits (ConnectionID cid)
 Delivers the size in bits of the PDU that will be returned by the next call to getHeadOfLinePDU(ConnectionID cid).
wns::ldk::CompoundPtr getHeadOfLinePDUSegment (ConnectionID cid, int bits)
 get compound out and do segmentation into bits (gross)
int getMinimumSegmentSize () const
 if supportsDynamicSegmentation, this is the minimum size of a segment in bits
std::queue< wns::ldk::CompoundPtrgetQueueCopy (ConnectionID cid)
 Retrieves a copy of the queue for a CID. Queued compounds are not copied but point to the same ones as in the original queue!
UserSet getQueuedUsers () const
 Returns a UserSet of all users who have backlogged PDUs in at least one of their queues.
QueueStatusContainer getQueueStatus () const
 Returns the a container of QueueStatus for each cid.
bool hasQueue (ConnectionID cid)
 Return True if a queue for this cid exists.
bool isAccepting (const wns::ldk::CompoundPtr &compound) const
 Has to be called before calling put(CompoundPtr) to see whether the queue module can still accept the PDU. According to the specific implementation the acceptance may be determined by the fill level of the correspondig queue. called in doIsAccepting(..) of the ResourceScheduler-FU.
bool isEmpty () const
 Return True if there is no compound in the queue.
unsigned long int numBitsForCid (ConnectionID cid) const
 Returns the number of Bits schedules for one user.
unsigned long int numCompoundsForCid (ConnectionID cid) const
 Returns the number of Compounds the Queue has stored for a certain user.
std::string printAllQueues ()
 print number of bits and pdus in each queue
void put (const wns::ldk::CompoundPtr &compound)
 compound in
bool queueHasPDUs (ConnectionID cid) const
 Returns true if the queue belonging to cid has backlogged PDUs.
ProbeOutput resetAllQueues ()
 Resets all internal queues and deletes all backlogged PDUs.
ProbeOutput resetQueue (ConnectionID cid)
 Resets only the queue belonging to the given ConnectionID and all backlogged PDUs from this queue.
ProbeOutput resetQueues (UserID user)
 Resets all queues belonging to the given user and deletes all backlogged PDUs in these queues.
void setColleagues (RegistryProxyInterface *_registry)
 Gives the queue module access to the RegistryProxy.
void setFUN (wns::ldk::fun::FUN *fun)
 needed for probes
 SimpleQueue (wns::ldk::HasReceptorInterface *, const wns::pyconfig::View &config)
bool supportsDynamicSegmentation () const
 true if getHeadOfLinePDUSegment() is supported
virtual ~SimpleQueue ()

Protected Member Functions

void probe ()

Private Types

typedef std::map< ConnectionID,
Queue
QueueContainer

Private Attributes

struct
wns::scheduler::queue::SimpleQueue::Colleagues 
colleagues
wns::pyconfig::View config
wns::logger::Logger logger
long int maxSize
wns::ldk::fun::FUNmyFUN
wns::probe::bus::contextprovider::VariableprobeContextProviderForCid
wns::probe::bus::contextprovider::VariableprobeContextProviderForPriority
QueueContainer queues
wns::probe::bus::ContextCollectorPtr sizeProbeBus

Classes

struct  Colleagues
struct  Queue


Detailed Description

Definition at line 49 of file SimpleQueue.hpp.


Member Typedef Documentation

Definition at line 122 of file SimpleQueue.hpp.


Constructor & Destructor Documentation

SimpleQueue::SimpleQueue ( wns::ldk::HasReceptorInterface ,
const wns::pyconfig::View config 
)

Definition at line 42 of file SimpleQueue.cpp.

SimpleQueue::~SimpleQueue (  )  [virtual]

Definition at line 52 of file SimpleQueue.cpp.


Member Function Documentation

ConnectionSet SimpleQueue::filterQueuedCids ( ConnectionSet  connections  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 259 of file SimpleQueue.cpp.

void wns::scheduler::queue::SimpleQueue::frameStarts (  )  [inline, virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 87 of file SimpleQueue.hpp.

ConnectionSet SimpleQueue::getActiveConnections (  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 153 of file SimpleQueue.cpp.

wns::ldk::CompoundPtr SimpleQueue::getHeadOfLinePDU ( ConnectionID  cid  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 204 of file SimpleQueue.cpp.

int SimpleQueue::getHeadOfLinePDUbits ( ConnectionID  cid  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 222 of file SimpleQueue.cpp.

wns::ldk::CompoundPtr wns::scheduler::queue::SimpleQueue::getHeadOfLinePDUSegment ( ConnectionID  cid,
int  bits 
) [inline, virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 92 of file SimpleQueue.hpp.

int wns::scheduler::queue::SimpleQueue::getMinimumSegmentSize (  )  const [inline, virtual]

Reimplemented from wns::scheduler::queue::QueueInterface.

Definition at line 94 of file SimpleQueue.hpp.

std::queue< wns::ldk::CompoundPtr > SimpleQueue::getQueueCopy ( ConnectionID  cid  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 229 of file SimpleQueue.cpp.

UserSet SimpleQueue::getQueuedUsers (  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 138 of file SimpleQueue.cpp.

QueueStatusContainer SimpleQueue::getQueueStatus (  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 182 of file SimpleQueue.cpp.

bool SimpleQueue::hasQueue ( ConnectionID  cid  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 246 of file SimpleQueue.cpp.

bool SimpleQueue::isAccepting ( const wns::ldk::CompoundPtr compound  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 78 of file SimpleQueue.cpp.

bool SimpleQueue::isEmpty (  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 236 of file SimpleQueue.cpp.

unsigned long int SimpleQueue::numBitsForCid ( ConnectionID  cid  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 173 of file SimpleQueue.cpp.

unsigned long int SimpleQueue::numCompoundsForCid ( ConnectionID  cid  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 165 of file SimpleQueue.cpp.

std::string SimpleQueue::printAllQueues (  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 362 of file SimpleQueue.cpp.

void wns::scheduler::queue::SimpleQueue::probe (  )  [protected]

void SimpleQueue::put ( const wns::ldk::CompoundPtr compound  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 112 of file SimpleQueue.cpp.

bool SimpleQueue::queueHasPDUs ( ConnectionID  cid  )  const [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 252 of file SimpleQueue.cpp.

QueueInterface::ProbeOutput SimpleQueue::resetAllQueues (  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 277 of file SimpleQueue.cpp.

QueueInterface::ProbeOutput SimpleQueue::resetQueue ( ConnectionID  cid  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 339 of file SimpleQueue.cpp.

QueueInterface::ProbeOutput SimpleQueue::resetQueues ( UserID  user  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 306 of file SimpleQueue.cpp.

void SimpleQueue::setColleagues ( RegistryProxyInterface registry  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 271 of file SimpleQueue.cpp.

void SimpleQueue::setFUN ( wns::ldk::fun::FUN fun  )  [virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 58 of file SimpleQueue.cpp.

bool wns::scheduler::queue::SimpleQueue::supportsDynamicSegmentation (  )  const [inline, virtual]

Implements wns::scheduler::queue::QueueInterface.

Definition at line 90 of file SimpleQueue.hpp.


Member Data Documentation

Definition at line 131 of file SimpleQueue.hpp.

Definition at line 130 of file SimpleQueue.hpp.

Definition at line 120 of file SimpleQueue.hpp.

Definition at line 132 of file SimpleQueue.hpp.

Definition at line 107 of file SimpleQueue.hpp.

Definition at line 108 of file SimpleQueue.hpp.

Definition at line 123 of file SimpleQueue.hpp.

Definition at line 109 of file SimpleQueue.hpp.


The documentation for this class was generated from the following files:

Generated on Sat Feb 11 03:33:01 2012 for openWNS by  doxygen 1.5.5