![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /******************************************************************************* 00002 * This file is part of openWNS (open Wireless Network Simulator) 00003 * _____________________________________________________________________________ 00004 * 00005 * Copyright (C) 2004-2009 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 5, D-52074 Aachen, Germany 00008 * phone: ++49-241-80-27910, 00009 * fax: ++49-241-80-22242 00010 * email: info@openwns.org 00011 * www: http://www.openwns.org 00012 * _____________________________________________________________________________ 00013 * 00014 * openWNS is free software; you can redistribute it and/or modify it under the 00015 * terms of the GNU Lesser General Public License version 2 as published by the 00016 * Free Software Foundation; 00017 * 00018 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00019 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00020 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00021 * details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 * 00026 ******************************************************************************/ 00027 00028 #ifndef WNS_SCHEDULER_QUEUE_QUEUEINTERFACE_HPP 00029 #define WNS_SCHEDULER_QUEUE_QUEUEINTERFACE_HPP 00030 00031 #include <WNS/scheduler/SchedulerTypes.hpp> 00032 #include <WNS/scheduler/RegistryProxyInterface.hpp> 00033 #include <WNS/HasReceptorConfigCreator.hpp> 00034 #include <queue> 00035 00036 namespace wns { namespace scheduler { namespace queue { 00037 00051 class QueueInterface { 00052 public: 00053 struct ProbeOutput{ 00054 ProbeOutput() 00055 : bits(0), 00056 compounds(0) 00057 {} 00058 Bits bits; 00059 int compounds; 00060 }; 00061 00062 virtual ~QueueInterface() {}; 00063 00069 virtual bool queueHasPDUs(ConnectionID cid) const = 0; 00070 00076 virtual ConnectionSet filterQueuedCids(ConnectionSet connections) = 0; 00077 00086 virtual wns::ldk::CompoundPtr getHeadOfLinePDU(ConnectionID cid) = 0; 00087 00094 virtual int getHeadOfLinePDUbits(ConnectionID cid) = 0; 00095 00101 virtual bool isEmpty() const = 0; 00102 00108 virtual bool hasQueue(ConnectionID cid) = 0; 00109 00115 virtual ProbeOutput resetAllQueues() = 0; 00116 00123 virtual ProbeOutput resetQueues(UserID user) = 0; 00124 00128 virtual void frameStarts() = 0; 00129 00136 virtual ProbeOutput resetQueue(ConnectionID cid) = 0; 00137 00139 virtual bool supportsDynamicSegmentation() const = 0; 00141 virtual wns::ldk::CompoundPtr getHeadOfLinePDUSegment(ConnectionID cid, int bits) = 0; 00143 virtual int getMinimumSegmentSize() const { return 0;}; 00144 00148 virtual std::queue<wns::ldk::CompoundPtr> 00149 getQueueCopy(ConnectionID cid) = 0; 00150 00157 virtual UserSet getQueuedUsers() const = 0; 00158 00164 virtual ConnectionSet getActiveConnections() const = 0; 00165 00172 virtual unsigned long int numCompoundsForCid(ConnectionID cid) const = 0; 00173 00179 virtual unsigned long int numBitsForCid(ConnectionID cid) const = 0; 00180 00186 virtual QueueStatusContainer getQueueStatus() const = 0; 00187 00197 virtual bool isAccepting(const wns::ldk::CompoundPtr& compound) const = 0; 00198 00206 virtual void put(const wns::ldk::CompoundPtr& compound) = 0; 00207 00213 virtual void setColleagues(RegistryProxyInterface* registry) = 0; 00214 00220 virtual void setFUN(wns::ldk::fun::FUN* fun) = 0; 00221 00225 virtual std::string printAllQueues() = 0; 00226 00227 }; 00228 //typedef wns::PyConfigViewCreator<QueueInterface, QueueInterface> QueueCreator; 00229 typedef wns::HasReceptorConfigCreator<QueueInterface, QueueInterface> QueueCreator; 00230 typedef wns::StaticFactory<QueueCreator> QueueFactory; 00231 00232 00233 00234 }}} // namespace wns::scheduler::queue 00235 #endif // WNS_SCHEDULER_QUEUE_QUEUEINTERFACE_HPP 00236 00237
1.5.5