User Manual, Developers Guide and API Documentation

DSAStrategy.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  * 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_STRATEGY_DSASTRATEGY_DSASTRATEGY_HPP
00029 #define WNS_SCHEDULER_STRATEGY_DSASTRATEGY_DSASTRATEGY_HPP
00030 
00031 #include <WNS/scheduler/strategy/dsastrategy/DSAStrategyInterface.hpp>
00032 #include <WNS/scheduler/strategy/StrategyInterface.hpp>
00033 #include <WNS/scheduler/strategy/SchedulerState.hpp>
00034 #include <WNS/scheduler/SchedulerTypes.hpp>
00035 #include <WNS/scheduler/RegistryProxyInterface.hpp>
00036 #include <WNS/logger/Logger.hpp>
00037 #include <string>
00038 #include <vector>
00039 
00040 namespace wns { namespace scheduler { namespace strategy { namespace dsastrategy {
00044                 class DSAStrategy :
00045             virtual public DSAStrategyInterface
00046                 {
00047                 public:
00048                     DSAStrategy(const wns::pyconfig::View& config);
00049                     virtual ~DSAStrategy();
00050 
00052                     virtual void setColleagues(RegistryProxyInterface* _registry);
00053 
00056                     virtual void initialize(SchedulerStatePtr schedulerState,
00057                                             SchedulingMapPtr schedulingMap);
00058 
00062                     virtual simTimeType
00063                     getCompoundDuration(RequestForResource& request) const;
00064 
00066                     int
00067                     getSpatialLayerForSubChannel(int subChannel,
00068                                          int timeSlot,
00069                                          RequestForResource& request,
00070                                          SchedulerStatePtr schedulerState,
00071                                          SchedulingMapPtr schedulingMap) const;
00072 
00074                     virtual bool
00075                     channelIsUsable(int subChannel,
00076                                     int timeSlot,
00077                                     int spatialLayer,
00078                                     RequestForResource& request,
00079                                     SchedulerStatePtr schedulerState,
00080                                     SchedulingMapPtr schedulingMap) const;
00081 
00083                     virtual bool
00084                     channelIsUsable(int subChannel,
00085                                     int timeSlot,
00086                                     RequestForResource& request,
00087                                     SchedulerStatePtr schedulerState,
00088                                     SchedulingMapPtr schedulingMap) const;
00089 
00090                 protected:
00091                     wns::logger::Logger logger;
00092                     struct Colleagues {
00093                         Colleagues() {registry=NULL;};
00094                         RegistryProxyInterface* registry;
00095                     } colleagues;
00096 
00097                 protected:
00099                     bool oneUserOnOneSubChannel;
00101                     bool adjacentSubchannelsOnUplink;
00103                     double highestDataRatePerSubChannel;
00105                     wns::service::phy::phymode::PhyModeMapperInterface* phyModeMapper;
00107                     wns::scheduler::UserID myUserID;
00108                 private:
00109                     std::string dsastrategyName;
00110                 };
00111             }}}} // namespace wns::scheduler::strategy::dsastrategy
00112 #endif //  WNS_SCHEDULER_DSASTRATEGY_DSASTRATEGY_HPP

Generated on Wed May 23 03:31:49 2012 for openWNS by  doxygen 1.5.5