![]() |
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 OFDMAPHY_SCANNER_HPP 00029 #define OFDMAPHY_SCANNER_HPP 00030 00031 #include <OFDMAPHY/receiver/Receiver.hpp> 00032 00033 #include <RISE/antenna/Antenna.hpp> 00034 #include <RISE/stations/station.hpp> 00035 #include <RISE/manager/systemmanager.hpp> 00036 00037 #include <WNS/node/component/Component.hpp> 00038 #include <WNS/logger/Logger.hpp> 00039 #include <WNS/PositionObserver.hpp> 00040 #include <WNS/probe/bus/ContextCollector.hpp> 00041 00042 namespace ofdmaphy { 00043 00044 class Scanner: 00045 public rise::Station, 00046 public wns::node::component::Component 00047 { 00048 typedef rise::BroadcastTransmissionObjectPtr Broadcast; 00049 00050 class Receiver : 00051 public ofdmaphy::receiver::Receiver 00052 { 00053 typedef std::list<rise::TransmissionObjectPtr> TOList; 00054 public: 00055 Receiver(const wns::pyconfig::View& config, Scanner* s); 00056 00057 virtual 00058 ~Receiver(); 00059 00060 virtual void 00061 notify(rise::TransmissionObjectPtr to); 00062 00063 virtual void 00064 positionChanged(); 00065 00066 virtual wns::Power 00067 getRxPower(const rise::TransmissionObjectPtr& to); 00068 00069 virtual wns::service::phy::ofdma::PatternPtr 00070 getCurrentReceivePattern(const rise::TransmissionObjectPtr&); 00071 00072 void 00073 initProbes(const wns::pyconfig::View&); 00074 00075 void 00076 setMargin(wns::Ratio margin); 00077 00078 int 00079 getBSID(); 00080 private: 00081 Scanner* scanner; 00082 00083 wns::Ratio margin; 00084 00085 TOList transmissions; 00086 00087 int bsID; 00088 00089 wns::probe::bus::ContextCollectorPtr rxpContextCollector; 00090 wns::probe::bus::ContextCollectorPtr sinrContextCollector; 00091 wns::probe::bus::ContextCollectorPtr pathlossContextCollector; 00092 wns::probe::bus::ContextCollectorPtr maxRxpContextCollector; 00093 wns::probe::bus::ContextCollectorPtr maxSINRContextCollector; 00094 wns::probe::bus::ContextCollectorPtr minPathlossContextCollector; 00095 wns::probe::bus::ContextCollectorPtr distanceContextCollector; 00096 }; 00097 00098 public: 00099 Scanner(wns::node::Interface* node, const wns::pyconfig::View& pyConfigView); 00100 00101 virtual 00102 ~Scanner(); 00103 00104 virtual void 00105 onNodeCreated(); 00106 00107 virtual void 00108 onWorldCreated(); 00109 00110 virtual void 00111 onShutdown(); 00112 00113 virtual rise::SystemManager* 00114 getSystemManager() const; 00115 00116 virtual wns::node::Interface* 00117 getMyNode() const; 00118 00119 private: 00120 virtual void receiveData(wns::osi::PDUPtr, wns::Power, wns::Power, wns::Ratio) 00121 { 00122 } 00123 00124 virtual void 00125 doStartup(); 00126 00127 wns::logger::Logger logger; 00128 rise::SystemManager* systemManager; 00129 Receiver* receiver; 00130 }; 00131 } // ofdmaphy 00132 00133 #endif // NOT defined OFDMAPHY_SENDER_HPP 00134 00135
1.5.5