![]() |
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 * 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_MAPINFOENTRY_H 00029 #define WNS_SCHEDULER_MAPINFOENTRY_H 00030 00031 #include <WNS/scheduler/SchedulerTypes.hpp> 00032 #include <WNS/service/phy/phymode/PhyModeInterface.hpp> 00033 #include <WNS/service/phy/ofdma/Pattern.hpp> 00034 #include <WNS/CandI.hpp> 00035 #include <WNS/ldk/Compound.hpp> 00036 #include <WNS/SmartPtr.hpp> 00037 #include <WNS/PowerRatio.hpp> 00038 #include <WNS/IOutputStreamable.hpp> 00039 #include <WNS/scheduler/SchedulerTypes.hpp> 00040 #include <list> 00041 00042 namespace wns { namespace node { 00043 class Interface; 00044 }} 00045 00046 namespace wns { namespace scheduler { 00047 00048 typedef std::list<wns::ldk::CompoundPtr> CompoundList; 00049 const int undefinedTime = -1.0; 00050 00053 class MapInfoEntry 00054 : virtual public wns::RefCountable, 00055 public wns::IOutputStreamable 00056 { 00057 public: 00058 MapInfoEntry(); 00059 ~MapInfoEntry(); 00061 virtual std::string doToString() const; 00062 std::string toString() const; 00064 simTimeType start; 00066 simTimeType end; 00068 //simTimeType compoundDuration; 00071 UserID user; 00072 UserID sourceUser; 00074 int frameNr; 00076 int subBand; 00078 int timeSlot; 00080 int spatialLayer; 00082 wns::Power txPower; 00084 wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr; 00086 wns::service::phy::ofdma::PatternPtr pattern; 00088 ChannelQualityOnOneSubChannel estimatedCQI; 00090 wns::scheduler::CompoundList compounds; 00091 }; // MapInfoEntry 00092 00094 typedef SmartPtr<MapInfoEntry> MapInfoEntryPtr; 00096 typedef std::list<MapInfoEntryPtr> MapInfoCollectionList; // <- cannot make SmartPtr of that 00098 class MapInfoCollection 00099 : virtual public wns::RefCountable, 00100 public MapInfoCollectionList // std::list<MapInfoEntryPtr> 00101 { 00102 public: 00103 MapInfoCollection() {}; 00104 ~MapInfoCollection() {}; 00109 virtual void join(const MapInfoCollection& otherList); 00110 }; 00112 typedef SmartPtr<MapInfoCollection> MapInfoCollectionPtr; 00113 00115 inline std::string 00116 printMapInfoCollection(const MapInfoCollectionPtr bursts) 00117 { 00118 std::stringstream s; 00119 int b = 1; 00120 s << "MapInfoCollection:"<<std::endl; 00121 for ( MapInfoCollection::const_iterator iter = bursts->begin(); iter != bursts->end(); ++iter ) 00122 { 00123 s << "### BurstNr: " << b++; 00124 s << " (Ptr=" << iter->getPtr() << ")"; 00125 s << (*iter)->toString(); 00126 } 00127 return s.str(); 00128 } // printMapInfoCollection() 00129 00131 inline std::string 00132 printMapInfoCollection(const MapInfoCollection& bursts) 00133 { 00134 std::stringstream s; 00135 int b = 1; 00136 s << "MapInfoCollection:"<<std::endl; 00137 for ( MapInfoCollection::const_iterator iter = bursts.begin(); iter != bursts.end(); ++iter ) 00138 { 00139 s << "### BurstNr: " << b++; 00140 s << " (Ptr=" << iter->getPtr() << ")"; 00141 s << (*iter)->toString(); 00142 } 00143 return s.str(); 00144 } // printMapInfoCollection() 00145 }} 00146 00147 #endif 00148 00149
1.5.5