![]() |
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-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 GLUE_CONVERGENCE_LOWER2OFDMAPHY_HPP 00029 #define GLUE_CONVERGENCE_LOWER2OFDMAPHY_HPP 00030 00031 #include <GLUE/convergence/Lower.hpp> 00032 00033 #include <WNS/service/phy/ofdma/DataTransmission.hpp> 00034 #include <WNS/service/phy/ofdma/Notification.hpp> 00035 #include <WNS/service/phy/ofdma/Handler.hpp> 00036 #include <WNS/service/phy/phymode/PhyModeMapperInterface.hpp> 00037 00038 #include <WNS/service/dll/Address.hpp> 00039 00040 #include <map> 00041 00042 namespace glue { namespace convergence { 00043 00044 class Lower2OFDMAPhy: 00045 virtual public Lower, 00046 public wns::ldk::CommandTypeSpecifier<LowerCommand>, 00047 public wns::ldk::HasReceptor<>, 00048 public wns::ldk::HasConnector<>, 00049 public wns::ldk::HasDeliverer<>, 00050 public wns::Cloneable<Lower2OFDMAPhy>, 00051 virtual public wns::service::phy::ofdma::Handler 00052 { 00053 00054 public: 00055 Lower2OFDMAPhy(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config); 00056 virtual ~Lower2OFDMAPhy(); 00057 00058 // wns::service::phy::ofdma::Handler 00059 virtual void 00060 onData(wns::osi::PDUPtr, wns::service::phy::power::PowerMeasurementPtr); 00061 00062 virtual void 00063 setNotificationService(wns::service::Service* phy); 00064 00065 virtual wns::service::phy::ofdma::Notification* 00066 getNotificationService() const; 00067 00068 virtual void 00069 setDataTransmissionService(wns::service::Service* phy); 00070 00071 virtual wns::service::phy::ofdma::DataTransmission* 00072 getDataTransmissionService() const; 00073 00074 virtual void 00075 setMACAddress(const wns::service::dll::UnicastAddress& address); 00076 00077 private: 00078 // CompoundHandlerInterface 00079 virtual void 00080 doSendData(const wns::ldk::CompoundPtr& sdu); 00081 00082 virtual void 00083 doOnData(const wns::ldk::CompoundPtr& compound); 00084 00085 virtual void 00086 onFUNCreated(); 00087 00088 virtual bool 00089 doIsAccepting(const wns::ldk::CompoundPtr& compound) const; 00090 00091 virtual void 00092 doWakeup(); 00093 00094 bool hasCommandOf(FunctionalUnit* routing, const wns::ldk::CompoundPtr& compound) const 00095 { 00096 return getFUN()->getProxy()->commandIsActivated(compound->getCommandPool(), routing); 00097 } 00098 00099 void 00100 stopTransmitting(const wns::ldk::CompoundPtr& compound); 00101 00102 wns::logger::Logger logger_; 00103 00104 struct Friends { 00105 UnicastUpper* unicastRouting; 00106 BroadcastUpper* broadcastRouting; 00107 } friends_; 00108 00109 std::string upperUnicastName_; 00110 std::string upperBroadcastName_; 00111 00112 bool transmitting_; 00113 00114 wns::service::phy::ofdma::DataTransmission* dataTransmission_; 00115 wns::service::phy::ofdma::Notification* notificationService_; 00116 wns::service::dll::UnicastAddress address_; 00117 00118 wns::service::phy::phymode::PhyModeMapperInterface* phyModeMapper_; 00119 }; 00120 } // convergence 00121 } // glue 00122 00123 #endif // NOT defined GLUE_CONVERGENCE_LOWER2OFDMAPHY_HPP 00124 00125
1.5.5