User Manual, Developers Guide and API Documentation

BypassQueue.hpp

Go to the documentation of this file.
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  * email: info@openwns.org
00009  * www: http://www.openwns.org
00010  * _____________________________________________________________________________
00011  *
00012  * openWNS is free software; you can redistribute it and/or modify it under the
00013  * terms of the GNU Lesser General Public License version 2 as published by the
00014  * Free Software Foundation;
00015  *
00016  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00017  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00018  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00019  * details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public License
00022  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00023  *
00024  ******************************************************************************/
00025 #pragma once
00026 
00027 #include <boost/function.hpp>
00028 #include <boost/noncopyable.hpp>
00029 #include <WNS/scheduler/queue/QueueInterface.hpp>
00030 
00031 namespace wns { namespace ldk {
00032     class HasReceptorInterface;
00033     }}
00034 
00035 
00036 namespace wimac { namespace scheduler {
00037 
00038     class BypassQueue:
00039         public wns::scheduler::queue::QueueInterface,
00040         boost::noncopyable
00041     {
00042     public:
00043         BypassQueue(wns::ldk::HasReceptorInterface* parent, const wns::pyconfig::View& config);
00044 
00045 
00050         bool
00051         queueHasPDUs(wns::scheduler::ConnectionID) const;
00052 
00053         virtual bool
00054         isEmpty() const;
00055 
00060         wns::scheduler::ConnectionSet
00061         filterQueuedCids(wns::scheduler::ConnectionSet connections);
00062 
00063 
00072         wns::ldk::CompoundPtr
00073         getHeadOfLinePDU(wns::scheduler::ConnectionID cid);
00074 
00080         int
00081         getHeadOfLinePDUbits(wns::scheduler::ConnectionID cid);
00082 
00086         bool
00087         hasQueue(wns::scheduler::ConnectionID cid);
00088 
00093         ProbeOutput
00094         resetAllQueues();
00095 
00100         ProbeOutput
00101         resetQueues(wns::scheduler::UserID);
00102 
00106         virtual void
00107         frameStarts();
00108 
00109 
00114         ProbeOutput
00115         resetQueue(wns::scheduler::ConnectionID);
00116 
00120         bool
00121         supportsDynamicSegmentation() const;
00122 
00126         wns::ldk::CompoundPtr
00127         getHeadOfLinePDUSegment(wns::scheduler::ConnectionID cid, int bits);
00128 
00133         wns::scheduler::UserSet
00134         getQueuedUsers() const;
00135 
00140         wns::scheduler::ConnectionSet
00141         getActiveConnections() const;
00142 
00147         wns::scheduler::ConnectionSet
00148         getActiveConnectionsForPriority(unsigned int priority) const;
00149 
00155         //unsigned long int
00156         //numCompoundsForUser(wns::scheduler::UserID user) const;
00157 
00162         unsigned long int
00163         numCompoundsForCid(wns::scheduler::ConnectionID cid) const;
00164 
00169         //unsigned long int
00170         //numBitsForUser(wns::scheduler::UserID user) const;
00171 
00175         unsigned long int
00176         numBitsForCid(wns::scheduler::ConnectionID cid) const;
00177 
00181         wns::scheduler::QueueStatusContainer
00182         getQueueStatus() const;
00183 
00192         bool
00193         isAccepting(const wns::ldk::CompoundPtr&) const;
00194 
00203         void
00204         put(const wns::ldk::CompoundPtr& compound);
00205 
00208         virtual std::queue<wns::ldk::CompoundPtr> 
00209         getQueueCopy(wns::scheduler::ConnectionID cid);
00210 
00214         void
00215         setColleagues(wns::scheduler::RegistryProxyInterface* registry);
00216 
00220         void
00221         setFUN(wns::ldk::fun::FUN* fun);
00222 
00226         std::string
00227         printAllQueues();
00228 
00229         wns::ldk::Receptor*
00230         getReceptor() const;
00231 
00232 
00233         struct IsAcceptingChecker
00234         {
00235             virtual bool operator()(const wns::ldk::CompoundPtr&) = 0;
00236         };
00237 
00238     private:
00239 
00240         wns::ldk::HasReceptorInterface* hasReceptor_;
00241 
00242         mutable IsAcceptingChecker* isAcceptingChecker_;
00243 
00244         wns::ldk::CompoundPtr current_;
00245 
00246         struct {
00247             wns::scheduler::RegistryProxyInterface* registry;
00248         } colleagues_;
00249     };
00250 
00251 }
00252 }

Generated on Mon May 21 03:32:17 2012 for openWNS by  doxygen 1.5.5