![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /****************************************************************************** 00002 * WiMeMac * 00003 * This file is part of openWNS (open Wireless Network Simulator) 00004 * _____________________________________________________________________________ 00005 * 00006 * Copyright (C) 2004-2011 00007 * Chair of Communication Networks (ComNets) 00008 * Kopernikusstr. 5, D-52074 Aachen, Germany 00009 * phone: ++49-241-80-27910, 00010 * fax: ++49-241-80-22242 00011 * email: info@openwns.org 00012 * www: http://www.openwns.org 00013 * _____________________________________________________________________________ 00014 * 00015 * openWNS is free software; you can redistribute it and/or modify it under the 00016 * terms of the GNU Lesser General Public License version 2 as published by the 00017 * Free Software Foundation; 00018 * 00019 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00020 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00021 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00022 * details. 00023 * 00024 * You should have received a copy of the GNU Lesser General Public License 00025 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00026 * 00027 ******************************************************************************/ 00028 00029 #ifndef WIMEMAC_PHYUSER_ACCESSFUNC 00030 #define WIMEMAC_PHYUSER_ACCESSFUNC 00031 00032 #include <WNS/ldk/Compound.hpp> 00033 #include <WNS/service/phy/ofdma/Pattern.hpp> 00034 #include <WNS/Cloneable.hpp> 00035 #include <WNS/logger/Logger.hpp> 00036 00037 namespace wns { namespace node { 00038 class Interface; 00039 }} 00040 00041 namespace wimemac { namespace convergence { 00042 class IPhyServices; 00043 00047 class OFDMAAccessFunc: 00048 public virtual wns::CloneableInterface 00049 { 00050 public: 00051 virtual void operator()(IPhyServices*, const wns::ldk::CompoundPtr& compound) = 0; 00052 virtual ~OFDMAAccessFunc(){} 00053 OFDMAAccessFunc(): 00054 transmissionStart(-1.0), 00055 transmissionStop(-1.0), 00056 subBand(0) 00057 {} 00058 double transmissionStart; 00059 double transmissionStop; 00060 int subBand; 00061 }; 00062 00063 class BroadcastOFDMAAccessFunc: 00064 public OFDMAAccessFunc, 00065 public wns::Cloneable<BroadcastOFDMAAccessFunc> 00066 { 00067 public: 00068 virtual void operator()(IPhyServices*, const wns::ldk::CompoundPtr&); 00069 }; 00070 00071 class OmniUnicastOFDMAAccessFunc: 00072 public OFDMAAccessFunc, 00073 public wns::Cloneable<OmniUnicastOFDMAAccessFunc> 00074 { 00075 public: 00076 virtual void operator()(IPhyServices*, const wns::ldk::CompoundPtr&); 00077 wns::node::Interface* destination; 00078 }; 00079 00080 /******************* Events ********************/ 00081 00082 class StopTransmission 00083 { 00084 public: 00085 StopTransmission( IPhyServices* phyUser_, const wns::ldk::CompoundPtr& compound_, int subBand_ = 0) : 00086 phyUser( phyUser_ ), 00087 compound( compound_ ), 00088 subBand( subBand_ ) 00089 {} 00090 00091 void operator()(); 00092 00093 private: 00094 IPhyServices* phyUser; 00095 wns::ldk::CompoundPtr compound; 00096 int subBand; 00097 }; 00098 00099 class StartBroadcastTransmission 00100 { 00101 public: 00102 StartBroadcastTransmission( IPhyServices* phyUser_, 00103 const wns::ldk::CompoundPtr& compound_, 00104 int subBand_ = 0): 00105 phyUser( phyUser_ ), 00106 compound( compound_ ), 00107 subBand( subBand_ ) 00108 {} 00109 00110 void operator()(); 00111 00112 protected: 00113 IPhyServices* phyUser; 00114 wns::ldk::CompoundPtr compound; 00115 int subBand; 00116 }; 00117 00118 class StartTransmission 00119 { 00120 public: 00121 StartTransmission( IPhyServices* phyUser_, const wns::ldk::CompoundPtr& compound_, 00122 wns::node::Interface* dstStation_, int subBand_ = 0 00123 ) : 00124 phyUser( phyUser_ ), 00125 compound( compound_ ), 00126 dstStation( dstStation_ ), 00127 subBand( subBand_ ) 00128 {} 00129 00130 void operator()(); 00131 00132 protected: 00133 IPhyServices* phyUser; 00134 wns::ldk::CompoundPtr compound; 00135 wns::node::Interface* dstStation; 00136 int subBand; 00137 }; 00138 } // convergence 00139 } // wimemac 00140 00141 #endif
1.5.5