User Manual, Developers Guide and API Documentation

RegistryProxyWiMAC.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 WIMAC_SCHEDULER_REGISTRYPROXYWIMAC_HPP
00029 #define WIMAC_SCHEDULER_REGISTRYPROXYWIMAC_HPP
00030 
00031 #include <WIMAC/services/ConnectionManager.hpp>
00032 #include <WIMAC/ConnectionIdentifier.hpp>
00033 #include <WIMAC/Component.hpp>
00034 #include <WIMAC/Logger.hpp>
00035 #include <WNS/scheduler/RegistryProxyInterface.hpp>
00036 #include <WNS/service/dll/StationTypes.hpp>
00037 #include <WNS/service/phy/phymode/PhyModeMapperInterface.hpp>
00038 #include <WNS/StaticFactory.hpp>
00039 
00040 
00041 namespace wimac {
00042 
00043     namespace frame {
00044         class MapHandlerInterface;
00045     }
00046     namespace scheduler {
00047 
00048     class Scheduler;
00050     class RegistryProxyWiMAC
00051         : public wns::scheduler::RegistryProxyInterface
00052     {
00053     public:
00054         RegistryProxyWiMAC(wns::ldk::fun::FUN*, const wns::pyconfig::View&);
00055         ~RegistryProxyWiMAC() {}
00056 
00057 
00058         wns::scheduler::UserID getUserForCID(wns::scheduler::ConnectionID cid);
00059         virtual wns::service::dll::UnicastAddress getPeerAddressForCID(wns::scheduler::ConnectionID cid);
00060         wns::scheduler::ConnectionVector getConnectionsForUser(const wns::scheduler::UserID user);
00061         float getMinTPForCID(wns::scheduler::ConnectionID cid);
00062         float getMaxDelayForCID(wns::scheduler::ConnectionID cid);
00063         wns::Ratio getMinSIRForCID(wns::scheduler::ConnectionID cid);
00064         wns::scheduler::ConnectionID getCIDforPDU(const wns::ldk::CompoundPtr& compound);
00065         void setFriends( const wns::ldk::CommandTypeSpecifierInterface* _classifier );
00066         void setFUN(const wns::ldk::fun::FUN* _fun);
00067         std::string getNameForUser(const wns::scheduler::UserID user);
00068         wns::service::phy::phymode::PhyModeMapperInterface* getPhyModeMapper() const;
00069         wns::SmartPtr<const wns::service::phy::phymode::PhyModeInterface> getBestPhyMode(const wns::Ratio&);
00070         wns::scheduler::UserID getMyUserID();
00071         simTimeType getOverhead(int numBursts);
00072         wns::scheduler::ChannelQualityOnOneSubChannel estimateTxSINRAt(
00073             const wns::scheduler::UserID user, int slot);
00074         wns::scheduler::ChannelQualityOnOneSubChannel estimateRxSINROf(
00075             const wns::scheduler::UserID user, int slot);
00076         wns::Power estimateInterferenceStdDeviation(const wns::scheduler::UserID user);
00077         wns::scheduler::Bits getQueueSizeLimitPerConnection();
00078         int getStationType(const wns::scheduler::UserID user);
00079         virtual wns::scheduler::UserSet filterReachable( wns::scheduler::UserSet users ); // soon obsolete
00080         virtual wns::scheduler::UserSet filterReachable( wns::scheduler::UserSet users, const int frameNr );
00081         virtual wns::scheduler::ConnectionSet filterReachable(wns::scheduler::ConnectionSet connections, const int frameNr, bool useHARQ );
00082         virtual wns::scheduler::PowerMap calcULResources(const wns::scheduler::UserSet&, unsigned long int) const;
00083         virtual wns::scheduler::UserSet getActiveULUsers() const;
00085         virtual int getTotalNumberOfUsers(const wns::scheduler::UserID user);
00086         void switchFilterTo(int qos);
00087 
00090         virtual wns::scheduler::ChannelQualitiesOnAllSubBandsPtr
00091         getChannelQualities4UserOnUplink(wns::scheduler::UserID user, int frameNr);
00092         virtual wns::scheduler::ChannelQualitiesOnAllSubBandsPtr
00093         getChannelQualities4UserOnDownlink(wns::scheduler::UserID user, int frameNr);
00094 
00096       virtual void
00097       registerCID(wns::scheduler::ConnectionID cid, wns::scheduler::UserID userID/*nextHop!*/) {};
00098 
00100       virtual void
00101       deregisterCID(wns::scheduler::ConnectionID cid, const wns::scheduler::UserID userID) {};
00102 
00104       virtual void
00105       deregisterUser(const wns::scheduler::UserID userID) {};
00106 
00107         virtual wns::scheduler::PowerCapabilities
00108         getPowerCapabilities(const wns::scheduler::UserID user) const;
00109 
00110         virtual wns::scheduler::PowerCapabilities
00111         getPowerCapabilities() const;
00112 
00114         int
00115         getNumberOfQoSClasses();
00117         virtual int
00118         getNumberOfPriorities();
00119 
00121         virtual wns::scheduler::ConnectionList&
00122         getCIDListForPriority(int priority);
00123 
00124         virtual wns::scheduler::ConnectionSet
00125         getConnectionsForPriority(int priority);
00126 
00127       // added to RegistryProxyInterface
00128       //const wns::service::phy::phymode::PhyModeInterfacePtr
00129       //getPhyMode(wns::scheduler::ConnectionID /*cid*/);
00130 
00131       int
00132       getPriorityForConnection(wns::scheduler::ConnectionID /*cid*/);
00133 
00134       //std::string
00135       //compoundInfo(const wns::ldk::CompoundPtr& /*compound*/);
00136 
00137       bool
00138       getDL() const;
00139 
00140       virtual bool
00141       getCQIAvailable() const;
00142 
00143     protected:
00144         wns::ldk::fun::FUN* fun;
00145         wimac::Component* layer2;
00146         service::ConnectionManager* connManager;
00147 
00149         std::map<wns::scheduler::UserID, ConnectionIdentifier::StationID> userId2StationId;
00150 
00151         struct {
00152             wns::ldk::CommandTypeSpecifierInterface* classifier;
00153         } friends;
00154 
00155         //std::auto_ptr<wns::service::phy::phymode::PhyModeMapperInterface> phyModeMapper;
00156         wns::service::phy::phymode::PhyModeMapperInterface* phyModeMapper;
00157 
00158         const int queueSize;
00159 
00160         int currentQoSFilter;
00161 
00162     private:
00163         wns::scheduler::UserSet filterListening( wns::scheduler::UserSet users );
00164         wns::scheduler::UserSet filterQoSbased( wns::scheduler::UserSet users );
00165 
00166         wns::scheduler::PowerCapabilities powerUT;
00167         wns::scheduler::PowerCapabilities powerAP;
00168         wns::scheduler::PowerCapabilities powerFRS;
00169 
00170         int numberOfPriorities;
00171         wns::scheduler::ConnectionList cidList;
00172         bool isDL_;
00173         wimac::frame::MapHandlerInterface* mapHandler;
00174     };
00175 
00176 }} // namespace wimac::scheduler
00177 #endif // WIMAC_SCHEDULER_REGISTRYPROXYWIMAC_HPP
00178 
00179 

Generated on Fri May 25 03:32:15 2012 for openWNS by  doxygen 1.5.5