User Manual, Developers Guide and API Documentation

ResourceSchedulerInterface.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-2007
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 LTE_TIMING_RESOURCESCHEDULERINTERFACE_HPP
00029 #define LTE_TIMING_RESOURCESCHEDULERINTERFACE_HPP
00030 
00031 #include <WNS/scheduler/MapInfoEntry.hpp>
00032 #include <WNS/scheduler/SchedulingMap.hpp>
00033 #include <WNS/service/phy/power/PowerMeasurement.hpp>
00034 
00035 namespace lte { namespace timing {
00036 
00038     class SchedulerCommand :
00039     public wns::ldk::Command
00040      {
00041      public:
00042           SchedulerCommand()
00043               {
00044              }
00045   
00046           SchedulerCommand(const SchedulerCommand& other)
00047              {
00048                  local.distance = other.local.distance;
00049                  local.subBand = other.local.subBand;
00050                  local.phyMeasurementPtr = other.local.phyMeasurementPtr;
00051                  if (other.magic.burst == wns::scheduler::MapInfoEntryPtr())
00052                  {
00053                      magic.burst = other.magic.burst;
00054                  }
00055                  else
00056                  {
00057                      magic.burst = wns::scheduler::MapInfoEntryPtr(
00058                          new  wns::scheduler::MapInfoEntry(*other.magic.burst));
00059                  }
00060                  if (other.magic.schedulingTimeSlotPtr == wns::scheduler::SchedulingTimeSlotPtr())
00061                  {
00062                      magic.schedulingTimeSlotPtr = other.magic.schedulingTimeSlotPtr;
00063                  }
00064                  else
00065                  {
00066                      magic.schedulingTimeSlotPtr = wns::scheduler::SchedulingTimeSlotPtr(
00067                          new  wns::scheduler::SchedulingTimeSlot(*other.magic.schedulingTimeSlotPtr));
00068                  }
00069              }
00070  
00071          virtual ~SchedulerCommand() {}
00072 
00073          struct Local{
00074              double distance;
00075              int subBand;
00076              wns::service::phy::power::PowerMeasurementPtr phyMeasurementPtr;
00077          };
00078  
00079          struct Peer {};
00080  
00085          struct Magic
00086          {
00091              wns::scheduler::MapInfoEntryPtr burst;
00092  
00098              wns::scheduler::SchedulingTimeSlotPtr schedulingTimeSlotPtr;
00099          };
00100  
00101          Local local;
00102  
00103          Peer peer;
00104  
00105          Magic magic;
00106     };
00107 
00108     class SchedulerOutgoing
00109     {
00110     public:
00111 
00117         virtual void
00118         finishCollection(int frameNr, simTimeType _startTime) = 0;
00119     };
00120 
00121     class SchedulerIncoming
00122     {
00123     public:
00124 
00125         virtual void deliverReceived() = 0;
00126 
00127     virtual void
00128     sendPendingHARQFeedback() = 0;
00129 
00130     };
00131 
00132     class MasterScheduler :
00133         virtual public SchedulerOutgoing,
00134         virtual public SchedulerIncoming
00135     {
00136     public:
00137 
00141         virtual void
00142         startCollection(int frameNr) = 0;
00143 
00144         virtual void
00145         resetHARQScheduledPeerRetransmissions() = 0;
00146     };
00147 
00148     class SlaveScheduler :
00149         virtual protected SchedulerOutgoing,
00150         virtual public SchedulerIncoming
00151     {
00152     public:
00153 
00158         virtual void
00159         startCollection(int frameNr) = 0;
00160     };
00161 
00165     class SchedulerFUInterface
00166     {
00167     public:
00168 
00172         virtual void
00173         onNodeCreated() = 0;
00174     };
00175 } }
00176 
00177 
00178 #endif // NOT defined LTE_TIMING_RESOURCESCHEDULERINTERFACE
00179 
00180 

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