User Manual, Developers Guide and API Documentation

Interface.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 
00026 #ifndef WIMAC_SCHEDULER_SCHEDULERINTERFACE_HPP
00027 #define WIMAC_SCHEDULER_SCHEDULERINTERFACE_HPP
00028 
00029 #include <WNS/ldk/Compound.hpp>
00030 #include <WNS/ldk/FUNConfigCreator.hpp>
00031 #include <WNS/StaticFactory.hpp>
00032 #include <WNS/scheduler/queue/QueueInterface.hpp>
00033 #include <WNS/scheduler/harq/HARQInterface.hpp>
00034 #include <WIMAC/FUConfigCreator.hpp>
00035 #include <WIMAC/scheduler/RegistryProxyWiMAC.hpp>
00036 
00037 namespace wns {
00038 namespace ldk {
00039 
00040 class Connector;
00041 class Receptor;
00042 
00043 namespace fun {
00044 
00045 class FUN;
00046 
00047 }
00048 }
00049 }
00050 
00051 namespace wimac {
00052     namespace scheduler {
00053 
00054         class Interface {
00055         public:
00056             virtual ~Interface() {}
00057 
00058 
00062             bool isAccepting(const wns::ldk::CompoundPtr& compound) const
00063             {
00064                 return doIsAccepting(compound);
00065             }
00066 
00070             virtual void schedule(const wns::ldk::CompoundPtr&) = 0;
00071 
00075             virtual void startScheduling() = 0;
00076 
00081             virtual void finishScheduling() = 0;
00082 
00086             virtual void deliverSchedule(wns::ldk::Connector*) = 0;
00087 
00091             virtual void setFUN(wns::ldk::fun::FUN*) = 0;
00092 
00096             virtual void setReceptor(wns::ldk::Receptor*) = 0;
00097 
00101             virtual void setDuration(const wns::simulator::Time&) = 0;
00102 
00106             virtual wns::simulator::Time getDuration() const = 0;
00107 
00111             virtual wns::scheduler::queue::QueueInterface* 
00112             getQueue() const = 0;
00113 
00114             virtual wimac::scheduler::RegistryProxyWiMAC* 
00115             getRegistryProxy() = 0;
00116 
00117             virtual wns::scheduler::harq::HARQInterface*
00118             getHARQ() = 0;
00119 
00120         private:
00121 
00122             virtual bool doIsAccepting(const wns::ldk::CompoundPtr& compound) const = 0;
00123 
00124         };
00125 
00126     typedef wimac::FUConfigCreator<Interface> SchedulerCreator;
00127     typedef wns::StaticFactory<SchedulerCreator> SchedulerFactory;
00128 
00129     }
00130 }
00131 #endif
00132 
00133 
00134 

Generated on Sun May 27 03:31:39 2012 for openWNS by  doxygen 1.5.5