![]() |
User Manual, Developers Guide and API Documentation |
![]() |
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_FRAME_DLMAPCOLLECTOR_H 00027 #define WIMAC_FRAME_DLMAPCOLLECTOR_H 00028 00029 #include <WNS/scheduler/MapInfoProviderInterface.hpp> 00030 00031 #include <WNS/ldk/ldk.hpp> 00032 #include <WNS/ldk/fcf/CompoundCollector.hpp> 00033 #include <WNS/ldk/tools/UpUnconnectable.hpp> 00034 #include <WNS/events/CanTimeout.hpp> 00035 00036 #include <WIMAC/frame/MapCommand.hpp> 00037 #include <WIMAC/frame/ULMapCollector.hpp> 00038 00039 namespace wimac { 00040 class Component; 00041 class PhyUser; 00042 namespace service { 00043 class ConnectionManager; 00044 } 00045 namespace scheduler { 00046 class Scheduler; 00047 } 00048 00049 namespace frame { 00050 00051 00052 typedef MapCommand DLMapCommand; 00053 00057 class DLMapCollector : 00058 public wns::ldk::fcf::CompoundCollector, 00059 public wns::ldk::CommandTypeSpecifier<DLMapCommand>, 00060 public wns::ldk::HasConnector<>, 00061 public wns::ldk::HasReceptor<>, 00062 public wns::Cloneable<DLMapCollector>, 00063 public wns::events::CanTimeout, 00064 public wns::ldk::tools::UpUnconnectable, 00065 virtual public wimac::frame::MapHandlerInterface 00066 { 00067 public: 00068 /*MapHandlerInterface begin */ 00069 virtual bool 00070 resourcesGranted() 00071 { 00072 assure(0, "not to be called"); return false; 00073 } 00074 virtual wns::scheduler::SchedulingMapPtr 00075 getMasterMapForSlaveScheduling() 00076 { 00077 assure(0, "not to be called"); 00078 return wns::scheduler::SchedulingMapPtr(); 00079 }; 00080 /*MapHandlerInterface end*/ 00081 00082 DLMapCollector( wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config ); 00083 00084 void onFUNCreated(); 00085 00086 void calculateSizes( const wns::ldk::CommandPool* commandPool, Bit& commandPoolSize, Bit& dataSize ) const; 00087 00088 void doOnData( const wns::ldk::CompoundPtr& ); 00089 00090 void doStart(int); 00091 00092 void doStartCollection(int){} 00093 void finishCollection(){} 00094 00095 void onTimeout(); 00096 00097 wns::simulator::Time getCurrentDuration() const; 00098 00099 00105 wns::simulator::Time getDLPhaseDuration() const { return dlPhaseDuration_; } 00106 00107 private: 00108 wimac::scheduler::Scheduler* dlScheduler_; 00109 std::string dlSchedulerName_; 00110 wimac::Component* component_; 00111 wimac::PhyUser* phyUser_; 00112 wns::SmartPtr<const wns::service::phy::phymode::PhyModeInterface> phyMode; 00113 00114 // members that are only used by the receiving MapCollector 00115 wimac::service::ConnectionManager* connectionManager_; 00116 wns::simulator::Time dlPhaseDuration_; 00117 }; 00118 } 00119 } 00120 #endif 00121
1.5.5