User Manual, Developers Guide and API Documentation

Callback.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_CALLBACK_HPP
00027 #define WIMAC_SCHEDULER_CALLBACK_HPP
00028 
00029 #include <queue>
00030 
00031 #include <WNS/scheduler/CallBackInterface.hpp>
00032 #include <WNS/scheduler/harq/HARQInterface.hpp>
00033 #include <WNS/probe/bus/ContextCollector.hpp> 
00034 
00035 namespace wns { namespace scheduler {
00036     class RegistryProxyInterface;
00037 }}
00038 
00039 namespace wimac {
00040     class PhyUser;
00041 }
00042 
00043 namespace wimac { namespace scheduler {
00044 
00045     class Callback :
00046         public virtual wns::scheduler::CallBackInterface
00047     {
00048     public:
00049         Callback(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config);
00050 
00051         virtual void setColleagues(wns::scheduler::RegistryProxyInterface* registry,
00052             wns::scheduler::harq::HARQInterface* harq);
00053 
00057         virtual void 
00058         deliverNow(wns::ldk::Connector*) = 0;
00059 
00060     protected:
00061         struct {
00062             wns::scheduler::RegistryProxyInterface* registry;
00063             wns::scheduler::harq::HARQInterface* harq;
00064         } colleagues;
00065 
00066         struct {
00067             wimac::PhyUser* phyUser;
00068         } friends_;
00069 
00070         std::queue<wns::ldk::CompoundPtr> scheduledPDUs;
00071 
00072         wns::simulator::Time lastScheduling_;
00073         wns::probe::bus::ContextCollectorPtr frameOffsetDelayProbe_;
00074         wns::probe::bus::ContextCollectorPtr transmissionDelayProbe_;
00075         wns::probe::bus::ContextCollectorPtr scheduleStartProbe_;
00076         wns::probe::bus::ContextCollectorPtr scheduleStopProbe_;
00077 
00078     public:
00079         void
00080         probeScheduleStart(int timeSlot, int subChannel, int beam, int userID);
00081 
00082         void
00083         probeScheduleStop(int timeSlot, int subChannel, int beam, int userID);
00084 
00085     };
00086 
00087     typedef wns::ldk::FUNConfigCreator<Callback> CallbackCreator;
00088     typedef wns::StaticFactory<CallbackCreator> CallbackFactory;
00089 }}
00090 
00091 #endif
00092 
00093 

Generated on Tue May 22 03:32:10 2012 for openWNS by  doxygen 1.5.5